添加充值功能、优化内容

This commit is contained in:
wangxiaowei
2026-01-10 19:09:01 +08:00
parent d12651fe8a
commit 59859a2363
17 changed files with 959 additions and 105 deletions

View File

@ -89,23 +89,24 @@
handleToLogin: async () => {
// TODO 如果是edit的话就是修改手机号
if (!testMobile(model.mobile)) {
toast.info('请输入正确的账号')
toast.show('请输入正确的账号')
return
}
if (!model.passowrd) {
toast.info('请输入密码')
toast.show('请输入密码')
return
}
uni.showLoading({
title: '登录中...'
toast.loading({
loadingType: 'ring',
loadingColor: '#4C9F44',
msg: '登录中...'
})
try {
const userStore = useUserStore()
const res = await userStore.mobileLogin(model.mobile, model.passowrd, 1, 1, 1)
uni.hideLoading()
toast.close()
// 这里记录用户账号密码,下次自动填充
uni.setStorageSync('loginMobile', model.mobile)
@ -116,11 +117,9 @@
router.reLaunch('/pages/index/index')
}, 1000)
} catch (error) {
toast.info('登录失败,请稍后重试')
uni.hideLoading()
toast.close()
return
}
}
}
</script>