diff --git a/pages/login/login.vue b/pages/login/login.vue index 0c2c529..a694d7d 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -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; } diff --git a/uni.scss b/uni.scss index 06f1183..515cb69 100644 --- a/uni.scss +++ b/uni.scss @@ -17,7 +17,7 @@ /* 颜色变量 */ /* 行为相关颜色 */ -$uni-color-primary: #007aff; +$uni-color-primary: #0385e5; $uni-color-success: #4cd964; $uni-color-warning: #f0ad4e; $uni-color-error: #dd524d; diff --git a/unpackage/apk/com.wavenet.mainlaun_release_202207111645_1.0.2.apk b/unpackage/apk/com.wavenet.mainlaun_release_202207111645_1.0.2.apk new file mode 100644 index 0000000..19c0f77 Binary files /dev/null and b/unpackage/apk/com.wavenet.mainlaun_release_202207111645_1.0.2.apk differ diff --git a/utils/util.js b/utils/util.js index 8674648..a1f704b 100755 --- a/utils/util.js +++ b/utils/util.js @@ -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