From eb97161832d9de4cb589cd3272debb230be797d4 Mon Sep 17 00:00:00 2001 From: zouyanyan <254651820@qq.com> Date: Tue, 1 Sep 2026 17:46:36 +0800 Subject: [PATCH] upbug --- manifest.json | 4 +-- pages/index/index.vue | 14 +++++---- pages/user/set.vue | 70 +++++++++++++++++++++++-------------------- pages/user/user.vue | 4 +-- 4 files changed, 49 insertions(+), 43 deletions(-) diff --git a/manifest.json b/manifest.json index 810f6aa..45e1e9e 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "瑜伽汇", "appid" : "__UNI__B6E0086", "description" : "瑜伽汇", - "versionName" : "1.0.3", - "versionCode" : 103, + "versionName" : "1.0.4", + "versionCode" : 104, "transformPx" : false, "app-plus" : { "flexible" : true, diff --git a/pages/index/index.vue b/pages/index/index.vue index 0779f99..138c45f 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -249,12 +249,14 @@ this.userid = user.userid? user.userid:''; this.phone = user.userphone; if(!this.shopid){ - uni.showModal({ - title: '提示', - content: '请选择门店信息!', - showCancel: false, - confirmText: '确定' - }); + if(this.userid){ + uni.showModal({ + title: '提示', + content: '请选择门店信息!', + showCancel: false, + confirmText: '确定' + }); + } } // 检查网络 diff --git a/pages/user/set.vue b/pages/user/set.vue index e251a0a..96686bd 100644 --- a/pages/user/set.vue +++ b/pages/user/set.vue @@ -40,12 +40,12 @@ --> - - - - - - + + + 账号注销 + + + 关于我们 版本号 {{versionIn}} @@ -176,33 +176,31 @@ uni.showLoading({ title: '账号注销中...' }); - const {data: res} = await uni.$http.post('/Appiso/delBuyerById', {id:this.userid}); - if(res=='1'){ - console.log('账号已注销!') - uni.showToast({ - title: '账号已注销!', - icon: 'success', - duration: 2000 - }); - // 清除登录缓存 + const {data: res} = await uni.$http.get('/api/cancel'); + console.log("账号注销返回",res) + if (res&&res.success) { + // 清除缓存 + myCache('token',''); + myCache('user',''); + myCache('userInfo',''); myCache('phone',''); myCache('openId',''); myCache('userid',''); - myCache('userInfo',''); - myCache('alipayuserInfo',''); - myCache("signtype",'11'); - setTimeout(() => { - // 跳转 我的 - uni.switchTab({ - url: '/pages/user/user' - }); - }, 2000); - } - else if(res=='2'){ - console.log('账号不可注销!') + // 门店信息退出 + myCache('shop',''); + myCache('myshop',''); + myCache('myshopid',''); + myCache('shoplist',''); + + // app清除角标的数量 + //#ifdef APP-PLUS + plus.runtime.setBadgeNumber(-1); + //#endif + uni.showModal({ title: '提示', - content: '当前账号还有订单未完成,账号不可注销!请处理后操作!', + content: '账号已注销!', + cancelText: '取消', confirmText: '确定', success: ress => { if (ress.confirm) { @@ -211,12 +209,18 @@ }); } else{ - uni.showToast({ - title: '账号注销失败!请联系客服后再重试!', - icon: 'error', - duration: 2000 - }) + uni.showModal({ + title: '提示', + content: '账号注销失败!请稍后再试!', + cancelText: '取消', + confirmText: '确定', + success: ress => { + if (ress.confirm) { + } + } + }); } + }, loginout(){ // 退出登录 diff --git a/pages/user/user.vue b/pages/user/user.vue index 556d018..afba326 100644 --- a/pages/user/user.vue +++ b/pages/user/user.vue @@ -164,12 +164,12 @@ {{servers[15].name}} - +