@antv/dumi-theme-antv 0.6.3 → 0.6.4-beta.0
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/utils/user.js +18 -11
- package/package.json +3 -2
package/dist/utils/user.js
CHANGED
|
@@ -51,6 +51,8 @@ var fetchWithTimeout = /*#__PURE__*/function () {
|
|
|
51
51
|
return _ref.apply(this, arguments);
|
|
52
52
|
};
|
|
53
53
|
}();
|
|
54
|
+
|
|
55
|
+
// 仅限于蚂蚁用户为 true
|
|
54
56
|
var isInternalUser;
|
|
55
57
|
|
|
56
58
|
/**
|
|
@@ -58,7 +60,7 @@ var isInternalUser;
|
|
|
58
60
|
*/
|
|
59
61
|
export var determineUserType = /*#__PURE__*/function () {
|
|
60
62
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
61
|
-
var url, timeout;
|
|
63
|
+
var url, timeout, res;
|
|
62
64
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
63
65
|
while (1) switch (_context2.prev = _context2.next) {
|
|
64
66
|
case 0:
|
|
@@ -68,26 +70,31 @@ export var determineUserType = /*#__PURE__*/function () {
|
|
|
68
70
|
}
|
|
69
71
|
return _context2.abrupt("return", isInternalUser);
|
|
70
72
|
case 2:
|
|
71
|
-
url = 'https://
|
|
72
|
-
timeout = 5000;
|
|
73
|
+
url = 'https://links.alipay.com/cors/room/67a96a296b6fa80490bdf892/tipConfig';
|
|
74
|
+
timeout = 5000;
|
|
73
75
|
_context2.prev = 4;
|
|
74
76
|
_context2.next = 7;
|
|
75
77
|
return fetchWithTimeout(url, {}, timeout);
|
|
76
78
|
case 7:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
res = _context2.sent;
|
|
80
|
+
if ((res === null || res === void 0 ? void 0 : res.buserviceErrorCode) === 'USER_NOT_LOGIN') {
|
|
81
|
+
isInternalUser = false; // 集团用户
|
|
82
|
+
} else {
|
|
83
|
+
isInternalUser = true; // 蚂蚁用户
|
|
84
|
+
}
|
|
85
|
+
_context2.next = 14;
|
|
79
86
|
break;
|
|
80
|
-
case
|
|
81
|
-
_context2.prev =
|
|
87
|
+
case 11:
|
|
88
|
+
_context2.prev = 11;
|
|
82
89
|
_context2.t0 = _context2["catch"](4);
|
|
83
|
-
isInternalUser = false;
|
|
84
|
-
case 13:
|
|
85
|
-
return _context2.abrupt("return", isInternalUser);
|
|
90
|
+
isInternalUser = false; // 外部用户
|
|
86
91
|
case 14:
|
|
92
|
+
return _context2.abrupt("return", isInternalUser);
|
|
93
|
+
case 15:
|
|
87
94
|
case "end":
|
|
88
95
|
return _context2.stop();
|
|
89
96
|
}
|
|
90
|
-
}, _callee2, null, [[4,
|
|
97
|
+
}, _callee2, null, [[4, 11]]);
|
|
91
98
|
}));
|
|
92
99
|
return function determineUserType() {
|
|
93
100
|
return _ref2.apply(this, arguments);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/dumi-theme-antv",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4-beta.0",
|
|
4
4
|
"description": "AntV website theme based on dumi2.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dumi",
|
|
@@ -129,7 +129,8 @@
|
|
|
129
129
|
"react-dom": ">=16.9.0"
|
|
130
130
|
},
|
|
131
131
|
"publishConfig": {
|
|
132
|
-
"access": "public"
|
|
132
|
+
"access": "public",
|
|
133
|
+
"tag": "beta"
|
|
133
134
|
},
|
|
134
135
|
"authors": [
|
|
135
136
|
"dumi",
|