一些优化
This commit is contained in:
@@ -102,7 +102,8 @@
|
||||
import eyeOpenImg from "@/static/eye_open.png"
|
||||
import eyeCloseImg from "@/static/eye_close.png"
|
||||
import api from "@/api/api.js"
|
||||
|
||||
import BASE_URL from "@/utils/config.js";
|
||||
|
||||
const customStyle = reactive({
|
||||
height: "100rpx",
|
||||
fontSize: "36rpx",
|
||||
@@ -226,16 +227,35 @@
|
||||
uni.setStorageSync('DEV_AUTH_YX_TOKEN_App', result.YX_token);
|
||||
uni.setStorageSync('userInfo', result.data);
|
||||
}
|
||||
}else{
|
||||
if (BASE_URL.indexOf('dev') == -1) {
|
||||
uni.setStorageSync('AUTH_TOKEN_App',result.access_token);
|
||||
uni.setStorageSync('AUTH_YX_ACCID_App', result.YX_accid);
|
||||
uni.setStorageSync('AUTH_YX_TOKEN_App', result.YX_token);
|
||||
uni.setStorageSync('userInfo', result.data);
|
||||
|
||||
} else {
|
||||
uni.setStorageSync('DEV_AUTH_TOKEN_App', result.access_token);
|
||||
uni.setStorageSync('DEV_AUTH_YX_ACCID_App', result.YX_accid);
|
||||
uni.setStorageSync('DEV_AUTH_YX_TOKEN_App', result.YX_token);
|
||||
uni.setStorageSync('userInfo', result.data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
console.log(uni.getStorageSync('userInfo'))
|
||||
console.log(1)
|
||||
uni.hideLoading();
|
||||
console.log(2)
|
||||
uni.showToast({
|
||||
title: '登录成功',
|
||||
icon: 'success'
|
||||
});
|
||||
console.log(3)
|
||||
uni.redirectTo({
|
||||
url:'/pages_course/course/course'
|
||||
url:'/pages/index/index'
|
||||
})
|
||||
console.log(4)
|
||||
})
|
||||
// 模拟登录过程
|
||||
// setTimeout(() => {
|
||||
|
||||
Reference in New Issue
Block a user