Compare commits

..

3 Commits

3 changed files with 24 additions and 13 deletions

View File

@ -78,6 +78,20 @@ module.exports = vm => {
}) })
}, 1500) }, 1500)
} else if (data.code == 500) { } else if (data.code == 500) {
if (['/member/api/member/get-info'].includes(response?.config?.url)) {
uni.showToast({
title: '登录失败',
icon: 'none',
duration: 800,
})
setTimeout(() => {
uni.reLaunch({
url: '/pages/login/index',
})
}, 800)
removeToken()
return data
}
uni.$u.toast(data.msg) uni.$u.toast(data.msg)
return data return data
} else { } else {

View File

@ -131,15 +131,13 @@ export default {
}, },
methods: { methods: {
setDefaultDateRange() { setDefaultDateRange() {
const end = new Date() const end = dayjs().subtract(1, 'day')
const start = new Date() const start = dayjs().subtract(15, 'day')
end.setDate(end.getDate() - 1) this.startDate = start.format('YYYY-MM-DD')
start.setDate(start.getDate() - 15) // 15 this.endDate = end.format('YYYY-MM-DD')
this.startDate = this.formatDate(start) this.startDateValue = Number(start.toDate())
this.endDate = this.formatDate(end) this.endDateValue = Number(end.toDate())
this.startDateValue = Number(start)
this.endDateValue = Number(end)
}, },
formatDate(date) { formatDate(date) {
return dayjs(date).format('YYYY-MM-DD') return dayjs(date).format('YYYY-MM-DD')

View File

@ -136,10 +136,10 @@
<u-toast ref="uToast"></u-toast> <u-toast ref="uToast"></u-toast>
<!-- 提现引导弹窗 --> <!-- 提现引导弹窗 -->
<WithdrawalGuide <!-- <WithdrawalGuide
:show="showWithdrawalGuide" :show="showWithdrawalGuide"
@confirm="onWithdrawalGuideConfirm" @confirm="onWithdrawalGuideConfirm"
/> /> -->
</view> </view>
</template> </template>
@ -252,12 +252,11 @@ export default {
bal.addWithdraw(this.dataForm).then(res => { bal.addWithdraw(this.dataForm).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.$refs.uToast.show({ this.$refs.uToast.show({
message: res.msg, message: res.msg || '提现成功',
type: 'success', type: 'success',
}) })
//
setTimeout(() => { setTimeout(() => {
this.showWithdrawalGuide = true uni.navigateBack()
}, 300) }, 300)
} }
}) })