|
@@ -344,12 +344,17 @@
|
|
|
uni.$on("refashCart",()=>{
|
|
|
this.cartCount()
|
|
|
})
|
|
|
+ // 刷新抵扣和充值余额
|
|
|
+ uni.$on("refashPayBalance",()=>{
|
|
|
+ this.getPayBalanceAcount()
|
|
|
+ })
|
|
|
},
|
|
|
// 页面卸载
|
|
|
onUnload() {
|
|
|
uni.$off('refashHome')
|
|
|
uni.$off('refashProm')
|
|
|
uni.$off('refashCart')
|
|
|
+ uni.$off('refashPayBalance')
|
|
|
},
|
|
|
onHide() {
|
|
|
// 用户头像
|
|
@@ -381,19 +386,17 @@
|
|
|
watch:{
|
|
|
hasShopiing(a,b){
|
|
|
if(a!=b&&a){
|
|
|
- // 获取抵扣支付权限
|
|
|
- this.getPayBalanceAuth()
|
|
|
- // 抵扣余额,充值余额
|
|
|
- this.getStoreAccount()
|
|
|
+ this.getPayBalanceAcount()
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- // 去认证
|
|
|
- authStore(){
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/storeManage/storeAuth'
|
|
|
- })
|
|
|
+ // 获取抵扣和充值余额
|
|
|
+ getPayBalanceAcount(){
|
|
|
+ // 获取抵扣支付权限
|
|
|
+ this.getPayBalanceAuth()
|
|
|
+ // 抵扣余额,充值余额
|
|
|
+ this.getStoreAccount()
|
|
|
},
|
|
|
// 抵扣余额
|
|
|
getStoreAccount(){
|
|
@@ -402,6 +405,19 @@
|
|
|
this.$store.state.vuex_storeAccount = res.data
|
|
|
})
|
|
|
},
|
|
|
+ // 抵扣支付权限
|
|
|
+ getPayBalanceAuth(){
|
|
|
+ queryBalancePaymentParam({userId:this.userInfo&&this.userInfo.userid}).then(res => {
|
|
|
+ const data = res.data[0]
|
|
|
+ this.$store.state.vuex_showBalanceAuth = data && data.storeParamList&&data.storeParamList[0]&&data.storeParamList[0].paramValue == 1
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 去认证
|
|
|
+ authStore(){
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/storeManage/storeAuth'
|
|
|
+ })
|
|
|
+ },
|
|
|
// 初始化页面
|
|
|
pageInit(flag){
|
|
|
// 已登录
|
|
@@ -412,10 +428,7 @@
|
|
|
this.getStoreShelf(flag)
|
|
|
// 如果已开通商城
|
|
|
if(this.hasShopiing){
|
|
|
- // 获取抵扣支付权限
|
|
|
- this.getPayBalanceAuth()
|
|
|
- // 抵扣余额,充值余额
|
|
|
- this.getStoreAccount()
|
|
|
+ this.getPayBalanceAcount()
|
|
|
}
|
|
|
}else{// 游客
|
|
|
this.getHasShopping()
|
|
@@ -520,13 +533,6 @@
|
|
|
this.getRedPacketRule()
|
|
|
}
|
|
|
},
|
|
|
- // 抵扣支付权限
|
|
|
- getPayBalanceAuth(){
|
|
|
- queryBalancePaymentParam({userId:this.userInfo&&this.userInfo.userid}).then(res => {
|
|
|
- const data = res.data[0]
|
|
|
- this.$store.state.vuex_showBalanceAuth = data && data.storeParamList&&data.storeParamList[0]&&data.storeParamList[0].paramValue == 1
|
|
|
- })
|
|
|
- },
|
|
|
// 显示开通商城的页面
|
|
|
showShopPage(flag){
|
|
|
// 隐藏tab 视频,显示tab购物车
|