一些优化

This commit is contained in:
haomingming
2025-09-04 17:34:47 +08:00
parent b068fb00cc
commit 4659f30400
18 changed files with 508 additions and 87 deletions
+23 -3
View File
@@ -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(() => {