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
|
.vite
|
||||||
|
|
||||||
claude.md
|
claude.md
|
||||||
|
AGENTS.md
|
||||||
|
|||||||
@ -70,6 +70,7 @@ export default {
|
|||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
// 持久请求,避免被路由切换时的 abortAll() 取消
|
// 持久请求,避免被路由切换时的 abortAll() 取消
|
||||||
|
if (this.$isLogin())
|
||||||
this.$get('/v1/client/HWxinfoClient/share', undefined, undefined, undefined, true).then(res => {
|
this.$get('/v1/client/HWxinfoClient/share', undefined, undefined, undefined, true).then(res => {
|
||||||
this.wechatShareInfo = res.data || {}
|
this.wechatShareInfo = res.data || {}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -174,7 +174,7 @@ function fetchWithTimeout(url, options, timeout = DEFAULT_TIMEOUT, persistent =
|
|||||||
.catch(err => {
|
.catch(err => {
|
||||||
clearTimeout(timer);
|
clearTimeout(timer);
|
||||||
if (err.name === 'AbortError') {
|
if (err.name === 'AbortError') {
|
||||||
reject({ status: 0, message: '请求已取消', data: null, aborted: true });
|
// ponytail: 请求取消后保持 pending,让 catch 不触发(避免路由切换时集体弹 toast)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
reject({ status: 0, message: '网络连接失败', data: null });
|
reject({ status: 0, message: '网络连接失败', data: null });
|
||||||
|
|||||||
@ -89,28 +89,28 @@ const routes = [
|
|||||||
component: () => import('./views/User/Team.vue'),
|
component: () => import('./views/User/Team.vue'),
|
||||||
meta: { title: '我的好友' }
|
meta: { title: '我的好友' }
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// path: '/Cashout',
|
path: '/Cashout',
|
||||||
// name: 'Cashout',
|
name: 'Cashout',
|
||||||
// component: () => import('./views/User/Wallet/Cashout/Cashout.vue'),
|
component: () => import('./views/User/Wallet/Cashout/Cashout.vue'),
|
||||||
// meta: {
|
meta: {
|
||||||
// title: '提现',
|
title: '提现',
|
||||||
// }
|
}
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// path: '/CashoutRecord',
|
path: '/CashoutRecord',
|
||||||
// name: 'CashoutRecord',
|
name: 'CashoutRecord',
|
||||||
// component: () => import('./views/User/Wallet/Cashout/CashoutRecord.vue'),
|
component: () => import('./views/User/Wallet/Cashout/CashoutRecord.vue'),
|
||||||
// meta: {
|
meta: {
|
||||||
// title: '提现记录',
|
title: '提现记录',
|
||||||
// }
|
}
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// path: '/CashoutAccount',
|
path: '/CashoutAccount',
|
||||||
// name: 'CashoutAccount',
|
name: 'CashoutAccount',
|
||||||
// component: () => import('./views/User/Wallet/Cashout/CashoutAccount.vue'),
|
component: () => import('./views/User/Wallet/Cashout/CashoutAccount.vue'),
|
||||||
// meta: { title: '提现账号' }
|
meta: { title: '提现账号' }
|
||||||
// },
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: '/Category',
|
path: '/Category',
|
||||||
|
|||||||
@ -1214,7 +1214,7 @@
|
|||||||
.mall_page__goods {
|
.mall_page__goods {
|
||||||
.box;
|
.box;
|
||||||
.box-tb;
|
.box-tb;
|
||||||
margin-bottom: 5vw;
|
// margin-bottom: 5vw;
|
||||||
|
|
||||||
.van-tabs {
|
.van-tabs {
|
||||||
font-size: 3.87vw;
|
font-size: 3.87vw;
|
||||||
|
|||||||
@ -125,14 +125,8 @@ export default {
|
|||||||
},
|
},
|
||||||
sendCode() {
|
sendCode() {
|
||||||
if (this.isSend) return;
|
if (this.isSend) return;
|
||||||
if (
|
if (!/^1[3-9]\d{9}$/.test(this.data.cellphone)) {
|
||||||
!this.data.Phone ||
|
this.$showFailToast('手机格式不正确,请检查手机号');
|
||||||
!/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.data.Phone)
|
|
||||||
) {
|
|
||||||
this.$showToast({
|
|
||||||
type: "fail",
|
|
||||||
message: "手机格式不正确,请检查手机号",
|
|
||||||
});
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$post('/v1/client/AuthClient/sendcode', {
|
this.$post('/v1/client/AuthClient/sendcode', {
|
||||||
|
|||||||
@ -228,7 +228,7 @@ export default {
|
|||||||
isSendCode: false,
|
isSendCode: false,
|
||||||
sendCodeTime: 0,
|
sendCodeTime: 0,
|
||||||
FollowQRCode: '',
|
FollowQRCode: '',
|
||||||
hide: true,
|
hide: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@ -127,7 +127,7 @@ export default {
|
|||||||
this.$refs.baseList.refresh()
|
this.$refs.baseList.refresh()
|
||||||
},
|
},
|
||||||
parseData(res) {
|
parseData(res) {
|
||||||
if (this.active === 2) {
|
if (this.active === 1) {
|
||||||
return res.data ? [res.data] : []
|
return res.data ? [res.data] : []
|
||||||
} else {
|
} else {
|
||||||
return res.data.items || []
|
return res.data.items || []
|
||||||
@ -145,8 +145,6 @@ export default {
|
|||||||
listUrl() {
|
listUrl() {
|
||||||
if (this.active === 0) {
|
if (this.active === 0) {
|
||||||
return '/v1/client/DUsersClient/friend'
|
return '/v1/client/DUsersClient/friend'
|
||||||
} else if (this.active === 1) {
|
|
||||||
return '/v1/client/DUsersClient/shop'
|
|
||||||
} else {
|
} else {
|
||||||
return '/v1/client/DUsersClient/referrer'
|
return '/v1/client/DUsersClient/referrer'
|
||||||
}
|
}
|
||||||
|
|||||||
@ -160,7 +160,7 @@ export default {
|
|||||||
showTerm: false,
|
showTerm: false,
|
||||||
list: [],
|
list: [],
|
||||||
isVIP: '',
|
isVIP: '',
|
||||||
hide: true,
|
hide: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -179,13 +179,13 @@ export default {
|
|||||||
// })
|
// })
|
||||||
},
|
},
|
||||||
toCashout() {
|
toCashout() {
|
||||||
if (this.isVIP === '会员') {
|
// if (this.isVIP === '会员') {
|
||||||
this.$showFailToast('您还未购买礼包产品成为VIP,暂不能提现!')
|
// this.$showFailToast('您还未购买礼包产品成为VIP,暂不能提现!')
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
// this.$navigate('/My')
|
// // this.$navigate('/My')
|
||||||
}, 1500);
|
// }, 1500);
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
this.$navigate('Cashout');
|
this.$navigate('Cashout');
|
||||||
},
|
},
|
||||||
onconfirm(value) {
|
onconfirm(value) {
|
||||||
|
|||||||
@ -88,12 +88,6 @@ export default {
|
|||||||
Promise.all([
|
Promise.all([
|
||||||
this.$get('/v1/client/DUsersClient').then(data => {
|
this.$get('/v1/client/DUsersClient').then(data => {
|
||||||
this.wallet.Balance = data.data.zijin;
|
this.wallet.Balance = data.data.zijin;
|
||||||
// if (data.data.userlevelname === '会员') {
|
|
||||||
// this.$showFailToast('您还未购买礼包产品成为VIP,暂不能提现!')
|
|
||||||
// setTimeout(() => {
|
|
||||||
// this.$navigate('/My')
|
|
||||||
// }, 1500);
|
|
||||||
// }
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.$showFailToast(err.message);
|
this.$showFailToast(err.message);
|
||||||
}),
|
}),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user