@sunggang/ui-lib 0.2.38 → 0.2.39
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/index.esm2.js +7 -6
- package/package.json +1 -1
package/index.esm2.js
CHANGED
|
@@ -43671,7 +43671,7 @@ var LiffProvider = function(param) {
|
|
|
43671
43671
|
// 登入初始化函數
|
|
43672
43672
|
var loginInit = function() {
|
|
43673
43673
|
var _ref = _async_to_generator(function(token, liff) {
|
|
43674
|
-
var
|
|
43674
|
+
var _resData_data, response, resData, loginToken, err;
|
|
43675
43675
|
return _ts_generator(this, function(_state) {
|
|
43676
43676
|
switch(_state.label){
|
|
43677
43677
|
case 0:
|
|
@@ -43695,12 +43695,13 @@ var LiffProvider = function(param) {
|
|
|
43695
43695
|
];
|
|
43696
43696
|
case 1:
|
|
43697
43697
|
response = _state.sent();
|
|
43698
|
-
|
|
43699
|
-
|
|
43700
|
-
|
|
43701
|
-
if (!loginToken.startsWith("Bearer ")) {
|
|
43702
|
-
loginToken = "Bearer ".concat(loginToken);
|
|
43698
|
+
resData = response === null || response === void 0 ? void 0 : response.data;
|
|
43699
|
+
if (!resData.access_token.startsWith("Bearer ")) {
|
|
43700
|
+
resData.access_token = "Bearer ".concat(resData.access_token);
|
|
43703
43701
|
}
|
|
43702
|
+
setLoginData(resData);
|
|
43703
|
+
window.localStorage.setItem(localStorageKey, JSON.stringify(resData));
|
|
43704
|
+
loginToken = resData === null || resData === void 0 ? void 0 : (_resData_data = resData.data) === null || _resData_data === void 0 ? void 0 : _resData_data.access_token;
|
|
43704
43705
|
if (loginToken) {
|
|
43705
43706
|
setAccessToken(loginToken);
|
|
43706
43707
|
if (memberInfoUrl) fetchMemberInfo(loginToken);
|