From d99a437b547fbb313ddf15f1a97c25e865f71c91 Mon Sep 17 00:00:00 2001 From: pyt <626651354@qq.com> Date: 星期一, 24 二月 2025 13:38:59 +0800 Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/H5/threeSide --- H5/utils/request.js | 23 ++++++++++++----------- 1 files changed, 12 insertions(+), 11 deletions(-) diff --git a/H5/utils/request.js b/H5/utils/request.js index d8a8571..81631bc 100644 --- a/H5/utils/request.js +++ b/H5/utils/request.js @@ -19,10 +19,11 @@ return new Promise(function(resolve, reject) { - let token = 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE2MTc3LCJ0eXBlIjoxLCJleHAiOjE3NDE2NjExMDYsImNyZWF0ZWQiOjE3NDAzNjUxMDY1MTh9.XRkMgKjEhRo6_BQK5fEVQ_Pv5bM-xeT36s4ju4Oh1F7ZmkIQOJUrdDnefub13JO6rZs3GT6dKnHZgCSyyQpsjg' + let token = uni.getStorageSync('token') || + 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE4OTI0ODk0OTc5Nzk5NDA4NjUsInR5cGUiOjEsImV4cCI6MTc0MTY3MTI5OSwiY3JlYXRlZCI6MTc0MDM3NTI5OTQwNn0.39bIG5k-yClEWnUXvA63rjS631pj6fykU-J6vrC5u3HczL8NSwT_3pdVkj3hr4qikCrE7i9hmNkU_aLch1sw8A' let header = { 'content-type': type ? 'application/x-www-form-urlencoded;charset=UTF-8' : 'application/json', - 'Authorization': token, + 'Authorization': 'Bearer ' + token, 'lang': uni.getStorageSync('locale') === 'zh-Hans' ? 'zh_CN' : 'zh-tw', } const requestTask = uni.request({ @@ -136,15 +137,15 @@ showCancel: false, success: function(res) { if (res.confirm) { - if (routeStr == 'pages/login/index') { - uni.reLaunch({ - url: '/pages/login/index' - }) - return - } - uni.reLaunch({ - url: '/pages/login/index' - }) + // if (routeStr == 'pages/login/index') { + // uni.reLaunch({ + // url: '/pages/login/index' + // }) + // return + // } + // uni.reLaunch({ + // url: '/pages/login/index' + // }) } } }); -- Gitblit v1.7.1