@jx3box/jx3box-ui 2.0.2 → 2.0.4

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 (128) hide show
  1. package/README.md +101 -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/i18n/messages/en-US.js +1 -0
  58. package/i18n/messages/vi.js +1 -0
  59. package/i18n/messages/zh-CN.js +1 -0
  60. package/i18n/messages/zh-TW.js +1 -0
  61. package/index.js +2 -0
  62. package/package.json +1 -1
  63. package/service/comment.js +56 -96
  64. package/src/App.vue +31 -31
  65. package/src/Breadcrumb.vue +16 -20
  66. package/src/Icon.vue +53 -0
  67. package/src/author/AuthorFans.vue +15 -5
  68. package/src/author/AuthorFollow.vue +1 -1
  69. package/src/author/AuthorGift.vue +9 -9
  70. package/src/author/AuthorHonor.vue +9 -8
  71. package/src/author/AuthorInfo.vue +10 -1
  72. package/src/author/AuthorLink.vue +8 -1
  73. package/src/author/AuthorPosts.vue +14 -8
  74. package/src/author/AuthorRss.vue +28 -34
  75. package/src/bread/Admin.vue +19 -6
  76. package/src/bread/Crumb.vue +7 -2
  77. package/src/bread/DesignTask.vue +44 -37
  78. package/src/comment/Avatar.vue +26 -8
  79. package/src/comment/CommentContent.vue +62 -17
  80. package/src/comment/CommentContentSimple.vue +54 -15
  81. package/src/comment/CommentWithReply.vue +22 -1
  82. package/src/comment/ReplyForReply.vue +14 -1
  83. package/src/comment/ReplyItem.vue +10 -1
  84. package/src/comment/ReplyList.vue +19 -1
  85. package/src/editor/BoxResource.vue +2 -2
  86. package/src/editor/Resource.vue +6 -6
  87. package/src/filters/clientBy.vue +14 -1
  88. package/src/filters/menuBy.vue +14 -1
  89. package/src/filters/orderBy.vue +1 -1
  90. package/src/filters/tagBy.vue +10 -1
  91. package/src/filters/versionBy.vue +6 -1
  92. package/src/filters/zlpBy.vue +6 -1
  93. package/src/footer/resource.vue +3 -1
  94. package/src/header/alternate.vue +2 -2
  95. package/src/header/asset.vue +13 -1
  96. package/src/header/box.vue +10 -5
  97. package/src/header/box2.vue +279 -247
  98. package/src/header/client.vue +6 -1
  99. package/src/header/lang.vue +1 -2
  100. package/src/header/logo.vue +3 -3
  101. package/src/header/manage.vue +0 -1
  102. package/src/header/nav.vue +1 -1
  103. package/src/header/userInfo.vue +18 -5
  104. package/src/interact/BoxcoinAdmin.vue +46 -5
  105. package/src/interact/BoxcoinRecords.vue +22 -1
  106. package/src/interact/BoxcoinUser.vue +49 -8
  107. package/src/interact/Contributors.vue +7 -11
  108. package/src/interact/Fav.vue +22 -1
  109. package/src/interact/Like.vue +10 -1
  110. package/src/interact/Share.vue +18 -1
  111. package/src/interact/WatchLater.vue +3 -3
  112. package/src/main.js +3 -1
  113. package/src/single/Author.vue +15 -10
  114. package/src/single/{cms-single.vue → CmsSingle.vue} +10 -1
  115. package/src/single/Collection.vue +10 -1
  116. package/src/single/Comment.vue +20 -3
  117. package/src/single/Creators.vue +10 -1
  118. package/src/single/PostDirectory.vue +1 -1
  119. package/src/single/PostHeader.vue +18 -1
  120. package/src/single/SimpleThx.vue +2 -2
  121. package/src/single/Thx.vue +45 -27
  122. package/assets/img/author/msg.svg +0 -55
  123. package/src/Bottom.vue +0 -23
  124. package/src/Box.vue +0 -149
  125. package/src/author/AuthorMsg.vue +0 -25
  126. package/src/bread/AdminButton.vue +0 -31
  127. package/src/header/bus.js +0 -9
  128. /package/docs/{README.md → i18n.md} +0 -0
@@ -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
  }
package/src/App.vue CHANGED
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="container-page">
3
3
  <CommonHeader></CommonHeader>
