component-shipinlv 1.0.35 → 1.0.37
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/UI/LayoutContent.d.ts +18 -0
- package/dist/UI/LayoutContent.js +73 -0
- package/dist/UI/LayoutContent.less +60 -0
- package/dist/UI/PageContentWarp.less +1 -1
- package/dist/UI/PageLoading.d.ts +3 -0
- package/dist/UI/PageLoading.js +11 -0
- package/dist/UI/PageLoading.less +7 -0
- package/dist/VideoPublish/account-manage/home.d.ts +9 -0
- package/dist/VideoPublish/account-manage/home.js +170 -0
- package/dist/VideoPublish/account-manage/home.less +58 -0
- package/dist/VideoPublish/account-manage/index.d.ts +3 -0
- package/dist/VideoPublish/account-manage/index.js +56 -0
- package/dist/VideoPublish/account-manage/index.less +59 -0
- package/dist/VideoPublish/account-manage/list.d.ts +10 -0
- package/dist/VideoPublish/account-manage/list.js +428 -0
- package/dist/VideoPublish/account-manage/list.less +154 -0
- package/dist/VideoPublish/account-manage/setting/index.d.ts +6 -0
- package/dist/VideoPublish/account-manage/setting/index.js +69 -0
- package/dist/VideoPublish/account-manage/setting/index.less +9 -0
- package/dist/VideoPublish/create-task/base/index.d.ts +10 -0
- package/dist/VideoPublish/create-task/base/index.js +315 -0
- package/dist/VideoPublish/create-task/base/index.less +64 -0
- package/dist/VideoPublish/create-task/index.js +294 -0
- package/dist/VideoPublish/index.d.ts +1 -0
- package/dist/VideoPublish/index.js +40 -11
- package/dist/VideoPublish/log/index.d.ts +2 -0
- package/dist/VideoPublish/log/index.js +122 -0
- package/dist/VideoPublish/log/index.less +83 -0
- package/dist/VideoPublish/video-account/query.js +1 -0
- package/dist/component/markdown/github-markdown-light.less +1102 -0
- package/dist/component/markdown/index.d.ts +8 -0
- package/dist/component/markdown/index.js +69 -0
- package/dist/component/markdown/index.less +55 -0
- package/dist/component/video-platform/logo.d.ts +1 -0
- package/dist/component/video-platform/logo.js +6 -0
- package/dist/config/apiUrls.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/accountManageSettingConfig.d.ts +2 -0
- package/dist/lib/accountManageSettingConfig.js +15 -0
- package/dist/lib/event.d.ts +7 -0
- package/dist/lib/event.js +59 -0
- package/dist/lib/getLocalUserInfo.d.ts +2 -0
- package/dist/lib/getLocalUserInfo.js +19 -0
- package/dist/lib/math.d.ts +38 -0
- package/dist/lib/math.js +146 -0
- package/dist/lib/sleep.d.ts +2 -0
- package/dist/lib/sleep.js +23 -0
- package/dist/lib/store.d.ts +7 -0
- package/dist/lib/store.js +36 -0
- package/dist/lib/toast.d.ts +2 -0
- package/dist/lib/toast.js +8 -0
- package/dist/lib/toastError.d.ts +2 -0
- package/dist/lib/toastError.js +8 -0
- package/dist/service/api/VideoPublishVideoAccountController.d.ts +13 -0
- package/dist/service/api/VideoPublishVideoAccountController.js +140 -0
- package/dist/types/PublishNpm.d.ts +36 -0
- package/dist/types/PublishNpm.js +0 -0
- package/dist/types/PublishTaskPlan.d.ts +41 -0
- package/dist/types/PublishTaskPlan.js +0 -0
- package/dist/types/User.d.ts +83 -0
- package/dist/types/VideoPublish.d.ts +4 -2
- package/dist/types/VideoPublishLog.d.ts +32 -0
- package/dist/types/VideoPublishLog.js +0 -0
- package/dist/typings/VideoPublishAccountManageSetting.d.ts +5 -0
- package/dist/typings/VideoPublishAccountManageSetting.js +0 -0
- package/dist/typings/VideoPublishVideoAccount.d.ts +69 -0
- package/dist/typings/VideoPublishVideoAccount.js +0 -0
- package/dist/window.d.ts +9 -0
- package/package.json +2 -1
- package/dist/VideoPublish/creat-task/index.js +0 -569
- /package/dist/VideoPublish/{creat-task → create-task}/hour-enabled.d.ts +0 -0
- /package/dist/VideoPublish/{creat-task → create-task}/hour-enabled.js +0 -0
- /package/dist/VideoPublish/{creat-task → create-task}/hour-enabled.less +0 -0
- /package/dist/VideoPublish/{creat-task → create-task}/index.css.d.ts +0 -0
- /package/dist/VideoPublish/{creat-task → create-task}/index.css.js +0 -0
- /package/dist/VideoPublish/{creat-task → create-task}/index.d.ts +0 -0
- /package/dist/VideoPublish/{creat-task → create-task}/select-list.css.d.ts +0 -0
- /package/dist/VideoPublish/{creat-task → create-task}/select-list.css.js +0 -0
- /package/dist/VideoPublish/{creat-task → create-task}/select-list.d.ts +0 -0
- /package/dist/VideoPublish/{creat-task → create-task}/select-list.js +0 -0
- /package/dist/VideoPublish/{creat-task → create-task}/task-list.css.d.ts +0 -0
- /package/dist/VideoPublish/{creat-task → create-task}/task-list.css.js +0 -0
- /package/dist/VideoPublish/{creat-task → create-task}/task-list.d.ts +0 -0
- /package/dist/VideoPublish/{creat-task → create-task}/task-list.js +0 -0
@@ -0,0 +1,69 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import MarkdownToJsx from "markdown-to-jsx";
|
3
|
+
import { Tag, Button, Divider, Progress, Tooltip } from 'antd';
|
4
|
+
import { WarningFilled, CheckCircleFilled, ClockCircleOutlined, CloseSquareFilled } from '@ant-design/icons';
|
5
|
+
import { VideoPlatform } from "../..";
|
6
|
+
import "./index.less";
|
7
|
+
import "./github-markdown-light.less";
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
9
|
+
var Markdown = function Markdown(_ref) {
|
10
|
+
var _ref$content = _ref.content,
|
11
|
+
content = _ref$content === void 0 ? '' : _ref$content;
|
12
|
+
return /*#__PURE__*/_jsx("div", {
|
13
|
+
className: "shipinlv-markdown markdown-body ",
|
14
|
+
children: /*#__PURE__*/_jsx(MarkdownToJsx, {
|
15
|
+
options: {
|
16
|
+
disableParsingRawHTML: false,
|
17
|
+
overrides: {
|
18
|
+
Tag: {
|
19
|
+
component: Tag
|
20
|
+
},
|
21
|
+
Button: {
|
22
|
+
component: Button
|
23
|
+
},
|
24
|
+
Divider: {
|
25
|
+
component: Divider
|
26
|
+
},
|
27
|
+
Progress: {
|
28
|
+
component: Progress
|
29
|
+
},
|
30
|
+
VideoPlatform: {
|
31
|
+
component: VideoPlatform
|
32
|
+
},
|
33
|
+
Tooltip: {
|
34
|
+
component: Tooltip
|
35
|
+
},
|
36
|
+
hr: {
|
37
|
+
component: Divider
|
38
|
+
},
|
39
|
+
WarningFilled: {
|
40
|
+
component: WarningFilled,
|
41
|
+
props: {
|
42
|
+
className: 'icon-warn'
|
43
|
+
}
|
44
|
+
},
|
45
|
+
CheckCircleFilled: {
|
46
|
+
component: CheckCircleFilled,
|
47
|
+
props: {
|
48
|
+
className: 'icon-success'
|
49
|
+
}
|
50
|
+
},
|
51
|
+
ClockCircleOutlined: {
|
52
|
+
component: ClockCircleOutlined,
|
53
|
+
props: {
|
54
|
+
className: 'icon-wait'
|
55
|
+
}
|
56
|
+
},
|
57
|
+
CloseSquareFilled: {
|
58
|
+
component: CloseSquareFilled,
|
59
|
+
props: {
|
60
|
+
className: 'icon-fail'
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
},
|
65
|
+
children: content
|
66
|
+
})
|
67
|
+
});
|
68
|
+
};
|
69
|
+
export default Markdown;
|
@@ -0,0 +1,55 @@
|
|
1
|
+
.shipinlv-markdown{
|
2
|
+
position: relative;
|
3
|
+
line-height: 1.5em;
|
4
|
+
word-break: break-all;
|
5
|
+
word-wrap: break-word;
|
6
|
+
white-space: break-spaces;
|
7
|
+
blockquote{
|
8
|
+
margin-bottom: -5px !important;
|
9
|
+
}
|
10
|
+
p{
|
11
|
+
//margin: 0 !important;
|
12
|
+
//padding: 1px;
|
13
|
+
//margin-block-start: 0 !important;
|
14
|
+
//margin-inline-end: 0 !important; ;
|
15
|
+
}
|
16
|
+
//.copy{
|
17
|
+
// position: absolute;
|
18
|
+
// right: 5px;
|
19
|
+
// top: 3px;
|
20
|
+
// background-color: rgba( 0, 0, 0, 0.6 );
|
21
|
+
// color: #FFF;
|
22
|
+
// line-height: 1em;
|
23
|
+
// padding: 4px;
|
24
|
+
// border-radius: 3px;
|
25
|
+
// font-size: 12px;
|
26
|
+
// opacity: 0.8;
|
27
|
+
// &:hover{
|
28
|
+
// opacity: 0.96;
|
29
|
+
// }
|
30
|
+
//}
|
31
|
+
//.languageTag{
|
32
|
+
// position: absolute;
|
33
|
+
// left: 0;
|
34
|
+
// top: 0;
|
35
|
+
// font-size: 12px;
|
36
|
+
// line-height: 1em;
|
37
|
+
// padding: 1px 3px 2px;
|
38
|
+
// background-color: #4fc6d6;
|
39
|
+
// color: #FFF;
|
40
|
+
// border-bottom-right-radius: 3px;
|
41
|
+
// border-top-left-radius: 3px;
|
42
|
+
// &.php{
|
43
|
+
// background-color: #7177ad;
|
44
|
+
// }
|
45
|
+
// &.shell{
|
46
|
+
// background-color: #333;
|
47
|
+
// }
|
48
|
+
// &.python{
|
49
|
+
// background-color: #4173a1;
|
50
|
+
// }
|
51
|
+
// &.tsx{
|
52
|
+
// background-color: #609b56;
|
53
|
+
// }
|
54
|
+
//}
|
55
|
+
}
|
@@ -15,6 +15,12 @@ export var VideoPlatformList = [{
|
|
15
15
|
name: '快手',
|
16
16
|
videoWebSiteUrl: 'https://www.kuaishou.com/',
|
17
17
|
allowMainDomainList: ['kuaishou.com']
|
18
|
+
}, {
|
19
|
+
platform: 'tiktok',
|
20
|
+
name: 'Tiktok',
|
21
|
+
disabled: true,
|
22
|
+
videoWebSiteUrl: 'https://www.tiktok.com/',
|
23
|
+
allowMainDomainList: ['tiktok.com']
|
18
24
|
}
|
19
25
|
// {
|
20
26
|
// platform: 'bilibili',
|
package/dist/config/apiUrls.js
CHANGED
package/dist/index.d.ts
CHANGED
@@ -12,7 +12,7 @@ export { default as DealerUrlDict } from './base/DealerUrlDict';
|
|
12
12
|
export { default as VideoPlatform, VideoPlatformList, VideoPlatformDict } from './component/video-platform/logo';
|
13
13
|
export { default as VipList } from './VipList';
|
14
14
|
export { default as VideoPublish } from './VideoPublish';
|
15
|
-
export { default as VideoPublishCreateTask } from './VideoPublish/
|
15
|
+
export { default as VideoPublishCreateTask } from './VideoPublish/create-task';
|
16
16
|
export { default as VideoPublishVideoAccount } from './VideoPublish/video-account';
|
17
17
|
export { default as VideoKindTag } from './component/videoKindTag';
|
18
18
|
export { VideoKindTagList } from './component/videoKindTag';
|
package/dist/index.js
CHANGED
@@ -14,7 +14,7 @@ export { default as DealerUrlDict } from "./base/DealerUrlDict";
|
|
14
14
|
export { default as VideoPlatform, VideoPlatformList, VideoPlatformDict } from "./component/video-platform/logo";
|
15
15
|
export { default as VipList } from "./VipList";
|
16
16
|
export { default as VideoPublish } from "./VideoPublish";
|
17
|
-
export { default as VideoPublishCreateTask } from "./VideoPublish/
|
17
|
+
export { default as VideoPublishCreateTask } from "./VideoPublish/create-task";
|
18
18
|
export { default as VideoPublishVideoAccount } from "./VideoPublish/video-account";
|
19
19
|
export { default as VideoKindTag } from "./component/videoKindTag";
|
20
20
|
export { VideoKindTagList } from "./component/videoKindTag";
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
+
import store from "./store";
|
3
|
+
var AccountManageSettingConfigKey = 'account-manage-setting';
|
4
|
+
var AccountManageSettingConfig = function AccountManageSettingConfig(data) {
|
5
|
+
if (data) {
|
6
|
+
store.set(AccountManageSettingConfigKey, _objectSpread({}, data));
|
7
|
+
return data;
|
8
|
+
}
|
9
|
+
console.log('AccountManageSettingConfig get');
|
10
|
+
var outData = _objectSpread({
|
11
|
+
isChromeOpen: false
|
12
|
+
}, store.get(AccountManageSettingConfigKey));
|
13
|
+
return outData;
|
14
|
+
};
|
15
|
+
export default AccountManageSettingConfig;
|
@@ -0,0 +1,59 @@
|
|
1
|
+
if (!window.__events) {
|
2
|
+
window.__events = [];
|
3
|
+
}
|
4
|
+
var event = {
|
5
|
+
run: function run(name, data) {
|
6
|
+
console.log('Reg event run:', name, data);
|
7
|
+
if (!name) {
|
8
|
+
return;
|
9
|
+
}
|
10
|
+
window.__events.forEach(function (item) {
|
11
|
+
// 命中 子集事件
|
12
|
+
if (item.name === name || "".concat(item.name, ".").indexOf(name) === 0) {
|
13
|
+
item.fn(data);
|
14
|
+
}
|
15
|
+
});
|
16
|
+
},
|
17
|
+
on: function on(name, fn) {
|
18
|
+
var isGlobalOnly = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
19
|
+
console.log('Reg event do:', name);
|
20
|
+
var eventItem = {
|
21
|
+
name: name,
|
22
|
+
fn: fn
|
23
|
+
};
|
24
|
+
window.__events.push(eventItem);
|
25
|
+
},
|
26
|
+
// 只绑定一次,但会运行多次;
|
27
|
+
one: function one(name, fn) {
|
28
|
+
var isBind = false;
|
29
|
+
window.__events.forEach(function (items) {
|
30
|
+
if (items.name === name) {
|
31
|
+
isBind = true;
|
32
|
+
}
|
33
|
+
});
|
34
|
+
if (isBind) {
|
35
|
+
console.log('event bind:', name);
|
36
|
+
return;
|
37
|
+
}
|
38
|
+
this.on(name, fn);
|
39
|
+
},
|
40
|
+
// 删除事件
|
41
|
+
off: function off(name) {
|
42
|
+
window.__events.forEach(function (item, index) {
|
43
|
+
var isDel;
|
44
|
+
// 匹配到子集事件
|
45
|
+
if ("".concat(item.name, ".").indexOf(name) > -1) {
|
46
|
+
isDel = true;
|
47
|
+
} else if (name === item.name) {
|
48
|
+
// 一级,子集的子集
|
49
|
+
isDel = true;
|
50
|
+
}
|
51
|
+
if (isDel) {
|
52
|
+
item.fn = function () {};
|
53
|
+
window.__events.splice(index, 1);
|
54
|
+
}
|
55
|
+
});
|
56
|
+
} // 记录
|
57
|
+
// events: [] as EventItem[],
|
58
|
+
};
|
59
|
+
export default event;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
+
import store from "./store";
|
3
|
+
var getLocalUserInfo = function getLocalUserInfo() {
|
4
|
+
var storageUserInfo = store.get('user-info') || {
|
5
|
+
nickname: '',
|
6
|
+
id: 0,
|
7
|
+
isLogin: false,
|
8
|
+
avatarUrl: '',
|
9
|
+
sid: '',
|
10
|
+
userVip: {},
|
11
|
+
gender: 2,
|
12
|
+
accountName: '',
|
13
|
+
role: '',
|
14
|
+
isVerified: false
|
15
|
+
};
|
16
|
+
var userInfo = _objectSpread({}, storageUserInfo);
|
17
|
+
return userInfo;
|
18
|
+
};
|
19
|
+
export default getLocalUserInfo;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
declare const math: {
|
2
|
+
arrayRandom(list: any[]): any[];
|
3
|
+
randInt: (num1: number, num2: number) => number;
|
4
|
+
randWord: (wordLen: number, baseWord?: string) => string;
|
5
|
+
/**加法运算
|
6
|
+
* @说明:解决两个浮点数相加时会出现误差的问题
|
7
|
+
* @参数1: number n1
|
8
|
+
* @参数2: number n2
|
9
|
+
* @示例:add(n1,n2)
|
10
|
+
* @返回:string n1+n2
|
11
|
+
*/
|
12
|
+
add: (n1: number, n2: number) => number;
|
13
|
+
subtract: (n1: any, n2: any) => number;
|
14
|
+
multiply: (n1: any, n2: any) => number;
|
15
|
+
divide: (n1: any, n2: any) => number; /**预处理加减运算 , 外界不调用
|
16
|
+
* @参数1: number n1
|
17
|
+
* @参数2: number n2
|
18
|
+
* @示例:preAddSubtract (n1,n2)
|
19
|
+
* @返回:object
|
20
|
+
*/
|
21
|
+
preAddSubtract: (n1: any, n2: any) => number | {
|
22
|
+
s1: any;
|
23
|
+
s2: any;
|
24
|
+
n1: number;
|
25
|
+
n2: number;
|
26
|
+
d1: any;
|
27
|
+
d2: any;
|
28
|
+
};
|
29
|
+
preHandle: (n1: any, n2: any) => number | {
|
30
|
+
s1: string;
|
31
|
+
s2: string;
|
32
|
+
n1: number;
|
33
|
+
n2: number;
|
34
|
+
d1: number;
|
35
|
+
d2: number;
|
36
|
+
};
|
37
|
+
};
|
38
|
+
export default math;
|
package/dist/lib/math.js
ADDED
@@ -0,0 +1,146 @@
|
|
1
|
+
// @ts-nocheck
|
2
|
+
var math = {
|
3
|
+
arrayRandom: function arrayRandom(list) {
|
4
|
+
list.sort(function (a, b) {
|
5
|
+
return Math.random() > 0.5 ? -1 : 1;
|
6
|
+
});
|
7
|
+
return list;
|
8
|
+
},
|
9
|
+
//随机整数
|
10
|
+
//生成从num1到num2(不包括num2)之间的随机数,若只传递一个参数,则生成0到该数之间的随机数
|
11
|
+
randInt: function randInt(num1, num2) {
|
12
|
+
//# 随机整数
|
13
|
+
if (num2 === undefined) {
|
14
|
+
num2 = num1;
|
15
|
+
num1 = 0;
|
16
|
+
}
|
17
|
+
return Math.floor(Math.random() * (num2 - num1) + num1);
|
18
|
+
},
|
19
|
+
// 生成随机字符串
|
20
|
+
//@len 长度
|
21
|
+
randWord: function randWord(wordLen) {
|
22
|
+
var baseWord = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
23
|
+
//# 随机字符串
|
24
|
+
var words = baseWord || 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',
|
25
|
+
length = words.length,
|
26
|
+
len = parseInt("".concat(wordLen)) || 0 //输出单词长度
|
27
|
+
,
|
28
|
+
out = [] //记录字符
|
29
|
+
,
|
30
|
+
pos = 0 // 记录位置
|
31
|
+
;
|
32
|
+
|
33
|
+
while (len--) {
|
34
|
+
pos = this.randInt(0, length);
|
35
|
+
out.push(words[pos]);
|
36
|
+
}
|
37
|
+
return out.join('');
|
38
|
+
},
|
39
|
+
/**加法运算
|
40
|
+
* @说明:解决两个浮点数相加时会出现误差的问题
|
41
|
+
* @参数1: number n1
|
42
|
+
* @参数2: number n2
|
43
|
+
* @示例:add(n1,n2)
|
44
|
+
* @返回:string n1+n2
|
45
|
+
*/
|
46
|
+
add: function add(n1, n2) {
|
47
|
+
//# 加法运算
|
48
|
+
var oT = this.preAddSubtract(n1, n2),
|
49
|
+
out = !(oT === oT) ? oT : ((oT.n1 + oT.n2) / Math.pow(10, Math.max(oT.d1, oT.d2))).toFixed(Math.max(oT.d1, oT.d2));
|
50
|
+
return parseFloat(out);
|
51
|
+
}
|
52
|
+
/**减法运算
|
53
|
+
* @说明:解决两个浮点数相减时会出现误差的问题
|
54
|
+
* @参数1: number n1
|
55
|
+
* @参数2: number n2
|
56
|
+
* @示例:subtract(n1,n2)
|
57
|
+
* @返回:string n1-n2
|
58
|
+
*/,
|
59
|
+
subtract: function subtract(n1, n2) {
|
60
|
+
//# 减法运算
|
61
|
+
var oT = this.preAddSubtract(n1, n2),
|
62
|
+
out = !(oT === oT) ? oT : ((oT.n1 - oT.n2) / Math.pow(10, Math.max(oT.d1, oT.d2))).toFixed(Math.max(oT.d1, oT.d2));
|
63
|
+
return parseFloat(out);
|
64
|
+
}
|
65
|
+
/**乘法运算
|
66
|
+
* @说明:解决两个浮点数相乘时会出现误差的问题
|
67
|
+
* @参数1: number n1
|
68
|
+
* @参数2: number n2
|
69
|
+
* @示例:multiply(n1,n2)
|
70
|
+
* @返回:string n1*n2
|
71
|
+
*/,
|
72
|
+
multiply: function multiply(n1, n2) {
|
73
|
+
//# 乘法运算
|
74
|
+
var oT = this.preHandle(n1, n2),
|
75
|
+
out = !(oT === oT) ? oT : (oT.n1 * oT.n2 / Math.pow(10, oT.d1 + oT.d2)).toFixed(oT.d1 + oT.d2);
|
76
|
+
return parseFloat(out);
|
77
|
+
}
|
78
|
+
/**除法运算
|
79
|
+
* @说明:解决两个浮点数相除时会出现误差的问题
|
80
|
+
* @参数1: number n1
|
81
|
+
* @参数2: number n2
|
82
|
+
* @示例:divide(n1,n2)
|
83
|
+
* @返回:number n1/n2
|
84
|
+
*/,
|
85
|
+
divide: function divide(n1, n2) {
|
86
|
+
//# 除法运算
|
87
|
+
var oT = this.preHandle(n1, n2),
|
88
|
+
out = !(oT === oT) ? oT : oT.n1 / oT.n2 / Math.pow(10, oT.d1 - oT.d2);
|
89
|
+
return parseFloat(out);
|
90
|
+
} /**预处理加减运算 , 外界不调用
|
91
|
+
* @参数1: number n1
|
92
|
+
* @参数2: number n2
|
93
|
+
* @示例:preAddSubtract (n1,n2)
|
94
|
+
* @返回:object
|
95
|
+
*/,
|
96
|
+
preAddSubtract: function preAddSubtract(n1, n2) {
|
97
|
+
//#noadd
|
98
|
+
var oT = this.preHandle(n1, n2);
|
99
|
+
return !(oT === oT) ? oT : function () {
|
100
|
+
//右补齐0
|
101
|
+
if (oT.d1 - oT.d2 > 0) {
|
102
|
+
oT.s2 = oT.s2 + new Array(oT.d1 - oT.d2 + 1).join('0');
|
103
|
+
} else {
|
104
|
+
oT.s1 = oT.s1 + new Array(oT.d2 - oT.d1 + 1).join('0');
|
105
|
+
}
|
106
|
+
return {
|
107
|
+
s1: oT.s1,
|
108
|
+
s2: oT.s2,
|
109
|
+
n1: parseInt(oT.s1, 10),
|
110
|
+
n2: parseInt(oT.s2, 10),
|
111
|
+
d1: oT.d1,
|
112
|
+
d2: oT.d2
|
113
|
+
};
|
114
|
+
}();
|
115
|
+
}
|
116
|
+
//////
|
117
|
+
/**预处理四则运算参数 , 外界不调用
|
118
|
+
* @参数1: number n1
|
119
|
+
* @参数2: number n2
|
120
|
+
* @示例:preHandle(n1,n2)
|
121
|
+
* @返回:object
|
122
|
+
*/,
|
123
|
+
preHandle: function preHandle(n1, n2) {
|
124
|
+
//#noadd
|
125
|
+
if (!((typeof n1 === 'number' || typeof n1 === 'string' && /^[\d]+(\.[\d]+)?$/g.test(n1)) && (typeof n2 === 'number' || typeof n2 === 'string' && /^[\d]+(\.[\d]+)?$/g.test(n2)))) {
|
126
|
+
return NaN;
|
127
|
+
}
|
128
|
+
var s1 = n1.toString(),
|
129
|
+
s2 = n2.toString(),
|
130
|
+
a1 = s1.split("."),
|
131
|
+
a2 = s2.split(".");
|
132
|
+
s1 = s1.replace(".", "");
|
133
|
+
s2 = s2.replace(".", "");
|
134
|
+
return {
|
135
|
+
s1: s1,
|
136
|
+
s2: s2,
|
137
|
+
n1: parseInt(s1, 10),
|
138
|
+
n2: parseInt(s2, 10),
|
139
|
+
d1: a1.length > 1 ? a1[1].length : 0,
|
140
|
+
//小数部分长度
|
141
|
+
d2: a2.length > 1 ? a2[1].length : 0 //小数部分长度
|
142
|
+
};
|
143
|
+
}
|
144
|
+
};
|
145
|
+
|
146
|
+
export default math;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
3
|
+
var sleep = /*#__PURE__*/function () {
|
4
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(millisecond) {
|
5
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
6
|
+
while (1) switch (_context.prev = _context.next) {
|
7
|
+
case 0:
|
8
|
+
return _context.abrupt("return", new Promise(function (resolve) {
|
9
|
+
setTimeout(function () {
|
10
|
+
resolve(true);
|
11
|
+
}, millisecond);
|
12
|
+
}));
|
13
|
+
case 1:
|
14
|
+
case "end":
|
15
|
+
return _context.stop();
|
16
|
+
}
|
17
|
+
}, _callee);
|
18
|
+
}));
|
19
|
+
return function sleep(_x) {
|
20
|
+
return _ref.apply(this, arguments);
|
21
|
+
};
|
22
|
+
}();
|
23
|
+
export default sleep;
|
@@ -0,0 +1,36 @@
|
|
1
|
+
var store = {
|
2
|
+
StoreKey: '',
|
3
|
+
getStoreKeyByName: function getStoreKeyByName(name) {
|
4
|
+
return this.StoreKey + name;
|
5
|
+
},
|
6
|
+
get: function get(name) {
|
7
|
+
var getData;
|
8
|
+
try {
|
9
|
+
getData = window.localStorage.getItem(this.StoreKey + name);
|
10
|
+
if (getData) {
|
11
|
+
getData = JSON.parse(getData);
|
12
|
+
}
|
13
|
+
} catch (e) {
|
14
|
+
console.error('LocalStorage get Error:', e);
|
15
|
+
}
|
16
|
+
var out;
|
17
|
+
if (!getData) {
|
18
|
+
out = '';
|
19
|
+
} else {
|
20
|
+
out = getData.value;
|
21
|
+
}
|
22
|
+
return out;
|
23
|
+
},
|
24
|
+
set: function set(name, value) {
|
25
|
+
value = typeof value === 'undefined' ? '' : value;
|
26
|
+
var saveData = {
|
27
|
+
value: value
|
28
|
+
};
|
29
|
+
try {
|
30
|
+
window.localStorage.setItem(this.StoreKey + name, JSON.stringify(saveData));
|
31
|
+
} catch (e) {
|
32
|
+
console.error('LocalStorage set Error:', e);
|
33
|
+
}
|
34
|
+
}
|
35
|
+
};
|
36
|
+
export default store;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { message } from 'antd';
|
2
|
+
var toast = function toast() {
|
3
|
+
var content = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
4
|
+
var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;
|
5
|
+
var onClose = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {};
|
6
|
+
return content && message.info(content, duration, onClose);
|
7
|
+
};
|
8
|
+
export default toast;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { message } from 'antd';
|
2
|
+
var toastError = function toastError() {
|
3
|
+
var content = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
4
|
+
var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;
|
5
|
+
var onClose = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {};
|
6
|
+
return content && message.error(content, duration, onClose);
|
7
|
+
};
|
8
|
+
export default toastError;
|
@@ -1,2 +1,15 @@
|
|
1
1
|
export declare function detailById(body: VideoPublishVideoAccount.DetailQuery, options?: Global.RequestOptions): Promise<VideoPublishVideoAccount.Detail>;
|
2
2
|
export declare function editInfo(body: VideoPublishVideoAccount.EditInfoQuery, options?: Global.RequestOptions): Promise<boolean>;
|
3
|
+
export declare function create(body: VideoPublishVideoAccount.CreateQuery, options?: Global.RequestOptions): Promise<boolean>;
|
4
|
+
export declare function expire(body: VideoPublishVideoAccount.ExpireQuery, options?: Global.RequestOptions): Promise<boolean>;
|
5
|
+
export declare function list(body?: {
|
6
|
+
current: number;
|
7
|
+
pageSize: number;
|
8
|
+
}, options?: Global.RequestOptions): Promise<VideoPublishVideoAccount.ListResult>;
|
9
|
+
export declare function del(body: {
|
10
|
+
id: number;
|
11
|
+
}, options?: Global.RequestOptions): Promise<{
|
12
|
+
id: number;
|
13
|
+
}>;
|
14
|
+
export declare function detail(body: VideoPublishVideoAccount.DetailQuery, options?: Global.RequestOptions): Promise<VideoPublishVideoAccount.Detail>;
|
15
|
+
export declare function SaveLoginStatus(body: VideoPublishVideoAccount.SaveLoginStatus, options?: Global.RequestOptions): Promise<boolean>;
|