diff --git a/manifest.json b/manifest.json index 75f6217..7116fe9 100644 --- a/manifest.json +++ b/manifest.json @@ -1,112 +1,112 @@ { - "name": "种植溯源", - "appid": "__UNI__D087881", - "description": "", - "versionName": "1.0.1", - "versionCode": "100", - "transformPx": false, - /* 5+App特有相关 */ - "app-plus": { - "usingComponents": true, - "nvueStyleCompiler": "uni-app", - "compilerVersion": 3, - "screenOrientation": [ - "portrait-primary", - "portrait-secondary", - "landscape-primary", - "landscape-secondary" - ], - "splashscreen": { - "alwaysShowBeforeRender": true, - "waiting": true, - "autoclose": true, - "delay": 0 - }, - /* 模块配置 */ - "modules": { - "Geolocation": {}, - "Maps": {}, - "LivePusher": {}, - "VideoPlayer": {}, - "Barcode": {}, - "Camera": {}, - "UniMP": { - "description": "uni小程序" - } - }, - /* 应用发布信息 */ - "distribute": { - /* android打包配置 */ - "android": { - "permissions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "minSdkVersion": 21 - }, - /* ios打包配置 */ - "ios": { - "dSYMs": false - }, - /* SDK配置 */ - "sdkConfigs": { - "ad": {}, - "geolocation": { - "amap": { - "name": "amap_18982406440DFVLElaO", - "__platform__": ["android"], - "appkey_ios": "4e6789b864fe1a2d76b98e38158f20f2", - "appkey_android": "a230d943475443eb29fc3871fbef8605" - }, - "system": { - "__platform__": ["ios", "android"] - } - }, - "maps": { - "amap": { - "name": "4e6789b864fe1a2d76b98e38158f20f2", - "appkey_ios": "a230d943475443eb29fc3871fbef8605", - "appkey_android": "a230d943475443eb29fc3871fbef8605" - } - } - } - } - }, - /* 快应用特有相关 */ - "quickapp": {}, - /* 小程序特有相关 */ - "mp-weixin": { - "appid": "", - "setting": { - "urlCheck": false - }, - "usingComponents": true - }, - "mp-alipay": { - "usingComponents": true - }, - "mp-baidu": { - "usingComponents": true - }, - "mp-toutiao": { - "usingComponents": true - }, - "uniStatistics": { - "enable": false - }, - "vueVersion": "3" -} \ No newline at end of file + "name" : "种植溯源", + "appid" : "__UNI__D087881", + "description" : "", + "versionName" : "1.0.1", + "versionCode" : "100", + "transformPx" : false, + /* 5+App特有相关 */ + "app-plus" : { + "usingComponents" : true, + "nvueStyleCompiler" : "uni-app", + "compilerVersion" : 3, + "screenOrientation" : [ + "portrait-primary", + "portrait-secondary", + "landscape-primary", + "landscape-secondary" + ], + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 + }, + /* 模块配置 */ + "modules" : { + "Geolocation" : {}, + "Maps" : {}, + "LivePusher" : {}, + "VideoPlayer" : {}, + "Barcode" : {}, + "Camera" : {}, + "UniMP" : { + "description" : "uni小程序" + } + }, + /* 应用发布信息 */ + "distribute" : { + /* android打包配置 */ + "android" : { + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "minSdkVersion" : 21 + }, + /* ios打包配置 */ + "ios" : { + "dSYMs" : false + }, + /* SDK配置 */ + "sdkConfigs" : { + "ad" : {}, + "geolocation" : { + "amap" : { + "name" : "amap_18982406440DFVLElaO", + "__platform__" : [ "android" ], + "appkey_ios" : "4e6789b864fe1a2d76b98e38158f20f2", + "appkey_android" : "a230d943475443eb29fc3871fbef8605" + }, + "system" : { + "__platform__" : [ "ios", "android" ] + } + }, + "maps" : { + "amap" : { + "name" : "4e6789b864fe1a2d76b98e38158f20f2", + "appkey_ios" : "a230d943475443eb29fc3871fbef8605", + "appkey_android" : "a230d943475443eb29fc3871fbef8605" + } + } + } + } + }, + /* 快应用特有相关 */ + "quickapp" : {}, + /* 小程序特有相关 */ + "mp-weixin" : { + "appid" : "", + "setting" : { + "urlCheck" : false + }, + "usingComponents" : true + }, + "mp-alipay" : { + "usingComponents" : true + }, + "mp-baidu" : { + "usingComponents" : true + }, + "mp-toutiao" : { + "usingComponents" : true + }, + "uniStatistics" : { + "enable" : false + }, + "vueVersion" : "3" +} diff --git a/utils/http.js b/utils/http.js index 4af274d..751ce4c 100644 --- a/utils/http.js +++ b/utils/http.js @@ -17,6 +17,7 @@ function baseRequest(url, method, data, { header = config.HEADER; if (store.state.userInfo) { header.TOKEN = store.state.userInfo.token + } return new Promise((reslove, reject) => { @@ -43,9 +44,13 @@ function baseRequest(url, method, data, { reslove(res.data); else if (res.data.code == -1) { - if (onReLogin) { + if (res.data.msg == "登录超时,请重新登录") { // store.commit('LOGOUT'); + uni.reLaunch({ + url:'/pages/Login/login' + }) + } } else if (res.data.code == 0) { if (res.data.msg != '用户信息不存在') { diff --git a/utils/syhttp.js b/utils/syhttp.js index 930a25c..a8c3b6d 100644 --- a/utils/syhttp.js +++ b/utils/syhttp.js @@ -37,15 +37,18 @@ function baseRequest(url, method, data, { if (noVerify) reslove(res.data); else if (res.data.code == -1) { - // if (onReLogin) { - // // store.commit('LOGOUT'); - // return reject(); - // } - uni.showToast({ - title: res.data.msg, - icon: 'none', - }) + if (res.data.msg == "登录超时,请重新登录") { + // store.commit('LOGOUT'); + uni.showToast({ + title: res.data.msg , + icon: 'none', + }) + uni.reLaunch({ + url:'/pages/Login/login' + }) + + } } else if (res.data.code == 0) { if (res.data.msg != '用户信息不存在') { uni.showToast({