From 9b139ce92aa09f466c01111dd66af9347a34d865 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期三, 02 七月 2025 17:23:51 +0800
Subject: [PATCH] 1
---
项目代码/LGPDA/common/http.interceptor.js | 14 +++++---------
1 files changed, 5 insertions(+), 9 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..0cbef37 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'
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