调试接口
This commit is contained in:
@ -51,8 +51,8 @@
|
||||
const redirectUrl = ref<string>('')
|
||||
|
||||
onLoad((args) => {
|
||||
console.log("🚀 ~ login args:", args)
|
||||
redirectUrl.value = args.redirect || ''
|
||||
|
||||
})
|
||||
|
||||
const Login = {
|
||||
@ -72,12 +72,13 @@
|
||||
const res = await userStore.wxLogin()
|
||||
uni.hideLoading()
|
||||
if (res) {
|
||||
toast.info('登录成功')
|
||||
if (redirectUrl.value) {
|
||||
router.redirectTo(redirectUrl.value)
|
||||
} else {
|
||||
router.navigateBack(1, 500)
|
||||
const decoded = decodeURIComponent(redirectUrl.value)
|
||||
if (decoded == '/bundle/order/tea-room/order-detail') {
|
||||
uni.$emit('transferOrder')
|
||||
}
|
||||
|
||||
toast.info('登录成功')
|
||||
router.navigateBack(1, 500)
|
||||
}
|
||||
} catch(error) {
|
||||
uni.hideLoading()
|
||||
|
||||
Reference in New Issue
Block a user