调试接口

This commit is contained in:
wangxiaowei
2025-12-20 22:44:12 +08:00
parent fc3072980c
commit a2f1023de8
32 changed files with 982 additions and 483 deletions

View File

@ -48,6 +48,13 @@
// 服务协议条款
const agree = ref<boolean>(false)
const redirectUrl = ref<string>('')
onLoad((args) => {
console.log("🚀 ~ login args:", args)
redirectUrl.value = args.redirect || ''
})
const Login = {
// 获取手机号
handleLogin: async (e: object) => {
@ -55,13 +62,27 @@
toast.info('请同意服务协议和隐私政策')
return
}
const userStore = useUserStore()
const res = await userStore.wxLogin()
if (res) {
toast.info('登录成功')
router.navigateBack(1, 500)
uni.showLoading({
title: '登录中...',
mask: true
})
try {
const userStore = useUserStore()
const res = await userStore.wxLogin()
uni.hideLoading()
if (res) {
toast.info('登录成功')
if (redirectUrl.value) {
router.redirectTo(redirectUrl.value)
} else {
router.navigateBack(1, 500)
}
}
} catch(error) {
uni.hideLoading()
}
},
// 手机登录