@cmstops/pro-compo 0.1.0 → 0.1.2
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/index.css +90 -0
- package/dist/index.min.css +1 -1
- package/es/appCenter/component.d.ts +0 -0
- package/es/appCenter/component.js +186 -0
- package/es/appCenter/index.d.ts +2 -0
- package/es/appCenter/index.js +7 -0
- package/es/appCenter/script/api.d.ts +10 -0
- package/es/appCenter/script/api.js +27 -0
- package/es/appCenter/script/apps.d.ts +23 -0
- package/es/appCenter/script/apps.js +122 -0
- package/es/appCenter/script/permissionMap.d.ts +6 -0
- package/es/appCenter/script/permissionMap.js +19 -0
- package/es/appCenter/script/routeMap.d.ts +4 -0
- package/es/appCenter/script/routeMap.js +109 -0
- package/es/appCenter/style/css.js +1 -0
- package/es/appCenter/style/index.css +90 -0
- package/es/appCenter/style/index.d.ts +1 -0
- package/es/appCenter/style/index.js +1 -0
- package/es/appCenter/style/index.less +100 -0
- package/es/button/style/css.js +1 -1
- package/es/button/style/index.js +1 -1
- package/es/index.css +90 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/index.less +1 -0
- package/es/utils/auth.d.ts +5 -0
- package/es/utils/auth.js +9 -0
- package/es/utils/request.d.ts +9 -0
- package/es/utils/request.js +36 -0
- package/lib/appCenter/component.js +187 -0
- package/lib/appCenter/index.js +8 -0
- package/lib/appCenter/script/api.js +32 -0
- package/lib/appCenter/script/apps.js +123 -0
- package/lib/appCenter/script/permissionMap.js +20 -0
- package/lib/appCenter/script/routeMap.js +110 -0
- package/lib/appCenter/style/css.js +2 -0
- package/lib/appCenter/style/index.css +90 -0
- package/lib/appCenter/style/index.js +2 -0
- package/lib/appCenter/style/index.less +100 -0
- package/lib/button/style/css.js +1 -1
- package/lib/button/style/index.js +1 -1
- package/lib/index.css +90 -0
- package/lib/index.js +2 -0
- package/lib/index.less +1 -0
- package/lib/utils/auth.js +12 -0
- package/lib/utils/request.js +41 -0
- package/package.json +1 -1
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var appList = [
|
|
3
|
+
{
|
|
4
|
+
alias: "\u8FD0\u8425\u7BA1\u7406",
|
|
5
|
+
actions: [
|
|
6
|
+
{
|
|
7
|
+
id: 13,
|
|
8
|
+
key: "push",
|
|
9
|
+
alias: "\u63A8\u9001\u7BA1\u7406",
|
|
10
|
+
brief: "\u63A8\u9001\u7BA1\u7406",
|
|
11
|
+
type: 3,
|
|
12
|
+
icon: "tuisongguanli",
|
|
13
|
+
target_url: ""
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: 14,
|
|
17
|
+
key: "pop",
|
|
18
|
+
alias: "\u63A8\u5E7F\u7BA1\u7406",
|
|
19
|
+
brief: "\u63A8\u5E7F\u7BA1\u7406",
|
|
20
|
+
real: "appcenter/app-promote:entry",
|
|
21
|
+
type: 3,
|
|
22
|
+
icon: "tuiguang",
|
|
23
|
+
target_url: ""
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
alias: "\u4FE1\u606F\u7BA1\u7406",
|
|
29
|
+
actions: [
|
|
30
|
+
{
|
|
31
|
+
id: 18,
|
|
32
|
+
key: "systemNotice",
|
|
33
|
+
alias: "\u7CFB\u7EDF\u516C\u544A",
|
|
34
|
+
brief: "\u7CFB\u7EDF\u516C\u544A",
|
|
35
|
+
real: "appcenter/app-notify:entry",
|
|
36
|
+
type: 3,
|
|
37
|
+
icon: "xitonggonggao",
|
|
38
|
+
target_url: ""
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: 19,
|
|
42
|
+
key: "hotsearch",
|
|
43
|
+
alias: "\u70ED\u8BCD\u641C\u7D22",
|
|
44
|
+
brief: "\u70ED\u8BCD\u641C\u7D22",
|
|
45
|
+
real: "appcenter/app-hotword:entry",
|
|
46
|
+
type: 3,
|
|
47
|
+
icon: "recisousuo",
|
|
48
|
+
target_url: ""
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: 20,
|
|
52
|
+
key: "usertags",
|
|
53
|
+
alias: "\u7528\u6237\u6807\u7B7E",
|
|
54
|
+
brief: "\u7528\u6237\u6807\u7B7E",
|
|
55
|
+
real: "appcenter/app-userlabel:entry",
|
|
56
|
+
type: 3,
|
|
57
|
+
icon: "yonghubiaoqian",
|
|
58
|
+
target_url: ""
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
alias: "\u8BC4\u8BBA\u7BA1\u7406",
|
|
64
|
+
actions: [
|
|
65
|
+
{
|
|
66
|
+
id: 23,
|
|
67
|
+
key: "commentList",
|
|
68
|
+
alias: "\u8BC4\u8BBA\u5217\u8868",
|
|
69
|
+
brief: "\u8BC4\u8BBA\u5217\u8868",
|
|
70
|
+
real: "appcenter/app-comment:entry",
|
|
71
|
+
type: 3,
|
|
72
|
+
icon: "app_commentList",
|
|
73
|
+
target_url: ""
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: 24,
|
|
77
|
+
key: "operatingRecord",
|
|
78
|
+
alias: "\u64CD\u4F5C\u8BB0\u5F55",
|
|
79
|
+
brief: "\u64CD\u4F5C\u8BB0\u5F55",
|
|
80
|
+
real: "appcenter/app-comment:entry",
|
|
81
|
+
type: 3,
|
|
82
|
+
icon: "app_operatingRecord",
|
|
83
|
+
target_url: ""
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
alias: "\u4E3E\u62A5\u7BA1\u7406",
|
|
89
|
+
actions: [
|
|
90
|
+
{
|
|
91
|
+
id: 25,
|
|
92
|
+
key: "warningList",
|
|
93
|
+
alias: "\u4E3E\u62A5\u5217\u8868",
|
|
94
|
+
brief: "\u4E3E\u62A5\u5217\u8868",
|
|
95
|
+
real: "appcenter/app-report:entry",
|
|
96
|
+
type: 3,
|
|
97
|
+
icon: "app_warningList",
|
|
98
|
+
target_url: ""
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: 26,
|
|
102
|
+
key: "reportRecord",
|
|
103
|
+
alias: "\u4E3E\u62A5\u64CD\u4F5C\u8BB0\u5F55",
|
|
104
|
+
brief: "\u4E3E\u62A5\u64CD\u4F5C\u8BB0\u5F55",
|
|
105
|
+
real: "appcenter/app-report:entry",
|
|
106
|
+
type: 3,
|
|
107
|
+
icon: "app_reportRecord",
|
|
108
|
+
target_url: ""
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: 27,
|
|
112
|
+
key: "feedbackList",
|
|
113
|
+
alias: "\u53CD\u9988\u7BA1\u7406",
|
|
114
|
+
brief: "\u53CD\u9988\u7BA1\u7406",
|
|
115
|
+
real: "appcenter/app-feedback:entry",
|
|
116
|
+
type: 3,
|
|
117
|
+
icon: "app_feedbackList",
|
|
118
|
+
target_url: ""
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
];
|
|
123
|
+
module.exports = appList;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function permissionMap(permissions, item, hideList = []) {
|
|
3
|
+
if (hideList.includes(item.key)) {
|
|
4
|
+
return false;
|
|
5
|
+
}
|
|
6
|
+
if (item.real === "publice") {
|
|
7
|
+
return true;
|
|
8
|
+
}
|
|
9
|
+
if (typeof item.real === "string") {
|
|
10
|
+
return permissions.includes(item.real);
|
|
11
|
+
}
|
|
12
|
+
if (item.real instanceof Array) {
|
|
13
|
+
const join = permissions.filter(function(v) {
|
|
14
|
+
return item.real.indexOf(v) > -1;
|
|
15
|
+
});
|
|
16
|
+
return join.length > 0;
|
|
17
|
+
}
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
module.exports = permissionMap;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var auth = require("../../utils/auth.js");
|
|
3
|
+
async function routeMap(BASE_API, rid = auth.getRID(), listType, app = null) {
|
|
4
|
+
const origin = BASE_API;
|
|
5
|
+
if (listType === "activityList") {
|
|
6
|
+
window.open(`/poplar/v2/activity?rid=${rid}`, "_blank");
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
if (listType === "statistics") {
|
|
10
|
+
window.open(`/#/operation/statistics?repoID=${rid}`, "_blank");
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (listType === "point") {
|
|
14
|
+
window.open(`/#/operation/point?repoID=${rid}`, "_blank");
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
if (listType === "systemNotice") {
|
|
18
|
+
window.open(`${origin}/foowz/#/systemNotice/${rid}`, "_blank");
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (listType === "push") {
|
|
22
|
+
window.open(`${origin}/foowz/#/pushManagement/${rid}`, "_blank");
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
if (listType === "pop") {
|
|
26
|
+
window.open(`${origin}/foowz/#/popManagement/${rid}`, "_blank");
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (listType === "hotsearch") {
|
|
30
|
+
window.open(`${origin}/foowz/#/hotsearch/${rid}`, "_blank");
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (listType === "usertags") {
|
|
34
|
+
window.open(`${origin}/foowz/#/newUserSetting/${rid}`, "_blank");
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (listType === "commentList") {
|
|
38
|
+
window.open(`${origin}/foowz/#/commentList/${rid}`, "_blank");
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
if (listType === "operatingRecord") {
|
|
42
|
+
window.open(`${origin}/foowz/#/operatingRecord/${rid}`, "_blank");
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (listType === "warningList") {
|
|
46
|
+
window.open(`${origin}/foowz/#/warningList/${rid}`, "_blank");
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (listType === "reportRecord") {
|
|
50
|
+
window.open(`${origin}/foowz/#/reportRecord/${rid}`, "_blank");
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (listType === "feedbackList") {
|
|
54
|
+
window.open(`${origin}/foowz/#/feedbackList/${rid}`, "_blank");
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (listType === "feedbackRecord") {
|
|
58
|
+
window.open(`${origin}/foowz/#/feedbackRecord/${rid}`, "_blank");
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (app && app.type === 2) {
|
|
62
|
+
if (listType === "liveList") {
|
|
63
|
+
window.open(
|
|
64
|
+
`/poplar/v2/microservice/redirect?rid=${rid}&module=live`,
|
|
65
|
+
"_blank"
|
|
66
|
+
);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (listType === "formList") {
|
|
70
|
+
window.open(
|
|
71
|
+
`/poplar/v2/microservice/redirect?rid=${rid}&module=form`,
|
|
72
|
+
"_blank"
|
|
73
|
+
);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
if (listType === "lotteryList") {
|
|
77
|
+
window.open(
|
|
78
|
+
`/poplar/v2/microservice/redirect?rid=${rid}&module=lottery`,
|
|
79
|
+
"_blank"
|
|
80
|
+
);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (listType === "wzList") {
|
|
84
|
+
window.open(
|
|
85
|
+
`/poplar/v2/microservice/redirect?rid=${rid}&module=wz`,
|
|
86
|
+
"_blank"
|
|
87
|
+
);
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
if (app.setting) {
|
|
91
|
+
window.open(
|
|
92
|
+
`/#/microservice/redirect?rid=${rid}&module=${listType}`,
|
|
93
|
+
"_blank"
|
|
94
|
+
);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
window.open(
|
|
98
|
+
`/poplar/v2/microservice/redirect?rid=${rid}&module=${listType}`,
|
|
99
|
+
"_blank"
|
|
100
|
+
);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (listType === "pop") {
|
|
104
|
+
window.open(`${origin}/#/popManagement/${rid}`, "_blank");
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
console.log(`/media/enterprisepublish/${rid}`);
|
|
108
|
+
window.open(`${origin}/#/media/enterprisepublish/${rid}`, "_blank");
|
|
109
|
+
}
|
|
110
|
+
module.exports = routeMap;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
.reference-btn {
|
|
2
|
+
border: none;
|
|
3
|
+
padding: 12px 16px;
|
|
4
|
+
border-radius: 4px;
|
|
5
|
+
color: #5f5f5f;
|
|
6
|
+
}
|
|
7
|
+
.app-list-wrap {
|
|
8
|
+
position: relative;
|
|
9
|
+
padding: 10px;
|
|
10
|
+
}
|
|
11
|
+
.app-title {
|
|
12
|
+
font-size: 16px;
|
|
13
|
+
font-weight: bold;
|
|
14
|
+
padding: 0px 15px;
|
|
15
|
+
}
|
|
16
|
+
.ul-list {
|
|
17
|
+
list-style: none;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
width: 435px !important;
|
|
20
|
+
text-align: center;
|
|
21
|
+
padding: 0;
|
|
22
|
+
margin: 0;
|
|
23
|
+
}
|
|
24
|
+
.ul-list .li_item {
|
|
25
|
+
float: left;
|
|
26
|
+
width: 85px;
|
|
27
|
+
height: 90px;
|
|
28
|
+
text-align: center;
|
|
29
|
+
margin: 13px 0;
|
|
30
|
+
position: relative;
|
|
31
|
+
}
|
|
32
|
+
.ul-list .li_item .icon-logo .svg-icon {
|
|
33
|
+
width: 4em;
|
|
34
|
+
height: 3.5em;
|
|
35
|
+
}
|
|
36
|
+
.ul-list .li_item:hover {
|
|
37
|
+
background: rgba(0, 0, 0, 0.05);
|
|
38
|
+
border-radius: 4px;
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
}
|
|
41
|
+
.ul-list .li_item:hover .icon-gengduo {
|
|
42
|
+
display: block;
|
|
43
|
+
}
|
|
44
|
+
.ul-list .li_item .wrap_icon {
|
|
45
|
+
width: 70px;
|
|
46
|
+
display: inline-block;
|
|
47
|
+
margin-top: 6px;
|
|
48
|
+
}
|
|
49
|
+
.ul-list .li_item .wrap_icon .wrap_ .icon-logo {
|
|
50
|
+
width: 70px;
|
|
51
|
+
height: 50px;
|
|
52
|
+
margin-bottom: 4px;
|
|
53
|
+
}
|
|
54
|
+
.ul-list .li_item .wrap_icon .wrap_ .icon-logo img {
|
|
55
|
+
max-width: 100%;
|
|
56
|
+
max-height: 100%;
|
|
57
|
+
}
|
|
58
|
+
.ul-list .li_item .wrap_icon .wrap_ .shortcut-logo {
|
|
59
|
+
line-height: 77px;
|
|
60
|
+
}
|
|
61
|
+
.ul-list .li_item .wrap_icon .wrap_ .shortcut-logo img {
|
|
62
|
+
width: 35px;
|
|
63
|
+
height: 35px;
|
|
64
|
+
}
|
|
65
|
+
.ul-list .li_item .wrap_icon .wrap_ .icon_title {
|
|
66
|
+
width: 73px;
|
|
67
|
+
height: 20px;
|
|
68
|
+
overflow: hidden;
|
|
69
|
+
text-overflow: ellipsis;
|
|
70
|
+
white-space: nowrap;
|
|
71
|
+
}
|
|
72
|
+
.ul-list .li_item .wrap_icon .quick-add .icon-logo {
|
|
73
|
+
width: 40px;
|
|
74
|
+
height: 40px;
|
|
75
|
+
margin: 5px auto 9px;
|
|
76
|
+
text-align: center;
|
|
77
|
+
background-color: rgba(0, 0, 0, 0.12);
|
|
78
|
+
border-radius: 50%;
|
|
79
|
+
}
|
|
80
|
+
.ul-list .li_item .wrap_icon .quick-add .icon-logo i {
|
|
81
|
+
line-height: 40px;
|
|
82
|
+
color: rgba(0, 0, 0, 0.85);
|
|
83
|
+
font-size: 14px;
|
|
84
|
+
}
|
|
85
|
+
.ul-list .li_item .icon-gengduo {
|
|
86
|
+
display: none;
|
|
87
|
+
position: absolute;
|
|
88
|
+
top: 2px;
|
|
89
|
+
right: 4px;
|
|
90
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
.reference-btn {
|
|
2
|
+
border: none;
|
|
3
|
+
padding: 12px 16px;
|
|
4
|
+
border-radius: 4px;
|
|
5
|
+
color: #5f5f5f;
|
|
6
|
+
}
|
|
7
|
+
.app-list-wrap {
|
|
8
|
+
position: relative;
|
|
9
|
+
padding: 10px;
|
|
10
|
+
}
|
|
11
|
+
.app-title {
|
|
12
|
+
font-size: 16px;
|
|
13
|
+
font-weight: bold;
|
|
14
|
+
padding: 0px 15px;
|
|
15
|
+
}
|
|
16
|
+
.ul-list {
|
|
17
|
+
list-style: none;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
width: 435px !important;
|
|
20
|
+
text-align: center;
|
|
21
|
+
padding: 0;
|
|
22
|
+
margin: 0;
|
|
23
|
+
.li_item {
|
|
24
|
+
float: left;
|
|
25
|
+
width: 85px;
|
|
26
|
+
height: 90px;
|
|
27
|
+
text-align: center;
|
|
28
|
+
// margin-left: 16px;
|
|
29
|
+
margin: 13px 0;
|
|
30
|
+
position: relative;
|
|
31
|
+
.icon-logo {
|
|
32
|
+
.svg-icon {
|
|
33
|
+
width: 4em;
|
|
34
|
+
height: 3.5em;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
&:hover {
|
|
38
|
+
// transition: ease-out 0.2s;
|
|
39
|
+
// transform: scale(1.1);
|
|
40
|
+
background: rgba(0, 0, 0, 0.05);
|
|
41
|
+
border-radius: 4px;
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
.icon-gengduo {
|
|
44
|
+
display: block;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
.wrap_icon {
|
|
48
|
+
width: 70px;
|
|
49
|
+
display: inline-block;
|
|
50
|
+
margin-top: 6px;
|
|
51
|
+
.wrap_ {
|
|
52
|
+
.icon-logo {
|
|
53
|
+
width: 70px;
|
|
54
|
+
height: 50px;
|
|
55
|
+
margin-bottom: 4px;
|
|
56
|
+
img {
|
|
57
|
+
max-width: 100%;
|
|
58
|
+
max-height: 100%;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
.shortcut-logo {
|
|
62
|
+
line-height: 77px;
|
|
63
|
+
img {
|
|
64
|
+
width: 35px;
|
|
65
|
+
height: 35px;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
.icon_title {
|
|
69
|
+
width: 73px;
|
|
70
|
+
height: 20px;
|
|
71
|
+
overflow: hidden;
|
|
72
|
+
text-overflow: ellipsis;
|
|
73
|
+
white-space: nowrap;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
.quick-add {
|
|
77
|
+
.icon-logo {
|
|
78
|
+
width: 40px;
|
|
79
|
+
height: 40px;
|
|
80
|
+
margin: 5px auto 9px;
|
|
81
|
+
text-align: center;
|
|
82
|
+
background-color: rgba(0, 0, 0, 0.12);
|
|
83
|
+
border-radius: 50%;
|
|
84
|
+
i {
|
|
85
|
+
line-height: 40px;
|
|
86
|
+
color: rgba(0, 0, 0, 0.85);
|
|
87
|
+
font-size: 14px;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
.icon-gengduo {
|
|
93
|
+
display: none;
|
|
94
|
+
position: absolute;
|
|
95
|
+
top: 2px;
|
|
96
|
+
right: 4px;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
package/lib/button/style/css.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
require("
|
|
2
|
+
require("./index.css");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
require("
|
|
2
|
+
require("./index.less");
|
package/lib/index.css
CHANGED
|
@@ -2,3 +2,93 @@
|
|
|
2
2
|
height: auto;
|
|
3
3
|
padding: 20px;
|
|
4
4
|
}
|
|
5
|
+
.reference-btn {
|
|
6
|
+
border: none;
|
|
7
|
+
padding: 12px 16px;
|
|
8
|
+
border-radius: 4px;
|
|
9
|
+
color: #5f5f5f;
|
|
10
|
+
}
|
|
11
|
+
.app-list-wrap {
|
|
12
|
+
position: relative;
|
|
13
|
+
padding: 10px;
|
|
14
|
+
}
|
|
15
|
+
.app-title {
|
|
16
|
+
font-size: 16px;
|
|
17
|
+
font-weight: bold;
|
|
18
|
+
padding: 0px 15px;
|
|
19
|
+
}
|
|
20
|
+
.ul-list {
|
|
21
|
+
list-style: none;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
width: 435px !important;
|
|
24
|
+
text-align: center;
|
|
25
|
+
padding: 0;
|
|
26
|
+
margin: 0;
|
|
27
|
+
}
|
|
28
|
+
.ul-list .li_item {
|
|
29
|
+
float: left;
|
|
30
|
+
width: 85px;
|
|
31
|
+
height: 90px;
|
|
32
|
+
text-align: center;
|
|
33
|
+
margin: 13px 0;
|
|
34
|
+
position: relative;
|
|
35
|
+
}
|
|
36
|
+
.ul-list .li_item .icon-logo .svg-icon {
|
|
37
|
+
width: 4em;
|
|
38
|
+
height: 3.5em;
|
|
39
|
+
}
|
|
40
|
+
.ul-list .li_item:hover {
|
|
41
|
+
background: rgba(0, 0, 0, 0.05);
|
|
42
|
+
border-radius: 4px;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
}
|
|
45
|
+
.ul-list .li_item:hover .icon-gengduo {
|
|
46
|
+
display: block;
|
|
47
|
+
}
|
|
48
|
+
.ul-list .li_item .wrap_icon {
|
|
49
|
+
width: 70px;
|
|
50
|
+
display: inline-block;
|
|
51
|
+
margin-top: 6px;
|
|
52
|
+
}
|
|
53
|
+
.ul-list .li_item .wrap_icon .wrap_ .icon-logo {
|
|
54
|
+
width: 70px;
|
|
55
|
+
height: 50px;
|
|
56
|
+
margin-bottom: 4px;
|
|
57
|
+
}
|
|
58
|
+
.ul-list .li_item .wrap_icon .wrap_ .icon-logo img {
|
|
59
|
+
max-width: 100%;
|
|
60
|
+
max-height: 100%;
|
|
61
|
+
}
|
|
62
|
+
.ul-list .li_item .wrap_icon .wrap_ .shortcut-logo {
|
|
63
|
+
line-height: 77px;
|
|
64
|
+
}
|
|
65
|
+
.ul-list .li_item .wrap_icon .wrap_ .shortcut-logo img {
|
|
66
|
+
width: 35px;
|
|
67
|
+
height: 35px;
|
|
68
|
+
}
|
|
69
|
+
.ul-list .li_item .wrap_icon .wrap_ .icon_title {
|
|
70
|
+
width: 73px;
|
|
71
|
+
height: 20px;
|
|
72
|
+
overflow: hidden;
|
|
73
|
+
text-overflow: ellipsis;
|
|
74
|
+
white-space: nowrap;
|
|
75
|
+
}
|
|
76
|
+
.ul-list .li_item .wrap_icon .quick-add .icon-logo {
|
|
77
|
+
width: 40px;
|
|
78
|
+
height: 40px;
|
|
79
|
+
margin: 5px auto 9px;
|
|
80
|
+
text-align: center;
|
|
81
|
+
background-color: rgba(0, 0, 0, 0.12);
|
|
82
|
+
border-radius: 50%;
|
|
83
|
+
}
|
|
84
|
+
.ul-list .li_item .wrap_icon .quick-add .icon-logo i {
|
|
85
|
+
line-height: 40px;
|
|
86
|
+
color: rgba(0, 0, 0, 0.85);
|
|
87
|
+
font-size: 14px;
|
|
88
|
+
}
|
|
89
|
+
.ul-list .li_item .icon-gengduo {
|
|
90
|
+
display: none;
|
|
91
|
+
position: absolute;
|
|
92
|
+
top: 2px;
|
|
93
|
+
right: 4px;
|
|
94
|
+
}
|
package/lib/index.js
CHANGED
|
@@ -2,5 +2,7 @@
|
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
var components = require("./components.js");
|
|
4
4
|
var index = require("./button/index.js");
|
|
5
|
+
var index$1 = require("./appCenter/index.js");
|
|
5
6
|
exports["default"] = components;
|
|
6
7
|
exports.button = index;
|
|
8
|
+
exports.appCenter = index$1;
|
package/lib/index.less
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const TokenKey = "cmstop_admin_template_token";
|
|
4
|
+
const RIDKey = "cmstop_admin_template_rid";
|
|
5
|
+
function getToken() {
|
|
6
|
+
return window.sessionStorage.getItem(TokenKey);
|
|
7
|
+
}
|
|
8
|
+
function getRID() {
|
|
9
|
+
return window.sessionStorage.getItem(RIDKey);
|
|
10
|
+
}
|
|
11
|
+
exports.getRID = getRID;
|
|
12
|
+
exports.getToken = getToken;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var axios = require("axios");
|
|
3
|
+
var auth = require("./auth.js");
|
|
4
|
+
function _interopDefaultLegacy(e) {
|
|
5
|
+
return e && typeof e === "object" && "default" in e ? e : { "default": e };
|
|
6
|
+
}
|
|
7
|
+
var axios__default = /* @__PURE__ */ _interopDefaultLegacy(axios);
|
|
8
|
+
function request(BASE_API, options) {
|
|
9
|
+
const service = axios__default["default"].create({
|
|
10
|
+
baseURL: BASE_API,
|
|
11
|
+
timeout: 5e3,
|
|
12
|
+
withCredentials: true
|
|
13
|
+
});
|
|
14
|
+
service.interceptors.request.use(
|
|
15
|
+
(config) => {
|
|
16
|
+
if (auth.getToken()) {
|
|
17
|
+
config.headers.Authorization = `Bearer ${auth.getToken()}`;
|
|
18
|
+
}
|
|
19
|
+
return config;
|
|
20
|
+
},
|
|
21
|
+
(error) => {
|
|
22
|
+
console.log(error);
|
|
23
|
+
return Promise.reject(error);
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
service.interceptors.response.use(
|
|
27
|
+
(response) => {
|
|
28
|
+
const res = response.data;
|
|
29
|
+
if (res.code !== 0) {
|
|
30
|
+
return Promise.reject(new Error(res.message || "Error"));
|
|
31
|
+
}
|
|
32
|
+
return res;
|
|
33
|
+
},
|
|
34
|
+
(error) => {
|
|
35
|
+
console.log("err" + error);
|
|
36
|
+
return Promise.reject(error);
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
return service(options);
|
|
40
|
+
}
|
|
41
|
+
module.exports = request;
|