|
|
|
|
@ -12,13 +12,17 @@ import { cardFactory } from '@/utils/card'
|
|
|
|
|
import { genCard1 } from '@/utils/card2'
|
|
|
|
|
import { genVipCard } from '@/utils/vipcard'
|
|
|
|
|
import { useStore } from 'vuex'
|
|
|
|
|
import { useUserStore } from '@/store/user'
|
|
|
|
|
import { useCardStore } from '@/store/card'
|
|
|
|
|
|
|
|
|
|
const store = useStore()
|
|
|
|
|
const userStore = useUserStore()
|
|
|
|
|
const cardStore = useCardStore()
|
|
|
|
|
|
|
|
|
|
const state = ref({
|
|
|
|
|
// active: 0,
|
|
|
|
|
showCusCard: false,
|
|
|
|
|
card_title: computed(() => store.state.user.userInfo.card_title),
|
|
|
|
|
card_title: computed(() => cardStore.cusCard.card_title),
|
|
|
|
|
vip_card: [],
|
|
|
|
|
flexContent: {},
|
|
|
|
|
})
|
|
|
|
|
@ -28,7 +32,7 @@ const activeName = ref('0');
|
|
|
|
|
let flexRef = ref(null)
|
|
|
|
|
|
|
|
|
|
const userInfo = computed(() => {
|
|
|
|
|
return store.state.user.userInfo
|
|
|
|
|
return userStore.userData
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
onMounted(async () => {
|
|
|
|
|
@ -50,7 +54,7 @@ watch(() => activeName.value, function (newVal, oldVal) {
|
|
|
|
|
}
|
|
|
|
|
}, { immediate: true })
|
|
|
|
|
|
|
|
|
|
watch(() => userInfo.value.cus_card, function (newVal, oldVal) {
|
|
|
|
|
watch(() => cardStore.cusCard.cus_card, function (newVal, oldVal) {
|
|
|
|
|
if (userInfo.value.level > 1 && newVal.length > 0) {
|
|
|
|
|
state.value.showCusCard = true
|
|
|
|
|
}
|
|
|
|
|
@ -169,7 +173,7 @@ function showChangeTpl() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const changeTpl = (val) => {
|
|
|
|
|
store.dispatch('user/setUserTpl', val)
|
|
|
|
|
userStore.setUserTpl(val)
|
|
|
|
|
showDraw.value = false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|