@jx3box/jx3box-ui 2.0.2 → 2.0.3

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.
Files changed (119) hide show
  1. package/README.md +50 -2
  2. package/assets/css/bread/admin.less +32 -0
  3. package/assets/css/bread/breadcrumb.less +38 -0
  4. package/assets/css/bread/crumb.less +6 -0
  5. package/assets/css/comment/quick-reply.less +12 -1
  6. package/assets/css/common/bottom.less +4 -0
  7. package/assets/css/common/footer.less +23 -0
  8. package/assets/css/common/left-sidebar.less +28 -0
  9. package/assets/css/common/main.less +21 -0
  10. package/assets/css/common/right-sidebar.less +31 -0
  11. package/assets/css/common/suspend-common.less +51 -0
  12. package/assets/css/editor/combo.less +51 -0
  13. package/assets/css/editor/resource.less +64 -0
  14. package/assets/css/editor/tinymce.less +20 -0
  15. package/assets/css/editor/upload.less +25 -0
  16. package/assets/css/filters/client-by.less +6 -0
  17. package/assets/css/header/box.less +34 -0
  18. package/assets/css/interact/like2.less +4 -0
  19. package/assets/css/interact/share2.less +17 -0
  20. package/assets/css/mixin.less +3 -0
  21. package/assets/css/module/author.less +41 -0
  22. package/assets/css/module/buff.less +10 -0
  23. package/assets/css/module/directory.less +22 -0
  24. package/assets/css/module/icon.less +4 -0
  25. package/assets/css/module/item.less +50 -0
  26. package/assets/css/module/item_simple.less +7 -0
  27. package/assets/css/module/jx3_element.less +2 -1
  28. package/assets/css/module/macro.less +17 -0
  29. package/assets/css/module/npc.less +46 -1
  30. package/assets/css/module/resource.less +13 -0
  31. package/assets/css/module/skill.less +9 -0
  32. package/assets/css/module/talent.less +71 -0
  33. package/assets/css/single/author.less +24 -10
  34. package/assets/css/single/cms-single.less +16 -0
  35. package/assets/css/single/thx.less +51 -0
  36. package/assets/css/tinymce/_.less +7 -1
  37. package/assets/css/tinymce/a.less +5 -0
  38. package/assets/css/tinymce/code.less +22 -0
  39. package/assets/css/tinymce/combo.less +12 -0
  40. package/assets/css/tinymce/fold.less +12 -0
  41. package/assets/css/tinymce/h.less +10 -0
  42. package/assets/css/tinymce/hr.less +2 -0
  43. package/assets/css/tinymce/img.less +3 -0
  44. package/assets/css/tinymce/imgpreview.less +6 -1
  45. package/assets/css/tinymce/latex.less +7 -1
  46. package/assets/css/tinymce/list.less +12 -0
  47. package/assets/css/tinymce/macro.less +7 -1
  48. package/assets/css/tinymce/nextpage.less +14 -0
  49. package/assets/css/tinymce/p.less +2 -0
  50. package/assets/css/tinymce/pz.less +6 -0
  51. package/assets/css/tinymce/qixue.less +6 -0
  52. package/assets/css/tinymce/quote.less +2 -0
  53. package/assets/css/tinymce/table.less +13 -1
  54. package/assets/css/tinymce/video.less +18 -0
  55. package/assets/img/author/rss.svg +1 -0
  56. package/assets/img/common/logo-v2.svg +14 -0
  57. package/index.js +2 -0
  58. package/package.json +1 -1
  59. package/service/comment.js +56 -96
  60. package/src/App.vue +31 -31
  61. package/src/Breadcrumb.vue +16 -20
  62. package/src/Icon.vue +53 -0
  63. package/src/author/AuthorFans.vue +15 -5
  64. package/src/author/AuthorFollow.vue +1 -1
  65. package/src/author/AuthorGift.vue +9 -9
  66. package/src/author/AuthorHonor.vue +9 -8
  67. package/src/author/AuthorInfo.vue +10 -1
  68. package/src/author/AuthorLink.vue +8 -1
  69. package/src/author/AuthorPosts.vue +14 -8
  70. package/src/author/AuthorRss.vue +28 -34
  71. package/src/bread/Admin.vue +19 -6
  72. package/src/bread/Crumb.vue +7 -2
  73. package/src/bread/DesignTask.vue +44 -37
  74. package/src/comment/Avatar.vue +26 -8
  75. package/src/comment/CommentContent.vue +62 -17
  76. package/src/comment/CommentContentSimple.vue +54 -15
  77. package/src/comment/CommentWithReply.vue +22 -1
  78. package/src/comment/ReplyForReply.vue +14 -1
  79. package/src/comment/ReplyItem.vue +10 -1
  80. package/src/comment/ReplyList.vue +19 -1
  81. package/src/editor/BoxResource.vue +2 -2
  82. package/src/editor/Resource.vue +6 -6
  83. package/src/filters/clientBy.vue +14 -1
  84. package/src/filters/menuBy.vue +14 -1
  85. package/src/filters/orderBy.vue +1 -1
  86. package/src/filters/tagBy.vue +10 -1
  87. package/src/filters/versionBy.vue +6 -1
  88. package/src/filters/zlpBy.vue +6 -1
  89. package/src/header/asset.vue +13 -1
  90. package/src/header/box.vue +6 -1
  91. package/src/header/box2.vue +232 -233
  92. package/src/header/client.vue +6 -1
  93. package/src/header/logo.vue +1 -1
  94. package/src/header/manage.vue +0 -1
  95. package/src/header/nav.vue +1 -1
  96. package/src/header/userInfo.vue +14 -1
  97. package/src/interact/BoxcoinAdmin.vue +46 -5
  98. package/src/interact/BoxcoinRecords.vue +22 -1
  99. package/src/interact/BoxcoinUser.vue +49 -8
  100. package/src/interact/Contributors.vue +7 -11
  101. package/src/interact/Fav.vue +22 -1
  102. package/src/interact/Like.vue +10 -1
  103. package/src/interact/Share.vue +18 -1
  104. package/src/interact/WatchLater.vue +3 -3
  105. package/src/main.js +3 -1
  106. package/src/single/Author.vue +15 -10
  107. package/src/single/Collection.vue +10 -1
  108. package/src/single/Comment.vue +20 -3
  109. package/src/single/Creators.vue +10 -1
  110. package/src/single/PostDirectory.vue +1 -1
  111. package/src/single/PostHeader.vue +18 -1
  112. package/src/single/SimpleThx.vue +2 -2
  113. package/src/single/Thx.vue +45 -27
  114. package/src/single/cms-single.vue +10 -1
  115. package/assets/img/author/msg.svg +0 -55
  116. package/src/Bottom.vue +0 -23
  117. package/src/Box.vue +0 -149
  118. package/src/author/AuthorMsg.vue +0 -25
  119. package/src/bread/AdminButton.vue +0 -31