4
- <!-- <breadcrumb
4
+ <breadcrumb
5
5
  name="频道名称"
6
6
  slug="slug"
7
7
  root="/slug"
@@ -15,9 +15,9 @@
15
15
  </template>
16
16
  <template #op-prepend> </template>
17
17
  </breadcrumb>
18
- <LeftSidebar :open="true" :uid="7">
18
+ <LeftSidebar :open="true" :uid="8719">
19
19
  <LeftSideToggle :mobileOnly="true" />
20
- <Author :uid="7" />
20
+ <Author :uid="8719" />
21
21
  </LeftSidebar>
22
22
  <Main :withoutLeft="false" :withoutRight="false">
23
23
  <versionBy value=""></versionBy>
@@ -72,42 +72,42 @@
72
72
  </div>
73
73
  </template>
74
74
  </SuspendCommon>
75
- </Main> -->
75
+ </Main>
76
76
  <CommonFooter> </CommonFooter>
77
77
  </div>
78
78
  </template>
79
79
 
80
80
  <script>
81
- // import singlebox from "./single/cms-single.vue";
82
- // import UploadAlum from "./editor/UploadAlum.vue";
83
- // import Author from "./single/Author.vue";
84
- // import SimpleThxVue from "./single/SimpleThx.vue";
85
- // import Comment from "./single/Comment.vue";
86
- // import Thx from "./single/Thx.vue";
87
- // import PostHeader from "./single/PostHeader.vue";
88
- // import PostTopic from "./single/PostTopic.vue";
89
- // import axios from "axios";
90
- // import post_topics from "@jx3box/jx3box-common/data/post_topics.json";
91
- // import { get_item } from "../service/item";
92
- // import AdminDirectMessage from "./bread/AdminDirectMessage.vue";
93
- // import Admin from "@/bread/Admin.vue";
94
- // import versionBy from "./filters/versionBy.vue";
95
- // import SuspendCommon from "./SuspendCommon.vue";
81
+ import singlebox from "./single/CmsSingle.vue";
82
+ import UploadAlum from "./editor/UploadAlum.vue";
83
+ import Author from "./single/Author.vue";
84
+ import SimpleThxVue from "./single/SimpleThx.vue";
85
+ import Comment from "./single/Comment.vue";
86
+ import Thx from "./single/Thx.vue";
87
+ import PostHeader from "./single/PostHeader.vue";
88
+ import PostTopic from "./single/PostTopic.vue";
89
+ import axios from "axios";
90
+ import post_topics from "@jx3box/jx3box-common/data/post_topics.json";
91
+ import { get_item } from "../service/item";
92
+ import AdminDirectMessage from "./bread/AdminDirectMessage.vue";
93
+ import Admin from "@/bread/Admin.vue";
94
+ import versionBy from "./filters/versionBy.vue";
95
+ import SuspendCommon from "./SuspendCommon.vue";
96
96
  export default {
97
97
  name: "App",
98
98
  components: {
99
- // SimpleThxVue,
100
- // Author,
101
- // Comment,
102
- // Thx,
103
- // // PostHeader,
104
- // PostTopic,
105
- // UploadAlum,
106
- // // AdminDirectMessage,
107
- // singlebox,
108
- // versionBy,
109
- // SuspendCommon,
110
- // // Admin,
99
+ SimpleThxVue,
100
+ Author,
101
+ Comment,
102
+ Thx,
103
+ // PostHeader,
104
+ PostTopic,
105
+ UploadAlum,
106
+ // AdminDirectMessage,
107
+ singlebox,
108
+ versionBy,
109
+ SuspendCommon,
110
+ // Admin,
111
111
  },
112
112
  data() {
113
113
  return {
@@ -34,9 +34,7 @@
34
34
  <el-icon><InfoFilled /></el-icon>
35
35
  <span>反馈</span>
36
36
  </a>
37
- <!-- <AdminButton v-if="adminEnable" class="u-admin" /> -->
38
37
  <Admin v-if="adminEnable" :marksOptions="adminMarks" :show-extend="showExtend" :app="slug" :subtypeMap="subtypeMap" />
39
- <!-- <AdminDrop v-if="adminEnable" /> -->
40
38
  <slot name="op-prepend"></slot>
41
39
  </div>
42
40
  </div>
@@ -53,22 +51,22 @@ import Bus from "../utils/bus";
53
51
 
54
52
  export default {
55
53
  name: "CommonBreadcrumb",
56
- props: [
57
- "name",
58
- "slug",
59
- "root",
60
- "publishEnable",
61
- "adminEnable",
62
- "topicEnable",
63
- "feedbackEnable",
64
- "overlayEnable",
65
- "crumbEnable",
66
- "withoutLeft",
67
- "adminMarks",
68
- "icon",
69
- "subtypeMap",
70
- "showExtend"
71
- ],
54
+ props: {
55
+ name: { type: String, default: "" },
56
+ slug: { type: String, default: "" },
57
+ root: { type: String, default: "" },
58
+ publishEnable: { type: Boolean, default: false },
59
+ adminEnable: { type: Boolean, default: false },
60
+ topicEnable: { type: Boolean, default: false },
61
+ feedbackEnable: { type: Boolean, default: false },
62
+ overlayEnable: { type: Boolean, default: false },
63
+ crumbEnable: { type: Boolean, default: false },
64
+ withoutLeft: { type: Boolean, default: false },
65
+ adminMarks: { type: Object, default: () => ({}) },
66
+ icon: { type: String, default: "" },
67
+ subtypeMap: { type: Object, default: () => ({}) },
68
+ showExtend: { type: Boolean, default: false },
69
+ },
72
70
  data: function () {
73
71
  return {
74
72
  isOpen: true,
@@ -130,8 +128,6 @@ export default {
130
128
  components: {
131
129
  Admin,
132
130
  Crumb,
133
- // AdminButton,
134
- // AdminDrop
135
131
  },
136
132
  };
137
133
  </script>
package/src/Icon.vue ADDED
@@ -0,0 +1,53 @@
1
+ <template>
2
+ <img v-if="renderMode === 'inline'" svg-inline :src="path" :style="boxStyle" />
3
+
4
+ <i v-else-if="renderMode === 'font-awesome'" :class="name" :style="fontSizeStyle"></i>
5
+
6
+ <i v-else-if="renderMode === 'lucide'" :data-lucide="name" :style="boxStyle"></i>
7
+
8
+ <svg v-else-if="renderMode === 'sprite'" class="rx-icon" :width="size" :height="size" role="img" :style="{ fill: 'currentColor' }">
9
+ <!-- 同时写 href 与 xlink:href,兼容性更好 -->
10
+ <use :href="symbolId" :xlink:href="symbolId" />
11
+ </svg>
12
+ </template>
13
+
14
+ <script>
15
+ export default {
16
+ name: "Icon",
17
+ props: {
18
+ // type 缺省:使用 path + svg-inline
19
+ // type=font-awesome:name 直接传入 "fa-xxx fa-solid" 等 class
20
+ // type=lucide:name 直接传入 lucide 的 icon name(如 "activity")
21
+ // type=sprite:使用雪碧图(prefix + name)
22
+ type: { type: String, default: "inline" },
23
+ name: { type: String, default: "" },
24
+ path: { type: String, default: "" },
25
+ prefix: { type: String, default: "icon-" }, // 与插件的 symbolId 前缀一致
26
+ size: { type: [Number, String], default: 24 }, // 图标大小,单位 px
27
+ },
28
+ computed: {
29
+ renderMode() {
30
+ const t = (this.type || "").trim();
31
+ if (!t) return this.path ? "inline" : "";
32
+ if (t === "font-awesome") return this.name ? "font-awesome" : "";
33
+ if (t === "lucide") return this.name ? "lucide" : "";
34
+ if (t === "sprite") return this.name ? "sprite" : "";
35
+ return this.name ? "sprite" : "";
36
+ },
37
+ sizePx() {
38
+ if (typeof this.size === "number") return `${this.size}px`;
39
+ if (!this.size) return "24px";
40
+ return String(this.size).match(/^\d+$/) ? `${this.size}px` : String(this.size);
41
+ },
42
+ fontSizeStyle() {
43
+ return { fontSize: this.sizePx };
44
+ },
45
+ boxStyle() {
46
+ return { width: this.sizePx, height: this.sizePx };
47
+ },
48
+ symbolId() {
49
+ return `#${this.prefix}${this.name}`;
50
+ },
51
+ },
52
+ };
53
+ </script>
@@ -4,7 +4,7 @@
4
4
  <img svg-inline src="../../assets/img/leftsidebar/fans.svg" />
5
5
  <span>粉丝榜</span>
6
6
  </div>
7
- <div class="f-avatar">
7
+ <div class="f-avatar" v-if="list && list.length">
8
8
  <el-tooltip
9
9
  class="item"
10
10
  effect="dark"
@@ -21,7 +21,9 @@
21
21
  </div>
22
22
  <div class="f-bottom">
23
23
  粉丝数: <span class="u-count">{{ fans_count }}</span
24
- ><template v-if="boxcoin_count">,累计收到盒币打赏: <span class="u-count">{{ boxcoin_count }}</span></template>
24
+ ><template v-if="boxcoin_count"
25
+ >,累计收到盒币打赏: <span class="u-count">{{ boxcoin_count }}</span></template
26
+ >
25
27
  </div>
26
28
  </div>
27
29
  </template>
@@ -33,7 +35,7 @@ export default {
33
35
  name: "AuthorFans",
34
36
  props: {
35
37
  uid: {
36
- type: Number,
38
+ type: [Number, String],
37
39
  default: 0,
38
40
  },
39
41
  },
@@ -148,15 +150,23 @@ export default {
148
150
  }
149
151
  }
150
152
  .f-avatar {
151
- height: 30px;
153
+ display: flex;
154
+ align-items: center;
155
+ flex-wrap: wrap;
156
+ gap: 5px;
157
+ margin-bottom: 6px;
158
+ line-height: 1;
152
159
  .f-avatar-num {
153
160
  .fz(12px);
154
161
  color: #888;
155
162
  font-weight: 700;
156
163
  }
157
- .u-fan{
164
+ .u-fan {
158
165
  .mr(5px);
159
166
  }
167
+ .el-tooltip {
168
+ display: inline-flex;
169
+ }
160
170
  }
161
171
  .f-bottom {
162
172
  .mt(5px);
@@ -37,7 +37,7 @@ export default {
37
37
  name: "AuthorFollow",
38
38
  props: {
39
39
  uid: {
40
- type: Number,
40
+ type: [Number, String],
41
41
  default: 0,
42
42
  },
43
43
  },
@@ -7,16 +7,11 @@
7
7
  :disabled="isSelf || !status"
8
8
  :title="btnTitle"
9
9
  plain
10
+ size="small"
10
11
  >赠礼</el-button
11
12
  >
12
13
 
13
- <el-dialog
14
- title="赠礼"
15
- v-model="visible"
16
- :append-to-body="true"
17
- class="c-author-gift-dialog"
18
- v-if="status"
19
- >
14
+ <el-dialog title="赠礼" v-model="visible" :append-to-body="true" class="c-author-gift-dialog" v-if="status">
20
15
  <div class="u-content">
21
16
  <div class="u-left">
22
17
  <em class="u-label">🌟 金箔</em>
@@ -27,7 +22,7 @@
27
22
  <em class="u-label">❤️ 赠送</em>
28
23
  <div class="u-points">
29
24
  <el-radio-group v-model="count">
30
- <el-radio :label="item" v-for="item in fitPoints" :key="item" border>
25
+ <el-radio :value="item" v-for="item in fitPoints" :key="item" border>
31
26
  <b>{{ item }}</b
32
27
  >金箔
33
28
  </el-radio>
@@ -64,7 +59,12 @@ import User from "@jx3box/jx3box-common/js/user";
64
59
  import { sendCny, checkCnyStatus, checkGiftStatus } from "../../service/thx";
65
60
  export default {
66
61
  name: "AuthorGift",
67
- props: ["uid"],
62
+ props: {
63
+ uid: {
64
+ type: [Number, String],
65
+ default: 0,
66
+ },
67
+ },
68
68
  components: {},
69
69
  data: function () {
70
70
  return {
@@ -8,10 +8,15 @@ import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
8
8
  import { getUserHonor } from "../../service/cms";
9
9
  import { inRange } from "lodash";
10
10
 
11
- const { __imgPath, __Root } = JX3BOX;
11
+ const { __cdn, __Root } = JX3BOX;
12
12
  const HONOR_IMG_KEY = "honor_img";
13
13
  export default {
14
- props: ["uid"],
14
+ props: {
15
+ uid: {
16
+ type: [Number, String],
17
+ default: 0,
18
+ },
19
+ },
15
20
  data: function () {
16
21
  return {
17
22
  honor: "",
@@ -35,12 +40,9 @@ export default {
35
40
  },
36
41
  methods: {
37
42
  imgUrl: function () {
38
- let item = this.honor;
43
+ let item = this.honor?.honor_info;
39
44
  if (!item) return;
40
- if (item.isImgIndex) {
41
- return __imgPath + `decoration/honor/${item.img}/${item.img}_${item.imgIndex}.${item.img_ext}`;
42
- }
43
- return __imgPath + `decoration/honor/${item.img}/${item.img}.${item.img_ext}`;
45
+ return __cdn + `design/decoration/honor/${item.img}/${item.img}.${item.img_ext}`;
44
46
  },
45
47
  getHonor() {
46
48
  let user_id = this.uid;
@@ -72,7 +74,6 @@ export default {
72
74
  let ranking = honorConfig.ranking;
73
75
  let honorStr = honorConfig.year || "";
74
76
 
75
- console.log(honorConfig, regPrefix);
76
77
  if (!only) {
77
78
  if (regPrefix) {
78
79
  honorStr = honorStr + (data[regPrefix[0].slice(1, -1)] || "");
@@ -62,7 +62,16 @@ import Honor from "./AuthorHonor.vue";
62
62
  const { __imgPath, __userLevelColor } = JX3BOX;
63
63
  export default {
64
64
  name: "AuthorInfo",
65
- props: ["uid", "anonymous"],
65
+ props: {
66
+ uid: {
67
+ type: [Number, String],
68
+ default: 0,
69
+ },
70
+ anonymous: {
71
+ type: [Number, String],
72
+ default: 0,
73
+ },
74
+ },
66
75
  components: {
67
76
  Avatar,
68
77
  Honor,
@@ -38,7 +38,14 @@ const { tvLink } = utilModule;
38
38
 
39
39
  export default {
40
40
  name: "AuthorLink",
41
- props: ["data"],
41
+ props: {
42
+ data: {
43
+ type: Object,
44
+ default: function () {
45
+ return {};
46
+ },
47
+ },
48
+ },
42
49
  components: {
43
50
  // AuthorMsg
44
51
  },
@@ -11,10 +11,8 @@
11
11
  <ul class="u-list" v-if="data && data.length">
12
12
  <li v-for="(item, i) in data" :key="i">
13
13
  <a class="u-item" :href="url(item.ID, item.post_type)" target="_blank">
14
- <span>
15
- <img svg-inline src="../../assets/img/leftsidebar/arrow.svg" class="u-icon" />
16
- {{ item.post_title || item.post_type + "/无标题" }}
17
- </span>
14
+ <img svg-inline src="../../assets/img/leftsidebar/arrow.svg" class="u-icon" />
15
+ <span class="u-title">{{ item.post_title || item.post_type + "/无标题" }}</span>
18
16
  </a>
19
17
  </li>
20
18
  </ul>
@@ -74,7 +72,9 @@ export default {
74
72
  .db;
75
73
  }
76
74
  .u-item {
77
- .db;
75
+ .flex;
76
+ align-items: center;
77
+ gap: 5px;
78
78
  padding: 3px 2px;
79
79
  .nobreak;
80
80
  .fz(12px,2);
@@ -82,9 +82,7 @@ export default {
82
82
  border-bottom: 1px solid transparent;
83
83
  &:hover {
84
84
  color: @pink;
85
- // background-color:#fff;
86
- // border-bottom: 1px solid @border;
87
- .u-icon{
85
+ .u-icon {
88
86
  transform: translateX(5px);
89
87
  }
90
88
  }
@@ -94,9 +92,17 @@ export default {
94
92
  .size(12px);
95
93
  // .y;
96
94
  color: #999;
95
+ flex: 0 0 auto;
97
96
  // .mr(5px);
98
97
  transition: all 0.3s;
99
98
  }
99
+ .u-title {
100
+ flex: 1 1 auto;
101
+ min-width: 0;
102
+ overflow: hidden;
103
+ text-overflow: ellipsis;
104
+ white-space: nowrap;
105
+ }
100
106
 
101
107
  .u-label {
102
108
  .pr;