|
@@ -101,16 +101,16 @@ export default {
|
|
// 直接调用 mutation
|
|
// 直接调用 mutation
|
|
const updateProductSpecId = (payload) => store.commit('createOrder/updateProductSpecId', payload)
|
|
const updateProductSpecId = (payload) => store.commit('createOrder/updateProductSpecId', payload)
|
|
|
|
|
|
- const { zhimaReportAccountInfo } = useAccountInfoModel((model) => {
|
|
|
|
- // 非首购、非会员时选中年卡
|
|
|
|
- if (!model.value?.isFirstBuy && !model.value?.inPack) {
|
|
|
|
|
|
+ const { zhimaReportAccountInfo, getAccountInfoModel } = useAccountInfoModel((model) => {
|
|
|
|
+ if (!model.isFirstBuy && !model.inPack) {
|
|
updateProductSpecId(1514)
|
|
updateProductSpecId(1514)
|
|
} else {
|
|
} else {
|
|
updateProductSpecId(1511)
|
|
updateProductSpecId(1511)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
return {
|
|
return {
|
|
- zhimaReportAccountInfo
|
|
|
|
|
|
+ zhimaReportAccountInfo,
|
|
|
|
+ getAccountInfoModel
|
|
}
|
|
}
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
@@ -216,7 +216,7 @@ export default {
|
|
return result
|
|
return result
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- created() {
|
|
|
|
|
|
+ async created() {
|
|
const { buyer } = this.$route.query
|
|
const { buyer } = this.$route.query
|
|
if (buyer) {
|
|
if (buyer) {
|
|
this.info.buyer = buyer
|
|
this.info.buyer = buyer
|
|
@@ -224,8 +224,16 @@ export default {
|
|
this.updateLayout({
|
|
this.updateLayout({
|
|
footerNotice: true
|
|
footerNotice: true
|
|
})
|
|
})
|
|
|
|
+ // 必须等待接口回调
|
|
|
|
+ await this.getAccountInfoModel().then(() => {
|
|
|
|
+ if (!this.useNowState.isFirstBuy && !this.useNowState.inPack) {
|
|
|
|
+ this.updateProductSpecId(1514)
|
|
|
|
+ } else {
|
|
|
|
+ this.updateProductSpecId(1511)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
- mounted() {
|
|
|
|
|
|
+ mounted() {
|
|
this.updatePayAmount()
|
|
this.updatePayAmount()
|
|
this.getUserInfoFun()
|
|
this.getUserInfoFun()
|
|
},
|
|
},
|