代码优化

This commit is contained in:
GaoHao
2024-12-28 17:34:13 +08:00
parent f3615bfbb8
commit 820fb9aea6
7 changed files with 53 additions and 27 deletions

View File

@@ -285,6 +285,7 @@
title: '正在登录中...',
})
this.$u.post('/app/Login/registerCode?password=' + code + '&phone=' + mobile).then(res => {
console.log(res)
if (res.code === 0) {
uni.setStorageSync('token', res.token)
uni.setStorageSync('userId', res.user.userId)
@@ -306,13 +307,8 @@
icon: 'none'
})
const arr= getCurrentPages()
if(arr.length<=1){
return uni.reLaunch({
url:'/pages/index/index'
})
}
uni.navigateBack({
delta: arr.length<=2?1:2
uni.reLaunch({
url:'/pages/index/index'
})
} else {
uni.hideLoading();