@@ -1,9 +1,12 @@
1
1
  // 编辑器内样式
2
2
  .c-article-tinymce{
3
+ /* assets/css/tinymce/latex.less */
3
4
  .w-latex{
5
+ /* assets/css/tinymce/latex.less */
4
6
  .pr;
5
7
  font-family: Georgia, 'Times New Roman', Times, serif;
6
8
  &:after{
9
+ /* assets/css/tinymce/latex.less */
7
10
  content : 'JX3BOX·Katex';
8
11
  position: absolute;right:0;top:-30px;
9
12
  background-color:@bg-black;
@@ -19,7 +22,9 @@
19
22
  }
20
23
  }
21
24
  .c-article-editor {
25
+ /* assets/css/tinymce/latex.less */
22
26
  .e-latex-area{
27
+ /* assets/css/tinymce/latex.less */
23
28
  min-height:24px;
24
29
  border-radius:4px;
25
30
  padding:10px;
@@ -31,6 +36,7 @@
31
36
  font-family: Georgia, 'Times New Roman', Times, serif;
32
37
  .pr;
33
38
  &:after{
39
+ /* assets/css/tinymce/latex.less */
34
40
  content : 'Latex';
35
41
  position: absolute;right:10px;top:10px;
36
42
  background-color:darken(#c8e1ff,20%);
@@ -40,4 +46,4 @@
40
46
  font-family: consolas;
41
47
  }
42
48
  }
43
- }
49
+ }
@@ -1,21 +1,27 @@
1
1
  /* 列表 */
2
2
  .c-article-tinymce{
3
+ /* assets/css/tinymce/list.less */
3
4
  ul,
4
5
  ol {
6
+ /* assets/css/tinymce/list.less */
5
7
  margin: 20px 0;
6
8
  }
7
9
  ul,
8
10
  ol {
11
+ /* assets/css/tinymce/list.less */
9
12
  padding-left: 40px;
10
13
  }
11
14
 
12
15
  /* 旧版checklist,无创建逻辑,仅作留存显示 */
13
16
  .e-checklist {
17
+ /* assets/css/tinymce/list.less */
14
18
  div {
19
+ /* assets/css/tinymce/list.less */
15
20
  position: relative;
16
21
  padding-left: 1.4em;
17
22
  }
18
23
  div:before {
24
+ /* assets/css/tinymce/list.less */
19
25
  display: block;
20
26
  position: absolute;
21
27
  left: 0;
@@ -30,20 +36,24 @@
30
36
  background-position: 0 0;
31
37
  }
32
38
  div.on:before {
39
+ /* assets/css/tinymce/list.less */
33
40
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");
34
41
  }
35
42
  }
36
43
 
37
44
  // 新版checklist
38
45
  .tox-checklist > li{
46
+ /* assets/css/tinymce/list.less */
39
47
  line-height: 2.2;
40
48
  margin:0 !important;
41
49
  }
42
50
  .tox-checklist > li:not(.tox-checklist--hidden) {
51
+ /* assets/css/tinymce/list.less */
43
52
  list-style: none;
44
53
  margin: 0.25em 0;
45
54
  }
46
55
  .tox-checklist > li:not(.tox-checklist--hidden)::before {
56
+ /* assets/css/tinymce/list.less */
47
57
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");
48
58
  background-size: 100%;
49
59
  content: "";
@@ -56,9 +66,11 @@
56
66
  }
57
67
  .tox-checklist
58
68
  li:not(.tox-checklist--hidden).tox-checklist--checked::before {
69
+ /* assets/css/tinymce/list.less */
59
70
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");
60
71
  }
61
72
  [dir="rtl"] .tox-checklist > li:not(.tox-checklist--hidden)::before {
73
+ /* assets/css/tinymce/list.less */
62
74
  margin-left: 0;
63
75
  margin-right: -1.5em;
64
76
  }
@@ -1,8 +1,11 @@
1
1
  // 编辑器外样式
2
2
  .c-article-tinymce{
3
+ /* assets/css/tinymce/macro.less */
3
4
  .e-jx3macro-area{
5
+ /* assets/css/tinymce/macro.less */
4
6
  .pr;
5
7
  &:after{
8
+ /* assets/css/tinymce/macro.less */
6
9
  content : 'JX3BOX·MACRO';
7
10
  position: absolute;right:0;top:-30px;
8
11
  background-color:@bg-black;
@@ -18,7 +21,9 @@
18
21
  }
19
22
  // tinymce编辑器
20
23
  .c-article-editor {
24
+ /* assets/css/tinymce/macro.less */
21
25
  .e-jx3macro-area{
26
+ /* assets/css/tinymce/macro.less */
22
27
  min-height:24px;
23
28
  border-radius:4px;
24
29
  padding:10px;
@@ -29,6 +34,7 @@
29
34
  color:darken(#c8e1ff,20%);
30
35
  .pr;
31
36
  &:after{
37
+ /* assets/css/tinymce/macro.less */
32
38
  content : 'JX3BOX·MACRO';
33
39
  position: absolute;right:10px;top:10px;
34
40
  background-color:darken(#c8e1ff,20%);
@@ -37,4 +43,4 @@
37
43
  padding:0 8px;
38
44
  }
39
45
  }
40
- }
46
+ }
@@ -1,5 +1,7 @@
1
1
  .c-article-editor {
2
+ /* assets/css/tinymce/nextpage.less */
2
3
  .mce-pagebreak {
4
+ /* assets/css/tinymce/nextpage.less */
3
5
  padding: 0;
4
6
  outline: none;
5
7
  border: none;
@@ -9,23 +11,28 @@
9
11
  }
10
12
  }
11
13
  .c-article-chunk {
14
+ /* assets/css/tinymce/nextpage.less */
12
15
  display: none;
13
16
  &.on {
17
+ /* assets/css/tinymce/nextpage.less */
14
18
  display: block;
15
19
  }
16
20
  }
17
21
  .c-article-all {
22
+ /* assets/css/tinymce/nextpage.less */
18
23
  width: 100%;
19
24
  margin: 10px auto !important;
20
25
  display: block !important;
21
26
  }
22
27
  .c-article-pages {
28
+ /* assets/css/tinymce/nextpage.less */
23
29
  margin: 10px;
24
30
  max-width: 100%;
25
31
  overflow-x: auto;
26
32
  text-align: center;
27
33
 
28
34
  .el-pager{
35
+ /* assets/css/tinymce/nextpage.less */
29
36
  margin:0;
30
37
  padding:0;
31
38
  }
@@ -33,12 +40,16 @@
33
40
 
34
41
  // 打印分页
35
42
  .c-article {
43
+ /* assets/css/tinymce/nextpage.less */
36
44
  .e-print-pagebreak {
45
+ /* assets/css/tinymce/nextpage.less */
37
46
  .none;
38
47
  }
39
48
  }
40
49
  .c-article-editor {
50
+ /* assets/css/tinymce/nextpage.less */
41
51
  .e-print-pagebreak {
52
+ /* assets/css/tinymce/nextpage.less */
42
53
  .db;
43
54
  border: none;
44
55
  border-bottom: 1px dotted #7ddcf9;
@@ -57,8 +68,11 @@
57
68
  }
58
69
  }
59
70
  @media print {
71
+ /* assets/css/tinymce/nextpage.less */
60
72
  .c-article {
73
+ /* assets/css/tinymce/nextpage.less */
61
74
  .e-print-pagebreak {
75
+ /* assets/css/tinymce/nextpage.less */
62
76
  page-break-after: always;
63
77
  }
64
78
  }
@@ -1,7 +1,9 @@
1
1
  // 段落
2
2
  .c-article-tinymce {
3
+ /* assets/css/tinymce/p.less */
3
4
  p,
4
5
  div {
6
+ /* assets/css/tinymce/p.less */
5
7
  margin: 0;
6
8
  line-height: 2.2;
7
9
  }
@@ -1,5 +1,6 @@
1
1
  // 编辑器内
2
2
  .e-pz-iframe{
3
+ /* assets/css/tinymce/pz.less */
3
4
  min-height: 24px;
4
5
  border-radius: 4px;
5
6
  font-size: 14px;
@@ -15,6 +16,7 @@
15
16
 
16
17
  .pr;
17
18
  &:after {
19
+ /* assets/css/tinymce/pz.less */
18
20
  content: "JX3BOX·配装方案";
19
21
  position: absolute;
20
22
  .lt(8px);
@@ -27,13 +29,17 @@
27
29
  }
28
30
  // 渲染模式隐藏
29
31
  .c-article-tinymce{
32
+ /* assets/css/tinymce/pz.less */
30
33
  .e-pz-iframe{
34
+ /* assets/css/tinymce/pz.less */
31
35
  display: none;
32
36
  }
33
37
  }
34
38
  // tinymce编辑器内展示
35
39
  .c-article-editor{
40
+ /* assets/css/tinymce/pz.less */
36
41
  .e-pz-iframe{
42
+ /* assets/css/tinymce/pz.less */
37
43
  display: block;
38
44
  }
39
45
  }
@@ -1,5 +1,6 @@
1
1
  // 编辑器内
2
2
  .e-jx3qixue-area ,.e-jx3talent2-area{
3
+ /* assets/css/tinymce/qixue.less */
3
4
  min-height: 24px;
4
5
  border-radius: 4px;
5
6
  font-size: 14px;
@@ -15,6 +16,7 @@
15
16
 
16
17
  .pr;
17
18
  &:after {
19
+ /* assets/css/tinymce/qixue.less */
18
20
  content: "JX3BOX·TALENT";
19
21
  position: absolute;
20
22
  .rt(8px);
@@ -27,13 +29,17 @@
27
29
  }
28
30
  // 渲染模式隐藏
29
31
  .c-article{
32
+ /* assets/css/tinymce/qixue.less */
30
33
  .e-jx3qixue-area,.e-jx3talent2-area{
34
+ /* assets/css/tinymce/qixue.less */
31
35
  display: none;
32
36
  }
33
37
  }
34
38
  // tinymce编辑器内展示
35
39
  .c-article-editor{
40
+ /* assets/css/tinymce/qixue.less */
36
41
  .e-jx3qixue-area,.e-jx3talent2-area{
42
+ /* assets/css/tinymce/qixue.less */
37
43
  display: block;
38
44
  }
39
45
  }
@@ -1,6 +1,8 @@
1
1
  /* 引用 */
2
2
  .c-article-tinymce{
3
+ /* assets/css/tinymce/quote.less */
3
4
  blockquote {
5
+ /* assets/css/tinymce/quote.less */
4
6
  border: 1px dashed #e1e4e8;
5
7
  border-radius: 4px;
6
8
  padding: 10px;
@@ -1,6 +1,8 @@
1
1
  /* 表格 */
2
2
  .c-article-tinymce {
3
+ /* assets/css/tinymce/table.less */
3
4
  table {
5
+ /* assets/css/tinymce/table.less */
4
6
  border-collapse: collapse;
5
7
  width: 100%;
6
8
  height:auto;
@@ -14,9 +16,11 @@
14
16
 
15
17
  td,
16
18
  th {
19
+ /* assets/css/tinymce/table.less */
17
20
  padding: 6px 10px;
18
21
  }
19
22
  td {
23
+ /* assets/css/tinymce/table.less */
20
24
  border: 1px solid #eee;
21
25
  }
22
26
  // th {
@@ -24,9 +28,11 @@
24
28
  // // font-weight: 600;
25
29
  // }
26
30
  tr:nth-child(2n + 1) {
31
+ /* assets/css/tinymce/table.less */
27
32
  background-color: #fafbfc;
28
33
  }
29
34
  tr:first-child {
35
+ /* assets/css/tinymce/table.less */
30
36
  // background-color: #f1f8ff;
31
37
  background-color: #fafbfc;
32
38
  font-weight: 600;
@@ -39,13 +45,17 @@
39
45
  }
40
46
 
41
47
  @media screen and (max-width: @phone) {
48
+ /* assets/css/tinymce/table.less */
42
49
  .c-article-tinymce{
50
+ /* assets/css/tinymce/table.less */
43
51
  table {
52
+ /* assets/css/tinymce/table.less */
44
53
  display: block;
45
54
  width: 100% !important;
46
55
  height: auto !important;
47
56
 
48
57
  th,td{
58
+ /* assets/css/tinymce/table.less */
49
59
  white-space: nowrap;
50
60
  }
51
61
  }
@@ -53,7 +63,9 @@
53
63
  }
54
64
 
55
65
  @media print{
66
+ /* assets/css/tinymce/table.less */
56
67
  table{
68
+ /* assets/css/tinymce/table.less */
57
69
  page-break-inside: avoid !important;
58
70
  }
59
- }
71
+ }
@@ -1,5 +1,7 @@
1
1
  .c-article-tinymce {
2
+ /* assets/css/tinymce/video.less */
2
3
  video {
4
+ /* assets/css/tinymce/video.less */
3
5
  background-color: #333;
4
6
  width: 100%;
5
7
  height: 800px;
@@ -8,8 +10,10 @@
8
10
  }
9
11
  }
10
12
  .c-article-videox {
13
+ /* assets/css/tinymce/video.less */
11
14
  iframe,
12
15
  iframe[allowfullscreen="allowfullscreen"] {
16
+ /* assets/css/tinymce/video.less */
13
17
  width: 100%;
14
18
  height: 800px;
15
19
  border: 1px solid #eee;
@@ -17,44 +21,58 @@
17
21
  }
18
22
  }
19
23
  .w-player-bilibili {
24
+ /* assets/css/tinymce/video.less */
20
25
  width: 100%;
21
26
  height: 800px;
22
27
  border: 1px solid #eee;
23
28
  box-sizing: border-box;
24
29
  }
25
30
  @media screen and (max-width:@ipad){
31
+ /* assets/css/tinymce/video.less */
26
32
  .w-player-bilibili{
33
+ /* assets/css/tinymce/video.less */
27
34
  height: 600px;
28
35
  }
29
36
  }
30
37
  @media screen and (max-width:@ipad-y){
38
+ /* assets/css/tinymce/video.less */
31
39
  .w-player-bilibili{
40
+ /* assets/css/tinymce/video.less */
32
41
  height: 500px;
33
42
  }
34
43
  }
35
44
  @media screen and (max-width:@phone){
45
+ /* assets/css/tinymce/video.less */
36
46
  .w-player-bilibili{
47
+ /* assets/css/tinymce/video.less */
37
48
  height: 240px;
38
49
  }
39
50
  }
40
51
  @media screen and (max-width:@ip5){
52
+ /* assets/css/tinymce/video.less */
41
53
  .w-player-bilibili{
54
+ /* assets/css/tinymce/video.less */
42
55
  height: 180px;
43
56
  }
44
57
  }
45
58
  .c-article-editor {
59
+ /* assets/css/tinymce/video.less */
46
60
  video,
47
61
  iframe {
62
+ /* assets/css/tinymce/video.less */
48
63
  cursor: default;
49
64
  }
50
65
  iframe {
66
+ /* assets/css/tinymce/video.less */
51
67
  width: auto;
52
68
  height: auto;
53
69
  }
54
70
  }
55
71
  @media screen and (max-width: @ipad) {
72
+ /* assets/css/tinymce/video.less */
56
73
  .c-article video,
57
74
  .c-article-videox iframe {
75
+ /* assets/css/tinymce/video.less */
58
76
  height: auto;
59
77
  min-height: 200px;
60
78
  }
@@ -0,0 +1 @@
1
+ <svg t="1773045984859" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4653"><path d="M139.093333 974.336a96.426667 96.426667 0 1 0 0-192.853333 96.426667 96.426667 0 0 0 0 192.853333zM926.122667 971.264c-26.453333 0-46.634667-20.224-46.634667-46.677333 0-433.962667-353.066667-788.608-788.608-788.608-26.453333 0-46.634667-20.224-46.634667-46.634667C44.202667 62.890667 64.426667 42.666667 90.88 42.666667 577.706667 42.666667 972.8 439.296 972.8 924.586667c0 26.453333-20.224 46.634667-46.677333 46.634666z" p-id="4654"></path><path d="M601.045333 972.8c-26.453333 0-46.634667-20.224-46.634666-46.677333 0-255.061333-208.426667-463.488-463.530667-463.488-26.453333 0-46.634667-20.224-46.634667-46.677334 0-26.453333 20.181333-46.634667 46.634667-46.634666 307.968 0 556.842667 250.410667 556.842667 556.8 0 24.917333-21.76 46.677333-46.677334 46.677333z" p-id="4655"></path></svg>
@@ -0,0 +1,14 @@
1
+ <svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240">
2
+ <g>
3
+ <path d="M202.93,58,132,17a24.27,24.27,0,0,0-24.28,0L88.06,28.33,116.9,45l.52-.7.57,1.32,1.82,1.06,36.1,20.84,1.18-1.16.38-1.47a11.27,11.27,0,0,1,10.9-8.79,12.33,12.33,0,0,1,8.18,3.24l4.09,3.56a9.07,9.07,0,0,1,1,1L185.18,68a11.92,11.92,0,0,1,2.74,11.47A11.47,11.47,0,0,1,179.63,87l-.66.17a36.73,36.73,0,0,1,4.31,15.94,56.07,56.07,0,0,1,2.19,15.61l29.6-17.09V79A24.27,24.27,0,0,0,202.93,58Z"/>
4
+ <polygon points="88.06 65 88.06 65 88.06 65 88.06 65"/>
5
+ <path d="M52,131.14l-8-7.25,7.86-7.43a12.21,12.21,0,0,1,4.48-2.67V104.5A36.65,36.65,0,0,1,68,77.68a27.09,27.09,0,0,1,.45-3.35l2.71-13.51,12,6.77.2.12L88.06,65,56.3,46.67,36.7,58A24.29,24.29,0,0,0,24.55,79V161a24.29,24.29,0,0,0,12.14,21l1.28.74L56.3,193.33V156.67h0v-21.8l-1.38-1.18C54,132.89,53,132.07,52,131.14Z"/>
6
+ <path d="M183.32,156.67h0L167.12,166a54.06,54.06,0,0,1-10.52,8.12,10,10,0,0,1-4.81,1.34,47.12,47.12,0,0,1-6.51,3.15l-7.14,4.12a36.65,36.65,0,0,1-36.66,0h0L95,179a32.73,32.73,0,0,1-6.91,3v29.71l8.51,4.91,11.1,6.41A24.27,24.27,0,0,0,132,223l71-41a24.27,24.27,0,0,0,12.14-21V138.33h0Z"/>
7
+ <path d="M92.13,169c1.05-.72,2.13-1.54,3.29-2.51.54-.45,1.09-.93,1.67-1.44a40.19,40.19,0,0,1-4.18-1.55c-.78-.34-1.55-.7-2.3-1.08a45.39,45.39,0,0,1-6.5-4,56.85,56.85,0,0,1-7.82-7.07A30.2,30.2,0,0,0,73.92,155c-.19.35-.36.7-.53,1s-.41.9-.59,1.35a23.19,23.19,0,0,0-.8,2.44,25.17,25.17,0,0,0-.57,2.59c-.14.79-.25,1.61-.34,2.47,0,.32-.07.65-.11,1-.12,1.34-.22,2.79-.31,4.37,0,.4,0,.8-.07,1.22,0,.83-.08,1.69-.13,2.6h0c4.07-.21,7.3-.36,10.1-.73.56-.07,1.1-.15,1.63-.24a23.55,23.55,0,0,0,7.27-2.44A28.25,28.25,0,0,0,92.13,169Z"/>
8
+ <path d="M140.11,70.85l-.4-.12-.5-.15-.31-.09-.52-.13-.78-.18-.58-.11-.79-.15-.63-.09-.8-.11-.38,0-.29,0-.82-.08-.71,0-.83,0-.72,0h-2.39l-.85,0-.72,0-.87.07-.71.07-.88.1-.7.09L123,70l-.67.11-1,.19-.6.13c-.35.07-.7.16-1,.25l-.5.12c-.5.14-1,.28-1.5.44a17.76,17.76,0,0,1-1,2.37,8.76,8.76,0,0,1-.68,1.17,4.81,4.81,0,0,1-.77.92c-1.43,1.29-2.76,2.43-3.94,3.53.62-.28,1.24-.53,1.86-.77l.6-.22,1.27-.44.72-.22,1.17-.35.75-.19,1.17-.28.75-.16,1.21-.21.71-.12c.46-.07.91-.12,1.36-.17l.57-.07q1-.09,1.92-.15h.31l1.63,0h.4c.87,0,1.74,0,2.62.09l.26,0c.78.06,1.57.14,2.36.24l.35,0,.51.07c.89.13,1.78.29,2.66.47l.47.1c.92.2,1.84.42,2.76.68l1.38-1.14a60.52,60.52,0,0,0-6.89-1.28c-1.21-.16-2.45-.3-3.72-.4,2.26-1.76,7.21-2.69,10.66-3.48C140.88,71.11,140.5,71,140.11,70.85Z"/>
9
+ <path d="M73.15,140l.39.55.72,1c.37.52.75,1,1.13,1.53.51.67,1,1.32,1.55,2l.36.43c.52.63,1,1.24,1.57,1.83l.21.23c.49.54,1,1.06,1.47,1.57l.33.35c.54.55,1.09,1.08,1.64,1.6l.32.29c.5.47,1,.92,1.52,1.35l.27.23c.56.48,1.14.93,1.71,1.38l.39.29c.57.42,1.14.83,1.72,1.22,0,0,0,0,.08.06.6.41,1.21.79,1.82,1.16l.42.24c.61.36,1.23.7,1.85,1l.19.09c.58.29,1.17.57,1.76.83l.41.18q.94.41,1.92.75l.35.12c.58.21,1.17.39,1.77.56l.35.11c.66.18,1.33.34,2,.49l.45.08.66.14,1.27.2.2,0c.7.09,1.4.16,2.11.21l.5,0h.06c.7,0,1.4.07,2.11.07h.12c.81,0,1.64,0,2.47-.09l.35,0c.82-.06,1.66-.15,2.5-.27l.48-.07c.84-.12,1.69-.27,2.54-.45l.42-.09c.9-.2,1.81-.41,2.73-.67a13.55,13.55,0,0,0,2.68-1.1,21.31,21.31,0,0,0,2.78-1.79c.62-.46,1.23-1,1.84-1.49a35.17,35.17,0,0,0,4.29-4.56,32.85,32.85,0,0,0,2.82-4.17c.4-.71.77-1.43,1.09-2.15A20.55,20.55,0,0,0,137,142a14.25,14.25,0,0,0,.38-2.06,10.08,10.08,0,0,0,0-2.05,6.92,6.92,0,0,0-2.36-4.76c-.41.23-.83.45-1.25.65l-.43.2-.84.37-.5.19-.76.27-.54.17-.72.21-.17,0c-.13,0-.26.06-.39.09s-.46.11-.69.15l-.57.1-.68.1-.57.06-.67.05-.57,0h-.59c-.55,0-1.1,0-1.64-.09l-.29,0c-.47-.05-.94-.13-1.41-.22l-.34-.07c-.53-.11-1.05-.25-1.56-.41l-.3-.1c-.44-.15-.87-.31-1.3-.49l-.31-.13c-.49-.21-1-.45-1.43-.7l-.3-.18c-.4-.23-.79-.47-1.18-.73l-.26-.17c-.43-.31-.86-.64-1.27-1l-.28-.24c-.36-.31-.7-.63-1-1l-.2-.19c-.38-.39-.74-.8-1.09-1.22l-.24-.31c-.3-.38-.6-.78-.88-1.19l-.13-.19q-.47-.7-.87-1.44l-.19-.36c-.24-.46-.47-.93-.68-1.41l-.08-.17c-.22-.53-.42-1.07-.61-1.63,0-.13-.08-.27-.13-.4-.16-.54-.32-1.08-.44-1.64l0-.11c-.13-.58-.23-1.18-.32-1.79,0-.15,0-.3,0-.45-.08-.61-.14-1.24-.16-1.88-.42-11,11.51-22.08,23.1-23.5l-1.2-.37-.77-.23-.29-.08c-.29-.09-.58-.18-.87-.25l-.14,0-.68-.18-.24-.05-.65-.14-.16,0-.8-.13-.2,0c-.21,0-.43,0-.65-.06l-.25,0-.85,0h0l-.9,0-.3,0-.7,0-.37,0-.68.08h-.08l-.37,0-1.23.18A51,51,0,0,1,125,86a27.09,27.09,0,0,1,3.57-1.41,35.89,35.89,0,0,1,7.13-1.39,4.6,4.6,0,0,1,.49-.75,12.37,12.37,0,0,1,1.93-1.82c-.78-.2-1.58-.38-2.4-.55l-.16,0c-.78-.15-1.57-.29-2.38-.4l-.25,0c-.79-.1-1.6-.19-2.42-.25h-.29q-1.23-.09-2.52-.09H127l-.95,0h-.27l-1.21.08-.24,0-1,.11-.34,0c-.37,0-.73.09-1.1.15l-.15,0-1.26.23-.31.06-1,.22-.33.08-1.29.34h0l-1.25.39-.34.12c-.35.11-.7.24-1,.37l-.28.1c-.43.17-.86.34-1.3.53l-.23.1-1.08.49-.36.18q-.57.27-1.14.57l-.18.1c-.44.23-.87.48-1.31.73l-.31.19-1,.64-.35.22q-.66.44-1.32.9h0l-.89.67-.39.28-.36.28-1,.83-.31.26c-.43.36-.86.74-1.29,1.13l-.24.22-1.06,1-.38.37c-.35.36-.71.72-1.06,1.1l-.23.23c-.42.45-.84.92-1.26,1.4l-.33.38c-.32.37-.65.76-1,1.16l-.36.44c-.42.52-.84,1.05-1.25,1.6.55-1.22,1.08-2.35,1.61-3.41.39-.77.77-1.49,1.16-2.2.25-.45.5-.89.76-1.33s.69-1.15,1-1.71c.53-.8,1.07-1.59,1.66-2.38s1.2-1.59,1.87-2.4l.06-.06c.43-.53.89-1.06,1.37-1.6,1-1.08,2-2.2,3.15-3.4s2.45-2.5,3.88-3.92l2.06-2h0a7.61,7.61,0,0,0,.75-.88h0a7,7,0,0,0,.61-1l.06-.12c.08-.18.16-.36.23-.54a8.91,8.91,0,0,0,.48-5.78c0-.54-.12-1.06-.18-1.54a18.6,18.6,0,0,1-5.45,5.56c-.34.24-.69.47-1,.7l0,0-.06,0c-.61.39-1.26.77-1.93,1.14s-1.13.61-1.72.91l-.23.11h0c-1,.51-2,1-3,1.45h0L98.6,74.58c-.19.08-.37.18-.56.27-.37.18-.74.35-1.11.54l-.37.17a.61.61,0,0,1-.14.07c-.27.14-.53.31-.79.46-.44.24-.89.48-1.32.74s-.67.44-1,.67h0l-.5.33-.54.35-.32.25-.08.06c-.53.38-1.05.77-1.56,1.18h0c-.22.18-.42.37-.64.56-.52.44-1,.89-1.53,1.36s-1,1-1.46,1.45h0c-.22.23-.43.48-.64.72s-.55.61-.82.93c-.06.07-.14.14-.2.22-.47.56-.91,1.15-1.35,1.74l-.18.24h0a.76.76,0,0,0,.08-.41,4.18,4.18,0,0,0-.19-1.06c-.07-.28-.16-.57-.26-.88-.46-1.38-1.12-2.91-1.31-3.36a.37.37,0,0,1,0-.11c-.05-.12-.11-.23-.16-.35s-.11-.25-.17-.37l-.06-.12c-.18-.37-.36-.75-.57-1.11a12.11,12.11,0,0,0-.88-1.32,6.79,6.79,0,0,0-.86-.91c-.3-.31-.62-.62-1-.92,0,.24.07.48.1.73h0a18.9,18.9,0,0,0-.28,2.51c0,.49,0,1,0,1.49,0,1,0,2,0,3a28.91,28.91,0,0,1-.31,4.48,68.22,68.22,0,0,1-1.59,7.21h0c-.07.19-.12.4-.19.59h0v0c-.08.19-.16.39-.24.61a2.33,2.33,0,0,0-.11.28c-.07.15-.13.32-.2.49s0,.09-.05.13-.11.26-.16.4-.24.57-.38.91-.29.71-.46,1.13-.35.87-.56,1.39-.43,1.07-.68,1.69l-.83,2.06a19.5,19.5,0,0,0-.62,1.91c-.1.38-.2.77-.29,1.17s-.22,1.06-.31,1.61a45.68,45.68,0,0,0-.58,6.77c0,.61,0,1.21,0,1.79a.76.76,0,0,1,0,.15c0,.35,0,.7,0,1s0,.41,0,.62h0c0,.73.1,1.44.18,2.1a19.36,19.36,0,0,0,.64,3.23l.06.16c.06.17.12.34.19.49a.56.56,0,0,0,0,.12h0a2.19,2.19,0,0,0-.3-.47l-.1-.12a3.23,3.23,0,0,0-.37-.37l-.09-.07a5.19,5.19,0,0,0-.57-.4l-.16-.1-.55-.3-.17-.08c-.24-.12-.5-.23-.76-.33l-.16-.06-.7-.24-.23-.07-.89-.25h0l-.87-.19-.26,0c-.26,0-.52-.09-.79-.12l-.15,0q-.45-.06-.9-.09l-.23,0-.71,0h-.21c-.27,0-.54,0-.8,0l-.15,0a6.07,6.07,0,0,0-.77.08h0a5.65,5.65,0,0,0-.65.15l-.12,0-.09,0h-.06a12.37,12.37,0,0,0-1.44.41c.4.21.8.44,1.19.67h0l.55.49c.8.69,1.6,1.36,2.39,2l1.45,1.26a32.71,32.71,0,0,1,4.07,4.29h0a.76.76,0,0,0,.11.14c.58.77,1.15,1.56,1.71,2.35l.48.67,1.61,2.33C72.19,138.57,72.67,139.26,73.15,140Z"/>
10
+ <polygon points="78.09 75.97 78.09 75.97 78.09 75.97 78.09 75.97"/>
11
+ <path d="M173,115.6c.23.27.45.56.66.85.43.59.84,1.21,1.24,1.88.19.34.39.68.58,1a45.5,45.5,0,0,0-2.54-15.66,40.54,40.54,0,0,0-2.62-5.9l-.18-.33a44.48,44.48,0,0,0-2.52-4l-.2-.27c-.35-.49-.72-1-1.1-1.44l-1,1-2.55,2.6,2.7,2.64,3.87,3.78-4.9,5.92a10.61,10.61,0,0,1-1.69,1.68,4.67,4.67,0,0,1-.79.52,3.49,3.49,0,0,1-.39.19,4.75,4.75,0,0,1-.8.28,7.34,7.34,0,0,1-.84.16c-.29,0-.59.06-.91.07l-1,0h-.55l-4.15,0a5.31,5.31,0,0,1-1.7,3.63l-.06,3a8.27,8.27,0,0,1-.12,1.21,7.87,7.87,0,0,1-.31,1.18,4.89,4.89,0,0,1-.3.75,6.52,6.52,0,0,1-.83,1.36,6.65,6.65,0,0,1-1.12,1.13,6.19,6.19,0,0,1-1.93,1h0a17.08,17.08,0,0,0-4.7,2.23,23.14,23.14,0,0,0-3.17,2.55c-.32.3-.63.62-1,.94a11.22,11.22,0,0,1,.92.9,10.16,10.16,0,0,1,.79,1,11.84,11.84,0,0,1,.86,1.39c.13.24.24.49.35.74s.14.34.2.51a9.55,9.55,0,0,1,.34,1c1,3.43.38,7.28-1.19,11.06-.18.45-.39.9-.6,1.35a36.56,36.56,0,0,1-4.86,7.51c-.32.38-.64.76-1,1.12l2.08-.89,2.07-1h0c-.08.13-.18.26-.27.4a22.2,22.2,0,0,1-1.47,2c-4.67,5.65-13.78,11.32-28.75,13.29,1,.27,2,.5,3.06.72l.64.14c1,.21,2,.4,3,.56l.5.07c.15,0,.31,0,.46.06.74.12,1.49.22,2.23.31l.47.05c1,.11,1.92.18,2.88.24l.63,0c1,0,1.94.08,2.89.08h.11c.92,0,1.84,0,2.74-.08l.75-.05c.84-.05,1.67-.12,2.5-.22l.31,0c.91-.11,1.81-.26,2.7-.42l.68-.13c.75-.15,1.48-.31,2.21-.49l.5-.12q1.27-.35,2.52-.75l.59-.21c.68-.24,1.36-.49,2-.76l.56-.23c.79-.34,1.58-.7,2.34-1.09l.46-.24c.63-.34,1.26-.69,1.87-1.07l.57-.34c.72-.46,1.44-.93,2.13-1.44l.27-.21c.61-.46,1.2-.94,1.79-1.44l.52-.46c.65-.58,1.29-1.18,1.9-1.81h0c-.22.39-.44.78-.67,1.17-.67,1.19-1.38,2.39-2.14,3.49,8-4.63,17.46-14.59,21.18-26.54a38.56,38.56,0,0,0,1-3.84,34.42,34.42,0,0,0,.54-3.95,31.76,31.76,0,0,0-4.22-18.47q.39.31.78.66A20.09,20.09,0,0,1,173,115.6Z"/>
12
+ <path d="M178.07,76.91a1,1,0,0,0,.32-1,3.09,3.09,0,0,0-.76-1.34l-3.55-4.09L170,66.88a4.58,4.58,0,0,0-.45-.35l-.14-.08-.29-.17-.16-.06-.25-.09-.17,0-.16,0h-.05a.93.93,0,0,0-.22,0,.44.44,0,0,0-.15,0,.86.86,0,0,0-.2.13l-.13.1a1.56,1.56,0,0,0-.17.25,1.1,1.1,0,0,0-.09.14,2.19,2.19,0,0,0-.2.55l-1.07,4.17L164.9,72.7,149.3,88l-.27.27-.48-.5L147,86.21l-.89-.91-3.76-3.85-2.65,2.19a3.77,3.77,0,0,0-.74.77,2.73,2.73,0,0,0-.37.77,4.65,4.65,0,0,0-.13.88c0,.33,0,.68,0,1.09v.31l0,8a.35.35,0,0,1-.34.35h-3.76c-.5,0-.74.09-.91.64l-.32,1-5.84.13a2.89,2.89,0,0,0-1.8.6,2,2,0,0,0-.31.34,1.46,1.46,0,0,0-.18.38c-.12.4-.27.82-.43,1.25a30.32,30.32,0,0,1-2.32,4.58l-.39.6c-.26.4-.51.77-.77,1.13s-.51.67-.76,1-.24.28-.36.41l-.34.36-8.81,8.52c0,.42.11.87.19,1.33a17.17,17.17,0,0,0,5.35,9.71c.32.29.65.56,1,.81l.33.24c.22.17.44.33.67.48l.39.24.63.37.4.2.65.31.39.16c.24.09.48.18.72.25l.32.11c.35.1.7.19,1,.26l.1,0c.32.06.64.1,1,.14l.36,0q.36,0,.72,0h.31a12.1,12.1,0,0,0,1.47-.1h0a12,12,0,0,0,1.43-.28h0l.27-.07a14.79,14.79,0,0,0,1.43-.45l.28-.11a14.78,14.78,0,0,0,1.48-.65h0l4.63-4.79a14.49,14.49,0,0,1,1.23-1.08c.34-.26.71-.53,1.1-.8l1.14-.74c.61-.38,1.27-.75,1.93-1.1l.66-.34c.45-.22.89-.42,1.33-.61a18.69,18.69,0,0,1,1.9-.7,2.29,2.29,0,0,0,1.32-2.28l.13-5.84,1-.33c.41-.13.56-.29.61-.58a1.55,1.55,0,0,0,0-.33v-3.76a.36.36,0,0,1,.36-.34l8.27,0a7.57,7.57,0,0,0,2-.15,2.7,2.7,0,0,0,1.15-.69,4,4,0,0,0,.39-.42l2.19-2.65-3.46-3.38-3.38-3.29,4.09-4.16,8.92-9.08,3.47-3.54.28-.28,4.17-1.07A2.08,2.08,0,0,0,178.07,76.91Z"/>
13
+ </g>
14
+ </svg>
package/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
  import CommonHeader from "./src/CommonHeader.vue";
3
3
  import Footer from "./src/Footer.vue";
4
4
  import CommonFooter from "./src/CommonFooter.vue";
5
+ import Icon from "./src/Icon.vue";
5
6
 
6
7
  // 布局
7
8
  import Main from "./src/Main.vue";
@@ -36,6 +37,7 @@ const components = {
36
37
  CommonHeader,
37
38
  CommonFooter,
38
39
  Footer,
40
+ Icon,
39
41
 
40
42
  Main,
41
43
  Breadcrumb,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-ui",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "JX3BOX Vue3 UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,11 +1,12 @@
1
1
  import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
2
2
 
3
3
  import { ElNotification as Notification } from "element-plus";
4
- import { $cms } from "@jx3box/jx3box-common/js/api";
4
+ import { $cms, $next } from "@jx3box/jx3box-common/js/api";
5
5
  import User from "@jx3box/jx3box-common/js/user";
6
6
 
7
7
  const KEY = "cmt_order";
8
- const { __Links, __next } = JX3BOX;
8
+ const { __Links } = JX3BOX;
9
+ const $ = $next({ interceptor: false, mute: true });
9
10
 
10
11
  export async function getOrderMode() {
11
12
  if (User.isLogin()) {
@@ -51,14 +52,12 @@ export async function setOrderMode(val) {
51
52
  }
52
53
 
53
54
  export const GET = function (url, queryParams) {
54
- let options = {
55
- method: "GET",
56
- headers: {
57
- Accept: "application/json",
58
- "Content-Type": "application/json",
59
- },
60
- };
61
- return __fetch(url, queryParams, options);
55
+ return $
56
+ .get(url, {
57
+ params: queryParams,
58
+ })
59
+ .then((res) => res.data)
60
+ .catch((err) => __handleError(err));
62
61
  };
63
62
 
64
63
  const postRecord = {};
@@ -90,98 +89,59 @@ export const POST = function (url, queryParams, body) {
90
89
  count: 0,
91
90
  };
92
91
  }
93
- let options = {
94
- method: "POST",
95
- headers: {
96
- Accept: "application/json",
97
- "Content-Type": "application/json",
98
- },
99
- body: JSON.stringify(body),
100
- };
101
- return __fetch(url, queryParams, options);
92
+ return $
93
+ .post(url, body, {
94
+ params: queryParams,
95
+ })
96
+ .then((res) => res.data)
97
+ .catch((err) => __handleError(err));
102
98
  };
103
99
  export const PUT = function (url, queryParams, body) {
104
- let options = {
105
- method: "PUT",
106
- headers: {
107
- Accept: "application/json",
108
- "Content-Type": "application/json",
109
- },
110
- body: JSON.stringify(body),
111
- };
112
- return __fetch(url, queryParams, options);
100
+ return $
101
+ .put(url, body, {
102
+ params: queryParams,
103
+ })
104
+ .then((res) => res.data)
105
+ .catch((err) => __handleError(err));
113
106
  };
114
107
 
115
108
  export const DELETE = function (url, queryParams) {
116
- let options = {
117
- method: "DELETE",
118
- };
119
- return __fetch(url, queryParams, options);
109
+ return $
110
+ .delete(url, {
111
+ params: queryParams,
112
+ })
113
+ .then((res) => res.data)
114
+ .catch((err) => __handleError(err));
120
115
  };
121
116
 
122
- function __fetch(url, queryParams, options) {
123
- let domain = process.env.NODE_ENV == "production" ? __next : "/";
124
- if (domain[domain.length - 1] == "/") {
125
- domain = domain.substring(0, domain.length - 1);
126
- }
127
- url = domain + url;
128
- options.credentials = "include";
129
- if (queryParams) {
130
- let queryQueue = [];
131
- Object.keys(queryParams).forEach((key) => {
132
- queryQueue.push(key + "=" + queryParams[key]);
133
- });
134
- let domain = __next;
135
- if (domain[domain.length - 1] == "/") {
136
- domain = domain.substring(0, domain.length - 1);
137
- }
138
- url = url + "?" + queryQueue.join("&");
117
+ function __handleError(err) {
118
+ const status = err?.response?.status;
119
+ const statusText = err?.response?.statusText || "Request Error";
120
+ const message = err?.response?.data?.msg || err?.response?.data || "";
121
+ switch (status) {
122
+ case 401:
123
+ case 403:
124
+ window.location.href = __Links.account.login + "?redirect=" + encodeURIComponent(window.location.href);
125
+ break;
126
+ case 423:
127
+ window.location.href = __Links.account.email_verify + "?redirect=" + encodeURIComponent(window.location.href);
128
+ break;
129
+ case 406:
130
+ Notification.warning({
131
+ title: "系统",
132
+ message: message || "提交内容不合法,请重新提交",
133
+ duration: 3000,
134
+ position: "bottom-right",
135
+ });
136
+ break;
137
+ default:
138
+ Notification.error({
139
+ title: "系统:" + statusText,
140
+ message: message || "系统错误,请稍后重试!",
141
+ duration: 3000,
142
+ position: "bottom-right",
143
+ });
144
+ break;
139
145
  }
140
-
141
- return fetch(url, options).then((resp) => {
142
- switch (resp.status) {
143
- case 200:
144
- break;
145
- case 401:
146
- window.location.href = __Links.account.login + "?redirect=" + encodeURIComponent(window.location.href);
147
- throw new Error("错误:" + resp.statusText);
148
- case 403:
149
- window.location.href = __Links.account.login + "?redirect=" + encodeURIComponent(window.location.href);
150
- throw new Error("错误:" + resp.statusText);
151
- case 423:
152
- window.location.href =
153
- __Links.account.email_verify + "?redirect=" + encodeURIComponent(window.location.href);
154
- throw new Error("错误:" + resp.statusText);
155
- case 406:
156
- resp.text().then((body) => {
157
- Notification.warning({
158
- title: "系统",
159
- message: body || "提交内容不合法,请重新提交",
160
- duration: 3000,
161
- position: "bottom-right",
162
- });
163
- });
164
-
165
- throw new Error("错误:" + resp.statusText);
166
- default:
167
- resp.text().then((body) => {
168
- Notification.error({
169
- title: "系统:" + resp.statusText,
170
- message: body || "系统错误,请稍后重试!",
171
- duration: 3000,
172
- position: "bottom-right",
173
- });
174
- });
175
-
176
- throw new Error("错误:" + resp.statusText);
177
- }
178
- let contentType = resp.headers.get("Content-Type");
179
- contentType = contentType && contentType.split(";").shift();
180
- switch (contentType) {
181
- case "application/json":
182
- return resp.json();
183
- default:
184
- return resp.text();
185
- }
186
- });
146
+ return Promise.reject(err);
187
147
  }