From 73a077d76b715aee6b9f384b087a6792a84989d8 Mon Sep 17 00:00:00 2001 From: huangxiaoqiang <1247017146@qq.com> Date: 星期二, 03 六月 2025 11:35:52 +0800 Subject: [PATCH] 代码提交 --- 项目代码/LGPDA/common/http.interceptor.js | 18 +++++++----------- 1 files changed, 7 insertions(+), 11 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/LGPDA/common/http.interceptor.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/LGPDA/common/http.interceptor.js" index 3600ab1..c020090 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/LGPDA/common/http.interceptor.js" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/LGPDA/common/http.interceptor.js" @@ -1,9 +1,5 @@ -// let baseUrl = 'http://10.1.105.155:9995' -// let baseUrl = 'http://10.1.211.101:9004' -// let baseUrl = 'http://127.0.0.1:9995' -// let baseUrl = 'http://127.0.0.1:5000' -let baseUrl = 'http://192.168.30.250:5000' -// let baseUrl = 'http://47.112.196.253:8881' +let baseUrl = 'http://127.0.0.1:5000' +// let baseUrl = 'http://192.168.30.250:5000' const install = (Vue, vm) => { // 姝や负鑷畾涔夐厤缃弬鏁帮紝鍏蜂綋鍙傛暟瑙佷笂鏂硅鏄� @@ -40,7 +36,7 @@ // var eee = "a" + uni.getStorageSync('pwd'); config.header.Token = 'xxxxxx'; config.header.Authorization = "Bearer " + uni.getStorageSync('jo_id_token'); - + config.header.uniapp = '1'; // 鍙互瀵规煇涓猽rl杩涜鐗瑰埆澶勭悊锛屾url鍙傛暟涓簍his.$u.get(url)涓殑url鍊� if (config.url == '/api/User/login') config.header.noToken = true; @@ -52,13 +48,13 @@ // 鍝嶅簲鎷︽埅锛屽垽鏂姸鎬佺爜鏄惁閫氳繃 Vue.prototype.$u.http.interceptor.response = (res) => { - if(!res.statusCode){ + if (!res.statusCode) { if (res.errMsg) { - vm.$u.toast("璇锋眰澶辫触,璇锋鏌ュ悗鍙扮▼搴忔槸鍚︽墦寮�,閿欒淇℃伅:" + res.errMsg); + vm.$u.toast("璇锋眰澶辫触,璇锋鏌ュ悗鍙扮▼搴忔槸鍚︽墦寮�,閿欒淇℃伅:" + res.errMsg); return false; } } - + if (res.statusCode == 200) { // res涓烘湇鍔$杩斿洖鍊硷紝鍙兘鏈塩ode锛宺esult绛夊瓧娈� // 杩欓噷瀵箁es.result杩涜杩斿洖锛屽皢浼氬湪this.$u.post(url).then(res => {})鐨則hen鍥炶皟涓殑res鐨勫埌 @@ -135,4 +131,4 @@ export default { install, baseUrl -} +} \ No newline at end of file -- Gitblit v1.9.3