generated from chenhao/template-h5
恢复提现入口、abort 请求不再弹 toast、其他小修
- 恢复 Cashout/CashoutRecord/CashoutAccount 路由及 My/Balance 提现入口,去掉 VIP 校验 - 请求被 abort 时保持 pending,不再触发 caller 的 catch 弹 toast - App.vue 未登录不请求微信分享配置 - ResetPwd 手机号校验改用 cellphone 字段并统一 showFailToast - Team 页 active=1 走 referrer 单条数据分支 - 忽略 AGENTS.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
51b2de1192
commit
7083c8d27e
1
.gitignore
vendored
1
.gitignore
vendored
@ -455,3 +455,4 @@ dist-ssr
|
||||
.vite
|
||||
|
||||
claude.md
|
||||
AGENTS.md
|
||||
|
||||
@ -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()) {
|
||||
|
||||
@ -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 });
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -1214,7 +1214,7 @@
|
||||
.mall_page__goods {
|
||||
.box;
|
||||
.box-tb;
|
||||
margin-bottom: 5vw;
|
||||
// margin-bottom: 5vw;
|
||||
|
||||
.van-tabs {
|
||||
font-size: 3.87vw;
|
||||
|
||||
@ -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', {
|
||||
|
||||
@ -228,7 +228,7 @@ export default {
|
||||
isSendCode: false,
|
||||
sendCodeTime: 0,
|
||||
FollowQRCode: '',
|
||||
hide: true,
|
||||
hide: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@ -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'
|
||||
}
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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);
|
||||
}),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user