cshenfu
2023-05-29 7b4fb1c7147d366b5d1fb8f32755181cc6fe1a9e
change logout
2个文件已修改
22 ■■■■■ 已修改文件
pages/mine/mine.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/vip/vip.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/mine/mine.vue
@@ -81,7 +81,6 @@
                <view class="flex align-center justify-between solid-bottom margin-left-sm">
                    <view class="title">退出登录</view>
                    <view class="flex align-center">
                        <view class="desc">提问的艺术</view>
                        <u-icon name="error" color="#848B9E" size="16"></u-icon>
                    </view>
                </view>
@@ -325,12 +324,23 @@
                })
            },
            logout() {
                uni.showModal({
                    title: '提示',
                    content: '确定退出登录吗?',
                    success: function (res) {
                        if (res.confirm) {
                uni.removeStorageSync('userInfo')
                uni.removeStorageSync('token')
                this.$store.commit('logout')
                uni.navigateTo({
                    url: this.tabbar.list[0].pagePath
                })
                        } else if (res.cancel) {
                            console.log('用户点击取消');
                        }
                    }.bind(this)//可处理uni.shuowModal的异步(即拿不到data里面数据的解决办法)
                });
            }
        },
    };
pages/vip/vip.vue
@@ -160,20 +160,14 @@
                                    this.$store.commit('syncUserNum',re.data.num)
                                })
                            }
                            console.log('pay r')
                        }, (er) => {
                            console.log(er.msg,"err.msg")
                            // uni.showModal({
                            //     title: "温馨提示",
                            //     content: er.msg
                            // })
                            uni.showToast({
                                title: '支付取消!',
                                icon: "error"
                            })
                            console.log('pay rr')
                        })
                    }else{
                        console.log(this.rechargeOptions[this.current].comb_id)
                        uni.showToast({
                            title: 'PC端用户支付!',
                            icon: "error"
@@ -192,7 +186,7 @@
                    if (!err && payRes.errMsg === "requestPayment:ok") {
                        uni.showModal({
                            title: "温馨提示",
                            content: "权益已开通成功!"
                            content: "权益已开通成功!",
                        })
                        this.$request('/api/Member/checkNum', 'POST',{
                                    comb_id: this.rechargeOptions[this.current].comb_id