|
@@ -12,6 +12,7 @@ function userLogin(uid, callback) {
|
|
id: uid,
|
|
id: uid,
|
|
}).then(res => {
|
|
}).then(res => {
|
|
if (res['data'] != "ERROR") {
|
|
if (res['data'] != "ERROR") {
|
|
|
|
+ setToken(res.data.userid)
|
|
userLogin2(callback);
|
|
userLogin2(callback);
|
|
} else {
|
|
} else {
|
|
console.error("错误")
|
|
console.error("错误")
|
|
@@ -62,8 +63,9 @@ router.beforeEach(async(to, from, next) => {
|
|
console.log(response);
|
|
console.log(response);
|
|
let data = response.data.replaceAll("\'", "\"")
|
|
let data = response.data.replaceAll("\'", "\"")
|
|
if (data && JSON.parse(data).uid) {
|
|
if (data && JSON.parse(data).uid) {
|
|
- // setToken(JSON.parse(data).uid);
|
|
|
|
|
|
+ setToken(JSON.parse(data).uid);
|
|
let userid = JSON.parse(data).uid;
|
|
let userid = JSON.parse(data).uid;
|
|
|
|
+ // let userid = 1270;
|
|
userLogin(userid, (isLogin) => {
|
|
userLogin(userid, (isLogin) => {
|
|
getSystemState(to, () => {
|
|
getSystemState(to, () => {
|
|
if (!isLogin && to.name != 'resultShowDetail') {
|
|
if (!isLogin && to.name != 'resultShowDetail') {
|