@freelog/tools-lib 0.1.162 → 0.1.165
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/i18n/I18nNext.d.ts +1 -0
- package/dist/service-API/index.d.ts +2 -0
- package/dist/service-API/nodes.d.ts +5 -0
- package/dist/service-API/presentables.d.ts +9 -0
- package/dist/service-API/resourceType.d.ts +10 -0
- package/dist/service-API/resources.d.ts +196 -1
- package/dist/service-API/storages.d.ts +6 -0
- package/dist/tools-lib.cjs.development.js +1208 -1232
- package/dist/tools-lib.cjs.development.js.map +1 -1
- package/dist/tools-lib.cjs.production.min.js +1 -1
- package/dist/tools-lib.cjs.production.min.js.map +1 -1
- package/dist/tools-lib.esm.js +1208 -1232
- package/dist/tools-lib.esm.js.map +1 -1
- package/dist/utils/linkTo.d.ts +49 -5
- package/package.json +1 -1
- package/src/service-API/index.ts +2 -0
- package/src/service-API/nodes.ts +113 -99
- package/src/service-API/presentables.ts +343 -322
- package/src/service-API/resourceType.ts +29 -0
- package/src/service-API/resources.ts +417 -1
- package/src/service-API/storages.ts +418 -403
- package/src/utils/linkTo.ts +594 -479
package/dist/tools-lib.esm.js
CHANGED
|
@@ -6,50 +6,42 @@ import i18next from 'i18next';
|
|
|
6
6
|
import Cookies from 'js-cookie';
|
|
7
7
|
import htmlReactParser from 'html-react-parser';
|
|
8
8
|
|
|
9
|
+
// import {report} from '@freelog/resource-policy-lang/dist';
|
|
9
10
|
// import {ContractEntity} from '@freelog/resource-policy-lang/dist/tools/ContractTool';
|
|
10
11
|
// const {compile} = require('@freelog/resource-policy-lang');
|
|
11
|
-
|
|
12
12
|
/**
|
|
13
13
|
* 将对应的字节数,转换为易读单位数量
|
|
14
14
|
* @param bytes
|
|
15
15
|
* @return {string}
|
|
16
16
|
*/
|
|
17
|
-
|
|
18
17
|
function humanizeSize(bytes) {
|
|
19
18
|
// console.log('dddhumanizeSizesdfsd');
|
|
20
19
|
if (bytes <= 0) {
|
|
21
20
|
return '0 B';
|
|
22
21
|
}
|
|
23
|
-
|
|
24
22
|
var unitArr = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
|
25
23
|
var index = Math.floor(Math.log(bytes) / Math.log(1024));
|
|
26
24
|
var size = Math.round(bytes / Math.pow(1024, index) * 100) / 100; //保留的小数位数
|
|
27
|
-
|
|
28
25
|
return size + ' ' + unitArr[index];
|
|
29
26
|
}
|
|
30
27
|
/**
|
|
31
28
|
* 格式化日期时间
|
|
32
29
|
*/
|
|
33
|
-
|
|
34
30
|
function formatDateTime(date, showTime) {
|
|
35
31
|
if (showTime === void 0) {
|
|
36
32
|
showTime = false;
|
|
37
33
|
}
|
|
38
|
-
|
|
39
34
|
return moment(date).format('YYYY/MM/DD' + (showTime ? ' HH:mm' : ''));
|
|
40
35
|
}
|
|
41
36
|
/**
|
|
42
37
|
* 根据传入的子域名拼合成完整的适合的url
|
|
43
38
|
* @param domain 要组合的三级域名
|
|
44
39
|
*/
|
|
45
|
-
|
|
46
40
|
function completeUrlByDomain(domain) {
|
|
47
41
|
var origin = "https://" + domain + ".testfreelog.com";
|
|
48
|
-
|
|
49
42
|
if (window.location.origin.includes('.freelog.com')) {
|
|
50
43
|
origin = "https://" + domain + ".freelog.com";
|
|
51
44
|
}
|
|
52
|
-
|
|
53
45
|
return origin;
|
|
54
46
|
}
|
|
55
47
|
/**
|
|
@@ -98,12 +90,10 @@ function completeUrlByDomain(domain) {
|
|
|
98
90
|
// };
|
|
99
91
|
// }
|
|
100
92
|
// }
|
|
101
|
-
|
|
102
93
|
/**
|
|
103
94
|
* 将资源类型关键字数组,转换成标准展示文字
|
|
104
95
|
* @param arr 关键字数组
|
|
105
96
|
*/
|
|
106
|
-
|
|
107
97
|
function resourceTypeKeyArrToResourceType(arr) {
|
|
108
98
|
return arr.join(' / ');
|
|
109
99
|
}
|
|
@@ -117,46 +107,46 @@ var Format = {
|
|
|
117
107
|
};
|
|
118
108
|
|
|
119
109
|
// 展品名称
|
|
120
|
-
var EXHIBIT_NAME = /*#__PURE__*/new RegExp(/^(?!.*(\\|\/|:|\*|\?|"|<|>|\||\s|@|\$|#)).{1,60}$/);
|
|
121
|
-
|
|
122
|
-
var RESOURCE_NAME = /*#__PURE__*/new RegExp(/^(?!.*(\\|\/|:|\*|\?|"|<|>|\||\s|@|\$|#)).{1,60}$/);
|
|
123
|
-
|
|
124
|
-
var RESOURCE_TYPE = /*#__PURE__*/new RegExp("^[\u4E00-\u9FEFa-zA-Z0-9\\-&.,]{1,40}$");
|
|
110
|
+
var EXHIBIT_NAME = /*#__PURE__*/new RegExp(/^(?!.*(\\|\/|:|\*|\?|"|<|>|\||\s|@|\$|#)).{1,60}$/);
|
|
111
|
+
// 资源名称
|
|
112
|
+
var RESOURCE_NAME = /*#__PURE__*/new RegExp(/^(?!.*(\\|\/|:|\*|\?|"|<|>|\||\s|@|\$|#)).{1,60}$/);
|
|
113
|
+
// 资源类型
|
|
114
|
+
var RESOURCE_TYPE = /*#__PURE__*/new RegExp("^[\u4E00-\u9FEFa-zA-Z0-9\\-&.,]{1,40}$");
|
|
115
|
+
// 自定义属性键
|
|
125
116
|
// export const CUSTOM_KEY: RegExp = new RegExp(/^[a-zA-Z_]([a-zA-Z0-9_]{1,19})?$/);
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
117
|
+
var CUSTOM_KEY = /*#__PURE__*/new RegExp('^[a-zA-Z]([a-zA-Z0-9_]{1,29})?$');
|
|
118
|
+
// 节点名称
|
|
119
|
+
var NODE_NAME = /*#__PURE__*/new RegExp(/^[\u4E00-\u9FA5|a-zA-Z0-9]{2,24}$/);
|
|
120
|
+
// 节点地址
|
|
130
121
|
// export const NODE_DOMAIN: RegExp = new RegExp(/^(?!-)[a-z0-9-]{4,24}(?<!-)$/);
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
122
|
+
var NODE_DOMAIN = /*#__PURE__*/new RegExp(/^[a-z0-9][a-z0-9-]{2,22}[a-z0-9]$/);
|
|
123
|
+
// 支付密码
|
|
124
|
+
var PAY_PASSWORD = /*#__PURE__*/new RegExp(/^\d{6}$/);
|
|
125
|
+
// 手机号码
|
|
126
|
+
var MOBILE_PHONE_NUMBER = /*#__PURE__*/new RegExp(/^1[345789]\d{9}$/);
|
|
127
|
+
// export const TELEPHONE_NUMBER = /^((13[0-9])|(14[5-9])|(15([0-3]|[5-9]))|(16[6-7])|(17[1-8])|(18[0-9])|(19[1|3])|(19[5|6])|(19[8|9]))\d{8}$/
|
|
137
128
|
// 邮箱地址
|
|
138
|
-
|
|
139
|
-
|
|
129
|
+
var EMAIL_ADDRESS = /*#__PURE__*/new RegExp(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/);
|
|
130
|
+
// 用户名
|
|
140
131
|
// export const USERNAME: RegExp = new RegExp(/^(?!-)[A-Za-z0-9-]{1,30}(?<!-)$/);
|
|
141
|
-
|
|
142
|
-
|
|
132
|
+
var USERNAME = /*#__PURE__*/new RegExp(/^([A-Za-z0-9][A-Za-z0-9-]{0,28})?[A-Za-z0-9]$/);
|
|
133
|
+
// 用户密码
|
|
143
134
|
// export const PASSWORD = /^(?=.*[a-zA-Z])(?=.*[0-9]).{6,24}$/;
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
135
|
+
var PASSWORD = /*#__PURE__*/new RegExp(/^(?=.*[0-9])(?=.*[a-zA-Z])(.{6,24})$/);
|
|
136
|
+
// 自然数
|
|
137
|
+
var NATURAL_NUMBER = /*#__PURE__*/new RegExp(/^[0-9]*$/);
|
|
138
|
+
// 正整数
|
|
139
|
+
var POSITIVE_INTEGER = /*#__PURE__*/new RegExp(/^[1-9]\d*$/);
|
|
140
|
+
// 最多两位小数的正数
|
|
150
141
|
// export const MAX_2_DECIMAL_POSITIVE_NUMBER = new RegExp(/^\d+(.\d{1,2})?$/);
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
142
|
+
var MAX_2_DECIMAL_POSITIVE_NUMBER = /*#__PURE__*/new RegExp(/^\d+(\.\d{0,2})?$/);
|
|
143
|
+
// 对象的Bucket名称
|
|
144
|
+
var BUCKET_NAME = /*#__PURE__*/new RegExp(/^([a-z0-9][a-z0-9-]{0,61})?[a-z0-9]$/);
|
|
145
|
+
// JS变量名称
|
|
146
|
+
var JS_VARIABLE_NAME = /*#__PURE__*/new RegExp(/^[A-Za-z$_][\w$_]*$/);
|
|
147
|
+
// 日期
|
|
148
|
+
var DATE = /*#__PURE__*/new RegExp(/(([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29)$/);
|
|
149
|
+
// 日期时间
|
|
160
150
|
var DATE_TIME = /*#__PURE__*/new RegExp(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/);
|
|
161
151
|
|
|
162
152
|
var Regexp = {
|
|
@@ -181,441 +171,367 @@ var Regexp = {
|
|
|
181
171
|
DATE_TIME: DATE_TIME
|
|
182
172
|
};
|
|
183
173
|
|
|
174
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
175
|
+
try {
|
|
176
|
+
var i = n[a](c),
|
|
177
|
+
u = i.value;
|
|
178
|
+
} catch (n) {
|
|
179
|
+
return void e(n);
|
|
180
|
+
}
|
|
181
|
+
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
182
|
+
}
|
|
183
|
+
function _asyncToGenerator(n) {
|
|
184
|
+
return function () {
|
|
185
|
+
var t = this,
|
|
186
|
+
e = arguments;
|
|
187
|
+
return new Promise(function (r, o) {
|
|
188
|
+
var a = n.apply(t, e);
|
|
189
|
+
function _next(n) {
|
|
190
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
191
|
+
}
|
|
192
|
+
function _throw(n) {
|
|
193
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
194
|
+
}
|
|
195
|
+
_next(void 0);
|
|
196
|
+
});
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
function _extends() {
|
|
200
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
201
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
202
|
+
var t = arguments[e];
|
|
203
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
204
|
+
}
|
|
205
|
+
return n;
|
|
206
|
+
}, _extends.apply(null, arguments);
|
|
207
|
+
}
|
|
208
|
+
function _objectDestructuringEmpty(t) {
|
|
209
|
+
if (null == t) throw new TypeError("Cannot destructure " + t);
|
|
210
|
+
}
|
|
211
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
212
|
+
if (null == r) return {};
|
|
213
|
+
var t = {};
|
|
214
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
215
|
+
if (e.includes(n)) continue;
|
|
216
|
+
t[n] = r[n];
|
|
217
|
+
}
|
|
218
|
+
return t;
|
|
219
|
+
}
|
|
184
220
|
function _regeneratorRuntime() {
|
|
185
|
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
186
|
-
|
|
187
221
|
_regeneratorRuntime = function () {
|
|
188
|
-
return
|
|
222
|
+
return e;
|
|
189
223
|
};
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
224
|
+
var t,
|
|
225
|
+
e = {},
|
|
226
|
+
r = Object.prototype,
|
|
227
|
+
n = r.hasOwnProperty,
|
|
228
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
229
|
+
t[e] = r.value;
|
|
230
|
+
},
|
|
231
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
232
|
+
a = i.iterator || "@@iterator",
|
|
233
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
234
|
+
u = i.toStringTag || "@@toStringTag";
|
|
235
|
+
function define(t, e, r) {
|
|
236
|
+
return Object.defineProperty(t, e, {
|
|
237
|
+
value: r,
|
|
202
238
|
enumerable: !0,
|
|
203
239
|
configurable: !0,
|
|
204
240
|
writable: !0
|
|
205
|
-
}),
|
|
241
|
+
}), t[e];
|
|
206
242
|
}
|
|
207
|
-
|
|
208
243
|
try {
|
|
209
244
|
define({}, "");
|
|
210
|
-
} catch (
|
|
211
|
-
define = function (
|
|
212
|
-
return
|
|
245
|
+
} catch (t) {
|
|
246
|
+
define = function (t, e, r) {
|
|
247
|
+
return t[e] = r;
|
|
213
248
|
};
|
|
214
249
|
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
return function (method, arg) {
|
|
223
|
-
if ("executing" === state) throw new Error("Generator is already running");
|
|
224
|
-
|
|
225
|
-
if ("completed" === state) {
|
|
226
|
-
if ("throw" === method) throw arg;
|
|
227
|
-
return doneResult();
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
for (context.method = method, context.arg = arg;;) {
|
|
231
|
-
var delegate = context.delegate;
|
|
232
|
-
|
|
233
|
-
if (delegate) {
|
|
234
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
235
|
-
|
|
236
|
-
if (delegateResult) {
|
|
237
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
238
|
-
return delegateResult;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
243
|
-
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
244
|
-
context.dispatchException(context.arg);
|
|
245
|
-
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
246
|
-
state = "executing";
|
|
247
|
-
var record = tryCatch(innerFn, self, context);
|
|
248
|
-
|
|
249
|
-
if ("normal" === record.type) {
|
|
250
|
-
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
251
|
-
return {
|
|
252
|
-
value: record.arg,
|
|
253
|
-
done: context.done
|
|
254
|
-
};
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
258
|
-
}
|
|
259
|
-
};
|
|
260
|
-
}(innerFn, self, context), generator;
|
|
250
|
+
function wrap(t, e, r, n) {
|
|
251
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
252
|
+
a = Object.create(i.prototype),
|
|
253
|
+
c = new Context(n || []);
|
|
254
|
+
return o(a, "_invoke", {
|
|
255
|
+
value: makeInvokeMethod(t, r, c)
|
|
256
|
+
}), a;
|
|
261
257
|
}
|
|
262
|
-
|
|
263
|
-
function tryCatch(fn, obj, arg) {
|
|
258
|
+
function tryCatch(t, e, r) {
|
|
264
259
|
try {
|
|
265
260
|
return {
|
|
266
261
|
type: "normal",
|
|
267
|
-
arg:
|
|
262
|
+
arg: t.call(e, r)
|
|
268
263
|
};
|
|
269
|
-
} catch (
|
|
264
|
+
} catch (t) {
|
|
270
265
|
return {
|
|
271
266
|
type: "throw",
|
|
272
|
-
arg:
|
|
267
|
+
arg: t
|
|
273
268
|
};
|
|
274
269
|
}
|
|
275
270
|
}
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
271
|
+
e.wrap = wrap;
|
|
272
|
+
var h = "suspendedStart",
|
|
273
|
+
l = "suspendedYield",
|
|
274
|
+
f = "executing",
|
|
275
|
+
s = "completed",
|
|
276
|
+
y = {};
|
|
280
277
|
function Generator() {}
|
|
281
|
-
|
|
282
278
|
function GeneratorFunction() {}
|
|
283
|
-
|
|
284
279
|
function GeneratorFunctionPrototype() {}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
280
|
+
var p = {};
|
|
281
|
+
define(p, a, function () {
|
|
288
282
|
return this;
|
|
289
283
|
});
|
|
290
|
-
var
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
var
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
return this._invoke(method, arg);
|
|
284
|
+
var d = Object.getPrototypeOf,
|
|
285
|
+
v = d && d(d(values([])));
|
|
286
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
287
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
288
|
+
function defineIteratorMethods(t) {
|
|
289
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
290
|
+
define(t, e, function (t) {
|
|
291
|
+
return this._invoke(e, t);
|
|
299
292
|
});
|
|
300
293
|
});
|
|
301
294
|
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
invoke("
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
}, function (error) {
|
|
317
|
-
return invoke("throw", error, resolve, reject);
|
|
295
|
+
function AsyncIterator(t, e) {
|
|
296
|
+
function invoke(r, o, i, a) {
|
|
297
|
+
var c = tryCatch(t[r], t, o);
|
|
298
|
+
if ("throw" !== c.type) {
|
|
299
|
+
var u = c.arg,
|
|
300
|
+
h = u.value;
|
|
301
|
+
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
302
|
+
invoke("next", t, i, a);
|
|
303
|
+
}, function (t) {
|
|
304
|
+
invoke("throw", t, i, a);
|
|
305
|
+
}) : e.resolve(h).then(function (t) {
|
|
306
|
+
u.value = t, i(u);
|
|
307
|
+
}, function (t) {
|
|
308
|
+
return invoke("throw", t, i, a);
|
|
318
309
|
});
|
|
319
310
|
}
|
|
320
|
-
|
|
321
|
-
reject(record.arg);
|
|
311
|
+
a(c.arg);
|
|
322
312
|
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
}
|
|
313
|
+
var r;
|
|
314
|
+
o(this, "_invoke", {
|
|
315
|
+
value: function (t, n) {
|
|
316
|
+
function callInvokeWithMethodAndArg() {
|
|
317
|
+
return new e(function (e, r) {
|
|
318
|
+
invoke(t, n, e, r);
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
331
322
|
}
|
|
332
|
-
|
|
333
|
-
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
334
|
-
};
|
|
323
|
+
});
|
|
335
324
|
}
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
325
|
+
function makeInvokeMethod(e, r, n) {
|
|
326
|
+
var o = h;
|
|
327
|
+
return function (i, a) {
|
|
328
|
+
if (o === f) throw Error("Generator is already running");
|
|
329
|
+
if (o === s) {
|
|
330
|
+
if ("throw" === i) throw a;
|
|
331
|
+
return {
|
|
332
|
+
value: t,
|
|
333
|
+
done: !0
|
|
334
|
+
};
|
|
344
335
|
}
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
336
|
+
for (n.method = i, n.arg = a;;) {
|
|
337
|
+
var c = n.delegate;
|
|
338
|
+
if (c) {
|
|
339
|
+
var u = maybeInvokeDelegate(c, n);
|
|
340
|
+
if (u) {
|
|
341
|
+
if (u === y) continue;
|
|
342
|
+
return u;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
346
|
+
if (o === h) throw o = s, n.arg;
|
|
347
|
+
n.dispatchException(n.arg);
|
|
348
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
349
|
+
o = f;
|
|
350
|
+
var p = tryCatch(e, r, n);
|
|
351
|
+
if ("normal" === p.type) {
|
|
352
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
353
|
+
return {
|
|
354
|
+
value: p.arg,
|
|
355
|
+
done: n.done
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
359
|
+
}
|
|
360
|
+
};
|
|
353
361
|
}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
362
|
+
function maybeInvokeDelegate(e, r) {
|
|
363
|
+
var n = r.method,
|
|
364
|
+
o = e.iterator[n];
|
|
365
|
+
if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
366
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
367
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
368
|
+
var a = i.arg;
|
|
369
|
+
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
370
|
+
}
|
|
371
|
+
function pushTryEntry(t) {
|
|
372
|
+
var e = {
|
|
373
|
+
tryLoc: t[0]
|
|
358
374
|
};
|
|
359
|
-
1 in
|
|
375
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
360
376
|
}
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
record.type = "normal", delete record.arg, entry.completion = record;
|
|
377
|
+
function resetTryEntry(t) {
|
|
378
|
+
var e = t.completion || {};
|
|
379
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
365
380
|
}
|
|
366
|
-
|
|
367
|
-
function Context(tryLocsList) {
|
|
381
|
+
function Context(t) {
|
|
368
382
|
this.tryEntries = [{
|
|
369
383
|
tryLoc: "root"
|
|
370
|
-
}],
|
|
384
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
371
385
|
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
if (
|
|
377
|
-
if (
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
next =
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
return next.value = undefined, next.done = !0, next;
|
|
385
|
-
};
|
|
386
|
-
|
|
387
|
-
return next.next = next;
|
|
386
|
+
function values(e) {
|
|
387
|
+
if (e || "" === e) {
|
|
388
|
+
var r = e[a];
|
|
389
|
+
if (r) return r.call(e);
|
|
390
|
+
if ("function" == typeof e.next) return e;
|
|
391
|
+
if (!isNaN(e.length)) {
|
|
392
|
+
var o = -1,
|
|
393
|
+
i = function next() {
|
|
394
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
395
|
+
return next.value = t, next.done = !0, next;
|
|
396
|
+
};
|
|
397
|
+
return i.next = i;
|
|
388
398
|
}
|
|
389
399
|
}
|
|
390
|
-
|
|
391
|
-
return {
|
|
392
|
-
next: doneResult
|
|
393
|
-
};
|
|
400
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
394
401
|
}
|
|
395
|
-
|
|
396
|
-
|
|
402
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
403
|
+
value: GeneratorFunctionPrototype,
|
|
404
|
+
configurable: !0
|
|
405
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
406
|
+
value: GeneratorFunction,
|
|
407
|
+
configurable: !0
|
|
408
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
409
|
+
var e = "function" == typeof t && t.constructor;
|
|
410
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
411
|
+
}, e.mark = function (t) {
|
|
412
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
413
|
+
}, e.awrap = function (t) {
|
|
397
414
|
return {
|
|
398
|
-
|
|
399
|
-
done: !0
|
|
415
|
+
__await: t
|
|
400
416
|
};
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
404
|
-
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
405
|
-
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
406
|
-
}, exports.mark = function (genFun) {
|
|
407
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
408
|
-
}, exports.awrap = function (arg) {
|
|
409
|
-
return {
|
|
410
|
-
__await: arg
|
|
411
|
-
};
|
|
412
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
417
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
413
418
|
return this;
|
|
414
|
-
}),
|
|
415
|
-
void 0 ===
|
|
416
|
-
var
|
|
417
|
-
return
|
|
418
|
-
return
|
|
419
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
420
|
+
void 0 === i && (i = Promise);
|
|
421
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
422
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
423
|
+
return t.done ? t.value : a.next();
|
|
419
424
|
});
|
|
420
|
-
}, defineIteratorMethods(
|
|
425
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
421
426
|
return this;
|
|
422
|
-
}), define(
|
|
427
|
+
}), define(g, "toString", function () {
|
|
423
428
|
return "[object Generator]";
|
|
424
|
-
}),
|
|
425
|
-
var
|
|
426
|
-
|
|
427
|
-
for (var
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
if (key in object) return next.value = key, next.done = !1, next;
|
|
429
|
+
}), e.keys = function (t) {
|
|
430
|
+
var e = Object(t),
|
|
431
|
+
r = [];
|
|
432
|
+
for (var n in e) r.push(n);
|
|
433
|
+
return r.reverse(), function next() {
|
|
434
|
+
for (; r.length;) {
|
|
435
|
+
var t = r.pop();
|
|
436
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
433
437
|
}
|
|
434
|
-
|
|
435
438
|
return next.done = !0, next;
|
|
436
439
|
};
|
|
437
|
-
},
|
|
440
|
+
}, e.values = values, Context.prototype = {
|
|
438
441
|
constructor: Context,
|
|
439
|
-
reset: function (
|
|
440
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent =
|
|
442
|
+
reset: function (e) {
|
|
443
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
441
444
|
},
|
|
442
445
|
stop: function () {
|
|
443
446
|
this.done = !0;
|
|
444
|
-
var
|
|
445
|
-
if ("throw" ===
|
|
447
|
+
var t = this.tryEntries[0].completion;
|
|
448
|
+
if ("throw" === t.type) throw t.arg;
|
|
446
449
|
return this.rval;
|
|
447
450
|
},
|
|
448
|
-
dispatchException: function (
|
|
449
|
-
if (this.done) throw
|
|
450
|
-
var
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
451
|
+
dispatchException: function (e) {
|
|
452
|
+
if (this.done) throw e;
|
|
453
|
+
var r = this;
|
|
454
|
+
function handle(n, o) {
|
|
455
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
454
456
|
}
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
if (
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
if (
|
|
466
|
-
if (this.prev <
|
|
467
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
468
|
-
} else if (hasCatch) {
|
|
469
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
457
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
458
|
+
var i = this.tryEntries[o],
|
|
459
|
+
a = i.completion;
|
|
460
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
461
|
+
if (i.tryLoc <= this.prev) {
|
|
462
|
+
var c = n.call(i, "catchLoc"),
|
|
463
|
+
u = n.call(i, "finallyLoc");
|
|
464
|
+
if (c && u) {
|
|
465
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
466
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
467
|
+
} else if (c) {
|
|
468
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
470
469
|
} else {
|
|
471
|
-
if (!
|
|
472
|
-
if (this.prev <
|
|
470
|
+
if (!u) throw Error("try statement without catch or finally");
|
|
471
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
473
472
|
}
|
|
474
473
|
}
|
|
475
474
|
}
|
|
476
475
|
},
|
|
477
|
-
abrupt: function (
|
|
478
|
-
for (var
|
|
479
|
-
var
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
var finallyEntry = entry;
|
|
476
|
+
abrupt: function (t, e) {
|
|
477
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
478
|
+
var o = this.tryEntries[r];
|
|
479
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
480
|
+
var i = o;
|
|
483
481
|
break;
|
|
484
482
|
}
|
|
485
483
|
}
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
484
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
485
|
+
var a = i ? i.completion : {};
|
|
486
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
490
487
|
},
|
|
491
|
-
complete: function (
|
|
492
|
-
if ("throw" ===
|
|
493
|
-
return "break" ===
|
|
488
|
+
complete: function (t, e) {
|
|
489
|
+
if ("throw" === t.type) throw t.arg;
|
|
490
|
+
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
494
491
|
},
|
|
495
|
-
finish: function (
|
|
496
|
-
for (var
|
|
497
|
-
var
|
|
498
|
-
if (
|
|
492
|
+
finish: function (t) {
|
|
493
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
494
|
+
var r = this.tryEntries[e];
|
|
495
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
499
496
|
}
|
|
500
497
|
},
|
|
501
|
-
catch: function (
|
|
502
|
-
for (var
|
|
503
|
-
var
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
var thrown = record.arg;
|
|
510
|
-
resetTryEntry(entry);
|
|
498
|
+
catch: function (t) {
|
|
499
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
500
|
+
var r = this.tryEntries[e];
|
|
501
|
+
if (r.tryLoc === t) {
|
|
502
|
+
var n = r.completion;
|
|
503
|
+
if ("throw" === n.type) {
|
|
504
|
+
var o = n.arg;
|
|
505
|
+
resetTryEntry(r);
|
|
511
506
|
}
|
|
512
|
-
|
|
513
|
-
return thrown;
|
|
507
|
+
return o;
|
|
514
508
|
}
|
|
515
509
|
}
|
|
516
|
-
|
|
517
|
-
throw new Error("illegal catch attempt");
|
|
510
|
+
throw Error("illegal catch attempt");
|
|
518
511
|
},
|
|
519
|
-
delegateYield: function (
|
|
512
|
+
delegateYield: function (e, r, n) {
|
|
520
513
|
return this.delegate = {
|
|
521
|
-
iterator: values(
|
|
522
|
-
resultName:
|
|
523
|
-
nextLoc:
|
|
524
|
-
}, "next" === this.method && (this.arg =
|
|
514
|
+
iterator: values(e),
|
|
515
|
+
resultName: r,
|
|
516
|
+
nextLoc: n
|
|
517
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
525
518
|
}
|
|
526
|
-
},
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
530
|
-
try {
|
|
531
|
-
var info = gen[key](arg);
|
|
532
|
-
var value = info.value;
|
|
533
|
-
} catch (error) {
|
|
534
|
-
reject(error);
|
|
535
|
-
return;
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
if (info.done) {
|
|
539
|
-
resolve(value);
|
|
540
|
-
} else {
|
|
541
|
-
Promise.resolve(value).then(_next, _throw);
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
function _asyncToGenerator(fn) {
|
|
546
|
-
return function () {
|
|
547
|
-
var self = this,
|
|
548
|
-
args = arguments;
|
|
549
|
-
return new Promise(function (resolve, reject) {
|
|
550
|
-
var gen = fn.apply(self, args);
|
|
551
|
-
|
|
552
|
-
function _next(value) {
|
|
553
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
function _throw(err) {
|
|
557
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
_next(undefined);
|
|
561
|
-
});
|
|
562
|
-
};
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
function _extends() {
|
|
566
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
567
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
568
|
-
var source = arguments[i];
|
|
569
|
-
|
|
570
|
-
for (var key in source) {
|
|
571
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
572
|
-
target[key] = source[key];
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
return target;
|
|
578
|
-
};
|
|
579
|
-
return _extends.apply(this, arguments);
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
function _objectDestructuringEmpty(obj) {
|
|
583
|
-
if (obj == null) throw new TypeError("Cannot destructure undefined");
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
587
|
-
if (source == null) return {};
|
|
588
|
-
var target = {};
|
|
589
|
-
var sourceKeys = Object.keys(source);
|
|
590
|
-
var key, i;
|
|
591
|
-
|
|
592
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
593
|
-
key = sourceKeys[i];
|
|
594
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
595
|
-
target[key] = source[key];
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
return target;
|
|
519
|
+
}, e;
|
|
599
520
|
}
|
|
600
521
|
|
|
601
522
|
var _excluded = ["resourceID"],
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
523
|
+
_excluded2 = ["nodeID", "showPage"],
|
|
524
|
+
_excluded3 = ["exhibitID"],
|
|
525
|
+
_excluded4 = ["nodeID", "showPage"],
|
|
526
|
+
_excluded5 = ["goTo"],
|
|
527
|
+
_excluded6 = ["goTo"],
|
|
528
|
+
_excluded7 = ["goTo", "returnUrl"];
|
|
607
529
|
function home(_temp) {
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
_objectDestructuringEmpty(_ref);
|
|
611
|
-
|
|
530
|
+
_objectDestructuringEmpty(_temp === void 0 ? {} : _temp);
|
|
612
531
|
return "/home";
|
|
613
532
|
}
|
|
614
533
|
function activities(_temp2) {
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
_objectDestructuringEmpty(_ref2);
|
|
618
|
-
|
|
534
|
+
_objectDestructuringEmpty(_temp2 === void 0 ? {} : _temp2);
|
|
619
535
|
return "/activities";
|
|
620
536
|
}
|
|
621
537
|
function activity(_ref3) {
|
|
@@ -623,308 +539,299 @@ function activity(_ref3) {
|
|
|
623
539
|
return "/activity/" + activityID;
|
|
624
540
|
}
|
|
625
541
|
function dashboard(_temp3) {
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
_objectDestructuringEmpty(_ref4);
|
|
629
|
-
|
|
542
|
+
_objectDestructuringEmpty(_temp3 === void 0 ? {} : _temp3);
|
|
630
543
|
return "/dashboard";
|
|
631
544
|
}
|
|
632
545
|
function market(_temp4) {
|
|
633
546
|
var _ref5 = _temp4 === void 0 ? {} : _temp4,
|
|
634
|
-
|
|
635
|
-
|
|
547
|
+
params = _extends({}, (_objectDestructuringEmpty(_ref5), _ref5));
|
|
636
548
|
return "/market" + handleQuery(params);
|
|
637
549
|
}
|
|
638
550
|
function exampleNodes(_temp5) {
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
_objectDestructuringEmpty(_ref6);
|
|
642
|
-
|
|
551
|
+
_objectDestructuringEmpty(_temp5 === void 0 ? {} : _temp5);
|
|
643
552
|
return "/examples";
|
|
644
553
|
}
|
|
645
554
|
function resourceDetails(_ref7) {
|
|
646
555
|
var resourceID = _ref7.resourceID,
|
|
647
|
-
|
|
648
|
-
|
|
556
|
+
params = _objectWithoutPropertiesLoose(_ref7, _excluded);
|
|
649
557
|
return "/resource/details/" + resourceID + handleQuery(params);
|
|
650
558
|
}
|
|
559
|
+
function collectionDetails(_ref8) {
|
|
560
|
+
var collectionID = _ref8.collectionID;
|
|
561
|
+
return "/resource/collectionDetails/" + collectionID;
|
|
562
|
+
}
|
|
651
563
|
function resourceCreatorEntry(_temp6) {
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
_objectDestructuringEmpty(_ref8);
|
|
655
|
-
|
|
564
|
+
_objectDestructuringEmpty(_temp6 === void 0 ? {} : _temp6);
|
|
656
565
|
return "/resource/creatorEntry";
|
|
657
566
|
}
|
|
658
567
|
function resourceCreator(_temp7) {
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
_objectDestructuringEmpty(_ref9);
|
|
662
|
-
|
|
568
|
+
_objectDestructuringEmpty(_temp7 === void 0 ? {} : _temp7);
|
|
663
569
|
return "/resource/creator";
|
|
664
570
|
}
|
|
665
571
|
function resourceCreatorBatch(_temp8) {
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
_objectDestructuringEmpty(_ref10);
|
|
669
|
-
|
|
572
|
+
_objectDestructuringEmpty(_temp8 === void 0 ? {} : _temp8);
|
|
670
573
|
return "/resource/creatorBatch";
|
|
671
574
|
}
|
|
672
|
-
function
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
575
|
+
function collectionCreator(_temp9) {
|
|
576
|
+
_objectDestructuringEmpty(_temp9 === void 0 ? {} : _temp9);
|
|
577
|
+
return "/resource/collectionCreator";
|
|
578
|
+
}
|
|
579
|
+
function myResources(_temp10) {
|
|
580
|
+
_objectDestructuringEmpty(_temp10 === void 0 ? {} : _temp10);
|
|
677
581
|
return "/resource/list";
|
|
678
582
|
}
|
|
679
|
-
function
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
583
|
+
function myCollections(_temp11) {
|
|
584
|
+
_objectDestructuringEmpty(_temp11 === void 0 ? {} : _temp11);
|
|
585
|
+
return "/resource/collection";
|
|
586
|
+
}
|
|
587
|
+
function myCollects(_temp12) {
|
|
588
|
+
_objectDestructuringEmpty(_temp12 === void 0 ? {} : _temp12);
|
|
684
589
|
return "/resource/collect";
|
|
685
590
|
}
|
|
686
|
-
function
|
|
687
|
-
var resourceID =
|
|
591
|
+
function resourceVersionInfo(_ref16) {
|
|
592
|
+
var resourceID = _ref16.resourceID,
|
|
593
|
+
_ref16$version = _ref16.version,
|
|
594
|
+
version = _ref16$version === void 0 ? '' : _ref16$version;
|
|
595
|
+
return "/resource/sidebar/versionInfo/" + resourceID + handleQuery({
|
|
596
|
+
version: version
|
|
597
|
+
});
|
|
598
|
+
}
|
|
599
|
+
function resourceInfo(_ref17) {
|
|
600
|
+
var resourceID = _ref17.resourceID;
|
|
688
601
|
return "/resource/sidebar/info/" + resourceID;
|
|
689
602
|
}
|
|
690
|
-
function resourcePolicy(
|
|
691
|
-
var resourceID =
|
|
603
|
+
function resourcePolicy(_ref18) {
|
|
604
|
+
var resourceID = _ref18.resourceID;
|
|
692
605
|
return "/resource/sidebar/policy/" + resourceID;
|
|
693
606
|
}
|
|
694
|
-
function resourceContract(
|
|
695
|
-
var resourceID =
|
|
607
|
+
function resourceContract(_ref19) {
|
|
608
|
+
var resourceID = _ref19.resourceID;
|
|
696
609
|
return "/resource/sidebar/contract/" + resourceID;
|
|
697
610
|
}
|
|
698
|
-
function resourceDependency(
|
|
699
|
-
var resourceID =
|
|
611
|
+
function resourceDependency(_ref20) {
|
|
612
|
+
var resourceID = _ref20.resourceID;
|
|
700
613
|
return "/resource/sidebar/dependency/" + resourceID;
|
|
701
614
|
}
|
|
702
|
-
function resourceVersionCreator(
|
|
703
|
-
var resourceID =
|
|
615
|
+
function resourceVersionCreator(_ref21) {
|
|
616
|
+
var resourceID = _ref21.resourceID;
|
|
704
617
|
return "/resource/versionCreator/" + resourceID;
|
|
705
618
|
}
|
|
706
|
-
function
|
|
707
|
-
var
|
|
708
|
-
|
|
709
|
-
version = _ref18$version === void 0 ? '' : _ref18$version;
|
|
710
|
-
return "/resource/sidebar/versionInfo/" + resourceID + handleQuery({
|
|
711
|
-
version: version
|
|
712
|
-
});
|
|
619
|
+
function collectionVersionInfo(_ref22) {
|
|
620
|
+
var collectionID = _ref22.collectionID;
|
|
621
|
+
return "/resource/collectionSidebar/versionInfo/" + collectionID;
|
|
713
622
|
}
|
|
714
|
-
function
|
|
715
|
-
var
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
623
|
+
function collectionInfo(_ref23) {
|
|
624
|
+
var collectionID = _ref23.collectionID;
|
|
625
|
+
return "/resource/collectionSidebar/info/" + collectionID;
|
|
626
|
+
}
|
|
627
|
+
function collectionPolicy(_ref24) {
|
|
628
|
+
var collectionID = _ref24.collectionID;
|
|
629
|
+
return "/resource/collectionSidebar/policy/" + collectionID;
|
|
630
|
+
}
|
|
631
|
+
function collectionContract(_ref25) {
|
|
632
|
+
var collectionID = _ref25.collectionID;
|
|
633
|
+
return "/resource/collectionSidebar/contract/" + collectionID;
|
|
634
|
+
}
|
|
635
|
+
function collectionDependency(_ref26) {
|
|
636
|
+
var collectionID = _ref26.collectionID;
|
|
637
|
+
return "/resource/collectionSidebar/dependency/" + collectionID;
|
|
638
|
+
}
|
|
639
|
+
function nodeCreator(_temp13) {
|
|
640
|
+
_objectDestructuringEmpty(_temp13 === void 0 ? {} : _temp13);
|
|
719
641
|
return "/node/creator";
|
|
720
642
|
}
|
|
721
|
-
function nodeManagement(
|
|
722
|
-
var nodeID =
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
643
|
+
function nodeManagement(_ref28) {
|
|
644
|
+
var nodeID = _ref28.nodeID,
|
|
645
|
+
_ref28$showPage = _ref28.showPage,
|
|
646
|
+
showPage = _ref28$showPage === void 0 ? 'exhibit' : _ref28$showPage,
|
|
647
|
+
params = _objectWithoutPropertiesLoose(_ref28, _excluded2);
|
|
727
648
|
return "/node/formal/" + nodeID + handleQuery(_extends({
|
|
728
649
|
showPage: showPage
|
|
729
650
|
}, params));
|
|
730
651
|
}
|
|
731
|
-
function exhibitManagement(
|
|
732
|
-
var exhibitID =
|
|
733
|
-
|
|
734
|
-
return "/node/exhibit/formal/" + exhibitID + handleQuery({
|
|
652
|
+
function exhibitManagement(_ref29) {
|
|
653
|
+
var exhibitID = _ref29.exhibitID,
|
|
654
|
+
params = _objectWithoutPropertiesLoose(_ref29, _excluded3);
|
|
655
|
+
return "/node/exhibit/formal/" + exhibitID + handleQuery(_extends({}, params));
|
|
656
|
+
}
|
|
657
|
+
function collectionExhibitManagement(_ref30) {
|
|
658
|
+
var exhibitID = _ref30.exhibitID,
|
|
659
|
+
openAuthDrawer = _ref30.openAuthDrawer;
|
|
660
|
+
return "/node/collectionExhibit/formal/" + exhibitID + handleQuery({
|
|
735
661
|
openAuthDrawer: openAuthDrawer
|
|
736
662
|
});
|
|
737
663
|
}
|
|
738
|
-
function informNodeManagement(
|
|
739
|
-
var nodeID =
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
664
|
+
function informNodeManagement(_ref31) {
|
|
665
|
+
var nodeID = _ref31.nodeID,
|
|
666
|
+
_ref31$showPage = _ref31.showPage,
|
|
667
|
+
showPage = _ref31$showPage === void 0 ? 'exhibit' : _ref31$showPage,
|
|
668
|
+
params = _objectWithoutPropertiesLoose(_ref31, _excluded4);
|
|
744
669
|
return "/node/informal/" + nodeID + handleQuery(_extends({
|
|
745
670
|
showPage: showPage
|
|
746
671
|
}, params));
|
|
747
672
|
}
|
|
748
|
-
function informExhibitManagement(
|
|
749
|
-
var exhibitID =
|
|
673
|
+
function informExhibitManagement(_ref32) {
|
|
674
|
+
var exhibitID = _ref32.exhibitID;
|
|
750
675
|
return "/node/exhibit/informal/" + exhibitID;
|
|
751
676
|
}
|
|
752
|
-
function storageSpace(
|
|
753
|
-
var
|
|
754
|
-
|
|
755
|
-
|
|
677
|
+
function storageSpace(_temp14) {
|
|
678
|
+
var _ref33 = _temp14 === void 0 ? {} : _temp14,
|
|
679
|
+
params = _extends({}, (_objectDestructuringEmpty(_ref33), _ref33));
|
|
756
680
|
return "/storage" + handleQuery(params);
|
|
757
681
|
}
|
|
758
|
-
function objectDetails(
|
|
759
|
-
var params = _extends({},
|
|
760
|
-
|
|
682
|
+
function objectDetails(_ref34) {
|
|
683
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref34), _ref34));
|
|
761
684
|
return "/storage" + handleQuery(params);
|
|
762
685
|
}
|
|
763
|
-
function
|
|
764
|
-
var
|
|
686
|
+
function collectionCreateSuccess(_ref35) {
|
|
687
|
+
var collectionID = _ref35.collectionID;
|
|
688
|
+
return "/result/collection/create/success/" + collectionID;
|
|
689
|
+
}
|
|
690
|
+
function resourceCreateSuccess(_ref36) {
|
|
691
|
+
var resourceID = _ref36.resourceID;
|
|
765
692
|
return "/result/resource/create/success/" + resourceID;
|
|
766
693
|
}
|
|
767
|
-
function resourceVersionCreateSuccess(
|
|
768
|
-
var resourceID =
|
|
769
|
-
|
|
694
|
+
function resourceVersionCreateSuccess(_ref37) {
|
|
695
|
+
var resourceID = _ref37.resourceID,
|
|
696
|
+
version = _ref37.version;
|
|
770
697
|
return "/result/resource/version/create/success/" + resourceID + "/" + version;
|
|
771
698
|
}
|
|
772
|
-
function resourceVersionCreateRelease(
|
|
773
|
-
var resourceID =
|
|
774
|
-
|
|
699
|
+
function resourceVersionCreateRelease(_ref38) {
|
|
700
|
+
var resourceID = _ref38.resourceID,
|
|
701
|
+
version = _ref38.version;
|
|
775
702
|
return "/result/resource/version/create/release/" + resourceID + "/" + version;
|
|
776
703
|
}
|
|
777
|
-
function nodeCreateSuccess(
|
|
778
|
-
var nodeID =
|
|
704
|
+
function nodeCreateSuccess(_ref39) {
|
|
705
|
+
var nodeID = _ref39.nodeID;
|
|
779
706
|
return "/result/node/create/success/" + nodeID;
|
|
780
707
|
}
|
|
781
|
-
function invitation(
|
|
782
|
-
var
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
708
|
+
function invitation(_temp15) {
|
|
709
|
+
var _ref40 = _temp15 === void 0 ? {} : _temp15,
|
|
710
|
+
goTo = _ref40.goTo,
|
|
711
|
+
params = _objectWithoutPropertiesLoose(_ref40, _excluded5);
|
|
786
712
|
// console.log(params.goTo, 'goTo9iowjefklsdj;flksdjflk')
|
|
787
713
|
return "/invitation" + handleQuery(_extends({}, params, {
|
|
788
714
|
returnUrl: goTo ? encodeURIComponent(goTo) : undefined
|
|
789
715
|
}));
|
|
790
716
|
}
|
|
791
|
-
function exception403(
|
|
792
|
-
var
|
|
793
|
-
|
|
794
|
-
|
|
717
|
+
function exception403(_temp16) {
|
|
718
|
+
var _ref41 = _temp16 === void 0 ? {} : _temp16,
|
|
719
|
+
params = _extends({}, (_objectDestructuringEmpty(_ref41), _ref41));
|
|
795
720
|
var fromUrl = params.from || '';
|
|
796
|
-
|
|
797
721
|
if (!fromUrl) {
|
|
798
722
|
var _window$location = window.location,
|
|
799
|
-
|
|
800
|
-
|
|
723
|
+
href = _window$location.href,
|
|
724
|
+
origin = _window$location.origin;
|
|
801
725
|
fromUrl = href.replace(origin, '');
|
|
802
726
|
}
|
|
803
|
-
|
|
804
727
|
return "/exception/403" + handleQuery({
|
|
805
728
|
from: fromUrl
|
|
806
729
|
});
|
|
807
730
|
}
|
|
808
|
-
function
|
|
809
|
-
var
|
|
731
|
+
function exceptionUnableToAccess(_temp17) {
|
|
732
|
+
var _ref42 = _temp17 === void 0 ? {} : _temp17,
|
|
733
|
+
params = _extends({}, (_objectDestructuringEmpty(_ref42), _ref42));
|
|
734
|
+
var fromUrl = params.from || '';
|
|
735
|
+
if (!fromUrl) {
|
|
736
|
+
var _window$location2 = window.location,
|
|
737
|
+
href = _window$location2.href,
|
|
738
|
+
origin = _window$location2.origin;
|
|
739
|
+
fromUrl = href.replace(origin, '');
|
|
740
|
+
}
|
|
741
|
+
return "/exception/unableToAccess" + handleQuery({
|
|
742
|
+
from: fromUrl
|
|
743
|
+
});
|
|
744
|
+
}
|
|
745
|
+
function nodeFreeze(_ref43) {
|
|
746
|
+
var nodeID = _ref43.nodeID;
|
|
810
747
|
return "/result/node/freeze/" + nodeID;
|
|
811
748
|
}
|
|
812
|
-
function resourceFreeze(
|
|
813
|
-
var resourceID =
|
|
749
|
+
function resourceFreeze(_ref44) {
|
|
750
|
+
var resourceID = _ref44.resourceID;
|
|
814
751
|
return "/result/resource/freeze/" + resourceID;
|
|
815
752
|
}
|
|
816
|
-
function globalSearch(
|
|
817
|
-
var search =
|
|
753
|
+
function globalSearch(_ref45) {
|
|
754
|
+
var search = _ref45.search;
|
|
818
755
|
return "/search" + handleQuery({
|
|
819
756
|
search: search
|
|
820
757
|
});
|
|
821
758
|
}
|
|
822
|
-
function login(
|
|
823
|
-
var
|
|
824
|
-
|
|
825
|
-
|
|
759
|
+
function login(_temp18) {
|
|
760
|
+
var _ref46 = _temp18 === void 0 ? {} : _temp18,
|
|
761
|
+
goTo = _ref46.goTo;
|
|
826
762
|
return "/login" + handleQuery({
|
|
827
763
|
goTo: goTo ? encodeURIComponent(goTo) : undefined
|
|
828
764
|
});
|
|
829
765
|
}
|
|
830
|
-
function logon(
|
|
831
|
-
var
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
766
|
+
function logon(_temp19) {
|
|
767
|
+
var _ref47 = _temp19 === void 0 ? {} : _temp19,
|
|
768
|
+
goTo = _ref47.goTo,
|
|
769
|
+
params = _objectWithoutPropertiesLoose(_ref47, _excluded6);
|
|
835
770
|
return "/logon" + handleQuery(_extends({
|
|
836
771
|
goTo: goTo ? encodeURIComponent(goTo) : undefined
|
|
837
772
|
}, params));
|
|
838
773
|
}
|
|
839
|
-
function bind(
|
|
840
|
-
var
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
774
|
+
function bind(_temp20) {
|
|
775
|
+
var _ref48 = _temp20 === void 0 ? {} : _temp20,
|
|
776
|
+
goTo = _ref48.goTo,
|
|
777
|
+
returnUrl = _ref48.returnUrl,
|
|
778
|
+
params = _objectWithoutPropertiesLoose(_ref48, _excluded7);
|
|
845
779
|
return "/bind" + handleQuery(_extends({
|
|
846
780
|
goTo: goTo ? encodeURIComponent(goTo) : undefined,
|
|
847
781
|
returnUrl: returnUrl ? encodeURIComponent(returnUrl) : undefined
|
|
848
782
|
}, params));
|
|
849
783
|
}
|
|
850
|
-
function retrieveUserPassword(
|
|
851
|
-
var
|
|
852
|
-
|
|
853
|
-
|
|
784
|
+
function retrieveUserPassword(_temp21) {
|
|
785
|
+
var _ref49 = _temp21 === void 0 ? {} : _temp21,
|
|
786
|
+
goTo = _ref49.goTo;
|
|
854
787
|
return "/retrieve" + handleQuery({
|
|
855
788
|
goTo: goTo ? encodeURIComponent(goTo) : undefined
|
|
856
789
|
});
|
|
857
790
|
}
|
|
858
|
-
function retrievePayPassword(
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
_objectDestructuringEmpty(_ref39);
|
|
862
|
-
|
|
791
|
+
function retrievePayPassword(_temp22) {
|
|
792
|
+
_objectDestructuringEmpty(_temp22 === void 0 ? {} : _temp22);
|
|
863
793
|
return "/retrievePayPassword";
|
|
864
794
|
}
|
|
865
|
-
function userFreeze(
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
_objectDestructuringEmpty(_ref40);
|
|
869
|
-
|
|
795
|
+
function userFreeze(_temp23) {
|
|
796
|
+
_objectDestructuringEmpty(_temp23 === void 0 ? {} : _temp23);
|
|
870
797
|
return "/freeze";
|
|
871
798
|
}
|
|
872
|
-
function wallet(
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
_objectDestructuringEmpty(_ref41);
|
|
876
|
-
|
|
799
|
+
function wallet(_temp24) {
|
|
800
|
+
_objectDestructuringEmpty(_temp24 === void 0 ? {} : _temp24);
|
|
877
801
|
return "/logged/wallet";
|
|
878
802
|
}
|
|
879
|
-
function reward(
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
_objectDestructuringEmpty(_ref42);
|
|
883
|
-
|
|
803
|
+
function reward(_temp25) {
|
|
804
|
+
_objectDestructuringEmpty(_temp25 === void 0 ? {} : _temp25);
|
|
884
805
|
return "/logged/reward";
|
|
885
806
|
}
|
|
886
|
-
function contract(
|
|
887
|
-
var
|
|
888
|
-
|
|
889
|
-
|
|
807
|
+
function contract(_temp26) {
|
|
808
|
+
var _ref54 = _temp26 === void 0 ? {} : _temp26,
|
|
809
|
+
params = _extends({}, (_objectDestructuringEmpty(_ref54), _ref54));
|
|
890
810
|
return "/logged/contract" + handleQuery(_extends({}, params));
|
|
891
811
|
}
|
|
892
|
-
function setting(
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
_objectDestructuringEmpty(_ref44);
|
|
896
|
-
|
|
812
|
+
function setting(_temp27) {
|
|
813
|
+
_objectDestructuringEmpty(_temp27 === void 0 ? {} : _temp27);
|
|
897
814
|
return "/logged/setting";
|
|
898
815
|
}
|
|
899
|
-
function binding(
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
_objectDestructuringEmpty(_ref45);
|
|
903
|
-
|
|
816
|
+
function binding(_temp28) {
|
|
817
|
+
_objectDestructuringEmpty(_temp28 === void 0 ? {} : _temp28);
|
|
904
818
|
return "/logged/binding";
|
|
905
819
|
}
|
|
906
|
-
function resultBindingSuccess(
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
_objectDestructuringEmpty(_ref46);
|
|
910
|
-
|
|
820
|
+
function resultBindingSuccess(_temp29) {
|
|
821
|
+
_objectDestructuringEmpty(_temp29 === void 0 ? {} : _temp29);
|
|
911
822
|
return "/result/binding";
|
|
912
823
|
}
|
|
913
824
|
/************** user End ******************************************************/
|
|
914
|
-
|
|
915
825
|
function handleQuery(query) {
|
|
916
826
|
var obj = {};
|
|
917
|
-
|
|
918
827
|
for (var _i = 0, _Object$entries = Object.entries(query); _i < _Object$entries.length; _i++) {
|
|
919
828
|
var _Object$entries$_i = _Object$entries[_i],
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
829
|
+
key = _Object$entries$_i[0],
|
|
830
|
+
value = _Object$entries$_i[1];
|
|
923
831
|
if (key && value) {
|
|
924
832
|
obj[key] = value;
|
|
925
833
|
}
|
|
926
834
|
}
|
|
927
|
-
|
|
928
835
|
var result = stringify(obj);
|
|
929
836
|
return result ? '?' + result : '';
|
|
930
837
|
}
|
|
@@ -938,30 +845,41 @@ var LinkTo = {
|
|
|
938
845
|
market: market,
|
|
939
846
|
exampleNodes: exampleNodes,
|
|
940
847
|
resourceDetails: resourceDetails,
|
|
848
|
+
collectionDetails: collectionDetails,
|
|
941
849
|
resourceCreatorEntry: resourceCreatorEntry,
|
|
942
850
|
resourceCreator: resourceCreator,
|
|
943
851
|
resourceCreatorBatch: resourceCreatorBatch,
|
|
852
|
+
collectionCreator: collectionCreator,
|
|
944
853
|
myResources: myResources,
|
|
854
|
+
myCollections: myCollections,
|
|
945
855
|
myCollects: myCollects,
|
|
856
|
+
resourceVersionInfo: resourceVersionInfo,
|
|
946
857
|
resourceInfo: resourceInfo,
|
|
947
858
|
resourcePolicy: resourcePolicy,
|
|
948
859
|
resourceContract: resourceContract,
|
|
949
860
|
resourceDependency: resourceDependency,
|
|
950
861
|
resourceVersionCreator: resourceVersionCreator,
|
|
951
|
-
|
|
862
|
+
collectionVersionInfo: collectionVersionInfo,
|
|
863
|
+
collectionInfo: collectionInfo,
|
|
864
|
+
collectionPolicy: collectionPolicy,
|
|
865
|
+
collectionContract: collectionContract,
|
|
866
|
+
collectionDependency: collectionDependency,
|
|
952
867
|
nodeCreator: nodeCreator,
|
|
953
868
|
nodeManagement: nodeManagement,
|
|
954
869
|
exhibitManagement: exhibitManagement,
|
|
870
|
+
collectionExhibitManagement: collectionExhibitManagement,
|
|
955
871
|
informNodeManagement: informNodeManagement,
|
|
956
872
|
informExhibitManagement: informExhibitManagement,
|
|
957
873
|
storageSpace: storageSpace,
|
|
958
874
|
objectDetails: objectDetails,
|
|
875
|
+
collectionCreateSuccess: collectionCreateSuccess,
|
|
959
876
|
resourceCreateSuccess: resourceCreateSuccess,
|
|
960
877
|
resourceVersionCreateSuccess: resourceVersionCreateSuccess,
|
|
961
878
|
resourceVersionCreateRelease: resourceVersionCreateRelease,
|
|
962
879
|
nodeCreateSuccess: nodeCreateSuccess,
|
|
963
880
|
invitation: invitation,
|
|
964
881
|
exception403: exception403,
|
|
882
|
+
exceptionUnableToAccess: exceptionUnableToAccess,
|
|
965
883
|
nodeFreeze: nodeFreeze,
|
|
966
884
|
resourceFreeze: resourceFreeze,
|
|
967
885
|
globalSearch: globalSearch,
|
|
@@ -981,38 +899,34 @@ var LinkTo = {
|
|
|
981
899
|
|
|
982
900
|
// export const apiHost = `${window.location.protocol}//qi.${(window.location.host.match(/(?<=\.).*/) || [''])[0]}`;
|
|
983
901
|
// 预设资源类型
|
|
984
|
-
var resourceTypes = ['json', 'widget', 'image', 'audio', 'markdown', 'theme', 'reveal_slide', 'license', 'video', 'catalog'];
|
|
985
|
-
|
|
986
|
-
var pageSize = 100;
|
|
987
|
-
|
|
902
|
+
var resourceTypes = ['json', 'widget', 'image', 'audio', 'markdown', 'theme', 'reveal_slide', 'license', 'video', 'catalog'];
|
|
903
|
+
// 全局列表加载条目数
|
|
904
|
+
var pageSize = 100;
|
|
905
|
+
// Moment 日期时间格式
|
|
988
906
|
var momentDateFormat = 'YYYY-MM-DD';
|
|
989
|
-
var momentDateTimeFormat = 'YYYY-MM-DD HH:mm';
|
|
990
|
-
|
|
907
|
+
var momentDateTimeFormat = 'YYYY-MM-DD HH:mm';
|
|
908
|
+
// 签约方用户的身份类型定义
|
|
991
909
|
var EnumContractPartyIdentityType;
|
|
992
|
-
|
|
993
910
|
(function (EnumContractPartyIdentityType) {
|
|
994
911
|
EnumContractPartyIdentityType[EnumContractPartyIdentityType["resource"] = 1] = "resource";
|
|
995
912
|
EnumContractPartyIdentityType[EnumContractPartyIdentityType["node"] = 2] = "node";
|
|
996
913
|
EnumContractPartyIdentityType[EnumContractPartyIdentityType["consumer"] = 3] = "consumer";
|
|
997
|
-
})(EnumContractPartyIdentityType || (EnumContractPartyIdentityType = {}));
|
|
998
|
-
|
|
999
|
-
|
|
914
|
+
})(EnumContractPartyIdentityType || (EnumContractPartyIdentityType = {}));
|
|
915
|
+
// 标的物类型定义
|
|
1000
916
|
var EnumSubjectType;
|
|
1001
|
-
|
|
1002
917
|
(function (EnumSubjectType) {
|
|
1003
918
|
EnumSubjectType[EnumSubjectType["resource"] = 1] = "resource";
|
|
1004
919
|
EnumSubjectType[EnumSubjectType["exhibit"] = 2] = "exhibit";
|
|
1005
920
|
EnumSubjectType[EnumSubjectType["user"] = 3] = "user";
|
|
1006
|
-
})(EnumSubjectType || (EnumSubjectType = {}));
|
|
1007
|
-
|
|
1008
|
-
|
|
921
|
+
})(EnumSubjectType || (EnumSubjectType = {}));
|
|
922
|
+
// 合约状态定义
|
|
1009
923
|
var EnumContractStatus;
|
|
1010
|
-
|
|
1011
924
|
(function (EnumContractStatus) {
|
|
1012
925
|
EnumContractStatus[EnumContractStatus["pending"] = 0] = "pending";
|
|
1013
926
|
EnumContractStatus[EnumContractStatus["authorized"] = 1] = "authorized";
|
|
1014
927
|
EnumContractStatus[EnumContractStatus["stopped"] = 2] = "stopped";
|
|
1015
|
-
})(EnumContractStatus || (EnumContractStatus = {}));
|
|
928
|
+
})(EnumContractStatus || (EnumContractStatus = {}));
|
|
929
|
+
// 合约授权状态定义
|
|
1016
930
|
// export enum ContractAuthStatus {
|
|
1017
931
|
//
|
|
1018
932
|
// }
|
|
@@ -1043,11 +957,10 @@ function details(params) {
|
|
|
1043
957
|
method: 'GET',
|
|
1044
958
|
url: "/v2/nodes/" + params.nodeId
|
|
1045
959
|
});
|
|
1046
|
-
}
|
|
960
|
+
}
|
|
961
|
+
// return FUtil.Axios.get(`/v2/nodes/detail`, {
|
|
1047
962
|
// params,
|
|
1048
963
|
// });
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
964
|
return FUtil.Request({
|
|
1052
965
|
method: 'GET',
|
|
1053
966
|
url: "/v2/nodes/detail",
|
|
@@ -1075,6 +988,13 @@ function setNodeInfo(params) {
|
|
|
1075
988
|
data: params
|
|
1076
989
|
});
|
|
1077
990
|
}
|
|
991
|
+
function deleteNode(_ref) {
|
|
992
|
+
var nodeId = _ref.nodeId;
|
|
993
|
+
return FUtil.Request({
|
|
994
|
+
method: 'DELETE',
|
|
995
|
+
url: "/v2/nodes/" + nodeId
|
|
996
|
+
});
|
|
997
|
+
}
|
|
1078
998
|
|
|
1079
999
|
var Node = {
|
|
1080
1000
|
__proto__: null,
|
|
@@ -1082,19 +1002,21 @@ var Node = {
|
|
|
1082
1002
|
details: details,
|
|
1083
1003
|
nodes: nodes,
|
|
1084
1004
|
searchForClient: searchForClient,
|
|
1085
|
-
setNodeInfo: setNodeInfo
|
|
1005
|
+
setNodeInfo: setNodeInfo,
|
|
1006
|
+
deleteNode: deleteNode
|
|
1086
1007
|
};
|
|
1087
1008
|
|
|
1088
1009
|
var _excluded$1 = ["presentableId"],
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1010
|
+
_excluded2$1 = ["presentableId"],
|
|
1011
|
+
_excluded3$1 = ["presentableId"],
|
|
1012
|
+
_excluded4$1 = ["presentableId"],
|
|
1013
|
+
_excluded5$1 = ["presentableId"],
|
|
1014
|
+
_excluded6$1 = ["presentableId"],
|
|
1015
|
+
_excluded7$1 = ["presentableId"],
|
|
1016
|
+
_excluded8 = ["presentableId"],
|
|
1017
|
+
_excluded9 = ["nodeId"],
|
|
1018
|
+
_excluded10 = ["nodeId"],
|
|
1019
|
+
_excluded11 = ["presentableId"];
|
|
1098
1020
|
function createPresentable(params) {
|
|
1099
1021
|
return FUtil.Request({
|
|
1100
1022
|
method: 'POST',
|
|
@@ -1104,8 +1026,7 @@ function createPresentable(params) {
|
|
|
1104
1026
|
}
|
|
1105
1027
|
function updatePresentable(_ref) {
|
|
1106
1028
|
var presentableId = _ref.presentableId,
|
|
1107
|
-
|
|
1108
|
-
|
|
1029
|
+
params = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
1109
1030
|
return FUtil.Request({
|
|
1110
1031
|
method: 'PUT',
|
|
1111
1032
|
url: "/v2/presentables/" + presentableId,
|
|
@@ -1114,8 +1035,7 @@ function updatePresentable(_ref) {
|
|
|
1114
1035
|
}
|
|
1115
1036
|
function presentablesOnlineStatus(_ref2) {
|
|
1116
1037
|
var presentableId = _ref2.presentableId,
|
|
1117
|
-
|
|
1118
|
-
|
|
1038
|
+
params = _objectWithoutPropertiesLoose(_ref2, _excluded2$1);
|
|
1119
1039
|
return FUtil.Request({
|
|
1120
1040
|
method: 'PUT',
|
|
1121
1041
|
url: "/v2/presentables/" + presentableId + "/onlineStatus",
|
|
@@ -1130,10 +1050,8 @@ function presentableDetails(params) {
|
|
|
1130
1050
|
params: params
|
|
1131
1051
|
});
|
|
1132
1052
|
}
|
|
1133
|
-
|
|
1134
1053
|
var presentableId = params.presentableId,
|
|
1135
|
-
|
|
1136
|
-
|
|
1054
|
+
p = _objectWithoutPropertiesLoose(params, _excluded3$1);
|
|
1137
1055
|
return FUtil.Request({
|
|
1138
1056
|
method: 'GET',
|
|
1139
1057
|
url: "/v2/presentables/" + presentableId,
|
|
@@ -1156,8 +1074,7 @@ function presentableList(params) {
|
|
|
1156
1074
|
}
|
|
1157
1075
|
function dependencyTree(_ref3) {
|
|
1158
1076
|
var presentableId = _ref3.presentableId,
|
|
1159
|
-
|
|
1160
|
-
|
|
1077
|
+
params = _objectWithoutPropertiesLoose(_ref3, _excluded4$1);
|
|
1161
1078
|
return FUtil.Request({
|
|
1162
1079
|
method: 'GET',
|
|
1163
1080
|
url: "/v2/presentables/" + presentableId + "/dependencyTree",
|
|
@@ -1166,8 +1083,7 @@ function dependencyTree(_ref3) {
|
|
|
1166
1083
|
}
|
|
1167
1084
|
function relationTree(_ref4) {
|
|
1168
1085
|
var presentableId = _ref4.presentableId,
|
|
1169
|
-
|
|
1170
|
-
|
|
1086
|
+
params = _objectWithoutPropertiesLoose(_ref4, _excluded5$1);
|
|
1171
1087
|
return FUtil.Request({
|
|
1172
1088
|
method: 'GET',
|
|
1173
1089
|
url: "/v2/presentables/" + presentableId + "/relationTree",
|
|
@@ -1176,8 +1092,7 @@ function relationTree(_ref4) {
|
|
|
1176
1092
|
}
|
|
1177
1093
|
function authTree(_ref5) {
|
|
1178
1094
|
var presentableId = _ref5.presentableId,
|
|
1179
|
-
|
|
1180
|
-
|
|
1095
|
+
params = _objectWithoutPropertiesLoose(_ref5, _excluded6$1);
|
|
1181
1096
|
return FUtil.Request({
|
|
1182
1097
|
method: 'GET',
|
|
1183
1098
|
url: "/v2/presentables/" + presentableId + "/authTree",
|
|
@@ -1186,8 +1101,7 @@ function authTree(_ref5) {
|
|
|
1186
1101
|
}
|
|
1187
1102
|
function presentablesVersion(_ref6) {
|
|
1188
1103
|
var presentableId = _ref6.presentableId,
|
|
1189
|
-
|
|
1190
|
-
|
|
1104
|
+
params = _objectWithoutPropertiesLoose(_ref6, _excluded7$1);
|
|
1191
1105
|
return FUtil.Request({
|
|
1192
1106
|
method: 'PUT',
|
|
1193
1107
|
url: "/v2/presentables/" + presentableId + "/version",
|
|
@@ -1196,8 +1110,7 @@ function presentablesVersion(_ref6) {
|
|
|
1196
1110
|
}
|
|
1197
1111
|
function updateRewriteProperty(_ref7) {
|
|
1198
1112
|
var presentableId = _ref7.presentableId,
|
|
1199
|
-
|
|
1200
|
-
|
|
1113
|
+
params = _objectWithoutPropertiesLoose(_ref7, _excluded8);
|
|
1201
1114
|
return FUtil.Request({
|
|
1202
1115
|
method: 'PUT',
|
|
1203
1116
|
url: "/v2/presentables/" + presentableId + "/rewriteProperty",
|
|
@@ -1206,8 +1119,7 @@ function updateRewriteProperty(_ref7) {
|
|
|
1206
1119
|
}
|
|
1207
1120
|
function batchAuth(_ref8) {
|
|
1208
1121
|
var nodeId = _ref8.nodeId,
|
|
1209
|
-
|
|
1210
|
-
|
|
1122
|
+
params = _objectWithoutPropertiesLoose(_ref8, _excluded9);
|
|
1211
1123
|
return FUtil.Request({
|
|
1212
1124
|
method: 'GET',
|
|
1213
1125
|
url: "/v2/auths/presentables/nodes/" + nodeId + "/batchAuth/result",
|
|
@@ -1216,8 +1128,7 @@ function batchAuth(_ref8) {
|
|
|
1216
1128
|
}
|
|
1217
1129
|
function contractAppliedPresentable(_ref9) {
|
|
1218
1130
|
var nodeId = _ref9.nodeId,
|
|
1219
|
-
|
|
1220
|
-
|
|
1131
|
+
params = _objectWithoutPropertiesLoose(_ref9, _excluded10);
|
|
1221
1132
|
return FUtil.Request({
|
|
1222
1133
|
method: 'GET',
|
|
1223
1134
|
url: "/v2/presentables/" + nodeId + "/contractAppliedPresentable",
|
|
@@ -1232,8 +1143,7 @@ function batchCreatePresentable(params) {
|
|
|
1232
1143
|
});
|
|
1233
1144
|
}
|
|
1234
1145
|
function batchUpdatePresentable(_ref10) {
|
|
1235
|
-
var params = _extends({}, _ref10);
|
|
1236
|
-
|
|
1146
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref10), _ref10));
|
|
1237
1147
|
return FUtil.Request({
|
|
1238
1148
|
method: 'PUT',
|
|
1239
1149
|
url: "/v2/presentables/updatePresentableBatch",
|
|
@@ -1241,14 +1151,22 @@ function batchUpdatePresentable(_ref10) {
|
|
|
1241
1151
|
});
|
|
1242
1152
|
}
|
|
1243
1153
|
function batchUpdatePresentableStatus(_ref11) {
|
|
1244
|
-
var params = _extends({}, _ref11);
|
|
1245
|
-
|
|
1154
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref11), _ref11));
|
|
1246
1155
|
return FUtil.Request({
|
|
1247
1156
|
method: 'PUT',
|
|
1248
1157
|
url: "/v2/presentables/updatePresentableOnlineStatusBatch",
|
|
1249
1158
|
data: params
|
|
1250
1159
|
});
|
|
1251
1160
|
}
|
|
1161
|
+
function ignorePresentableVersionUpdateTip(_ref12) {
|
|
1162
|
+
var presentableId = _ref12.presentableId,
|
|
1163
|
+
params = _objectWithoutPropertiesLoose(_ref12, _excluded11);
|
|
1164
|
+
return FUtil.Request({
|
|
1165
|
+
method: 'POST',
|
|
1166
|
+
url: "/v2/presentables/" + presentableId + "/ignorePresentableVersionUpdateTip",
|
|
1167
|
+
data: params
|
|
1168
|
+
});
|
|
1169
|
+
}
|
|
1252
1170
|
|
|
1253
1171
|
var Exhibit = {
|
|
1254
1172
|
__proto__: null,
|
|
@@ -1267,14 +1185,15 @@ var Exhibit = {
|
|
|
1267
1185
|
contractAppliedPresentable: contractAppliedPresentable,
|
|
1268
1186
|
batchCreatePresentable: batchCreatePresentable,
|
|
1269
1187
|
batchUpdatePresentable: batchUpdatePresentable,
|
|
1270
|
-
batchUpdatePresentableStatus: batchUpdatePresentableStatus
|
|
1188
|
+
batchUpdatePresentableStatus: batchUpdatePresentableStatus,
|
|
1189
|
+
ignorePresentableVersionUpdateTip: ignorePresentableVersionUpdateTip
|
|
1271
1190
|
};
|
|
1272
1191
|
|
|
1273
1192
|
var _excluded$2 = ["bucketName"],
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1193
|
+
_excluded2$2 = ["bucketName"],
|
|
1194
|
+
_excluded3$2 = ["objectIdOrName"],
|
|
1195
|
+
_excluded4$2 = ["sha1"],
|
|
1196
|
+
_excluded5$2 = ["objectIdOrName"];
|
|
1278
1197
|
function createBucket(params) {
|
|
1279
1198
|
return FUtil.Request({
|
|
1280
1199
|
method: 'POST',
|
|
@@ -1293,7 +1212,6 @@ function spaceStatistics(params) {
|
|
|
1293
1212
|
if (params === void 0) {
|
|
1294
1213
|
params = {};
|
|
1295
1214
|
}
|
|
1296
|
-
|
|
1297
1215
|
return FUtil.Request({
|
|
1298
1216
|
method: 'GET',
|
|
1299
1217
|
url: "/v2/storages/buckets/spaceStatistics",
|
|
@@ -1315,8 +1233,7 @@ function bucketDetails(_ref) {
|
|
|
1315
1233
|
}
|
|
1316
1234
|
function objectList(_ref2) {
|
|
1317
1235
|
var bucketName = _ref2.bucketName,
|
|
1318
|
-
|
|
1319
|
-
|
|
1236
|
+
params = _objectWithoutPropertiesLoose(_ref2, _excluded$2);
|
|
1320
1237
|
return FUtil.Request({
|
|
1321
1238
|
method: 'GET',
|
|
1322
1239
|
url: "/v2/storages/buckets/" + bucketName + "/objects",
|
|
@@ -1332,8 +1249,7 @@ function userNodeDataList(params) {
|
|
|
1332
1249
|
}
|
|
1333
1250
|
function createObject(_ref3) {
|
|
1334
1251
|
var bucketName = _ref3.bucketName,
|
|
1335
|
-
|
|
1336
|
-
|
|
1252
|
+
params = _objectWithoutPropertiesLoose(_ref3, _excluded2$2);
|
|
1337
1253
|
return FUtil.Request({
|
|
1338
1254
|
method: 'POST',
|
|
1339
1255
|
url: "/v2/storages/buckets/" + bucketName + "/objects",
|
|
@@ -1348,7 +1264,6 @@ function objectDetails$1(params) {
|
|
|
1348
1264
|
params: params
|
|
1349
1265
|
});
|
|
1350
1266
|
}
|
|
1351
|
-
|
|
1352
1267
|
return FUtil.Request({
|
|
1353
1268
|
method: 'GET',
|
|
1354
1269
|
url: "/v2/storages/buckets/" + params.bucketName + "/objects/" + params.objectId,
|
|
@@ -1383,19 +1298,15 @@ function uploadFile(params, config, returnCancel) {
|
|
|
1383
1298
|
if (returnCancel === void 0) {
|
|
1384
1299
|
returnCancel = false;
|
|
1385
1300
|
}
|
|
1386
|
-
|
|
1387
1301
|
var formData = new FormData();
|
|
1388
|
-
|
|
1389
1302
|
for (var _i = 0, _Object$entries = Object.entries(params); _i < _Object$entries.length; _i++) {
|
|
1390
1303
|
var _Object$entries$_i = _Object$entries[_i],
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1304
|
+
key = _Object$entries$_i[0],
|
|
1305
|
+
value = _Object$entries$_i[1];
|
|
1394
1306
|
if (value) {
|
|
1395
1307
|
formData.append(key, value);
|
|
1396
1308
|
}
|
|
1397
1309
|
}
|
|
1398
|
-
|
|
1399
1310
|
if (!returnCancel) {
|
|
1400
1311
|
// return FUtil.Axios.post('/v2/storages/files/upload', formData, config);
|
|
1401
1312
|
return FUtil.Request(_extends({
|
|
@@ -1404,13 +1315,12 @@ function uploadFile(params, config, returnCancel) {
|
|
|
1404
1315
|
data: formData
|
|
1405
1316
|
}, config));
|
|
1406
1317
|
}
|
|
1407
|
-
|
|
1408
|
-
|
|
1318
|
+
var cancel = null;
|
|
1319
|
+
// const promise = FUtil.Axios.post('/v2/storages/files/upload', formData, {
|
|
1409
1320
|
// cancelToken: new FUtil.Axios.CancelToken((c) => {
|
|
1410
1321
|
// cancel = c;
|
|
1411
1322
|
// }),
|
|
1412
1323
|
// });
|
|
1413
|
-
|
|
1414
1324
|
var promise = FUtil.Request(_extends({
|
|
1415
1325
|
method: 'POST',
|
|
1416
1326
|
url: "/v2/storages/files/upload",
|
|
@@ -1423,17 +1333,14 @@ function uploadFile(params, config, returnCancel) {
|
|
|
1423
1333
|
}
|
|
1424
1334
|
function uploadImage(params, config) {
|
|
1425
1335
|
var formData = new FormData();
|
|
1426
|
-
|
|
1427
1336
|
for (var _i2 = 0, _Object$entries2 = Object.entries(params); _i2 < _Object$entries2.length; _i2++) {
|
|
1428
1337
|
var _Object$entries2$_i = _Object$entries2[_i2],
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1338
|
+
key = _Object$entries2$_i[0],
|
|
1339
|
+
value = _Object$entries2$_i[1];
|
|
1432
1340
|
if (value) {
|
|
1433
1341
|
formData.append(key, value);
|
|
1434
1342
|
}
|
|
1435
1343
|
}
|
|
1436
|
-
|
|
1437
1344
|
return FUtil.Request(_extends({
|
|
1438
1345
|
method: 'POST',
|
|
1439
1346
|
url: "/v2/storages/files/uploadImage",
|
|
@@ -1456,8 +1363,7 @@ function generateCoverImage(params) {
|
|
|
1456
1363
|
}
|
|
1457
1364
|
function updateObject(_ref5) {
|
|
1458
1365
|
var objectIdOrName = _ref5.objectIdOrName,
|
|
1459
|
-
|
|
1460
|
-
|
|
1366
|
+
params = _objectWithoutPropertiesLoose(_ref5, _excluded3$2);
|
|
1461
1367
|
return FUtil.Request({
|
|
1462
1368
|
method: 'PUT',
|
|
1463
1369
|
url: "/v2/storages/objects/" + objectIdOrName,
|
|
@@ -1465,8 +1371,7 @@ function updateObject(_ref5) {
|
|
|
1465
1371
|
});
|
|
1466
1372
|
}
|
|
1467
1373
|
function batchUpdateObject(_ref6) {
|
|
1468
|
-
var params = _extends({}, _ref6);
|
|
1469
|
-
|
|
1374
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref6), _ref6));
|
|
1470
1375
|
return FUtil.Request({
|
|
1471
1376
|
method: 'PUT',
|
|
1472
1377
|
url: "/v2/storages/objects/updateBatch",
|
|
@@ -1482,8 +1387,7 @@ function batchObjectList(params) {
|
|
|
1482
1387
|
}
|
|
1483
1388
|
function fileProperty(_ref7) {
|
|
1484
1389
|
var sha1 = _ref7.sha1,
|
|
1485
|
-
|
|
1486
|
-
|
|
1390
|
+
params = _objectWithoutPropertiesLoose(_ref7, _excluded4$2);
|
|
1487
1391
|
return FUtil.Request({
|
|
1488
1392
|
method: 'GET',
|
|
1489
1393
|
url: "/v2/storages/files/" + sha1 + "/property",
|
|
@@ -1492,8 +1396,7 @@ function fileProperty(_ref7) {
|
|
|
1492
1396
|
}
|
|
1493
1397
|
function cycleDependencyCheck(_ref8) {
|
|
1494
1398
|
var objectIdOrName = _ref8.objectIdOrName,
|
|
1495
|
-
|
|
1496
|
-
|
|
1399
|
+
params = _objectWithoutPropertiesLoose(_ref8, _excluded5$2);
|
|
1497
1400
|
return FUtil.Request({
|
|
1498
1401
|
method: 'POST',
|
|
1499
1402
|
url: "/v2/storages/objects/" + objectIdOrName + "/cycleDependencyCheck",
|
|
@@ -1501,8 +1404,7 @@ function cycleDependencyCheck(_ref8) {
|
|
|
1501
1404
|
});
|
|
1502
1405
|
}
|
|
1503
1406
|
function clearUserNodeData(_ref9) {
|
|
1504
|
-
var params = _extends({}, _ref9);
|
|
1505
|
-
|
|
1407
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref9), _ref9));
|
|
1506
1408
|
return FUtil.Request({
|
|
1507
1409
|
method: 'DELETE',
|
|
1508
1410
|
url: "/v2/storages/buckets/.UserNodeData/objects/clear",
|
|
@@ -1510,14 +1412,21 @@ function clearUserNodeData(_ref9) {
|
|
|
1510
1412
|
});
|
|
1511
1413
|
}
|
|
1512
1414
|
function filesListInfo(_ref10) {
|
|
1513
|
-
var params = _extends({}, _ref10);
|
|
1514
|
-
|
|
1415
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref10), _ref10));
|
|
1515
1416
|
return FUtil.Request({
|
|
1516
1417
|
method: 'GET',
|
|
1517
1418
|
url: "/v2/storages/files/list/info",
|
|
1518
1419
|
params: params
|
|
1519
1420
|
});
|
|
1520
1421
|
}
|
|
1422
|
+
function filesInfo(_ref11) {
|
|
1423
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref11), _ref11));
|
|
1424
|
+
return FUtil.Request({
|
|
1425
|
+
method: 'GET',
|
|
1426
|
+
url: "/v2/storages/files/info",
|
|
1427
|
+
params: params
|
|
1428
|
+
});
|
|
1429
|
+
}
|
|
1521
1430
|
|
|
1522
1431
|
var Storage = {
|
|
1523
1432
|
__proto__: null,
|
|
@@ -1544,7 +1453,8 @@ var Storage = {
|
|
|
1544
1453
|
fileProperty: fileProperty,
|
|
1545
1454
|
cycleDependencyCheck: cycleDependencyCheck,
|
|
1546
1455
|
clearUserNodeData: clearUserNodeData,
|
|
1547
|
-
filesListInfo: filesListInfo
|
|
1456
|
+
filesListInfo: filesListInfo,
|
|
1457
|
+
filesInfo: filesInfo
|
|
1548
1458
|
};
|
|
1549
1459
|
|
|
1550
1460
|
function collectResource(params) {
|
|
@@ -1599,17 +1509,31 @@ var Collection = {
|
|
|
1599
1509
|
};
|
|
1600
1510
|
|
|
1601
1511
|
var _excluded$3 = ["resourceIdOrName"],
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1512
|
+
_excluded2$3 = ["resourceId"],
|
|
1513
|
+
_excluded3$3 = ["resourceId"],
|
|
1514
|
+
_excluded4$3 = ["resourceId"],
|
|
1515
|
+
_excluded5$3 = ["resourceId", "version"],
|
|
1516
|
+
_excluded6$2 = ["fileSha1"],
|
|
1517
|
+
_excluded7$2 = ["fileSha1"],
|
|
1518
|
+
_excluded8$1 = ["resourceId"],
|
|
1519
|
+
_excluded9$1 = ["resourceId"],
|
|
1520
|
+
_excluded10$1 = ["resourceId"],
|
|
1521
|
+
_excluded11$1 = ["resourceId"],
|
|
1522
|
+
_excluded12 = ["resourceId"],
|
|
1523
|
+
_excluded13 = ["resourceId"],
|
|
1524
|
+
_excluded14 = ["resourceId"],
|
|
1525
|
+
_excluded15 = ["resourceId"],
|
|
1526
|
+
_excluded16 = ["resourceId"],
|
|
1527
|
+
_excluded17 = ["resourceId"],
|
|
1528
|
+
_excluded18 = ["resourceId"],
|
|
1529
|
+
_excluded19 = ["resourceId"],
|
|
1530
|
+
_excluded20 = ["resourceId"],
|
|
1531
|
+
_excluded21 = ["resourceId"],
|
|
1532
|
+
_excluded22 = ["resourceId"],
|
|
1533
|
+
_excluded23 = ["resourceId"],
|
|
1534
|
+
_excluded24 = ["resourceId", "itemId"],
|
|
1535
|
+
_excluded25 = ["resourceId"],
|
|
1536
|
+
_excluded26 = ["resourceId"];
|
|
1613
1537
|
function create$1(params) {
|
|
1614
1538
|
return FUtil.Request({
|
|
1615
1539
|
method: 'POST',
|
|
@@ -1637,10 +1561,10 @@ function batchUpdate(params) {
|
|
|
1637
1561
|
url: "/v2/resources/updateBatch",
|
|
1638
1562
|
data: params
|
|
1639
1563
|
});
|
|
1640
|
-
}
|
|
1564
|
+
}
|
|
1565
|
+
// interface ListReturnType extends CommonReturn {
|
|
1641
1566
|
// data: IResourceInfo[];
|
|
1642
1567
|
// }
|
|
1643
|
-
|
|
1644
1568
|
function list(params) {
|
|
1645
1569
|
return FUtil.Request({
|
|
1646
1570
|
method: 'GET',
|
|
@@ -1650,8 +1574,7 @@ function list(params) {
|
|
|
1650
1574
|
}
|
|
1651
1575
|
function info(_ref) {
|
|
1652
1576
|
var resourceIdOrName = _ref.resourceIdOrName,
|
|
1653
|
-
|
|
1654
|
-
|
|
1577
|
+
params = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
1655
1578
|
return FUtil.Request({
|
|
1656
1579
|
method: 'GET',
|
|
1657
1580
|
url: "/v2/resources/" + encodeURIComponent(resourceIdOrName),
|
|
@@ -1667,8 +1590,7 @@ function batchInfo(params) {
|
|
|
1667
1590
|
}
|
|
1668
1591
|
function dependencyTree$1(_ref2) {
|
|
1669
1592
|
var resourceId = _ref2.resourceId,
|
|
1670
|
-
|
|
1671
|
-
|
|
1593
|
+
params = _objectWithoutPropertiesLoose(_ref2, _excluded2$3);
|
|
1672
1594
|
return FUtil.Request({
|
|
1673
1595
|
method: 'GET',
|
|
1674
1596
|
url: "/v2/resources/" + resourceId + "/dependencyTree",
|
|
@@ -1677,8 +1599,7 @@ function dependencyTree$1(_ref2) {
|
|
|
1677
1599
|
}
|
|
1678
1600
|
function authTree$1(_ref3) {
|
|
1679
1601
|
var resourceId = _ref3.resourceId,
|
|
1680
|
-
|
|
1681
|
-
|
|
1602
|
+
params = _objectWithoutPropertiesLoose(_ref3, _excluded3$3);
|
|
1682
1603
|
return FUtil.Request({
|
|
1683
1604
|
method: 'GET',
|
|
1684
1605
|
url: "/v2/resources/" + resourceId + "/authTree",
|
|
@@ -1687,8 +1608,7 @@ function authTree$1(_ref3) {
|
|
|
1687
1608
|
}
|
|
1688
1609
|
function createVersion(_ref4) {
|
|
1689
1610
|
var resourceId = _ref4.resourceId,
|
|
1690
|
-
|
|
1691
|
-
|
|
1611
|
+
params = _objectWithoutPropertiesLoose(_ref4, _excluded4$3);
|
|
1692
1612
|
// return FUtil.Axios.post(`/v2/resources/${resourceId}/versions`, params);
|
|
1693
1613
|
return FUtil.Request({
|
|
1694
1614
|
method: 'POST',
|
|
@@ -1698,9 +1618,8 @@ function createVersion(_ref4) {
|
|
|
1698
1618
|
}
|
|
1699
1619
|
function resourceVersionInfo1(_ref5) {
|
|
1700
1620
|
var resourceId = _ref5.resourceId,
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1621
|
+
version = _ref5.version,
|
|
1622
|
+
params = _objectWithoutPropertiesLoose(_ref5, _excluded5$3);
|
|
1704
1623
|
return FUtil.Request({
|
|
1705
1624
|
method: 'GET',
|
|
1706
1625
|
url: "/v2/resources/" + resourceId + "/versions/" + version,
|
|
@@ -1715,8 +1634,7 @@ function resourceVersionInfo2(params) {
|
|
|
1715
1634
|
});
|
|
1716
1635
|
}
|
|
1717
1636
|
function getVersionList(_ref6) {
|
|
1718
|
-
var params = _extends({}, _ref6);
|
|
1719
|
-
|
|
1637
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref6), _ref6));
|
|
1720
1638
|
return FUtil.Request({
|
|
1721
1639
|
method: 'GET',
|
|
1722
1640
|
url: "/v2/resources/versions/list",
|
|
@@ -1725,8 +1643,7 @@ function getVersionList(_ref6) {
|
|
|
1725
1643
|
}
|
|
1726
1644
|
function getResourceVersionBySha1(_ref7) {
|
|
1727
1645
|
var fileSha1 = _ref7.fileSha1,
|
|
1728
|
-
|
|
1729
|
-
|
|
1646
|
+
params = _objectWithoutPropertiesLoose(_ref7, _excluded6$2);
|
|
1730
1647
|
return FUtil.Request({
|
|
1731
1648
|
method: 'GET',
|
|
1732
1649
|
url: "/v2/resources/files/" + fileSha1 + "/versions",
|
|
@@ -1735,8 +1652,7 @@ function getResourceVersionBySha1(_ref7) {
|
|
|
1735
1652
|
}
|
|
1736
1653
|
function getResourceBySha1(_ref8) {
|
|
1737
1654
|
var fileSha1 = _ref8.fileSha1,
|
|
1738
|
-
|
|
1739
|
-
|
|
1655
|
+
params = _objectWithoutPropertiesLoose(_ref8, _excluded7$2);
|
|
1740
1656
|
// return FUtil.Axios.get(`/v2/resources/files/${fileSha1}`, {
|
|
1741
1657
|
// params,
|
|
1742
1658
|
// });
|
|
@@ -1789,14 +1705,14 @@ function resourceIsUsedByOther(params) {
|
|
|
1789
1705
|
});
|
|
1790
1706
|
}
|
|
1791
1707
|
function resourcesDownload(params) {
|
|
1792
|
-
return window.location.href = FUtil.Format.completeUrlByDomain('api') + ("/v2/resources/" + params.resourceId + "/versions/" + params.version + "/download");
|
|
1708
|
+
return window.location.href = FUtil.Format.completeUrlByDomain('api') + ("/v2/resources/" + params.resourceId + "/versions/" + params.version + "/download");
|
|
1709
|
+
// return request.get(`/v2/resources/${params.resourceId}/versions/${params.$version}/download`, {
|
|
1793
1710
|
// responseType: 'arraybuffer',
|
|
1794
1711
|
// });
|
|
1795
1712
|
}
|
|
1796
1713
|
function batchGetCoverageVersions(_ref10) {
|
|
1797
1714
|
var resourceId = _ref10.resourceId,
|
|
1798
|
-
|
|
1799
|
-
|
|
1715
|
+
params = _objectWithoutPropertiesLoose(_ref10, _excluded8$1);
|
|
1800
1716
|
// return FUtil.Axios.get(`/v2/resources/${resourceId}/contracts/coverageVersions`, {
|
|
1801
1717
|
// params,
|
|
1802
1718
|
// });
|
|
@@ -1815,8 +1731,7 @@ function resolveResources(params) {
|
|
|
1815
1731
|
}
|
|
1816
1732
|
function batchSetContracts(_ref11) {
|
|
1817
1733
|
var resourceId = _ref11.resourceId,
|
|
1818
|
-
|
|
1819
|
-
|
|
1734
|
+
params = _objectWithoutPropertiesLoose(_ref11, _excluded9$1);
|
|
1820
1735
|
// return FUtil.Axios.put(`/v2/resources/${resourceId}/versions/batchSetContracts`, params);
|
|
1821
1736
|
return FUtil.Request({
|
|
1822
1737
|
method: 'PUT',
|
|
@@ -1826,8 +1741,7 @@ function batchSetContracts(_ref11) {
|
|
|
1826
1741
|
}
|
|
1827
1742
|
function cycleDependencyCheck$1(_ref12) {
|
|
1828
1743
|
var resourceId = _ref12.resourceId,
|
|
1829
|
-
|
|
1830
|
-
|
|
1744
|
+
params = _objectWithoutPropertiesLoose(_ref12, _excluded10$1);
|
|
1831
1745
|
// return FUtil.Axios.post(`/v2/resources/${resourceId}/versions/cycleDependencyCheck`, params);
|
|
1832
1746
|
return FUtil.Request({
|
|
1833
1747
|
method: 'POST',
|
|
@@ -1837,8 +1751,7 @@ function cycleDependencyCheck$1(_ref12) {
|
|
|
1837
1751
|
}
|
|
1838
1752
|
function relationTree$1(_ref13) {
|
|
1839
1753
|
var resourceId = _ref13.resourceId,
|
|
1840
|
-
|
|
1841
|
-
|
|
1754
|
+
params = _objectWithoutPropertiesLoose(_ref13, _excluded11$1);
|
|
1842
1755
|
// return FUtil.Axios.get(`/v2/resources/${resourceId}/relationTree`, {
|
|
1843
1756
|
// params,
|
|
1844
1757
|
// });
|
|
@@ -1850,8 +1763,7 @@ function relationTree$1(_ref13) {
|
|
|
1850
1763
|
}
|
|
1851
1764
|
function relationTreeAuth(_ref14) {
|
|
1852
1765
|
var resourceId = _ref14.resourceId,
|
|
1853
|
-
|
|
1854
|
-
|
|
1766
|
+
params = _objectWithoutPropertiesLoose(_ref14, _excluded12);
|
|
1855
1767
|
return FUtil.Request({
|
|
1856
1768
|
method: 'GET',
|
|
1857
1769
|
url: "/v2/auths/resources/" + resourceId + "/relationTreeAuth",
|
|
@@ -1859,8 +1771,7 @@ function relationTreeAuth(_ref14) {
|
|
|
1859
1771
|
});
|
|
1860
1772
|
}
|
|
1861
1773
|
function resourcesCount(_ref15) {
|
|
1862
|
-
var params = _extends({}, _ref15);
|
|
1863
|
-
|
|
1774
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref15), _ref15));
|
|
1864
1775
|
return FUtil.Request({
|
|
1865
1776
|
method: 'GET',
|
|
1866
1777
|
url: "/v2/resources/count",
|
|
@@ -1868,8 +1779,7 @@ function resourcesCount(_ref15) {
|
|
|
1868
1779
|
});
|
|
1869
1780
|
}
|
|
1870
1781
|
function batchAuth$1(_ref16) {
|
|
1871
|
-
var params = _extends({}, _ref16);
|
|
1872
|
-
|
|
1782
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref16), _ref16));
|
|
1873
1783
|
return FUtil.Request({
|
|
1874
1784
|
method: 'GET',
|
|
1875
1785
|
url: "/v2/auths/resources/batchAuth/results",
|
|
@@ -1877,8 +1787,7 @@ function batchAuth$1(_ref16) {
|
|
|
1877
1787
|
});
|
|
1878
1788
|
}
|
|
1879
1789
|
function resourcesRecommend(_ref17) {
|
|
1880
|
-
var params = _extends({}, _ref17);
|
|
1881
|
-
|
|
1790
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref17), _ref17));
|
|
1882
1791
|
return FUtil.Request({
|
|
1883
1792
|
method: 'GET',
|
|
1884
1793
|
url: "/v2/resources/recommend",
|
|
@@ -1886,8 +1795,7 @@ function resourcesRecommend(_ref17) {
|
|
|
1886
1795
|
});
|
|
1887
1796
|
}
|
|
1888
1797
|
function availableTags(_ref18) {
|
|
1889
|
-
var params = _extends({}, _ref18);
|
|
1890
|
-
|
|
1798
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref18), _ref18));
|
|
1891
1799
|
return FUtil.Request({
|
|
1892
1800
|
method: 'GET',
|
|
1893
1801
|
url: "/v2/resources/tags/availableTags",
|
|
@@ -1896,8 +1804,7 @@ function availableTags(_ref18) {
|
|
|
1896
1804
|
}
|
|
1897
1805
|
function resourceTypes$1(_temp) {
|
|
1898
1806
|
var _ref19 = _temp === void 0 ? {} : _temp,
|
|
1899
|
-
|
|
1900
|
-
|
|
1807
|
+
params = _extends({}, (_objectDestructuringEmpty(_ref19), _ref19));
|
|
1901
1808
|
return FUtil.Request({
|
|
1902
1809
|
method: 'GET',
|
|
1903
1810
|
url: "/v2/resources/types/listSimpleByGroup",
|
|
@@ -1905,8 +1812,7 @@ function resourceTypes$1(_temp) {
|
|
|
1905
1812
|
});
|
|
1906
1813
|
}
|
|
1907
1814
|
function ListSimpleByParentCode(_ref20) {
|
|
1908
|
-
var params = _extends({}, _ref20);
|
|
1909
|
-
|
|
1815
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref20), _ref20));
|
|
1910
1816
|
return FUtil.Request({
|
|
1911
1817
|
method: 'GET',
|
|
1912
1818
|
url: "/v2/resources/types/listSimpleByParentCode",
|
|
@@ -1914,8 +1820,7 @@ function ListSimpleByParentCode(_ref20) {
|
|
|
1914
1820
|
});
|
|
1915
1821
|
}
|
|
1916
1822
|
function getResourceTypeInfoByCode(_ref21) {
|
|
1917
|
-
var params = _extends({}, _ref21);
|
|
1918
|
-
|
|
1823
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref21), _ref21));
|
|
1919
1824
|
return FUtil.Request({
|
|
1920
1825
|
method: 'GET',
|
|
1921
1826
|
url: "/v2/resources/types/getInfoByCode",
|
|
@@ -1923,8 +1828,7 @@ function getResourceTypeInfoByCode(_ref21) {
|
|
|
1923
1828
|
});
|
|
1924
1829
|
}
|
|
1925
1830
|
function getResourceAttrListSimple(_ref22) {
|
|
1926
|
-
var params = _extends({}, _ref22);
|
|
1927
|
-
|
|
1831
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref22), _ref22));
|
|
1928
1832
|
return FUtil.Request({
|
|
1929
1833
|
method: 'GET',
|
|
1930
1834
|
url: "/v2/resources/attrs/listSimple",
|
|
@@ -1933,8 +1837,7 @@ function getResourceAttrListSimple(_ref22) {
|
|
|
1933
1837
|
}
|
|
1934
1838
|
function listSimple4Recently(_temp2) {
|
|
1935
1839
|
var _ref23 = _temp2 === void 0 ? {} : _temp2,
|
|
1936
|
-
|
|
1937
|
-
|
|
1840
|
+
params = _extends({}, (_objectDestructuringEmpty(_ref23), _ref23));
|
|
1938
1841
|
return FUtil.Request({
|
|
1939
1842
|
method: 'GET',
|
|
1940
1843
|
url: "/v2/resources/types/listSimple4Recently",
|
|
@@ -1942,8 +1845,7 @@ function listSimple4Recently(_temp2) {
|
|
|
1942
1845
|
});
|
|
1943
1846
|
}
|
|
1944
1847
|
function getAttrsInfoByKey(_ref24) {
|
|
1945
|
-
var params = _extends({}, _ref24);
|
|
1946
|
-
|
|
1848
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref24), _ref24));
|
|
1947
1849
|
return FUtil.Request({
|
|
1948
1850
|
method: 'GET',
|
|
1949
1851
|
url: "/v2/resources/attrs/getInfoByKey",
|
|
@@ -1960,6 +1862,201 @@ function generateResourceNames(_ref25) {
|
|
|
1960
1862
|
}
|
|
1961
1863
|
});
|
|
1962
1864
|
}
|
|
1865
|
+
function updateCollection(_ref26) {
|
|
1866
|
+
var resourceId = _ref26.resourceId,
|
|
1867
|
+
params = _objectWithoutPropertiesLoose(_ref26, _excluded13);
|
|
1868
|
+
return FUtil.Request({
|
|
1869
|
+
method: 'PUT',
|
|
1870
|
+
url: "/v2/resources/catalogue/" + resourceId,
|
|
1871
|
+
data: params
|
|
1872
|
+
});
|
|
1873
|
+
}
|
|
1874
|
+
function deleteCollectionUnitResource(_ref27) {
|
|
1875
|
+
var resourceId = _ref27.resourceId,
|
|
1876
|
+
removeCollectionItemIds = _ref27.removeCollectionItemIds;
|
|
1877
|
+
return FUtil.Request({
|
|
1878
|
+
method: 'DELETE',
|
|
1879
|
+
url: "/v2/resources/catalogue/" + resourceId + "?removeCollectionItemIds=" + removeCollectionItemIds.join(',')
|
|
1880
|
+
});
|
|
1881
|
+
}
|
|
1882
|
+
function getCollectionItems(_ref28) {
|
|
1883
|
+
var resourceId = _ref28.resourceId,
|
|
1884
|
+
params = _objectWithoutPropertiesLoose(_ref28, _excluded14);
|
|
1885
|
+
return FUtil.Request({
|
|
1886
|
+
method: 'GET',
|
|
1887
|
+
url: "/v2/resources/catalogue/" + resourceId + "/items",
|
|
1888
|
+
params: params
|
|
1889
|
+
});
|
|
1890
|
+
}
|
|
1891
|
+
function getCollectionItems_Draft(_ref29) {
|
|
1892
|
+
var resourceId = _ref29.resourceId,
|
|
1893
|
+
params = _objectWithoutPropertiesLoose(_ref29, _excluded15);
|
|
1894
|
+
return FUtil.Request({
|
|
1895
|
+
method: 'GET',
|
|
1896
|
+
url: "/v2/resources/catalogues/drafts/" + resourceId + "/items",
|
|
1897
|
+
params: params
|
|
1898
|
+
});
|
|
1899
|
+
}
|
|
1900
|
+
function setCollectionItemSort(_ref30) {
|
|
1901
|
+
var resourceId = _ref30.resourceId,
|
|
1902
|
+
params = _objectWithoutPropertiesLoose(_ref30, _excluded16);
|
|
1903
|
+
return FUtil.Request({
|
|
1904
|
+
method: 'PUT',
|
|
1905
|
+
url: "/v2/resources/catalogue/" + resourceId + "/manualSort",
|
|
1906
|
+
data: params
|
|
1907
|
+
});
|
|
1908
|
+
}
|
|
1909
|
+
function reorderCollectionItemsSort(_ref31) {
|
|
1910
|
+
var resourceId = _ref31.resourceId,
|
|
1911
|
+
params = _objectWithoutPropertiesLoose(_ref31, _excluded17);
|
|
1912
|
+
return FUtil.Request({
|
|
1913
|
+
method: 'PUT',
|
|
1914
|
+
url: "/v2/resources/catalogue/" + resourceId + "/reorder",
|
|
1915
|
+
data: params
|
|
1916
|
+
});
|
|
1917
|
+
}
|
|
1918
|
+
function checkExistCollectionItems(_ref32) {
|
|
1919
|
+
var resourceId = _ref32.resourceId,
|
|
1920
|
+
params = _objectWithoutPropertiesLoose(_ref32, _excluded18);
|
|
1921
|
+
return FUtil.Request({
|
|
1922
|
+
method: 'GET',
|
|
1923
|
+
url: "/v2/resources/catalogue/" + resourceId + "/items/checkExists",
|
|
1924
|
+
params: params
|
|
1925
|
+
});
|
|
1926
|
+
}
|
|
1927
|
+
function getCollectionItemsAuth(_ref33) {
|
|
1928
|
+
var resourceId = _ref33.resourceId,
|
|
1929
|
+
params = _objectWithoutPropertiesLoose(_ref33, _excluded19);
|
|
1930
|
+
return FUtil.Request({
|
|
1931
|
+
method: 'GET',
|
|
1932
|
+
url: "/v2/auths/resources/" + resourceId + "/items/batchAuth",
|
|
1933
|
+
params: params
|
|
1934
|
+
});
|
|
1935
|
+
}
|
|
1936
|
+
function batchResourceItems(_ref34) {
|
|
1937
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref34), _ref34));
|
|
1938
|
+
return FUtil.Request({
|
|
1939
|
+
method: 'GET',
|
|
1940
|
+
url: "/v2/resources/catalogue/items/batch/list",
|
|
1941
|
+
params: params
|
|
1942
|
+
});
|
|
1943
|
+
}
|
|
1944
|
+
function batchResourceItems_Draft(_ref35) {
|
|
1945
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref35), _ref35));
|
|
1946
|
+
return FUtil.Request({
|
|
1947
|
+
method: 'GET',
|
|
1948
|
+
url: "/v2/resources/catalogues/drafts/items/batch/list",
|
|
1949
|
+
params: params
|
|
1950
|
+
});
|
|
1951
|
+
}
|
|
1952
|
+
function getCollectionUpdateLogs(_ref36) {
|
|
1953
|
+
var resourceId = _ref36.resourceId,
|
|
1954
|
+
params = _objectWithoutPropertiesLoose(_ref36, _excluded20);
|
|
1955
|
+
return FUtil.Request({
|
|
1956
|
+
method: 'GET',
|
|
1957
|
+
url: "/v2/resources/catalogue/" + resourceId + "/updateLogs",
|
|
1958
|
+
params: params
|
|
1959
|
+
});
|
|
1960
|
+
}
|
|
1961
|
+
function getCollectionCollectRules(_ref37) {
|
|
1962
|
+
var resourceId = _ref37.resourceId;
|
|
1963
|
+
return FUtil.Request({
|
|
1964
|
+
method: 'GET',
|
|
1965
|
+
url: "/v2/resources/catalogue/" + resourceId + "/items/collectRules"
|
|
1966
|
+
});
|
|
1967
|
+
}
|
|
1968
|
+
function setCollectRules(_ref38) {
|
|
1969
|
+
var resourceId = _ref38.resourceId,
|
|
1970
|
+
params = _objectWithoutPropertiesLoose(_ref38, _excluded21);
|
|
1971
|
+
return FUtil.Request({
|
|
1972
|
+
method: 'POST',
|
|
1973
|
+
url: "/v2/resources/catalogue/" + resourceId + "/items/collectRules",
|
|
1974
|
+
data: params
|
|
1975
|
+
});
|
|
1976
|
+
}
|
|
1977
|
+
function setItemsTitle(_ref39) {
|
|
1978
|
+
var resourceId = _ref39.resourceId,
|
|
1979
|
+
data = _ref39.data;
|
|
1980
|
+
return FUtil.Request({
|
|
1981
|
+
method: 'PUT',
|
|
1982
|
+
url: "/v2/resources/catalogue/" + resourceId + "/items",
|
|
1983
|
+
data: data
|
|
1984
|
+
});
|
|
1985
|
+
}
|
|
1986
|
+
function deleteCollectionItems_Draft(_ref40) {
|
|
1987
|
+
var resourceId = _ref40.resourceId,
|
|
1988
|
+
removeCollectionItemIds = _ref40.removeCollectionItemIds;
|
|
1989
|
+
return FUtil.Request({
|
|
1990
|
+
method: 'DELETE',
|
|
1991
|
+
url: "/v2/resources/catalogues/drafts/" + resourceId + "/items?removeCollectionItemIds=" + removeCollectionItemIds.join(',')
|
|
1992
|
+
});
|
|
1993
|
+
}
|
|
1994
|
+
function setCollectionItemsSortID_Draft(_ref41) {
|
|
1995
|
+
var resourceId = _ref41.resourceId,
|
|
1996
|
+
data = _ref41.data;
|
|
1997
|
+
return FUtil.Request({
|
|
1998
|
+
method: 'PUT',
|
|
1999
|
+
url: "/v2/resources/catalogues/drafts/" + resourceId + "/manualSort",
|
|
2000
|
+
data: data
|
|
2001
|
+
});
|
|
2002
|
+
}
|
|
2003
|
+
function reorderCollectionItems_Draft(_ref42) {
|
|
2004
|
+
var resourceId = _ref42.resourceId,
|
|
2005
|
+
params = _objectWithoutPropertiesLoose(_ref42, _excluded22);
|
|
2006
|
+
return FUtil.Request({
|
|
2007
|
+
method: 'PUT',
|
|
2008
|
+
url: "/v2/resources/catalogues/drafts/" + resourceId + "/reorder",
|
|
2009
|
+
data: params
|
|
2010
|
+
});
|
|
2011
|
+
}
|
|
2012
|
+
function resourceIsExistInItems_Draft(_ref43) {
|
|
2013
|
+
var resourceId = _ref43.resourceId,
|
|
2014
|
+
params = _objectWithoutPropertiesLoose(_ref43, _excluded23);
|
|
2015
|
+
return FUtil.Request({
|
|
2016
|
+
method: 'GET',
|
|
2017
|
+
url: "/v2/resources/catalogues/drafts/" + resourceId + "/items/checkExists",
|
|
2018
|
+
params: params
|
|
2019
|
+
});
|
|
2020
|
+
}
|
|
2021
|
+
function updateCollectionItemsInfo_Draft(_ref44) {
|
|
2022
|
+
var resourceId = _ref44.resourceId,
|
|
2023
|
+
data = _ref44.data;
|
|
2024
|
+
return FUtil.Request({
|
|
2025
|
+
method: 'PUT',
|
|
2026
|
+
// url: `/v2/resources/catalogue/${resourceId}/items`,
|
|
2027
|
+
url: "/v2/resources/catalogues/drafts/" + resourceId + "/items",
|
|
2028
|
+
data: data
|
|
2029
|
+
});
|
|
2030
|
+
}
|
|
2031
|
+
function updateCollectionItemAuthorization_Draft(_ref45) {
|
|
2032
|
+
var resourceId = _ref45.resourceId,
|
|
2033
|
+
itemId = _ref45.itemId,
|
|
2034
|
+
params = _objectWithoutPropertiesLoose(_ref45, _excluded24);
|
|
2035
|
+
return FUtil.Request({
|
|
2036
|
+
method: 'PUT',
|
|
2037
|
+
// url: `/v2/resources/catalogues/${resourceId}/items/${itemId}`,
|
|
2038
|
+
url: "/v2/resources/catalogues/drafts/" + resourceId + "/items/" + itemId,
|
|
2039
|
+
data: params
|
|
2040
|
+
});
|
|
2041
|
+
}
|
|
2042
|
+
function addResourceItems_Draft(_ref46) {
|
|
2043
|
+
var resourceId = _ref46.resourceId,
|
|
2044
|
+
params = _objectWithoutPropertiesLoose(_ref46, _excluded25);
|
|
2045
|
+
return FUtil.Request({
|
|
2046
|
+
method: 'POST',
|
|
2047
|
+
url: "/v2/resources/catalogues/drafts/" + resourceId + "/items",
|
|
2048
|
+
data: params
|
|
2049
|
+
});
|
|
2050
|
+
}
|
|
2051
|
+
function getCollectionItemsAuth_Draft(_ref47) {
|
|
2052
|
+
var resourceId = _ref47.resourceId,
|
|
2053
|
+
params = _objectWithoutPropertiesLoose(_ref47, _excluded26);
|
|
2054
|
+
return FUtil.Request({
|
|
2055
|
+
method: 'GET',
|
|
2056
|
+
url: "/v2/resources/catalogues/drafts/" + resourceId + "/items/batchAuth",
|
|
2057
|
+
params: params
|
|
2058
|
+
});
|
|
2059
|
+
}
|
|
1963
2060
|
|
|
1964
2061
|
var Resource = {
|
|
1965
2062
|
__proto__: null,
|
|
@@ -2000,13 +2097,34 @@ var Resource = {
|
|
|
2000
2097
|
getResourceAttrListSimple: getResourceAttrListSimple,
|
|
2001
2098
|
listSimple4Recently: listSimple4Recently,
|
|
2002
2099
|
getAttrsInfoByKey: getAttrsInfoByKey,
|
|
2003
|
-
generateResourceNames: generateResourceNames
|
|
2100
|
+
generateResourceNames: generateResourceNames,
|
|
2101
|
+
updateCollection: updateCollection,
|
|
2102
|
+
deleteCollectionUnitResource: deleteCollectionUnitResource,
|
|
2103
|
+
getCollectionItems: getCollectionItems,
|
|
2104
|
+
getCollectionItems_Draft: getCollectionItems_Draft,
|
|
2105
|
+
setCollectionItemSort: setCollectionItemSort,
|
|
2106
|
+
reorderCollectionItemsSort: reorderCollectionItemsSort,
|
|
2107
|
+
checkExistCollectionItems: checkExistCollectionItems,
|
|
2108
|
+
getCollectionItemsAuth: getCollectionItemsAuth,
|
|
2109
|
+
batchResourceItems: batchResourceItems,
|
|
2110
|
+
batchResourceItems_Draft: batchResourceItems_Draft,
|
|
2111
|
+
getCollectionUpdateLogs: getCollectionUpdateLogs,
|
|
2112
|
+
getCollectionCollectRules: getCollectionCollectRules,
|
|
2113
|
+
setCollectRules: setCollectRules,
|
|
2114
|
+
setItemsTitle: setItemsTitle,
|
|
2115
|
+
deleteCollectionItems_Draft: deleteCollectionItems_Draft,
|
|
2116
|
+
setCollectionItemsSortID_Draft: setCollectionItemsSortID_Draft,
|
|
2117
|
+
reorderCollectionItems_Draft: reorderCollectionItems_Draft,
|
|
2118
|
+
resourceIsExistInItems_Draft: resourceIsExistInItems_Draft,
|
|
2119
|
+
updateCollectionItemsInfo_Draft: updateCollectionItemsInfo_Draft,
|
|
2120
|
+
updateCollectionItemAuthorization_Draft: updateCollectionItemAuthorization_Draft,
|
|
2121
|
+
addResourceItems_Draft: addResourceItems_Draft,
|
|
2122
|
+
getCollectionItemsAuth_Draft: getCollectionItemsAuth_Draft
|
|
2004
2123
|
};
|
|
2005
2124
|
|
|
2006
2125
|
var _excluded$4 = ["loginName"];
|
|
2007
2126
|
function login$1(_ref) {
|
|
2008
|
-
var params = _extends({}, _ref);
|
|
2009
|
-
|
|
2127
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
2010
2128
|
// return FUtil.Axios.post(`/v2/passport/login`, params);
|
|
2011
2129
|
return FUtil.Request({
|
|
2012
2130
|
method: 'POST',
|
|
@@ -2018,8 +2136,7 @@ function login$1(_ref) {
|
|
|
2018
2136
|
}
|
|
2019
2137
|
function logout(_temp) {
|
|
2020
2138
|
var _ref2 = _temp === void 0 ? {} : _temp,
|
|
2021
|
-
|
|
2022
|
-
|
|
2139
|
+
params = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
|
|
2023
2140
|
return FUtil.Request({
|
|
2024
2141
|
method: 'GET',
|
|
2025
2142
|
url: '/v2/passport/logout',
|
|
@@ -2043,10 +2160,7 @@ function batchUserList(params) {
|
|
|
2043
2160
|
});
|
|
2044
2161
|
}
|
|
2045
2162
|
function currentUserInfo(_temp2) {
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
_objectDestructuringEmpty(_ref3);
|
|
2049
|
-
|
|
2163
|
+
_objectDestructuringEmpty(_temp2 === void 0 ? {} : _temp2);
|
|
2050
2164
|
// return FUtil.Axios.get(`/v1/userinfos/current`);
|
|
2051
2165
|
return FUtil.Request({
|
|
2052
2166
|
method: 'GET',
|
|
@@ -2069,8 +2183,7 @@ function logon$1(params) {
|
|
|
2069
2183
|
}
|
|
2070
2184
|
function resetPassword(_ref4) {
|
|
2071
2185
|
var loginName = _ref4.loginName,
|
|
2072
|
-
|
|
2073
|
-
|
|
2186
|
+
params = _objectWithoutPropertiesLoose(_ref4, _excluded$4);
|
|
2074
2187
|
return FUtil.Request({
|
|
2075
2188
|
method: 'PUT',
|
|
2076
2189
|
url: "/v2/users/" + loginName + "/resetPassword",
|
|
@@ -2086,17 +2199,14 @@ function updatePassword(params) {
|
|
|
2086
2199
|
}
|
|
2087
2200
|
function uploadHeadImg(params, config) {
|
|
2088
2201
|
var formData = new FormData();
|
|
2089
|
-
|
|
2090
2202
|
for (var _i = 0, _Object$entries = Object.entries(params); _i < _Object$entries.length; _i++) {
|
|
2091
2203
|
var _Object$entries$_i = _Object$entries[_i],
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2204
|
+
key = _Object$entries$_i[0],
|
|
2205
|
+
value = _Object$entries$_i[1];
|
|
2095
2206
|
if (value) {
|
|
2096
2207
|
formData.append(key, value);
|
|
2097
2208
|
}
|
|
2098
2209
|
}
|
|
2099
|
-
|
|
2100
2210
|
return FUtil.Request(_extends({
|
|
2101
2211
|
method: 'POST',
|
|
2102
2212
|
url: "/v2/users/current/uploadHeadImg",
|
|
@@ -2121,7 +2231,6 @@ function areasProvinces(params) {
|
|
|
2121
2231
|
if (params === void 0) {
|
|
2122
2232
|
params = {};
|
|
2123
2233
|
}
|
|
2124
|
-
|
|
2125
2234
|
return FUtil.Request({
|
|
2126
2235
|
method: 'GET',
|
|
2127
2236
|
url: "/v2/areas/provinces",
|
|
@@ -2155,7 +2264,6 @@ function thirdPartyList(params) {
|
|
|
2155
2264
|
if (params === void 0) {
|
|
2156
2265
|
params = {};
|
|
2157
2266
|
}
|
|
2158
|
-
|
|
2159
2267
|
return FUtil.Request({
|
|
2160
2268
|
method: 'GET',
|
|
2161
2269
|
url: "/v2/thirdParty/list",
|
|
@@ -2168,15 +2276,15 @@ function thirdPartyIsBind(params) {
|
|
|
2168
2276
|
url: "/v2/thirdParty/isBind",
|
|
2169
2277
|
params: params
|
|
2170
2278
|
});
|
|
2171
|
-
}
|
|
2172
|
-
|
|
2279
|
+
}
|
|
2280
|
+
// 签到
|
|
2173
2281
|
function signForCoins() {
|
|
2174
2282
|
return FUtil.Request({
|
|
2175
2283
|
method: 'GET',
|
|
2176
2284
|
url: "/v2/activities/facade/sign"
|
|
2177
2285
|
});
|
|
2178
|
-
}
|
|
2179
|
-
|
|
2286
|
+
}
|
|
2287
|
+
// 查询签到信息
|
|
2180
2288
|
function getSignInfo() {
|
|
2181
2289
|
return FUtil.Request({
|
|
2182
2290
|
method: 'GET',
|
|
@@ -2209,20 +2317,19 @@ var User = {
|
|
|
2209
2317
|
};
|
|
2210
2318
|
|
|
2211
2319
|
var _excluded$5 = ["nodeId"],
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2320
|
+
_excluded2$4 = ["nodeId"],
|
|
2321
|
+
_excluded3$4 = ["nodeId"],
|
|
2322
|
+
_excluded4$4 = ["nodeId"],
|
|
2323
|
+
_excluded5$4 = ["nodeId"],
|
|
2324
|
+
_excluded6$3 = ["testResourceId"],
|
|
2325
|
+
_excluded7$3 = ["testResourceId"],
|
|
2326
|
+
_excluded8$2 = ["nodeId"],
|
|
2327
|
+
_excluded9$2 = ["nodeId"],
|
|
2328
|
+
_excluded10$2 = ["nodeId"],
|
|
2329
|
+
_excluded11$2 = ["nodeId"];
|
|
2222
2330
|
function testResources(_ref) {
|
|
2223
2331
|
var nodeId = _ref.nodeId,
|
|
2224
|
-
|
|
2225
|
-
|
|
2332
|
+
params = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
2226
2333
|
return FUtil.Request({
|
|
2227
2334
|
method: 'GET',
|
|
2228
2335
|
url: "/v2/testNodes/" + nodeId + "/testResources",
|
|
@@ -2231,8 +2338,7 @@ function testResources(_ref) {
|
|
|
2231
2338
|
}
|
|
2232
2339
|
function createRules(_ref2) {
|
|
2233
2340
|
var nodeId = _ref2.nodeId,
|
|
2234
|
-
|
|
2235
|
-
|
|
2341
|
+
params = _objectWithoutPropertiesLoose(_ref2, _excluded2$4);
|
|
2236
2342
|
return FUtil.Request({
|
|
2237
2343
|
method: 'POST',
|
|
2238
2344
|
url: "/v2/testNodes/" + nodeId + "/rules",
|
|
@@ -2241,8 +2347,7 @@ function createRules(_ref2) {
|
|
|
2241
2347
|
}
|
|
2242
2348
|
function batchTestResources(_ref3) {
|
|
2243
2349
|
var nodeId = _ref3.nodeId,
|
|
2244
|
-
|
|
2245
|
-
|
|
2350
|
+
params = _objectWithoutPropertiesLoose(_ref3, _excluded3$4);
|
|
2246
2351
|
return FUtil.Request({
|
|
2247
2352
|
method: 'GET',
|
|
2248
2353
|
url: "/v2/testNodes/" + nodeId + "/testResources/list",
|
|
@@ -2251,8 +2356,7 @@ function batchTestResources(_ref3) {
|
|
|
2251
2356
|
}
|
|
2252
2357
|
function dependencyTree$2(_ref4) {
|
|
2253
2358
|
var nodeId = _ref4.nodeId,
|
|
2254
|
-
|
|
2255
|
-
|
|
2359
|
+
params = _objectWithoutPropertiesLoose(_ref4, _excluded4$4);
|
|
2256
2360
|
return FUtil.Request({
|
|
2257
2361
|
method: 'GET',
|
|
2258
2362
|
url: "/v2/testNodes/" + nodeId + "/testResources/dependencyTree/search",
|
|
@@ -2261,8 +2365,7 @@ function dependencyTree$2(_ref4) {
|
|
|
2261
2365
|
}
|
|
2262
2366
|
function putRules(_ref5) {
|
|
2263
2367
|
var nodeId = _ref5.nodeId,
|
|
2264
|
-
|
|
2265
|
-
|
|
2368
|
+
params = _objectWithoutPropertiesLoose(_ref5, _excluded5$4);
|
|
2266
2369
|
return FUtil.Request({
|
|
2267
2370
|
method: 'PUT',
|
|
2268
2371
|
url: "/v2/testNodes/" + nodeId + "/rules",
|
|
@@ -2278,8 +2381,7 @@ function testNodeRules(_ref6) {
|
|
|
2278
2381
|
}
|
|
2279
2382
|
function updateTestResourceContracts(_ref7) {
|
|
2280
2383
|
var testResourceId = _ref7.testResourceId,
|
|
2281
|
-
|
|
2282
|
-
|
|
2384
|
+
params = _objectWithoutPropertiesLoose(_ref7, _excluded6$3);
|
|
2283
2385
|
// return FUtil.Axios.put(`/v2/testNodes/testResources/${testResourceId}`, params);
|
|
2284
2386
|
return FUtil.Request({
|
|
2285
2387
|
method: 'PUT',
|
|
@@ -2289,8 +2391,7 @@ function updateTestResourceContracts(_ref7) {
|
|
|
2289
2391
|
}
|
|
2290
2392
|
function dependencyTreeFilter(_ref8) {
|
|
2291
2393
|
var testResourceId = _ref8.testResourceId,
|
|
2292
|
-
|
|
2293
|
-
|
|
2394
|
+
params = _objectWithoutPropertiesLoose(_ref8, _excluded7$3);
|
|
2294
2395
|
// return FUtil.Axios.get(`/v2/testNodes/testResources/${testResourceId}/dependencyTree/filter`, {
|
|
2295
2396
|
// params
|
|
2296
2397
|
// });
|
|
@@ -2325,8 +2426,7 @@ function testResourceDetails(_ref11) {
|
|
|
2325
2426
|
}
|
|
2326
2427
|
function searchTestResourcesByDependency(_ref12) {
|
|
2327
2428
|
var nodeId = _ref12.nodeId,
|
|
2328
|
-
|
|
2329
|
-
|
|
2429
|
+
params = _objectWithoutPropertiesLoose(_ref12, _excluded8$2);
|
|
2330
2430
|
// return FUtil.Axios.get(`/v2/testNodes/${nodeId}/testResources/searchByDependency`, {
|
|
2331
2431
|
// params,
|
|
2332
2432
|
// });
|
|
@@ -2338,8 +2438,7 @@ function searchTestResourcesByDependency(_ref12) {
|
|
|
2338
2438
|
}
|
|
2339
2439
|
function rulesRematch(_ref13) {
|
|
2340
2440
|
var nodeId = _ref13.nodeId,
|
|
2341
|
-
|
|
2342
|
-
|
|
2441
|
+
params = _objectWithoutPropertiesLoose(_ref13, _excluded9$2);
|
|
2343
2442
|
return FUtil.Request({
|
|
2344
2443
|
method: 'POST',
|
|
2345
2444
|
url: "/v2/testNodes/" + nodeId + "/rules/rematch",
|
|
@@ -2348,8 +2447,7 @@ function rulesRematch(_ref13) {
|
|
|
2348
2447
|
}
|
|
2349
2448
|
function rulesPreExecution(_ref14) {
|
|
2350
2449
|
var nodeId = _ref14.nodeId,
|
|
2351
|
-
|
|
2352
|
-
|
|
2450
|
+
params = _objectWithoutPropertiesLoose(_ref14, _excluded10$2);
|
|
2353
2451
|
return FUtil.Request({
|
|
2354
2452
|
method: 'POST',
|
|
2355
2453
|
url: "/v2/testNodes/" + nodeId + "/rules/preExecution",
|
|
@@ -2358,8 +2456,7 @@ function rulesPreExecution(_ref14) {
|
|
|
2358
2456
|
}
|
|
2359
2457
|
function batchGetAuths(_ref15) {
|
|
2360
2458
|
var nodeId = _ref15.nodeId,
|
|
2361
|
-
|
|
2362
|
-
|
|
2459
|
+
params = _objectWithoutPropertiesLoose(_ref15, _excluded11$2);
|
|
2363
2460
|
return FUtil.Request({
|
|
2364
2461
|
method: 'GET',
|
|
2365
2462
|
url: "/v2/auths/exhibits/" + nodeId + "/test/batchAuth/results",
|
|
@@ -2387,10 +2484,9 @@ var InformalNode = {
|
|
|
2387
2484
|
};
|
|
2388
2485
|
|
|
2389
2486
|
var _excluded$6 = ["contractId"],
|
|
2390
|
-
|
|
2487
|
+
_excluded2$5 = ["contractId"];
|
|
2391
2488
|
function createContract(_ref) {
|
|
2392
|
-
var params = _extends({}, _ref);
|
|
2393
|
-
|
|
2489
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
2394
2490
|
return FUtil.Request({
|
|
2395
2491
|
method: 'POST',
|
|
2396
2492
|
url: "/v2/contracts",
|
|
@@ -2398,8 +2494,7 @@ function createContract(_ref) {
|
|
|
2398
2494
|
});
|
|
2399
2495
|
}
|
|
2400
2496
|
function batchCreateContracts(_ref2) {
|
|
2401
|
-
var params = _extends({}, _ref2);
|
|
2402
|
-
|
|
2497
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
|
|
2403
2498
|
return FUtil.Request({
|
|
2404
2499
|
method: 'POST',
|
|
2405
2500
|
url: "/v2/contracts/batchSign",
|
|
@@ -2408,8 +2503,7 @@ function batchCreateContracts(_ref2) {
|
|
|
2408
2503
|
}
|
|
2409
2504
|
function contractDetails(_ref3) {
|
|
2410
2505
|
var contractId = _ref3.contractId,
|
|
2411
|
-
|
|
2412
|
-
|
|
2506
|
+
params = _objectWithoutPropertiesLoose(_ref3, _excluded$6);
|
|
2413
2507
|
return FUtil.Request({
|
|
2414
2508
|
method: 'GET',
|
|
2415
2509
|
url: "/v2/contracts/" + contractId,
|
|
@@ -2439,8 +2533,7 @@ function batchContracts(params) {
|
|
|
2439
2533
|
}
|
|
2440
2534
|
function transitionRecords(_ref4) {
|
|
2441
2535
|
var contractId = _ref4.contractId,
|
|
2442
|
-
|
|
2443
|
-
|
|
2536
|
+
params = _objectWithoutPropertiesLoose(_ref4, _excluded2$5);
|
|
2444
2537
|
return FUtil.Request({
|
|
2445
2538
|
method: 'GET',
|
|
2446
2539
|
url: "/v2/contracts/" + contractId + "/transitionRecords",
|
|
@@ -2468,11 +2561,10 @@ var Contract = {
|
|
|
2468
2561
|
};
|
|
2469
2562
|
|
|
2470
2563
|
var _excluded$7 = ["accountId"],
|
|
2471
|
-
|
|
2564
|
+
_excluded2$6 = ["userId"];
|
|
2472
2565
|
function details$1(_ref) {
|
|
2473
2566
|
var accountId = _ref.accountId,
|
|
2474
|
-
|
|
2475
|
-
|
|
2567
|
+
params = _objectWithoutPropertiesLoose(_ref, _excluded$7);
|
|
2476
2568
|
return FUtil.Request({
|
|
2477
2569
|
method: 'GET',
|
|
2478
2570
|
url: "/v2/transactions/details/" + accountId,
|
|
@@ -2481,8 +2573,7 @@ function details$1(_ref) {
|
|
|
2481
2573
|
}
|
|
2482
2574
|
function individualAccounts(_ref2) {
|
|
2483
2575
|
var userId = _ref2.userId,
|
|
2484
|
-
|
|
2485
|
-
|
|
2576
|
+
params = _objectWithoutPropertiesLoose(_ref2, _excluded2$6);
|
|
2486
2577
|
return FUtil.Request({
|
|
2487
2578
|
method: 'GET',
|
|
2488
2579
|
url: "/v2/accounts/individualAccounts/" + userId,
|
|
@@ -2497,8 +2588,7 @@ function transactionDetails(_ref3) {
|
|
|
2497
2588
|
});
|
|
2498
2589
|
}
|
|
2499
2590
|
function activateIndividualAccounts(_ref4) {
|
|
2500
|
-
var params = _extends({}, _ref4);
|
|
2501
|
-
|
|
2591
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref4), _ref4));
|
|
2502
2592
|
return FUtil.Request({
|
|
2503
2593
|
method: 'PUT',
|
|
2504
2594
|
url: "/v2/accounts/individualAccounts/activate",
|
|
@@ -2506,8 +2596,7 @@ function activateIndividualAccounts(_ref4) {
|
|
|
2506
2596
|
});
|
|
2507
2597
|
}
|
|
2508
2598
|
function changePassword(_ref5) {
|
|
2509
|
-
var params = _extends({}, _ref5);
|
|
2510
|
-
|
|
2599
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref5), _ref5));
|
|
2511
2600
|
return FUtil.Request({
|
|
2512
2601
|
method: 'PUT',
|
|
2513
2602
|
url: "/v2/accounts/individualAccounts",
|
|
@@ -2515,8 +2604,7 @@ function changePassword(_ref5) {
|
|
|
2515
2604
|
});
|
|
2516
2605
|
}
|
|
2517
2606
|
function resetPassword$1(_ref6) {
|
|
2518
|
-
var params = _extends({}, _ref6);
|
|
2519
|
-
|
|
2607
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref6), _ref6));
|
|
2520
2608
|
return FUtil.Request({
|
|
2521
2609
|
method: 'PUT',
|
|
2522
2610
|
url: "/v2/accounts/individualAccounts/resetPassword",
|
|
@@ -2524,8 +2612,7 @@ function resetPassword$1(_ref6) {
|
|
|
2524
2612
|
});
|
|
2525
2613
|
}
|
|
2526
2614
|
function verifyTransactionPassword(_ref7) {
|
|
2527
|
-
var params = _extends({}, _ref7);
|
|
2528
|
-
|
|
2615
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref7), _ref7));
|
|
2529
2616
|
return FUtil.Request({
|
|
2530
2617
|
method: 'GET',
|
|
2531
2618
|
url: "/v2/accounts/individualAccounts/verifyTransactionPassword",
|
|
@@ -2568,8 +2655,7 @@ var Captcha = {
|
|
|
2568
2655
|
var _excluded$8 = ["contractId"];
|
|
2569
2656
|
function transaction(_ref) {
|
|
2570
2657
|
var contractId = _ref.contractId,
|
|
2571
|
-
|
|
2572
|
-
|
|
2658
|
+
params = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
2573
2659
|
return FUtil.Request({
|
|
2574
2660
|
method: 'POST',
|
|
2575
2661
|
url: "/v2/contracts/" + contractId + "/events/payment",
|
|
@@ -2628,7 +2714,6 @@ function getBaseTaskInfo(params) {
|
|
|
2628
2714
|
if (params === void 0) {
|
|
2629
2715
|
params = {};
|
|
2630
2716
|
}
|
|
2631
|
-
|
|
2632
2717
|
return FUtil.Request({
|
|
2633
2718
|
method: 'GET',
|
|
2634
2719
|
url: "/v2/activities/facade/getBaseTaskInfo",
|
|
@@ -2639,7 +2724,6 @@ function getResourceTaskInfo(params) {
|
|
|
2639
2724
|
if (params === void 0) {
|
|
2640
2725
|
params = {};
|
|
2641
2726
|
}
|
|
2642
|
-
|
|
2643
2727
|
return FUtil.Request({
|
|
2644
2728
|
method: 'GET',
|
|
2645
2729
|
url: "/v2/activities/facade/getResourceTaskInfo",
|
|
@@ -2650,7 +2734,6 @@ function getNodeTaskInfo(params) {
|
|
|
2650
2734
|
if (params === void 0) {
|
|
2651
2735
|
params = {};
|
|
2652
2736
|
}
|
|
2653
|
-
|
|
2654
2737
|
return FUtil.Request({
|
|
2655
2738
|
method: 'GET',
|
|
2656
2739
|
url: "/v2/activities/facade/getNodeTaskInfo",
|
|
@@ -2696,7 +2779,6 @@ function getWechatOfficialAccountInfo(params) {
|
|
|
2696
2779
|
if (params === void 0) {
|
|
2697
2780
|
params = {};
|
|
2698
2781
|
}
|
|
2699
|
-
|
|
2700
2782
|
return FUtil.Request({
|
|
2701
2783
|
method: 'GET',
|
|
2702
2784
|
url: "/v2/extensions/wechat/getRelationship4Client",
|
|
@@ -2707,7 +2789,6 @@ function lotteryList(params) {
|
|
|
2707
2789
|
if (params === void 0) {
|
|
2708
2790
|
params = {};
|
|
2709
2791
|
}
|
|
2710
|
-
|
|
2711
2792
|
return FUtil.Request({
|
|
2712
2793
|
method: 'GET',
|
|
2713
2794
|
url: "/v2/activities/lottery/resource/list",
|
|
@@ -2739,7 +2820,6 @@ function listRewardRecordInfos(params) {
|
|
|
2739
2820
|
if (params === void 0) {
|
|
2740
2821
|
params = {};
|
|
2741
2822
|
}
|
|
2742
|
-
|
|
2743
2823
|
return FUtil.Request({
|
|
2744
2824
|
method: 'POST',
|
|
2745
2825
|
url: "/v2/activities/facade/listRewardRecordInfos",
|
|
@@ -2805,15 +2885,13 @@ function codeDetails1(_ref) {
|
|
|
2805
2885
|
}
|
|
2806
2886
|
function codeDetails2(_ref2) {
|
|
2807
2887
|
_objectDestructuringEmpty(_ref2);
|
|
2808
|
-
|
|
2809
2888
|
return FUtil.Request({
|
|
2810
2889
|
method: 'GET',
|
|
2811
2890
|
url: "/v2/testQualifications/beta/codes/userActivateCode"
|
|
2812
2891
|
});
|
|
2813
2892
|
}
|
|
2814
2893
|
function betaCodesActivate(_ref3) {
|
|
2815
|
-
var params = _extends({}, _ref3);
|
|
2816
|
-
|
|
2894
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref3), _ref3));
|
|
2817
2895
|
return FUtil.Request({
|
|
2818
2896
|
method: 'POST',
|
|
2819
2897
|
url: "/v2/testQualifications/beta/codes/activate",
|
|
@@ -2821,8 +2899,7 @@ function betaCodesActivate(_ref3) {
|
|
|
2821
2899
|
});
|
|
2822
2900
|
}
|
|
2823
2901
|
function usedRecords(_ref4) {
|
|
2824
|
-
var params = _extends({}, _ref4);
|
|
2825
|
-
|
|
2902
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref4), _ref4));
|
|
2826
2903
|
return FUtil.Request({
|
|
2827
2904
|
method: 'GET',
|
|
2828
2905
|
url: "/v2/testQualifications/beta/codes/usedRecords",
|
|
@@ -2830,8 +2907,7 @@ function usedRecords(_ref4) {
|
|
|
2830
2907
|
});
|
|
2831
2908
|
}
|
|
2832
2909
|
function betaApply(_ref5) {
|
|
2833
|
-
var params = _extends({}, _ref5);
|
|
2834
|
-
|
|
2910
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref5), _ref5));
|
|
2835
2911
|
return FUtil.Request({
|
|
2836
2912
|
method: 'POST',
|
|
2837
2913
|
url: "/v2/testQualifications/beta/apply",
|
|
@@ -2840,8 +2916,7 @@ function betaApply(_ref5) {
|
|
|
2840
2916
|
}
|
|
2841
2917
|
function getBetaApply1(_temp) {
|
|
2842
2918
|
var _ref6 = _temp === void 0 ? {} : _temp,
|
|
2843
|
-
|
|
2844
|
-
|
|
2919
|
+
params = _extends({}, (_objectDestructuringEmpty(_ref6), _ref6));
|
|
2845
2920
|
return FUtil.Request({
|
|
2846
2921
|
method: 'GET',
|
|
2847
2922
|
url: "/v2/testQualifications/beta/apply/current",
|
|
@@ -2850,8 +2925,7 @@ function getBetaApply1(_temp) {
|
|
|
2850
2925
|
}
|
|
2851
2926
|
function getBetaApply2(_ref7) {
|
|
2852
2927
|
var recordId = _ref7.recordId,
|
|
2853
|
-
|
|
2854
|
-
|
|
2928
|
+
params = _objectWithoutPropertiesLoose(_ref7, _excluded$9);
|
|
2855
2929
|
return FUtil.Request({
|
|
2856
2930
|
method: 'GET',
|
|
2857
2931
|
url: "/v2/testQualifications/beta/apply/" + recordId,
|
|
@@ -2859,8 +2933,7 @@ function getBetaApply2(_ref7) {
|
|
|
2859
2933
|
});
|
|
2860
2934
|
}
|
|
2861
2935
|
function invitees(_ref8) {
|
|
2862
|
-
var params = _extends({}, _ref8);
|
|
2863
|
-
|
|
2936
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref8), _ref8));
|
|
2864
2937
|
return FUtil.Request({
|
|
2865
2938
|
method: 'GET',
|
|
2866
2939
|
url: "/v2/testQualifications/beta/codes/invitees",
|
|
@@ -2900,7 +2973,8 @@ function configsList(params) {
|
|
|
2900
2973
|
url: "/v2/i18n/configs/list",
|
|
2901
2974
|
data: params
|
|
2902
2975
|
});
|
|
2903
|
-
}
|
|
2976
|
+
}
|
|
2977
|
+
// oss保存的翻译
|
|
2904
2978
|
// interface ConfigsListParamsType {
|
|
2905
2979
|
// key: string;
|
|
2906
2980
|
// content: string;
|
|
@@ -2941,7 +3015,6 @@ function policyTemplates(params) {
|
|
|
2941
3015
|
if (params === void 0) {
|
|
2942
3016
|
params = {};
|
|
2943
3017
|
}
|
|
2944
|
-
|
|
2945
3018
|
return FUtil.Request({
|
|
2946
3019
|
method: 'GET',
|
|
2947
3020
|
url: "/v2/translate/translate-config/list4Client",
|
|
@@ -2976,7 +3049,6 @@ var Policy = {
|
|
|
2976
3049
|
};
|
|
2977
3050
|
|
|
2978
3051
|
// import * as CryptoJS from 'crypto-js';
|
|
2979
|
-
|
|
2980
3052
|
/**
|
|
2981
3053
|
* 根据 File 获取 SHA1 Hash 字符串
|
|
2982
3054
|
* @param file
|
|
@@ -2986,46 +3058,38 @@ function getSHA1Hash(file) {
|
|
|
2986
3058
|
return new Promise(function (resolve) {
|
|
2987
3059
|
var reader = new FileReader();
|
|
2988
3060
|
reader.readAsArrayBuffer(file);
|
|
2989
|
-
reader.onload = /*#__PURE__*/_asyncToGenerator(
|
|
3061
|
+
reader.onload = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
2990
3062
|
var sha1;
|
|
2991
3063
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2992
|
-
while (1) {
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
return
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
sha1 = _context.sent;
|
|
3022
|
-
resolve(sha1);
|
|
3023
|
-
return _context.abrupt("return", '');
|
|
3024
|
-
|
|
3025
|
-
case 11:
|
|
3026
|
-
case "end":
|
|
3027
|
-
return _context.stop();
|
|
3028
|
-
}
|
|
3064
|
+
while (1) switch (_context.prev = _context.next) {
|
|
3065
|
+
case 0:
|
|
3066
|
+
if (reader.result) {
|
|
3067
|
+
_context.next = 3;
|
|
3068
|
+
break;
|
|
3069
|
+
}
|
|
3070
|
+
resolve('');
|
|
3071
|
+
return _context.abrupt("return", '');
|
|
3072
|
+
case 3:
|
|
3073
|
+
if (!(typeof reader.result === 'string')) {
|
|
3074
|
+
_context.next = 6;
|
|
3075
|
+
break;
|
|
3076
|
+
}
|
|
3077
|
+
resolve('');
|
|
3078
|
+
return _context.abrupt("return", '');
|
|
3079
|
+
case 6:
|
|
3080
|
+
_context.next = 8;
|
|
3081
|
+
return self.crypto.subtle.digest('SHA-1', reader.result).then(function (a) {
|
|
3082
|
+
return Array.from(new Uint8Array(a)).map(function (a) {
|
|
3083
|
+
return a.toString(16).padStart(2, '0');
|
|
3084
|
+
}).join('');
|
|
3085
|
+
});
|
|
3086
|
+
case 8:
|
|
3087
|
+
sha1 = _context.sent;
|
|
3088
|
+
resolve(sha1);
|
|
3089
|
+
return _context.abrupt("return", '');
|
|
3090
|
+
case 11:
|
|
3091
|
+
case "end":
|
|
3092
|
+
return _context.stop();
|
|
3029
3093
|
}
|
|
3030
3094
|
}, _callee);
|
|
3031
3095
|
}));
|
|
@@ -3034,70 +3098,56 @@ function getSHA1Hash(file) {
|
|
|
3034
3098
|
/**
|
|
3035
3099
|
* 生成随机码
|
|
3036
3100
|
*/
|
|
3037
|
-
|
|
3038
3101
|
function generateRandomCode(strLen) {
|
|
3039
3102
|
if (strLen === void 0) {
|
|
3040
3103
|
strLen = 5;
|
|
3041
3104
|
}
|
|
3042
|
-
|
|
3043
3105
|
var allStr = 'ABCDEFGHIJKLMNPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890';
|
|
3044
3106
|
var newStrArr = [];
|
|
3045
|
-
|
|
3046
3107
|
for (var i = 0; i < strLen; i++) {
|
|
3047
3108
|
newStrArr.push(allStr[Math.floor(Math.random() * 61)]);
|
|
3048
3109
|
}
|
|
3049
|
-
|
|
3050
3110
|
return newStrArr.join('');
|
|
3051
3111
|
}
|
|
3052
3112
|
/**
|
|
3053
3113
|
* 通过读取 cookies 获取用户 ID
|
|
3054
3114
|
*/
|
|
3055
|
-
|
|
3056
3115
|
function getUserIDByCookies() {
|
|
3057
3116
|
var uid = document.cookie.split('; ').find(function (co) {
|
|
3058
3117
|
return co.startsWith('uid=');
|
|
3059
3118
|
});
|
|
3060
|
-
|
|
3061
3119
|
if (!uid) {
|
|
3062
3120
|
return -1;
|
|
3063
3121
|
}
|
|
3064
|
-
|
|
3065
3122
|
return Number(uid.replace('uid=', ''));
|
|
3066
3123
|
}
|
|
3067
3124
|
function transformServerAPIContractState(_ref2) {
|
|
3068
3125
|
var status = _ref2.status,
|
|
3069
|
-
|
|
3070
|
-
|
|
3126
|
+
authStatus = _ref2.authStatus;
|
|
3071
3127
|
if (status === 0) {
|
|
3072
3128
|
if (authStatus === 1 || authStatus === 3) {
|
|
3073
3129
|
return 'active';
|
|
3074
3130
|
}
|
|
3075
|
-
|
|
3076
3131
|
if (authStatus === 2) {
|
|
3077
3132
|
return 'testActive';
|
|
3078
3133
|
}
|
|
3079
|
-
|
|
3080
3134
|
if (authStatus === 128) {
|
|
3081
3135
|
return 'inactive';
|
|
3082
3136
|
}
|
|
3083
3137
|
}
|
|
3084
|
-
|
|
3085
3138
|
if (status === 1) {
|
|
3086
3139
|
return 'terminal';
|
|
3087
3140
|
}
|
|
3088
|
-
|
|
3089
3141
|
return 'exception';
|
|
3090
3142
|
}
|
|
3091
3143
|
/**
|
|
3092
3144
|
* 暂时休眠
|
|
3093
3145
|
* @param ms 休眠时常(毫秒)
|
|
3094
3146
|
*/
|
|
3095
|
-
|
|
3096
3147
|
function promiseSleep(ms) {
|
|
3097
3148
|
if (ms === void 0) {
|
|
3098
3149
|
ms = 300;
|
|
3099
3150
|
}
|
|
3100
|
-
|
|
3101
3151
|
return new Promise(function (resolve) {
|
|
3102
3152
|
setTimeout(function () {
|
|
3103
3153
|
resolve();
|
|
@@ -3108,12 +3158,10 @@ function promiseSleep(ms) {
|
|
|
3108
3158
|
* 获取用户头像URL
|
|
3109
3159
|
* @param userID
|
|
3110
3160
|
*/
|
|
3111
|
-
|
|
3112
3161
|
function getAvatarUrl(userID) {
|
|
3113
3162
|
if (userID === void 0) {
|
|
3114
3163
|
userID = 0;
|
|
3115
3164
|
}
|
|
3116
|
-
|
|
3117
3165
|
// return `${completeUrlByDomain('image')}/avatar/${userID || getUserIDByCookies()}?t=${Date.now()}`;
|
|
3118
3166
|
return "https://image.freelog.com/avatar/" + (userID || getUserIDByCookies()) + "?t=" + Date.now();
|
|
3119
3167
|
}
|
|
@@ -3131,123 +3179,101 @@ var Tool = {
|
|
|
3131
3179
|
function getFilesSha1Info(_x, _x2) {
|
|
3132
3180
|
return _getFilesSha1Info.apply(this, arguments);
|
|
3133
3181
|
}
|
|
3134
|
-
|
|
3135
3182
|
function _getFilesSha1Info() {
|
|
3136
|
-
_getFilesSha1Info = _asyncToGenerator(
|
|
3183
|
+
_getFilesSha1Info = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref, cdPartially) {
|
|
3137
3184
|
var sha1, resourceTypeCode, delay, needHandleSha1, allData, _yield$Storage$filesL, ret, errCode, data, msg, finishedInfo;
|
|
3138
|
-
|
|
3139
3185
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
3140
|
-
while (1) {
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
needHandleSha1
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
}
|
|
3201
|
-
|
|
3202
|
-
});
|
|
3203
|
-
finishedInfo = data.filter(function (d) {
|
|
3204
|
-
return d.metaAnalyzeStatus !== 0 && d.metaAnalyzeStatus !== 1;
|
|
3205
|
-
}).map(function (d) {
|
|
3206
|
-
var state = 'fail';
|
|
3207
|
-
|
|
3208
|
-
if (!d.metaAnalyzeStatus) {
|
|
3209
|
-
state = 'nonentity';
|
|
3210
|
-
} else if (d.metaAnalyzeStatus === 2) {
|
|
3211
|
-
state = 'success';
|
|
3212
|
-
} else if (d.metaAnalyzeStatus === 3) {
|
|
3213
|
-
state = 'fail';
|
|
3214
|
-
} // console.log(d, '90wieojiksdjf;lkasdjf;lksdjflksjdflkjsdlfkjsdlkj');
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
return {
|
|
3218
|
-
sha1: d.sha1,
|
|
3219
|
-
state: state,
|
|
3220
|
-
info: d
|
|
3221
|
-
};
|
|
3222
|
-
});
|
|
3223
|
-
cdPartially && cdPartially(finishedInfo);
|
|
3224
|
-
allData = [].concat(allData, finishedInfo);
|
|
3225
|
-
|
|
3226
|
-
if (!(needHandleSha1.length === 0)) {
|
|
3227
|
-
_context.next = 24;
|
|
3228
|
-
break;
|
|
3186
|
+
while (1) switch (_context.prev = _context.next) {
|
|
3187
|
+
case 0:
|
|
3188
|
+
sha1 = _ref.sha1, resourceTypeCode = _ref.resourceTypeCode;
|
|
3189
|
+
if (cdPartially === void 0) {
|
|
3190
|
+
cdPartially = function cdPartially() {
|
|
3191
|
+
return undefined;
|
|
3192
|
+
};
|
|
3193
|
+
}
|
|
3194
|
+
if (!(sha1.length === 0)) {
|
|
3195
|
+
_context.next = 4;
|
|
3196
|
+
break;
|
|
3197
|
+
}
|
|
3198
|
+
return _context.abrupt("return", {
|
|
3199
|
+
error: '',
|
|
3200
|
+
result: []
|
|
3201
|
+
});
|
|
3202
|
+
case 4:
|
|
3203
|
+
delay = 500;
|
|
3204
|
+
needHandleSha1 = [].concat(sha1);
|
|
3205
|
+
allData = [];
|
|
3206
|
+
case 7:
|
|
3207
|
+
_context.next = 10;
|
|
3208
|
+
return filesListInfo({
|
|
3209
|
+
sha1: needHandleSha1.join(','),
|
|
3210
|
+
resourceTypeCode: resourceTypeCode
|
|
3211
|
+
});
|
|
3212
|
+
case 10:
|
|
3213
|
+
_yield$Storage$filesL = _context.sent;
|
|
3214
|
+
ret = _yield$Storage$filesL.ret;
|
|
3215
|
+
errCode = _yield$Storage$filesL.errCode;
|
|
3216
|
+
data = _yield$Storage$filesL.data;
|
|
3217
|
+
msg = _yield$Storage$filesL.msg;
|
|
3218
|
+
if (!(ret !== 0 || errCode !== 0)) {
|
|
3219
|
+
_context.next = 18;
|
|
3220
|
+
break;
|
|
3221
|
+
}
|
|
3222
|
+
console.log({
|
|
3223
|
+
ret: ret,
|
|
3224
|
+
errCode: errCode,
|
|
3225
|
+
data: data,
|
|
3226
|
+
msg: msg
|
|
3227
|
+
}, '09iowksdjaklfjs;oalijflskdjflsdkjflkj');
|
|
3228
|
+
return _context.abrupt("return", {
|
|
3229
|
+
error: msg,
|
|
3230
|
+
result: allData
|
|
3231
|
+
});
|
|
3232
|
+
case 18:
|
|
3233
|
+
needHandleSha1 = data.filter(function (d) {
|
|
3234
|
+
return d.metaAnalyzeStatus === 0 || d.metaAnalyzeStatus === 1;
|
|
3235
|
+
}).map(function (d) {
|
|
3236
|
+
return d.sha1;
|
|
3237
|
+
});
|
|
3238
|
+
finishedInfo = data.filter(function (d) {
|
|
3239
|
+
return d.metaAnalyzeStatus !== 0 && d.metaAnalyzeStatus !== 1;
|
|
3240
|
+
}).map(function (d) {
|
|
3241
|
+
var state = 'fail';
|
|
3242
|
+
if (!d.metaAnalyzeStatus) {
|
|
3243
|
+
state = 'nonentity';
|
|
3244
|
+
} else if (d.metaAnalyzeStatus === 2) {
|
|
3245
|
+
state = 'success';
|
|
3246
|
+
} else if (d.metaAnalyzeStatus === 3) {
|
|
3247
|
+
state = 'fail';
|
|
3229
3248
|
}
|
|
3230
|
-
|
|
3231
|
-
return
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3249
|
+
// console.log(d, '90wieojiksdjf;lkasdjf;lksdjflksjdflkjsdlfkjsdlkj');
|
|
3250
|
+
return {
|
|
3251
|
+
sha1: d.sha1,
|
|
3252
|
+
state: state,
|
|
3253
|
+
info: d
|
|
3254
|
+
};
|
|
3255
|
+
});
|
|
3256
|
+
cdPartially && cdPartially(finishedInfo);
|
|
3257
|
+
allData = [].concat(allData, finishedInfo);
|
|
3258
|
+
if (!(needHandleSha1.length === 0)) {
|
|
3259
|
+
_context.next = 24;
|
|
3239
3260
|
break;
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3261
|
+
}
|
|
3262
|
+
return _context.abrupt("break", 28);
|
|
3263
|
+
case 24:
|
|
3264
|
+
_context.next = 26;
|
|
3265
|
+
return promiseSleep(delay);
|
|
3266
|
+
case 26:
|
|
3267
|
+
_context.next = 7;
|
|
3268
|
+
break;
|
|
3269
|
+
case 28:
|
|
3270
|
+
return _context.abrupt("return", {
|
|
3271
|
+
error: '',
|
|
3272
|
+
result: allData
|
|
3273
|
+
});
|
|
3274
|
+
case 29:
|
|
3275
|
+
case "end":
|
|
3276
|
+
return _context.stop();
|
|
3251
3277
|
}
|
|
3252
3278
|
}, _callee);
|
|
3253
3279
|
}));
|
|
@@ -3261,8 +3287,7 @@ var recombination = {
|
|
|
3261
3287
|
|
|
3262
3288
|
function operationCategories(_temp) {
|
|
3263
3289
|
var _ref = _temp === void 0 ? {} : _temp,
|
|
3264
|
-
|
|
3265
|
-
|
|
3290
|
+
params = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
3266
3291
|
return FUtil.Request({
|
|
3267
3292
|
method: 'GET',
|
|
3268
3293
|
url: "/v2/resources/operation-categories/listSimpleByGroup",
|
|
@@ -3270,8 +3295,7 @@ function operationCategories(_temp) {
|
|
|
3270
3295
|
});
|
|
3271
3296
|
}
|
|
3272
3297
|
function recordRank(_ref2) {
|
|
3273
|
-
var params = _extends({}, _ref2);
|
|
3274
|
-
|
|
3298
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
|
|
3275
3299
|
return FUtil.Request({
|
|
3276
3300
|
method: 'POST',
|
|
3277
3301
|
url: "/v2/activities/coin/record/rank",
|
|
@@ -3279,8 +3303,7 @@ function recordRank(_ref2) {
|
|
|
3279
3303
|
});
|
|
3280
3304
|
}
|
|
3281
3305
|
function rankInfo(_ref3) {
|
|
3282
|
-
var params = _extends({}, _ref3);
|
|
3283
|
-
|
|
3306
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref3), _ref3));
|
|
3284
3307
|
return FUtil.Request({
|
|
3285
3308
|
method: 'POST',
|
|
3286
3309
|
url: "/v2/activities/coin/record/rankInfo",
|
|
@@ -3295,6 +3318,29 @@ var Operation = {
|
|
|
3295
3318
|
rankInfo: rankInfo
|
|
3296
3319
|
};
|
|
3297
3320
|
|
|
3321
|
+
function getInfoByCode(_ref) {
|
|
3322
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
3323
|
+
return FUtil.Request({
|
|
3324
|
+
method: 'GET',
|
|
3325
|
+
url: "/v2/resources/types/getInfoByCode",
|
|
3326
|
+
params: params
|
|
3327
|
+
});
|
|
3328
|
+
}
|
|
3329
|
+
function getInfoByCodeOrName(_ref2) {
|
|
3330
|
+
var params = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
|
|
3331
|
+
return FUtil.Request({
|
|
3332
|
+
method: 'GET',
|
|
3333
|
+
url: "/v2/resources/types/getInfoByCodeOrName",
|
|
3334
|
+
params: params
|
|
3335
|
+
});
|
|
3336
|
+
}
|
|
3337
|
+
|
|
3338
|
+
var ResourceType = {
|
|
3339
|
+
__proto__: null,
|
|
3340
|
+
getInfoByCode: getInfoByCode,
|
|
3341
|
+
getInfoByCodeOrName: getInfoByCodeOrName
|
|
3342
|
+
};
|
|
3343
|
+
|
|
3298
3344
|
var FServiceAPI = {
|
|
3299
3345
|
Node: Node,
|
|
3300
3346
|
Exhibit: Exhibit,
|
|
@@ -3313,9 +3359,11 @@ var FServiceAPI = {
|
|
|
3313
3359
|
I18n: I18n,
|
|
3314
3360
|
Policy: Policy,
|
|
3315
3361
|
recombination: recombination,
|
|
3316
|
-
Operation: Operation
|
|
3362
|
+
Operation: Operation,
|
|
3363
|
+
ResourceType: ResourceType
|
|
3317
3364
|
};
|
|
3318
3365
|
|
|
3366
|
+
// import from '../service-API';
|
|
3319
3367
|
var codeMessage = {
|
|
3320
3368
|
200: '服务器成功返回请求的数据。',
|
|
3321
3369
|
201: '新建或修改数据成功。',
|
|
@@ -3332,8 +3380,8 @@ var codeMessage = {
|
|
|
3332
3380
|
502: '网关错误。',
|
|
3333
3381
|
503: '服务不可用,服务器暂时过载或维护。',
|
|
3334
3382
|
504: '网关超时。'
|
|
3335
|
-
};
|
|
3336
|
-
|
|
3383
|
+
};
|
|
3384
|
+
// export let apiHost: string = '';
|
|
3337
3385
|
if (window.location.hostname.includes('.com')) {
|
|
3338
3386
|
// apiHost = `${window.location.protocol}//qi.${(window.location.host.match(/(?<=\.).*/) || [''])[0]}`;
|
|
3339
3387
|
// apiHost = window.location.origin.replace('console', 'qi');
|
|
@@ -3363,8 +3411,6 @@ if (window.location.hostname.includes('.com')) {
|
|
|
3363
3411
|
// };
|
|
3364
3412
|
//
|
|
3365
3413
|
// // Add a request interceptor
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
3414
|
axios.interceptors.request.use(function (config) {
|
|
3369
3415
|
// Do something before request is sent
|
|
3370
3416
|
// NProgress.start();
|
|
@@ -3377,10 +3423,8 @@ axios.interceptors.request.use(function (config) {
|
|
|
3377
3423
|
/**
|
|
3378
3424
|
* 配置request请求时的默认参数
|
|
3379
3425
|
*/
|
|
3380
|
-
|
|
3381
3426
|
axios.interceptors.response.use(function (response) {
|
|
3382
3427
|
var _headers$contentDisp;
|
|
3383
|
-
|
|
3384
3428
|
// Do something with response data
|
|
3385
3429
|
// console.log(response, 'response!!!!!!');
|
|
3386
3430
|
// NProgress.done();
|
|
@@ -3388,18 +3432,17 @@ axios.interceptors.response.use(function (response) {
|
|
|
3388
3432
|
var error = {
|
|
3389
3433
|
description: codeMessage[response.status],
|
|
3390
3434
|
message: response.status
|
|
3391
|
-
};
|
|
3392
|
-
|
|
3435
|
+
};
|
|
3436
|
+
// notification.error(error);
|
|
3393
3437
|
throw new Error(JSON.stringify(error));
|
|
3394
3438
|
}
|
|
3395
|
-
|
|
3396
3439
|
var data = response.data,
|
|
3397
|
-
|
|
3398
|
-
|
|
3440
|
+
headers = response.headers;
|
|
3399
3441
|
if ((_headers$contentDisp = headers['content-disposition']) != null && _headers$contentDisp.includes('attachment;')) {
|
|
3400
3442
|
// downloadFile(response);
|
|
3401
3443
|
return;
|
|
3402
|
-
}
|
|
3444
|
+
}
|
|
3445
|
+
// console.log(data, 'data2390jasdflkf');
|
|
3403
3446
|
// if ((data.errcode === undefined
|
|
3404
3447
|
// ? (data.errCode !== 0 && data.errCode !== 2)
|
|
3405
3448
|
// : (data.errcode !== 0 && data.errcode !== 2))
|
|
@@ -3410,8 +3453,6 @@ axios.interceptors.response.use(function (response) {
|
|
|
3410
3453
|
// // });
|
|
3411
3454
|
// throw new Error(JSON.stringify(data));
|
|
3412
3455
|
// }
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
3456
|
return data;
|
|
3416
3457
|
}, function (error) {
|
|
3417
3458
|
// Do something with response error
|
|
@@ -3421,51 +3462,40 @@ axios.interceptors.response.use(function (response) {
|
|
|
3421
3462
|
function request(_x, _x2) {
|
|
3422
3463
|
return _request.apply(this, arguments);
|
|
3423
3464
|
}
|
|
3424
|
-
|
|
3425
3465
|
function _request() {
|
|
3426
|
-
_request = _asyncToGenerator(
|
|
3466
|
+
_request = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(config, _temp) {
|
|
3427
3467
|
var _ref, _ref$noRedirect, noRedirect, _ref$noErrorAlert, noErrorAlert, result;
|
|
3428
|
-
|
|
3429
3468
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
3430
|
-
while (1) {
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3469
|
+
while (1) switch (_context.prev = _context.next) {
|
|
3470
|
+
case 0:
|
|
3471
|
+
_ref = _temp === void 0 ? {} : _temp, _ref$noRedirect = _ref.noRedirect, noRedirect = _ref$noRedirect === void 0 ? false : _ref$noRedirect, _ref$noErrorAlert = _ref.noErrorAlert, noErrorAlert = _ref$noErrorAlert === void 0 ? false : _ref$noErrorAlert;
|
|
3472
|
+
_context.next = 3;
|
|
3473
|
+
return axios.request(config);
|
|
3474
|
+
case 3:
|
|
3475
|
+
result = _context.sent;
|
|
3476
|
+
if (!(result.errCode === 30 && !noRedirect)) {
|
|
3477
|
+
_context.next = 10;
|
|
3478
|
+
break;
|
|
3479
|
+
}
|
|
3480
|
+
_context.next = 7;
|
|
3481
|
+
return FServiceAPI.User.logout();
|
|
3482
|
+
case 7:
|
|
3483
|
+
window.location.replace("" + completeUrlByDomain('user') + login({
|
|
3484
|
+
goTo: window.location.href
|
|
3485
|
+
}));
|
|
3486
|
+
_context.next = 11;
|
|
3487
|
+
break;
|
|
3488
|
+
case 10:
|
|
3489
|
+
if (result.ret === 4 && result.errCode === 10 && !noRedirect) {
|
|
3490
|
+
window.location.replace("" + completeUrlByDomain('user') + userFreeze({
|
|
3450
3491
|
goTo: window.location.href
|
|
3451
3492
|
}));
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
goTo: window.location.href
|
|
3459
|
-
}));
|
|
3460
|
-
}
|
|
3461
|
-
|
|
3462
|
-
case 11:
|
|
3463
|
-
return _context.abrupt("return", result);
|
|
3464
|
-
|
|
3465
|
-
case 12:
|
|
3466
|
-
case "end":
|
|
3467
|
-
return _context.stop();
|
|
3468
|
-
}
|
|
3493
|
+
}
|
|
3494
|
+
case 11:
|
|
3495
|
+
return _context.abrupt("return", result);
|
|
3496
|
+
case 12:
|
|
3497
|
+
case "end":
|
|
3498
|
+
return _context.stop();
|
|
3469
3499
|
}
|
|
3470
3500
|
}, _callee);
|
|
3471
3501
|
}));
|
|
@@ -3474,20 +3504,16 @@ function _request() {
|
|
|
3474
3504
|
|
|
3475
3505
|
function useGetState(initVal) {
|
|
3476
3506
|
var _React$useState = useState(initVal),
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3507
|
+
state = _React$useState[0],
|
|
3508
|
+
setState = _React$useState[1];
|
|
3480
3509
|
var ref = useRef(initVal);
|
|
3481
|
-
|
|
3482
3510
|
function setStateCopy(newVal) {
|
|
3483
3511
|
ref.current = newVal;
|
|
3484
3512
|
setState(newVal);
|
|
3485
3513
|
}
|
|
3486
|
-
|
|
3487
3514
|
function getState() {
|
|
3488
3515
|
return ref.current;
|
|
3489
3516
|
}
|
|
3490
|
-
|
|
3491
3517
|
return [state, setStateCopy, getState];
|
|
3492
3518
|
}
|
|
3493
3519
|
|
|
@@ -3496,6 +3522,7 @@ var Hook = {
|
|
|
3496
3522
|
useGetState: useGetState
|
|
3497
3523
|
};
|
|
3498
3524
|
|
|
3525
|
+
// import I18n from '../i18n';
|
|
3499
3526
|
var FUtil = {
|
|
3500
3527
|
Format: Format,
|
|
3501
3528
|
Regexp: Regexp,
|
|
@@ -3518,12 +3545,11 @@ var allLanguage = [{
|
|
|
3518
3545
|
value: 'zh_CN',
|
|
3519
3546
|
label: '简体中文'
|
|
3520
3547
|
}];
|
|
3521
|
-
|
|
3522
3548
|
var I18nNext = /*#__PURE__*/function () {
|
|
3523
3549
|
function I18nNext() {
|
|
3524
3550
|
this._loadingData = 'NotStart';
|
|
3525
|
-
this._taskQueue = [];
|
|
3526
|
-
|
|
3551
|
+
this._taskQueue = [];
|
|
3552
|
+
// private _currentLanguage: LanguageKeyType = window.localStorage.getItem(localStorage_i18nextLng_key) as null || 'zh_CN';
|
|
3527
3553
|
this._currentLanguage = Cookies.get(localStorage_i18nextLng_key) || 'zh_CN';
|
|
3528
3554
|
this.ready();
|
|
3529
3555
|
this.ready = this.ready.bind(this);
|
|
@@ -3532,100 +3558,77 @@ var I18nNext = /*#__PURE__*/function () {
|
|
|
3532
3558
|
this.getAllLanguage = this.getAllLanguage.bind(this);
|
|
3533
3559
|
this.getCurrentLanguage = this.getCurrentLanguage.bind(this);
|
|
3534
3560
|
}
|
|
3535
|
-
|
|
3536
3561
|
var _proto = I18nNext.prototype;
|
|
3537
|
-
|
|
3538
3562
|
_proto.ready = /*#__PURE__*/function () {
|
|
3539
|
-
var _ready = /*#__PURE__*/_asyncToGenerator(
|
|
3563
|
+
var _ready = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
3540
3564
|
var _this = this;
|
|
3541
|
-
|
|
3542
3565
|
var exc, handleTasks, promise;
|
|
3543
3566
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
3544
|
-
while (1) {
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
case 0:
|
|
3561
|
-
if (!(_this._loadingData === 'End')) {
|
|
3562
|
-
_context.next = 3;
|
|
3563
|
-
break;
|
|
3564
|
-
}
|
|
3565
|
-
|
|
3566
|
-
exc();
|
|
3567
|
-
return _context.abrupt("return");
|
|
3568
|
-
|
|
3569
|
-
case 3:
|
|
3570
|
-
if (!(_this._loadingData === 'Start')) {
|
|
3571
|
-
_context.next = 5;
|
|
3572
|
-
break;
|
|
3573
|
-
}
|
|
3574
|
-
|
|
3575
|
-
return _context.abrupt("return");
|
|
3576
|
-
|
|
3577
|
-
case 5:
|
|
3578
|
-
// NO_START
|
|
3579
|
-
_this._loadingData = 'Start';
|
|
3580
|
-
_context.next = 8;
|
|
3581
|
-
return _this._handleData();
|
|
3582
|
-
|
|
3583
|
-
case 8:
|
|
3584
|
-
// console.log('######');
|
|
3585
|
-
exc();
|
|
3586
|
-
|
|
3587
|
-
case 9:
|
|
3588
|
-
case "end":
|
|
3589
|
-
return _context.stop();
|
|
3567
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
3568
|
+
case 0:
|
|
3569
|
+
exc = function exc() {
|
|
3570
|
+
while (_this._taskQueue.length > 0) {
|
|
3571
|
+
var task = _this._taskQueue.shift();
|
|
3572
|
+
task && task();
|
|
3573
|
+
}
|
|
3574
|
+
};
|
|
3575
|
+
handleTasks = /*#__PURE__*/function () {
|
|
3576
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
3577
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
3578
|
+
while (1) switch (_context.prev = _context.next) {
|
|
3579
|
+
case 0:
|
|
3580
|
+
if (!(_this._loadingData === 'End')) {
|
|
3581
|
+
_context.next = 3;
|
|
3582
|
+
break;
|
|
3590
3583
|
}
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3584
|
+
exc();
|
|
3585
|
+
return _context.abrupt("return");
|
|
3586
|
+
case 3:
|
|
3587
|
+
if (!(_this._loadingData === 'Start')) {
|
|
3588
|
+
_context.next = 5;
|
|
3589
|
+
break;
|
|
3590
|
+
}
|
|
3591
|
+
return _context.abrupt("return");
|
|
3592
|
+
case 5:
|
|
3593
|
+
// NO_START
|
|
3594
|
+
_this._loadingData = 'Start';
|
|
3595
|
+
_context.next = 8;
|
|
3596
|
+
return _this._handleData();
|
|
3597
|
+
case 8:
|
|
3598
|
+
// console.log('######');
|
|
3599
|
+
exc();
|
|
3600
|
+
case 9:
|
|
3601
|
+
case "end":
|
|
3602
|
+
return _context.stop();
|
|
3603
|
+
}
|
|
3604
|
+
}, _callee);
|
|
3605
|
+
}));
|
|
3606
|
+
return function handleTasks() {
|
|
3607
|
+
return _ref.apply(this, arguments);
|
|
3608
|
+
};
|
|
3609
|
+
}();
|
|
3610
|
+
promise = new Promise(function (resolve) {
|
|
3611
|
+
_this._taskQueue.push(resolve);
|
|
3612
|
+
});
|
|
3613
|
+
handleTasks();
|
|
3614
|
+
return _context2.abrupt("return", promise);
|
|
3615
|
+
case 5:
|
|
3616
|
+
case "end":
|
|
3617
|
+
return _context2.stop();
|
|
3610
3618
|
}
|
|
3611
3619
|
}, _callee2);
|
|
3612
3620
|
}));
|
|
3613
|
-
|
|
3614
3621
|
function ready() {
|
|
3615
3622
|
return _ready.apply(this, arguments);
|
|
3616
3623
|
}
|
|
3617
|
-
|
|
3618
3624
|
return ready;
|
|
3619
3625
|
}();
|
|
3620
|
-
|
|
3621
3626
|
_proto.t = function t(key, options) {
|
|
3622
3627
|
return i18next.t(key.trim(), options);
|
|
3623
3628
|
};
|
|
3624
|
-
|
|
3625
3629
|
_proto.tJSXElement = function tJSXElement(key, options) {
|
|
3626
3630
|
return htmlReactParser(i18next.t(key.trim(), options));
|
|
3627
3631
|
};
|
|
3628
|
-
|
|
3629
3632
|
_proto.changeLanguage = function changeLanguage(lng) {
|
|
3630
3633
|
// return i18next.changeLanguage(lng);
|
|
3631
3634
|
// window.localStorage.setItem(localStorage_i18nextLng_key, lng)
|
|
@@ -3634,135 +3637,108 @@ var I18nNext = /*#__PURE__*/function () {
|
|
|
3634
3637
|
domain: FUtil.Format.completeUrlByDomain('').replace(/http(s)?:\/\//, '')
|
|
3635
3638
|
});
|
|
3636
3639
|
};
|
|
3637
|
-
|
|
3638
3640
|
_proto.getAllLanguage = function getAllLanguage() {
|
|
3639
3641
|
return allLanguage;
|
|
3640
3642
|
};
|
|
3641
|
-
|
|
3642
3643
|
_proto.getCurrentLanguage = function getCurrentLanguage() {
|
|
3643
3644
|
return this._currentLanguage;
|
|
3644
3645
|
};
|
|
3645
|
-
|
|
3646
3646
|
_proto._handleData = /*#__PURE__*/function () {
|
|
3647
|
-
var _handleData2 = /*#__PURE__*/_asyncToGenerator(
|
|
3647
|
+
var _handleData2 = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
3648
3648
|
var lng, resource, i18nextResources;
|
|
3649
3649
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
3650
|
-
while (1) {
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
if (i18nextResources) {
|
|
3659
|
-
_context3.next = 9;
|
|
3660
|
-
break;
|
|
3661
|
-
}
|
|
3662
|
-
|
|
3663
|
-
_context3.next = 6;
|
|
3664
|
-
return this._fetchData();
|
|
3665
|
-
|
|
3666
|
-
case 6:
|
|
3667
|
-
i18nextResources = _context3.sent;
|
|
3668
|
-
_context3.next = 10;
|
|
3650
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
3651
|
+
case 0:
|
|
3652
|
+
lng = this._currentLanguage;
|
|
3653
|
+
resource = window.localStorage.getItem(localStorage_i18nextResources_key); // const resource: string | undefined = Cookies.get(decodeURIComponent(localStorage_i18nextResources_key));
|
|
3654
|
+
i18nextResources = resource ? JSON.parse(resource) : null;
|
|
3655
|
+
if (i18nextResources) {
|
|
3656
|
+
_context3.next = 9;
|
|
3669
3657
|
break;
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3658
|
+
}
|
|
3659
|
+
_context3.next = 6;
|
|
3660
|
+
return this._fetchData();
|
|
3661
|
+
case 6:
|
|
3662
|
+
i18nextResources = _context3.sent;
|
|
3663
|
+
_context3.next = 10;
|
|
3664
|
+
break;
|
|
3665
|
+
case 9:
|
|
3666
|
+
this._fetchData();
|
|
3667
|
+
case 10:
|
|
3668
|
+
_context3.next = 12;
|
|
3669
|
+
return i18next.init({
|
|
3670
|
+
// the translations
|
|
3671
|
+
// (tip move them in a JSON file and import them,
|
|
3672
|
+
// or even better, manage them via a UI: https://react.i18next.com/guides/multiple-translation-files#manage-your-translations-with-a-management-gui)
|
|
3673
|
+
resources: i18nextResources,
|
|
3674
|
+
lng: lng,
|
|
3675
|
+
fallbackLng: 'zh_CN',
|
|
3676
|
+
interpolation: {
|
|
3677
|
+
escapeValue: false,
|
|
3678
|
+
prefix: '{',
|
|
3679
|
+
suffix: '}'
|
|
3680
|
+
}
|
|
3681
|
+
});
|
|
3682
|
+
case 12:
|
|
3683
|
+
this._loadingData = 'End';
|
|
3684
|
+
case 13:
|
|
3685
|
+
case "end":
|
|
3686
|
+
return _context3.stop();
|
|
3697
3687
|
}
|
|
3698
3688
|
}, _callee3, this);
|
|
3699
3689
|
}));
|
|
3700
|
-
|
|
3701
3690
|
function _handleData() {
|
|
3702
3691
|
return _handleData2.apply(this, arguments);
|
|
3703
3692
|
}
|
|
3704
|
-
|
|
3705
3693
|
return _handleData;
|
|
3706
3694
|
}();
|
|
3707
|
-
|
|
3708
3695
|
_proto._fetchData = /*#__PURE__*/function () {
|
|
3709
|
-
var _fetchData2 = /*#__PURE__*/_asyncToGenerator(
|
|
3696
|
+
var _fetchData2 = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
3710
3697
|
var url, res, en_US, zh_CN, _i, _Object$entries, _Object$entries$_i, key, value, result;
|
|
3711
|
-
|
|
3712
3698
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
3713
|
-
while (1) {
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3699
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
3700
|
+
case 0:
|
|
3701
|
+
url = window.location.origin.includes('.freelog.com') ? ossJsonUrl : ossJsonUrl_Test;
|
|
3702
|
+
_context4.next = 3;
|
|
3703
|
+
return axios.get(url + '?timestamp=' + Date.now(), {
|
|
3704
|
+
withCredentials: false
|
|
3705
|
+
});
|
|
3706
|
+
case 3:
|
|
3707
|
+
res = _context4.sent;
|
|
3708
|
+
// console.log(res, 'data09oiw3qjelsfkdfjlsdkfjl');
|
|
3709
|
+
en_US = {};
|
|
3710
|
+
zh_CN = {};
|
|
3711
|
+
for (_i = 0, _Object$entries = Object.entries(res); _i < _Object$entries.length; _i++) {
|
|
3712
|
+
_Object$entries$_i = _Object$entries[_i], key = _Object$entries$_i[0], value = _Object$entries$_i[1];
|
|
3713
|
+
// console.log(key, value, 'key, value90iowsldfjlsdkj');
|
|
3714
|
+
en_US[key] = value['en_US'];
|
|
3715
|
+
zh_CN[key] = value['zh_CN'];
|
|
3716
|
+
}
|
|
3717
|
+
result = {
|
|
3718
|
+
en_US: {
|
|
3719
|
+
translation: en_US
|
|
3720
|
+
},
|
|
3721
|
+
zh_CN: {
|
|
3722
|
+
translation: zh_CN
|
|
3733
3723
|
}
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
window.localStorage.setItem(localStorage_i18nextResources_key, JSON.stringify(result)); // Cookies.set(localStorage_i18nextResources_key, encodeURIComponent(JSON.stringify(result)), {
|
|
3745
|
-
// expires: 36525,
|
|
3746
|
-
// domain: FUtil.Format.completeUrlByDomain('').replace(/http(s)?:\/\//, ''),
|
|
3747
|
-
// });
|
|
3748
|
-
|
|
3749
|
-
return _context4.abrupt("return", result);
|
|
3750
|
-
|
|
3751
|
-
case 10:
|
|
3752
|
-
case "end":
|
|
3753
|
-
return _context4.stop();
|
|
3754
|
-
}
|
|
3724
|
+
}; // console.log(result, 'result093sdolkfjlsdkjl');
|
|
3725
|
+
window.localStorage.setItem(localStorage_i18nextResources_key, JSON.stringify(result));
|
|
3726
|
+
// Cookies.set(localStorage_i18nextResources_key, encodeURIComponent(JSON.stringify(result)), {
|
|
3727
|
+
// expires: 36525,
|
|
3728
|
+
// domain: FUtil.Format.completeUrlByDomain('').replace(/http(s)?:\/\//, ''),
|
|
3729
|
+
// });
|
|
3730
|
+
return _context4.abrupt("return", result);
|
|
3731
|
+
case 10:
|
|
3732
|
+
case "end":
|
|
3733
|
+
return _context4.stop();
|
|
3755
3734
|
}
|
|
3756
3735
|
}, _callee4);
|
|
3757
3736
|
}));
|
|
3758
|
-
|
|
3759
3737
|
function _fetchData() {
|
|
3760
3738
|
return _fetchData2.apply(this, arguments);
|
|
3761
3739
|
}
|
|
3762
|
-
|
|
3763
3740
|
return _fetchData;
|
|
3764
3741
|
}();
|
|
3765
|
-
|
|
3766
3742
|
return I18nNext;
|
|
3767
3743
|
}();
|
|
3768
3744
|
|