uniapp-request-sdk 1.4.4 → 1.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +2 -4
- package/dist/index.umd.js +2 -4
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -131,13 +131,11 @@ var UniRequest = /*#__PURE__*/function () {
|
|
|
131
131
|
return new Promise(function (res, rej) {
|
|
132
132
|
var retryFucntion = function retryFucntion() {
|
|
133
133
|
/** 因为token需要动态获取,因此放入这里 */
|
|
134
|
-
// #ifndef H5
|
|
135
134
|
header[_this3.tokenHeader] = "".concat(_this3.tokenPrefix).concat(_this3.token);
|
|
136
|
-
// #endif
|
|
137
135
|
/** 针对h5调试的时候,因为塞入cookie是不安全的,因此无需塞入cookie,使用登录页后,后端塞入的cookie */
|
|
138
136
|
// #ifdef H5
|
|
139
|
-
if (
|
|
140
|
-
header[_this3.tokenHeader]
|
|
137
|
+
if (_this3.tokenHeader === 'cookie') {
|
|
138
|
+
delete header[_this3.tokenHeader];
|
|
141
139
|
}
|
|
142
140
|
// #endif
|
|
143
141
|
callbackPromise(Object.assign(Object.assign({}, params), {
|
package/dist/index.umd.js
CHANGED
|
@@ -137,13 +137,11 @@
|
|
|
137
137
|
return new Promise(function (res, rej) {
|
|
138
138
|
var retryFucntion = function retryFucntion() {
|
|
139
139
|
/** 因为token需要动态获取,因此放入这里 */
|
|
140
|
-
// #ifndef H5
|
|
141
140
|
header[_this3.tokenHeader] = "".concat(_this3.tokenPrefix).concat(_this3.token);
|
|
142
|
-
// #endif
|
|
143
141
|
/** 针对h5调试的时候,因为塞入cookie是不安全的,因此无需塞入cookie,使用登录页后,后端塞入的cookie */
|
|
144
142
|
// #ifdef H5
|
|
145
|
-
if (
|
|
146
|
-
header[_this3.tokenHeader]
|
|
143
|
+
if (_this3.tokenHeader === 'cookie') {
|
|
144
|
+
delete header[_this3.tokenHeader];
|
|
147
145
|
}
|
|
148
146
|
// #endif
|
|
149
147
|
callbackPromise(Object.assign(Object.assign({}, params), {
|