@smart100/spu-web-plugin 1.0.25-beta.4 → 1.0.25-beta.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/spu-web-plugin.mjs +94 -80
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/login.ts +29 -18
- package/src/oss/downloadService.ts +4 -3
package/dist/spu-web-plugin.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var version = "1.0.25-beta.
|
|
1
|
+
var version = "1.0.25-beta.5";
|
|
2
2
|
|
|
3
3
|
/** Detect free variable `global` from Node.js. */
|
|
4
4
|
var freeGlobal$2 = typeof global == 'object' && global && global.Object === Object && global;
|
|
@@ -16839,7 +16839,7 @@ function singleLogin(_x3) {
|
|
|
16839
16839
|
}
|
|
16840
16840
|
function _singleLogin() {
|
|
16841
16841
|
_singleLogin = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime$1().mark(function _callee8(query) {
|
|
16842
|
-
var flag, token, refreshtoken, tokenexpires, envname, context, setBaseInfo, isneedlogin, loginRole, refreshTokenUser, tokenUser, nowEnvname, envData;
|
|
16842
|
+
var flag, token, refreshtoken, tokenexpires, envname, context, setBaseInfo, isneedlogin, loginRole, curUser, cacheUser, refreshTokenUser, tokenUser, nowEnvname, envData;
|
|
16843
16843
|
return _regeneratorRuntime$1().wrap(function _callee8$(_context8) {
|
|
16844
16844
|
while (1) switch (_context8.prev = _context8.next) {
|
|
16845
16845
|
case 0:
|
|
@@ -16858,7 +16858,9 @@ function _singleLogin() {
|
|
|
16858
16858
|
}
|
|
16859
16859
|
};
|
|
16860
16860
|
query = cloneDeep$1(query);
|
|
16861
|
-
|
|
16861
|
+
// App SPUWebview 内用 Native-Api 获取token 而不是从 url 上取
|
|
16862
|
+
// 暂时只在 门户引擎 中启用 等门户引擎验证通过之后 再改成所有 SPU 默认
|
|
16863
|
+
if (!(globalOptions.isfixapptokenexpired && globalOptions.modulekey === 'portalEngine')) {
|
|
16862
16864
|
_context8.next = 6;
|
|
16863
16865
|
break;
|
|
16864
16866
|
}
|
|
@@ -16874,141 +16876,153 @@ function _singleLogin() {
|
|
|
16874
16876
|
envname = query.envname;
|
|
16875
16877
|
context = query.context;
|
|
16876
16878
|
if (!checkLoginByToken(token)) {
|
|
16877
|
-
_context8.next =
|
|
16879
|
+
_context8.next = 67;
|
|
16878
16880
|
break;
|
|
16879
16881
|
}
|
|
16880
16882
|
isneedlogin = true; // 是否需要走单点登录流程
|
|
16881
16883
|
loginRole = getRoleByToken(token);
|
|
16882
|
-
|
|
16883
|
-
|
|
16884
|
-
|
|
16885
|
-
|
|
16886
|
-
|
|
16887
|
-
|
|
16888
|
-
|
|
16889
|
-
|
|
16890
|
-
|
|
16891
|
-
|
|
16884
|
+
curUser = getUserByToken(token);
|
|
16885
|
+
cacheUser = getUserByToken(getToken()); // 如果本地已经登录
|
|
16886
|
+
if (checkLogin()) {
|
|
16887
|
+
// 产品运营中心单点登录只有 token
|
|
16888
|
+
if (loginRole === 'center') {
|
|
16889
|
+
if ((curUser === null || curUser === void 0 ? void 0 : curUser.userCode) === (cacheUser === null || cacheUser === void 0 ? void 0 : cacheUser.userCode) && (curUser === null || curUser === void 0 ? void 0 : curUser.appId) === (cacheUser === null || cacheUser === void 0 ? void 0 : cacheUser.appId)) {
|
|
16890
|
+
isneedlogin = false;
|
|
16891
|
+
}
|
|
16892
|
+
} else {
|
|
16893
|
+
// 不重复走单点登录的逻辑
|
|
16894
|
+
// 旧:判断当前单点登录的 token/refreshtoken/tokenexpires 是否与本地缓存的一致
|
|
16895
|
+
// 新:解析当前单点登录 token 中的 mbcode、tenantcode,如果与缓存的一致,说明本次登录与上次登录是同个人同个租户
|
|
16896
|
+
// 新逻辑暂时只用于超表
|
|
16897
|
+
if (globalOptions.modulekey === 'litheformspu' && globalOptions.isoptimizesingleloginlogic) {
|
|
16898
|
+
if ((curUser === null || curUser === void 0 ? void 0 : curUser.memberCode) === (cacheUser === null || cacheUser === void 0 ? void 0 : cacheUser.memberCode) && (curUser === null || curUser === void 0 ? void 0 : curUser.tenantCode) === (cacheUser === null || cacheUser === void 0 ? void 0 : cacheUser.tenantCode)) {
|
|
16899
|
+
isneedlogin = false;
|
|
16900
|
+
}
|
|
16901
|
+
} else {
|
|
16902
|
+
if (token === getToken() && refreshtoken === getRefreshToken() && tokenexpires === getTokenExpires()) {
|
|
16903
|
+
isneedlogin = false;
|
|
16904
|
+
}
|
|
16905
|
+
}
|
|
16892
16906
|
}
|
|
16893
16907
|
}
|
|
16894
16908
|
// isneedlogin = true
|
|
16895
16909
|
// debugger
|
|
16896
16910
|
if (!isneedlogin) {
|
|
16897
|
-
_context8.next =
|
|
16911
|
+
_context8.next = 64;
|
|
16898
16912
|
break;
|
|
16899
16913
|
}
|
|
16900
16914
|
setBaseInfo();
|
|
16901
16915
|
// 单点登录写入 token 之后
|
|
16902
|
-
_context8.prev =
|
|
16916
|
+
_context8.prev = 20;
|
|
16903
16917
|
if (!checkLogin()) {
|
|
16904
|
-
_context8.next =
|
|
16918
|
+
_context8.next = 27;
|
|
16905
16919
|
break;
|
|
16906
16920
|
}
|
|
16907
16921
|
refreshTokenUser = getUserByToken(getRefreshToken());
|
|
16908
16922
|
tokenUser = getUserByToken(getToken()); // 如果 refreshtoken 不完整【由于web端登录时 如果有选择租户或选择职位的情况 得到的 refreshtoken 是不完整】 则通过完整的 token 换取完整的 refreshtoken 如果不换的话 通过刷新 token 接口得到的 token 也变成不完整的了
|
|
16909
16923
|
if (!(!(refreshTokenUser !== null && refreshTokenUser !== void 0 && refreshTokenUser.tokenId) && tokenUser !== null && tokenUser !== void 0 && tokenUser.tokenId)) {
|
|
16910
|
-
_context8.next =
|
|
16924
|
+
_context8.next = 27;
|
|
16911
16925
|
break;
|
|
16912
16926
|
}
|
|
16913
|
-
_context8.next =
|
|
16927
|
+
_context8.next = 27;
|
|
16914
16928
|
return updateToken();
|
|
16915
|
-
case 25:
|
|
16916
|
-
_context8.next = 30;
|
|
16917
|
-
break;
|
|
16918
16929
|
case 27:
|
|
16919
|
-
_context8.prev = 27;
|
|
16920
|
-
_context8.t0 = _context8["catch"](18);
|
|
16921
|
-
console.error(_context8.t0);
|
|
16922
|
-
case 30:
|
|
16923
16930
|
_context8.next = 32;
|
|
16924
|
-
|
|
16931
|
+
break;
|
|
16932
|
+
case 29:
|
|
16933
|
+
_context8.prev = 29;
|
|
16934
|
+
_context8.t0 = _context8["catch"](20);
|
|
16935
|
+
console.error(_context8.t0);
|
|
16925
16936
|
case 32:
|
|
16937
|
+
_context8.next = 34;
|
|
16938
|
+
return getEnvname();
|
|
16939
|
+
case 34:
|
|
16926
16940
|
nowEnvname = _context8.sent;
|
|
16927
16941
|
if (!nowEnvname) {
|
|
16928
|
-
_context8.next =
|
|
16942
|
+
_context8.next = 55;
|
|
16929
16943
|
break;
|
|
16930
16944
|
}
|
|
16931
|
-
_context8.next =
|
|
16945
|
+
_context8.next = 38;
|
|
16932
16946
|
return requestEnvdata(nowEnvname);
|
|
16933
|
-
case
|
|
16947
|
+
case 38:
|
|
16934
16948
|
envData = _context8.sent;
|
|
16935
16949
|
if (!envData) {
|
|
16936
|
-
_context8.next =
|
|
16950
|
+
_context8.next = 51;
|
|
16937
16951
|
break;
|
|
16938
16952
|
}
|
|
16939
16953
|
saveEnvdata(envData);
|
|
16940
16954
|
if (!envData.tenantcode) {
|
|
16941
|
-
_context8.next =
|
|
16955
|
+
_context8.next = 47;
|
|
16942
16956
|
break;
|
|
16943
16957
|
}
|
|
16944
16958
|
setTecode(envData.tenantcode);
|
|
16945
16959
|
// 租户配置
|
|
16946
|
-
_context8.next =
|
|
16960
|
+
_context8.next = 45;
|
|
16947
16961
|
return tenantSetting.requestAndSetTenantSetting(envData.tenantcode);
|
|
16948
|
-
case 43:
|
|
16949
|
-
_context8.next = 47;
|
|
16950
|
-
break;
|
|
16951
16962
|
case 45:
|
|
16963
|
+
_context8.next = 49;
|
|
16964
|
+
break;
|
|
16965
|
+
case 47:
|
|
16952
16966
|
tenantSetting.removeTenantSetting();
|
|
16953
16967
|
removeTecode();
|
|
16954
|
-
case 47:
|
|
16955
|
-
_context8.next = 51;
|
|
16956
|
-
break;
|
|
16957
16968
|
case 49:
|
|
16969
|
+
_context8.next = 53;
|
|
16970
|
+
break;
|
|
16971
|
+
case 51:
|
|
16958
16972
|
removeEnvdata();
|
|
16959
16973
|
removeTecode();
|
|
16960
|
-
case 51:
|
|
16961
|
-
_context8.next = 55;
|
|
16962
|
-
break;
|
|
16963
16974
|
case 53:
|
|
16975
|
+
_context8.next = 57;
|
|
16976
|
+
break;
|
|
16977
|
+
case 55:
|
|
16964
16978
|
removeEnvdata();
|
|
16965
16979
|
removeTecode();
|
|
16966
|
-
case 55:
|
|
16967
|
-
_context8.next = 57;
|
|
16968
|
-
return getAndSetTenant();
|
|
16969
16980
|
case 57:
|
|
16970
16981
|
_context8.next = 59;
|
|
16971
|
-
return
|
|
16982
|
+
return getAndSetTenant();
|
|
16972
16983
|
case 59:
|
|
16984
|
+
_context8.next = 61;
|
|
16985
|
+
return getAndSetUserInfo();
|
|
16986
|
+
case 61:
|
|
16973
16987
|
flag = true;
|
|
16974
|
-
_context8.next =
|
|
16988
|
+
_context8.next = 65;
|
|
16975
16989
|
break;
|
|
16976
|
-
case
|
|
16990
|
+
case 64:
|
|
16977
16991
|
flag = true;
|
|
16978
|
-
case 63:
|
|
16979
|
-
_context8.next = 68;
|
|
16980
|
-
break;
|
|
16981
16992
|
case 65:
|
|
16993
|
+
_context8.next = 70;
|
|
16994
|
+
break;
|
|
16995
|
+
case 67:
|
|
16982
16996
|
flag = false;
|
|
16983
16997
|
setBaseInfo(); // 传递的token过期依然写入 如果不写入的话 有可能之前的token本来没过期 页面依然可用
|
|
16984
|
-
console.error('单点登录失败,请检查链接所传 token/refreshtoken/tokenexpires 是否非法或过期。');
|
|
16985
|
-
case
|
|
16998
|
+
console.error('单点登录失败,请检查链接所传 token/refreshtoken/tokenexpires/envname 是否非法或过期。');
|
|
16999
|
+
case 70:
|
|
16986
17000
|
if (!flag) {
|
|
16987
|
-
_context8.next =
|
|
17001
|
+
_context8.next = 79;
|
|
16988
17002
|
break;
|
|
16989
17003
|
}
|
|
16990
17004
|
// 启动刷新token机制
|
|
16991
17005
|
startRefreshtoken();
|
|
16992
17006
|
// 获取spu 信息
|
|
16993
|
-
_context8.next =
|
|
17007
|
+
_context8.next = 74;
|
|
16994
17008
|
return core$1.initGetData();
|
|
16995
|
-
case
|
|
17009
|
+
case 74:
|
|
16996
17010
|
// 删除 query 中相关参数
|
|
16997
17011
|
token && delete query.token;
|
|
16998
17012
|
refreshtoken && delete query.refreshtoken;
|
|
16999
17013
|
tokenexpires && delete query.tokenexpires;
|
|
17000
17014
|
envname && delete query.envname;
|
|
17001
17015
|
context && delete query.context;
|
|
17002
|
-
case
|
|
17016
|
+
case 79:
|
|
17003
17017
|
return _context8.abrupt("return", {
|
|
17004
17018
|
flag: flag,
|
|
17005
17019
|
query: query
|
|
17006
17020
|
});
|
|
17007
|
-
case
|
|
17021
|
+
case 80:
|
|
17008
17022
|
case "end":
|
|
17009
17023
|
return _context8.stop();
|
|
17010
17024
|
}
|
|
17011
|
-
}, _callee8, null, [[
|
|
17025
|
+
}, _callee8, null, [[20, 29]]);
|
|
17012
17026
|
}));
|
|
17013
17027
|
return _singleLogin.apply(this, arguments);
|
|
17014
17028
|
}
|
|
@@ -52480,7 +52494,7 @@ var getUrl = /*#__PURE__*/function () {
|
|
|
52480
52494
|
copeStr = provider !== null && provider !== void 0 && provider.isAliyun ? getAliyunCope(cope) : getCope(cope);
|
|
52481
52495
|
contentType = getContentType(suffix);
|
|
52482
52496
|
if (!(provider !== null && provider !== void 0 && provider.isAliyun)) {
|
|
52483
|
-
_context.next =
|
|
52497
|
+
_context.next = 25;
|
|
52484
52498
|
break;
|
|
52485
52499
|
}
|
|
52486
52500
|
ossClient = new AliClient({
|
|
@@ -52495,11 +52509,10 @@ var getUrl = /*#__PURE__*/function () {
|
|
|
52495
52509
|
responseHeader = {
|
|
52496
52510
|
// 'content-type': contentType || undefined,
|
|
52497
52511
|
'content-disposition': 'attachment; filename=' + (filename && encodeURIComponent(filename)) // 阿里云提供的下载名字
|
|
52498
|
-
};
|
|
52499
|
-
|
|
52500
|
-
|
|
52501
|
-
|
|
52502
|
-
}
|
|
52512
|
+
}; // TODO 阿里云不在提供,会报错
|
|
52513
|
+
// if (contentType) {
|
|
52514
|
+
// responseHeader['content-type'] = contentType
|
|
52515
|
+
// }
|
|
52503
52516
|
ossUrl = ossClient.signatureUrl(objectKey, {
|
|
52504
52517
|
response: responseHeader,
|
|
52505
52518
|
process: copeStr
|
|
@@ -52509,9 +52522,9 @@ var getUrl = /*#__PURE__*/function () {
|
|
|
52509
52522
|
// ossUrl = ossUrl.replace(paths[1] + '/' + paths[2], paths[1])
|
|
52510
52523
|
// }
|
|
52511
52524
|
return _context.abrupt("return", ossUrl);
|
|
52512
|
-
case
|
|
52525
|
+
case 25:
|
|
52513
52526
|
if (!(provider !== null && provider !== void 0 && provider.isHuawei)) {
|
|
52514
|
-
_context.next =
|
|
52527
|
+
_context.next = 42;
|
|
52515
52528
|
break;
|
|
52516
52529
|
}
|
|
52517
52530
|
obs = new ObsClient({
|
|
@@ -52523,7 +52536,7 @@ var getUrl = /*#__PURE__*/function () {
|
|
|
52523
52536
|
if (objectKey && objectKey[0] === '/') {
|
|
52524
52537
|
objectKey = objectKey.slice(1);
|
|
52525
52538
|
}
|
|
52526
|
-
_context.prev =
|
|
52539
|
+
_context.prev = 28;
|
|
52527
52540
|
Params = {
|
|
52528
52541
|
// Method: 'get',
|
|
52529
52542
|
Bucket: storageConfig.cloudserv_storage_storagebucket,
|
|
@@ -52543,17 +52556,17 @@ var getUrl = /*#__PURE__*/function () {
|
|
|
52543
52556
|
// if (expires) setCacheUrl(cacheKey, signedUrl, +expires)
|
|
52544
52557
|
// 华为云通过 createSignedUrlSync 生产的签名链接默认带有 :80 或者 :443 端口 后端删除时需要去除
|
|
52545
52558
|
return _context.abrupt("return", signedUrl.replace(/:(80|443)/, ''));
|
|
52546
|
-
case
|
|
52547
|
-
_context.prev =
|
|
52548
|
-
_context.t0 = _context["catch"](
|
|
52559
|
+
case 36:
|
|
52560
|
+
_context.prev = 36;
|
|
52561
|
+
_context.t0 = _context["catch"](28);
|
|
52549
52562
|
console.error(_context.t0);
|
|
52550
52563
|
throw Error(_context.t0);
|
|
52551
|
-
case
|
|
52552
|
-
_context.next =
|
|
52564
|
+
case 40:
|
|
52565
|
+
_context.next = 55;
|
|
52553
52566
|
break;
|
|
52554
|
-
case
|
|
52567
|
+
case 42:
|
|
52555
52568
|
if (!(provider !== null && provider !== void 0 && provider.isMinio)) {
|
|
52556
|
-
_context.next =
|
|
52569
|
+
_context.next = 54;
|
|
52557
52570
|
break;
|
|
52558
52571
|
}
|
|
52559
52572
|
s3Params = {
|
|
@@ -52591,18 +52604,18 @@ var getUrl = /*#__PURE__*/function () {
|
|
|
52591
52604
|
});
|
|
52592
52605
|
});
|
|
52593
52606
|
};
|
|
52594
|
-
_context.next =
|
|
52607
|
+
_context.next = 50;
|
|
52595
52608
|
return getSignedUrlPro();
|
|
52596
|
-
case
|
|
52609
|
+
case 50:
|
|
52597
52610
|
_signedUrl = _context.sent;
|
|
52598
52611
|
return _context.abrupt("return", _signedUrl);
|
|
52599
|
-
case
|
|
52612
|
+
case 54:
|
|
52600
52613
|
throw Error("\u6682\u4E0D\u652F\u6301".concat(provider === null || provider === void 0 ? void 0 : provider.name, "\u5B58\u50A8\u7C7B\u578B"));
|
|
52601
|
-
case
|
|
52614
|
+
case 55:
|
|
52602
52615
|
case "end":
|
|
52603
52616
|
return _context.stop();
|
|
52604
52617
|
}
|
|
52605
|
-
}, _callee, null, [[
|
|
52618
|
+
}, _callee, null, [[28, 36]]);
|
|
52606
52619
|
}));
|
|
52607
52620
|
return function getUrl(_x) {
|
|
52608
52621
|
return _ref2.apply(this, arguments);
|
|
@@ -70657,6 +70670,7 @@ var getDefaultGlobalOptions = function getDefaultGlobalOptions() {
|
|
|
70657
70670
|
moduleversion: arr[2] || '',
|
|
70658
70671
|
storageproxyprefix: '',
|
|
70659
70672
|
isfixapptokenexpired: false,
|
|
70673
|
+
isoptimizesingleloginlogic: false,
|
|
70660
70674
|
singleLoginCallback: null,
|
|
70661
70675
|
router: null
|
|
70662
70676
|
};
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -58,6 +58,7 @@ const getDefaultGlobalOptions = () => {
|
|
|
58
58
|
moduleversion: arr[2] || '',
|
|
59
59
|
storageproxyprefix: '',
|
|
60
60
|
isfixapptokenexpired: false, // 是否修复apptoken过期问题 目前版本暂时不默认修复 等门户引擎验证通过之后 再改成默认修复
|
|
61
|
+
isoptimizesingleloginlogic: false, // 是否优化判断不重复走单点登录的逻辑 暂时只在超表上优化
|
|
61
62
|
singleLoginCallback: null,
|
|
62
63
|
router: null
|
|
63
64
|
}
|
package/src/login.ts
CHANGED
|
@@ -601,7 +601,9 @@ const fixAppTokenExpired = async () => {
|
|
|
601
601
|
// 单点登录
|
|
602
602
|
async function singleLogin(query: IAny) {
|
|
603
603
|
query = cloneDeep(query)
|
|
604
|
-
|
|
604
|
+
// App SPUWebview 内用 Native-Api 获取token 而不是从 url 上取
|
|
605
|
+
// 暂时只在 门户引擎 中启用 等门户引擎验证通过之后 再改成所有 SPU 默认
|
|
606
|
+
if (globalOptions.isfixapptokenexpired && globalOptions.modulekey === 'portalEngine') {
|
|
605
607
|
query = await fixLoginQuery(query)
|
|
606
608
|
}
|
|
607
609
|
|
|
@@ -630,24 +632,33 @@ async function singleLogin(query: IAny) {
|
|
|
630
632
|
if (checkLoginByToken(token)) {
|
|
631
633
|
let isneedlogin = true // 是否需要走单点登录流程
|
|
632
634
|
const loginRole = getRoleByToken(token)
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
635
|
+
const curUser = getUserByToken(token)
|
|
636
|
+
const cacheUser = getUserByToken(getToken())
|
|
637
|
+
|
|
638
|
+
// 如果本地已经登录
|
|
639
|
+
if (checkLogin()) {
|
|
640
|
+
// 产品运营中心单点登录只有 token
|
|
641
|
+
if (loginRole === 'center') {
|
|
642
|
+
if (curUser?.userCode === cacheUser?.userCode && curUser?.appId === cacheUser?.appId) {
|
|
643
|
+
isneedlogin = false
|
|
644
|
+
}
|
|
645
|
+
} else {
|
|
646
|
+
// 不重复走单点登录的逻辑
|
|
647
|
+
// 旧:判断当前单点登录的 token/refreshtoken/tokenexpires 是否与本地缓存的一致
|
|
648
|
+
// 新:解析当前单点登录 token 中的 mbcode、tenantcode,如果与缓存的一致,说明本次登录与上次登录是同个人同个租户
|
|
649
|
+
// 新逻辑暂时只用于超表
|
|
650
|
+
if (globalOptions.modulekey === 'litheformspu' && globalOptions.isoptimizesingleloginlogic) {
|
|
651
|
+
if (curUser?.memberCode === cacheUser?.memberCode && curUser?.tenantCode === cacheUser?.tenantCode) {
|
|
652
|
+
isneedlogin = false
|
|
653
|
+
}
|
|
654
|
+
} else {
|
|
655
|
+
if (token === getToken() && refreshtoken === getRefreshToken() && tokenexpires === getTokenExpires()) {
|
|
656
|
+
isneedlogin = false
|
|
657
|
+
}
|
|
658
|
+
}
|
|
649
659
|
}
|
|
650
660
|
}
|
|
661
|
+
|
|
651
662
|
// isneedlogin = true
|
|
652
663
|
// debugger
|
|
653
664
|
|
|
@@ -702,7 +713,7 @@ async function singleLogin(query: IAny) {
|
|
|
702
713
|
} else {
|
|
703
714
|
flag = false
|
|
704
715
|
setBaseInfo() // 传递的token过期依然写入 如果不写入的话 有可能之前的token本来没过期 页面依然可用
|
|
705
|
-
console.error('单点登录失败,请检查链接所传 token/refreshtoken/tokenexpires 是否非法或过期。')
|
|
716
|
+
console.error('单点登录失败,请检查链接所传 token/refreshtoken/tokenexpires/envname 是否非法或过期。')
|
|
706
717
|
}
|
|
707
718
|
|
|
708
719
|
// 单点登录成功
|
|
@@ -163,9 +163,10 @@ const getUrl = async ({
|
|
|
163
163
|
// 'content-type': contentType || undefined,
|
|
164
164
|
'content-disposition': 'attachment; filename=' + (filename && encodeURIComponent(filename)) // 阿里云提供的下载名字
|
|
165
165
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
// TODO 阿里云不在提供,会报错
|
|
167
|
+
// if (contentType) {
|
|
168
|
+
// responseHeader['content-type'] = contentType
|
|
169
|
+
// }
|
|
169
170
|
|
|
170
171
|
const ossUrl = ossClient.signatureUrl(objectKey, {
|
|
171
172
|
response: responseHeader,
|