刘翔宇-旅管家 3 years ago
parent 81909d5959
commit 0957c29e2e

@ -28,6 +28,36 @@
}
},
onLoad: function(options) {
let userinfo = uni.getStorageSync('userInfo_token');
if (!util.isNull(options.token) && options.tp == "hdgl") {
let token = options.token;
uni.request({
url: util.HOST + '/api/mobile/auth/oss-login',
method: 'POST',
data: {
'token': token,
'tp': options.tp
},
success: function(res) {
console.log(res)
uni.setStorageSync('userInfo_token', res);
uni.redirectTo({
url: '/pages/index/index'
});
},
fail: function(res) {
console.log(res)
util.alert(res);
}
});
} else {
if (!util.isNull(userinfo)) {
uni.redirectTo({
url: '/pages/index/index'
});
}
}
},
@ -101,8 +131,9 @@
background: #0385e5;
display: flex;
justify-content: space-around;
}
.back{
color: #FFFFFF;
}
.back {
color: #FFFFFF;
}
</style>

@ -17,7 +17,7 @@
/* 颜色变量 */
/* 行为相关颜色 */
$uni-color-primary: #007aff;
$uni-color-primary: #0385e5;
$uni-color-success: #4cd964;
$uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d;

@ -1,7 +1,8 @@
import md5 from "./md5.min";
const HOSTARR = {
'development': 'http://patrol.115.langye.net',
'production': 'http://patrol.115.langye.net'
//'development': 'http://patrol.115.langye.net',
'development': 'http://192.168.60.100:9001',
'production': 'http://192.168.60.100:9001'
}; // 审核状态
const HOST = HOSTARR[process.env

Loading…
Cancel
Save