diff --git a/.gitignore b/.gitignore index b2d1342..b824ff1 100644 --- a/.gitignore +++ b/.gitignore @@ -455,3 +455,4 @@ dist-ssr .vite claude.md +AGENTS.md diff --git a/src/App.vue b/src/App.vue index 9e1fb48..99deee3 100644 --- a/src/App.vue +++ b/src/App.vue @@ -70,9 +70,10 @@ export default { }, init() { // 持久请求,避免被路由切换时的 abortAll() 取消 - this.$get('/v1/client/HWxinfoClient/share', undefined, undefined, undefined, true).then(res => { - this.wechatShareInfo = res.data || {} - }) + if (this.$isLogin()) + this.$get('/v1/client/HWxinfoClient/share', undefined, undefined, undefined, true).then(res => { + this.wechatShareInfo = res.data || {} + }) }, updateShare(title, desc, imgUrl) { if (wx && this.$isWechat()) { diff --git a/src/api/http.js b/src/api/http.js index a0134aa..96103de 100644 --- a/src/api/http.js +++ b/src/api/http.js @@ -174,7 +174,7 @@ function fetchWithTimeout(url, options, timeout = DEFAULT_TIMEOUT, persistent = .catch(err => { clearTimeout(timer); if (err.name === 'AbortError') { - reject({ status: 0, message: '请求已取消', data: null, aborted: true }); + // ponytail: 请求取消后保持 pending,让 catch 不触发(避免路由切换时集体弹 toast) return; } reject({ status: 0, message: '网络连接失败', data: null }); diff --git a/src/router.js b/src/router.js index b1d1d59..c1bd39a 100644 --- a/src/router.js +++ b/src/router.js @@ -89,28 +89,28 @@ const routes = [ component: () => import('./views/User/Team.vue'), meta: { title: '我的好友' } }, - // { - // path: '/Cashout', - // name: 'Cashout', - // component: () => import('./views/User/Wallet/Cashout/Cashout.vue'), - // meta: { - // title: '提现', - // } - // }, - // { - // path: '/CashoutRecord', - // name: 'CashoutRecord', - // component: () => import('./views/User/Wallet/Cashout/CashoutRecord.vue'), - // meta: { - // title: '提现记录', - // } - // }, - // { - // path: '/CashoutAccount', - // name: 'CashoutAccount', - // component: () => import('./views/User/Wallet/Cashout/CashoutAccount.vue'), - // meta: { title: '提现账号' } - // }, + { + path: '/Cashout', + name: 'Cashout', + component: () => import('./views/User/Wallet/Cashout/Cashout.vue'), + meta: { + title: '提现', + } + }, + { + path: '/CashoutRecord', + name: 'CashoutRecord', + component: () => import('./views/User/Wallet/Cashout/CashoutRecord.vue'), + meta: { + title: '提现记录', + } + }, + { + path: '/CashoutAccount', + name: 'CashoutAccount', + component: () => import('./views/User/Wallet/Cashout/CashoutAccount.vue'), + meta: { title: '提现账号' } + }, { path: '/Category', diff --git a/src/styles/ch.less b/src/styles/ch.less index 69bf742..e6d1116 100644 --- a/src/styles/ch.less +++ b/src/styles/ch.less @@ -1214,7 +1214,7 @@ .mall_page__goods { .box; .box-tb; - margin-bottom: 5vw; + // margin-bottom: 5vw; .van-tabs { font-size: 3.87vw; diff --git a/src/views/Account/ResetPwd.vue b/src/views/Account/ResetPwd.vue index bba5786..2980739 100644 --- a/src/views/Account/ResetPwd.vue +++ b/src/views/Account/ResetPwd.vue @@ -125,14 +125,8 @@ export default { }, sendCode() { if (this.isSend) return; - if ( - !this.data.Phone || - !/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.data.Phone) - ) { - this.$showToast({ - type: "fail", - message: "手机格式不正确,请检查手机号", - }); + if (!/^1[3-9]\d{9}$/.test(this.data.cellphone)) { + this.$showFailToast('手机格式不正确,请检查手机号'); return; } this.$post('/v1/client/AuthClient/sendcode', { diff --git a/src/views/User/My.vue b/src/views/User/My.vue index 9af8d81..7d7076c 100644 --- a/src/views/User/My.vue +++ b/src/views/User/My.vue @@ -228,7 +228,7 @@ export default { isSendCode: false, sendCodeTime: 0, FollowQRCode: '', - hide: true, + hide: false, } }, methods: { diff --git a/src/views/User/Team.vue b/src/views/User/Team.vue index dd1d426..6d5d956 100644 --- a/src/views/User/Team.vue +++ b/src/views/User/Team.vue @@ -127,7 +127,7 @@ export default { this.$refs.baseList.refresh() }, parseData(res) { - if (this.active === 2) { + if (this.active === 1) { return res.data ? [res.data] : [] } else { return res.data.items || [] @@ -145,8 +145,6 @@ export default { listUrl() { if (this.active === 0) { return '/v1/client/DUsersClient/friend' - } else if (this.active === 1) { - return '/v1/client/DUsersClient/shop' } else { return '/v1/client/DUsersClient/referrer' } diff --git a/src/views/User/Wallet/Balance.vue b/src/views/User/Wallet/Balance.vue index 15a0aca..0b78b5b 100644 --- a/src/views/User/Wallet/Balance.vue +++ b/src/views/User/Wallet/Balance.vue @@ -160,7 +160,7 @@ export default { showTerm: false, list: [], isVIP: '', - hide: true, + hide: false, } }, methods: { @@ -179,13 +179,13 @@ export default { // }) }, toCashout() { - if (this.isVIP === '会员') { - this.$showFailToast('您还未购买礼包产品成为VIP,暂不能提现!') - setTimeout(() => { - // this.$navigate('/My') - }, 1500); - return - } + // if (this.isVIP === '会员') { + // this.$showFailToast('您还未购买礼包产品成为VIP,暂不能提现!') + // setTimeout(() => { + // // this.$navigate('/My') + // }, 1500); + // return + // } this.$navigate('Cashout'); }, onconfirm(value) { diff --git a/src/views/User/Wallet/Cashout/Cashout.vue b/src/views/User/Wallet/Cashout/Cashout.vue index 7f1f80e..8038a58 100644 --- a/src/views/User/Wallet/Cashout/Cashout.vue +++ b/src/views/User/Wallet/Cashout/Cashout.vue @@ -88,12 +88,6 @@ export default { Promise.all([ this.$get('/v1/client/DUsersClient').then(data => { this.wallet.Balance = data.data.zijin; - // if (data.data.userlevelname === '会员') { - // this.$showFailToast('您还未购买礼包产品成为VIP,暂不能提现!') - // setTimeout(() => { - // this.$navigate('/My') - // }, 1500); - // } }).catch(err => { this.$showFailToast(err.message); }),