增加网络波动加载中,增加会员信息扫码充值
This commit is contained in:
@@ -94,7 +94,8 @@
|
||||
</view>
|
||||
<view class="recharge" @tap="$u.debounce(userbalancerechangesub, 500)">立即充值</view>
|
||||
</view>
|
||||
<registermember :memberOpen="infoForn.show" :shopUserInfo="infoForn.shopUserInfo" :detailtype='detailtype'>
|
||||
<registermember :memberOpen="infoForn.show" :shopUserInfo="infoForn.shopUserInfo" :detailtype='detailtype'
|
||||
@emitsmemberOpen="emitsmemberOpen">
|
||||
</registermember>
|
||||
</view>
|
||||
|
||||
@@ -104,7 +105,8 @@
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
onMounted
|
||||
onMounted,
|
||||
getCurrentInstance
|
||||
} from 'vue';
|
||||
import registermember from './components/registermember.vue'
|
||||
|
||||
@@ -113,6 +115,11 @@
|
||||
APIshopUserInfo
|
||||
} from '@/common/api/member.js'
|
||||
|
||||
// 获取全局属性
|
||||
const {
|
||||
proxy
|
||||
} = getCurrentInstance();
|
||||
|
||||
// 状态管理
|
||||
import {
|
||||
Memberpay
|
||||
@@ -194,6 +201,12 @@
|
||||
});
|
||||
}
|
||||
|
||||
const emitsmemberOpen = async () => {
|
||||
asyncshopUserInfo()
|
||||
await paygetActive()
|
||||
// infoForn.show = false
|
||||
}
|
||||
|
||||
// 监听金额修改
|
||||
const amountChange = () => {
|
||||
let item = infoForn.listdata.filter(item => infoForn.amount == item.amount)
|
||||
@@ -212,36 +225,6 @@
|
||||
|
||||
}
|
||||
|
||||
const shopInfo = async () => {
|
||||
let res = await this.api.shopUserInfo({
|
||||
shopId: this.shopId,
|
||||
userId: uni.cache.get('userInfo').id,
|
||||
})
|
||||
if (res.code == 0) {
|
||||
infoForn.shopUserInfo = res.data;
|
||||
uni.cache.remove('memberOpen', this.memberOpen)
|
||||
if (infoForn.shopUserInfo.isVip == 0) {
|
||||
this.memberOpen = true;
|
||||
uni.cache.set('memberOpen', this.memberOpen)
|
||||
}
|
||||
} else {
|
||||
let pages = getCurrentPages()
|
||||
if (pages.length > 1) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
setTimeout(res => {
|
||||
uni.exitMiniProgram({
|
||||
success: function() {
|
||||
console.log('退出小程序成功');
|
||||
},
|
||||
fail: function(err) {
|
||||
console.log('退出小程序失败', err);
|
||||
}
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// * 进入明细\管理
|
||||
const handleClick = (item) => {
|
||||
@@ -268,12 +251,6 @@
|
||||
complete: () => {}
|
||||
})
|
||||
}
|
||||
// 注册会员卡
|
||||
const getRegisterMember = (e) => {
|
||||
infoForn.memberOpen = e;
|
||||
this.shopInfo();
|
||||
this.paygetActive()
|
||||
}
|
||||
|
||||
// 解码
|
||||
const getQueryString = (url, name) => {
|
||||
@@ -319,7 +296,7 @@
|
||||
});
|
||||
return false;
|
||||
}
|
||||
await store.actionspayltPayVip({
|
||||
await store.actionspayltPayVip({
|
||||
shopId: infoForn.shopId,
|
||||
activateId: infoForn.id,
|
||||
shopUserId: infoForn.userInfo.id,
|
||||
@@ -347,6 +324,7 @@
|
||||
|
||||
|
||||
onMounted(async () => {
|
||||
await proxy.$onLaunched;
|
||||
// 获取当前页面栈
|
||||
const pages = getCurrentPages();
|
||||
// 获取当前页面实例
|
||||
|
||||
Reference in New Issue
Block a user