修复code二维码长按识别调整开通vip后返回页面

This commit is contained in:
唐明明
2021-09-29 17:53:14 +08:00
parent c0ef649ff5
commit e76c84789b
4 changed files with 26 additions and 12 deletions

View File

@@ -26,9 +26,13 @@
},
created() {
managesCategory().then(res => {
console.log(res)
this.loding = false
this.category = res
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
methods:{

View File

@@ -4,6 +4,7 @@
<swiper class="code-swiper" previous-margin="70rpx" next-margin="70rpx" @change="swiperChange">
<swiper-item v-for="(item, index) in inviteData" :key="index">
<view class="code-item">
<view class="code-lay"></view>
<image class="code-back-image" :src="item.cover" mode="aspectFill"></image>
<view class="codDate">
<view class="codDate-year">
@@ -315,6 +316,12 @@
height: 100%;
width: 100%;
padding: 0 $padding/2;
.code-lay{
position: absolute;
width: 100%;
height: 100%;
z-index: 10;
}
.code-back-image{
width: 100%;
height: 100%;

View File

@@ -236,12 +236,15 @@ export default {
openid: this.$store.getters.getCode
}).then(payConfig => {
wx.chooseWXPay({...payConfig,
success: ()=> {
uni.showToast({
title: '支付成功',
icon: "success"
})
this.idenInfo();
success() {
uni.showModal({
title : '提示',
content : '支付成功,恭喜您成功开通',
cancelColor: '#8b64fd',
success() {
this.$Router.back()
}
})
},
fail(err) {
uni.showToast({

View File

@@ -24,11 +24,11 @@ const router = createRouter({
router.beforeEach((to, from, next) => {
const token = store.getters.getToken || uni.getStorageSync('token')
// 检查是否需要微信授权
if(store.getters.getCode === '' && to.name != 'wxAuth'){
next({
name: 'wxAuth'
})
}
// if(store.getters.getCode === '' && to.name != 'wxAuth'){
// next({
// name: 'wxAuth'
// })
// }
// 检查是否需要登录
if(to.auth && token === ''){
next({