|
|
|
|
@ -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>
|
|
|
|
|
|