lion 3 years ago
commit 87aa4c41b4

@ -28,6 +28,36 @@
} }
}, },
onLoad: function(options) { 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'
});
}
}
}, },
@ -102,7 +132,8 @@
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
} }
.back{
.back {
color: #FFFFFF; color: #FFFFFF;
} }
</style> </style>

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

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

Loading…
Cancel
Save