From 85b460b57cd7e9ad935042df74f40e1bbdfa3408 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期二, 22 十月 2024 09:13:36 +0800
Subject: [PATCH] ll
---
h5_meeting/utils/service.js | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/h5_meeting/utils/service.js b/h5_meeting/utils/service.js
index 0814f6f..2001939 100644
--- a/h5_meeting/utils/service.js
+++ b/h5_meeting/utils/service.js
@@ -2,29 +2,31 @@
export const http = function (options) {
{
return new Promise((resolve, reject) => {
- let token = uni.getStorageSync('token') || ''
+ // let token = uni.getStorageSync('token') || ''
// 鍦ㄧ櫥褰曠殑鏃跺�欓渶瑕佸偍瀛� token uni.setStorageSync("authorization","杩欓噷鏄櫥褰曡幏鍙栫殑token鍊�")
// uni.showLoading({
// title:"鍔犺浇涓�..."
// })
- uni.showLoading({
- title: '鍔犺浇涓�',
- mask: true
- })
+ // uni.showLoading({
+ // title: '鍔犺浇涓�',
+ // mask: true
+ // })
+ const param = uni.getStorageSync('param') || {}
uni.request({
- url: baseUrl + options.url,
+ url: (param.baseUrl || baseUrl) + options.url,
+ // url: baseUrl + options.url,
data: options.data || {},
method: options.method || 'GET',
header: options.header || {
// 鏍规嵁瀹為檯鎺ュ彛璁捐 key 鍙� token 鎴栬�� authorization
- dm_user_token: token,
+ // dm_user_token: token,
"content-type": 'application/json;charset=UTF-8'
},
success: (res) => {
let data = res.data
// 鎺у埗鍙版樉绀烘暟鎹俊鎭�
- uni.hideLoading()
+ // uni.hideLoading()
// 鐧诲綍杩囨湡
if (data.code === 5112) {
setTimeout(() => {
@@ -62,7 +64,7 @@
console.log('msg', baseUrl + options.url)
// 杩斿洖閿欒娑堟伅
reject(err)
- uni.hideLoading()
+ // uni.hideLoading()
},
catch: (e) => {
console.log(e)
--
Gitblit v1.9.3