@jx3box/jx3box-vue3-ui 0.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 (284) hide show
  1. package/.editorconfig +13 -0
  2. package/.env +1 -0
  3. package/.eslintrc +9 -0
  4. package/.prettierrc +21 -0
  5. package/README.md +1 -0
  6. package/assets/css/admin.less +83 -0
  7. package/assets/css/author.less +86 -0
  8. package/assets/css/bottom.less +21 -0
  9. package/assets/css/box.less +180 -0
  10. package/assets/css/box2.less +150 -0
  11. package/assets/css/breadcrumb.less +155 -0
  12. package/assets/css/client-by.less +33 -0
  13. package/assets/css/cms-single.less +55 -0
  14. package/assets/css/crumb.less +17 -0
  15. package/assets/css/down.less +16 -0
  16. package/assets/css/footer.less +72 -0
  17. package/assets/css/github-repo.less +87 -0
  18. package/assets/css/header.less +532 -0
  19. package/assets/css/icon.less +10 -0
  20. package/assets/css/left-sidebar.less +137 -0
  21. package/assets/css/like.less +80 -0
  22. package/assets/css/like2.less +19 -0
  23. package/assets/css/main.less +67 -0
  24. package/assets/css/mark-by.less +97 -0
  25. package/assets/css/mark.less +34 -0
  26. package/assets/css/menu-by.less +9 -0
  27. package/assets/css/mixin.less +62 -0
  28. package/assets/css/order-by.less +86 -0
  29. package/assets/css/print.less +26 -0
  30. package/assets/css/qrcode.less +70 -0
  31. package/assets/css/right-msg.less +26 -0
  32. package/assets/css/right-sidebar.less +106 -0
  33. package/assets/css/share2.less +99 -0
  34. package/assets/css/sharing.less +26 -0
  35. package/assets/css/tag-by.less +86 -0
  36. package/assets/css/thx.less +213 -0
  37. package/assets/css/var.less +4 -0
  38. package/assets/css/wiki-comments.less +150 -0
  39. package/assets/css/wiki-panel.less +175 -0
  40. package/assets/css/wiki-revisions.less +62 -0
  41. package/assets/data/box.json +184 -0
  42. package/assets/data/box2.json +606 -0
  43. package/assets/data/game_font.json +242 -0
  44. package/assets/data/nav.json +12 -0
  45. package/assets/data/panel.json +27 -0
  46. package/assets/data/zlp.json +5 -0
  47. package/assets/img/author/bilibili.png +0 -0
  48. package/assets/img/author/bilibili.svg +1 -0
  49. package/assets/img/author/chat.png +0 -0
  50. package/assets/img/author/douyu.png +0 -0
  51. package/assets/img/author/douyu.svg +1 -0
  52. package/assets/img/author/github.svg +1 -0
  53. package/assets/img/author/huya.png +0 -0
  54. package/assets/img/author/huya.svg +1 -0
  55. package/assets/img/author/msg.svg +55 -0
  56. package/assets/img/author/tuilan.png +0 -0
  57. package/assets/img/author/weibo.svg +70 -0
  58. package/assets/img/bread/menu.svg +1 -0
  59. package/assets/img/footer/china.svg +1 -0
  60. package/assets/img/header/add.svg +1 -0
  61. package/assets/img/header/bell.svg +1 -0
  62. package/assets/img/header/coin.svg +15 -0
  63. package/assets/img/header/edit.svg +1 -0
  64. package/assets/img/header/logo.svg +5 -0
  65. package/assets/img/header/manage.svg +1 -0
  66. package/assets/img/header/msg.svg +1 -0
  67. package/assets/img/header/search-key-slash.svg +5 -0
  68. package/assets/img/header/send.svg +56 -0
  69. package/assets/img/header/vip.svg +1 -0
  70. package/assets/img/jx3.svg +11 -0
  71. package/assets/img/leftsidebar/arrow.svg +64 -0
  72. package/assets/img/leftsidebar/close.svg +49 -0
  73. package/assets/img/leftsidebar/fans.svg +1 -0
  74. package/assets/img/leftsidebar/medal.svg +1 -0
  75. package/assets/img/leftsidebar/more.svg +50 -0
  76. package/assets/img/leftsidebar/open.svg +51 -0
  77. package/assets/img/leftsidebar/post.svg +46 -0
  78. package/assets/img/leftsidebar/team.svg +1 -0
  79. package/assets/img/leftsidebar/united.svg +1 -0
  80. package/assets/img/list/post.svg +1 -0
  81. package/assets/img/price/jin.png +0 -0
  82. package/assets/img/price/tong.png +0 -0
  83. package/assets/img/price/yin.png +0 -0
  84. package/assets/img/price/zhuan.png +0 -0
  85. package/assets/img/rightsidebar/ac.svg +1 -0
  86. package/assets/img/rightsidebar/github.svg +1 -0
  87. package/assets/img/rightsidebar/repo.svg +1 -0
  88. package/assets/img/single/author.svg +1 -0
  89. package/assets/img/single/lock.svg +1 -0
  90. package/assets/img/single/modate.svg +24 -0
  91. package/assets/img/single/podate.svg +23 -0
  92. package/assets/img/widget/admin_gift.svg +10 -0
  93. package/assets/img/widget/gift.svg +1 -0
  94. package/assets/img/widget/heart.svg +17 -0
  95. package/assets/img/widget/heart1.svg +1 -0
  96. package/assets/img/widget/heart2.svg +11 -0
  97. package/assets/img/widget/heart3.svg +37 -0
  98. package/assets/img/widget/like.svg +1 -0
  99. package/assets/img/widget/like2.svg +1 -0
  100. package/assets/img/widget/like3.svg +14 -0
  101. package/assets/img/widget/qq.svg +1 -0
  102. package/assets/img/widget/qr-code.svg +1 -0
  103. package/assets/img/widget/qzone.svg +1 -0
  104. package/assets/img/widget/share-link.png +0 -0
  105. package/assets/img/widget/share.svg +13 -0
  106. package/assets/img/widget/share2.svg +19 -0
  107. package/assets/img/widget/star.svg +9 -0
  108. package/assets/img/widget/tieba.svg +1 -0
  109. package/assets/img/widget/unstar.svg +21 -0
  110. package/assets/img/widget/web_heart_animation.png +0 -0
  111. package/assets/img/widget/weibo.svg +1 -0
  112. package/assets/img/widget/weixin.svg +1 -0
  113. package/assets/js/app.js +7 -0
  114. package/babel.config.js +3 -0
  115. package/jsconfig.json +17 -0
  116. package/package.json +71 -0
  117. package/public/favicon.ico +0 -0
  118. package/public/image/box/bbs.svg +87 -0
  119. package/public/image/box/bbs__.svg +101 -0
  120. package/public/image/box/bbs_on.svg +88 -0
  121. package/public/image/box/bps.svg +10 -0
  122. package/public/image/box/bps_on.svg +10 -0
  123. package/public/image/box/cj.svg +1 -0
  124. package/public/image/box/cj_on.svg +1 -0
  125. package/public/image/box/collection.svg +1 -0
  126. package/public/image/box/collection_on.svg +1 -0
  127. package/public/image/box/database.svg +22 -0
  128. package/public/image/box/database_on.svg +22 -0
  129. package/public/image/box/dbm.svg +21 -0
  130. package/public/image/box/dbm_on.svg +21 -0
  131. package/public/image/box/exam.svg +35 -0
  132. package/public/image/box/exam_on.svg +35 -0
  133. package/public/image/box/facedata.svg +21 -0
  134. package/public/image/box/facedata_on.svg +21 -0
  135. package/public/image/box/fb.svg +18 -0
  136. package/public/image/box/fb_on.svg +18 -0
  137. package/public/image/box/fbdata.svg +15 -0
  138. package/public/image/box/fbdata_on.svg +15 -0
  139. package/public/image/box/fbdrop.svg +26 -0
  140. package/public/image/box/fbdrop_on.svg +26 -0
  141. package/public/image/box/fbgem.svg +39 -0
  142. package/public/image/box/fbgem_on.svg +39 -0
  143. package/public/image/box/flower.svg +28 -0
  144. package/public/image/box/flower_on.svg +28 -0
  145. package/public/image/box/furniture.svg +32 -0
  146. package/public/image/box/furniture_on.svg +32 -0
  147. package/public/image/box/haste.svg +8 -0
  148. package/public/image/box/haste_on.svg +8 -0
  149. package/public/image/box/home.svg +47 -0
  150. package/public/image/box/home_on.svg +47 -0
  151. package/public/image/box/house.svg +1 -0
  152. package/public/image/box/house_on.svg +1 -0
  153. package/public/image/box/icons.svg +15 -0
  154. package/public/image/box/icons_on.svg +15 -0
  155. package/public/image/box/item.svg +1 -0
  156. package/public/image/box/item_on.svg +1 -0
  157. package/public/image/box/j3dps.svg +28 -0
  158. package/public/image/box/j3dps_on.svg +28 -0
  159. package/public/image/box/j3pz.svg +36 -0
  160. package/public/image/box/j3pz_on.svg +36 -0
  161. package/public/image/box/jx3dat.svg +27 -0
  162. package/public/image/box/jx3dat_on.svg +27 -0
  163. package/public/image/box/keju.svg +30 -0
  164. package/public/image/box/keju_on.svg +30 -0
  165. package/public/image/box/knowledge.svg +52 -0
  166. package/public/image/box/knowledge_on.svg +52 -0
  167. package/public/image/box/macro.svg +15 -0
  168. package/public/image/box/macro_on.svg +18 -0
  169. package/public/image/box/macroeditor.svg +38 -0
  170. package/public/image/box/macroeditor_on.svg +38 -0
  171. package/public/image/box/png/100.png +0 -0
  172. package/public/image/box/png/bbs.png +0 -0
  173. package/public/image/box/png/bbs1.png +0 -0
  174. package/public/image/box/png/bbs2.png +0 -0
  175. package/public/image/box/png/bps.png +0 -0
  176. package/public/image/box/png/cj.png +0 -0
  177. package/public/image/box/png/database.png +0 -0
  178. package/public/image/box/png/drop.png +0 -0
  179. package/public/image/box/png/emotion.png +0 -0
  180. package/public/image/box/png/face.png +0 -0
  181. package/public/image/box/png/fb.png +0 -0
  182. package/public/image/box/png/flog.png +0 -0
  183. package/public/image/box/png/flower.png +0 -0
  184. package/public/image/box/png/furniture.png +0 -0
  185. package/public/image/box/png/gem.png +0 -0
  186. package/public/image/box/png/guishi.png +0 -0
  187. package/public/image/box/png/home.png +0 -0
  188. package/public/image/box/png/house.png +0 -0
  189. package/public/image/box/png/icons.png +0 -0
  190. package/public/image/box/png/item.png +0 -0
  191. package/public/image/box/png/j3pz.png +0 -0
  192. package/public/image/box/png/joker.png +0 -0
  193. package/public/image/box/png/jx3dat.png +0 -0
  194. package/public/image/box/png/jx3datbuilder.png +0 -0
  195. package/public/image/box/png/keju.png +0 -0
  196. package/public/image/box/png/macro.png +0 -0
  197. package/public/image/box/png/macroeditor.png +0 -0
  198. package/public/image/box/png/macroeditor2.png +0 -0
  199. package/public/image/box/png/minami.png +0 -0
  200. package/public/image/box/png/mirror.png +0 -0
  201. package/public/image/box/png/oa.png +0 -0
  202. package/public/image/box/png/pig.png +0 -0
  203. package/public/image/box/png/price.png +0 -0
  204. package/public/image/box/png/qiyu.png +0 -0
  205. package/public/image/box/png/rank2_on.png +0 -0
  206. package/public/image/box/png/role.png +0 -0
  207. package/public/image/box/png/servers.png +0 -0
  208. package/public/image/box/png/share.png +0 -0
  209. package/public/image/box/png/shop.png +0 -0
  210. package/public/image/box/png/skull.png +0 -0
  211. package/public/image/box/png/speed.png +0 -0
  212. package/public/image/box/png/talent.png +0 -0
  213. package/public/image/box/png/team.png +0 -0
  214. package/public/image/box/png/team_on.png +0 -0
  215. package/public/image/box/png/tool.png +0 -0
  216. package/public/image/box/png/translator.png +0 -0
  217. package/public/image/box/png/trophy.png +0 -0
  218. package/public/image/box/png/trophy2.png +0 -0
  219. package/public/image/box/png/wiki.png +0 -0
  220. package/public/image/box/price.svg +19 -0
  221. package/public/image/box/price_on.svg +19 -0
  222. package/public/image/box/qiyu.svg +1 -0
  223. package/public/image/box/qiyu_on.svg +1 -0
  224. package/public/image/box/quest.svg +52 -0
  225. package/public/image/box/quest_on.svg +57 -0
  226. package/public/image/box/rank.svg +36 -0
  227. package/public/image/box/rank_on.svg +36 -0
  228. package/public/image/box/servers.svg +31 -0
  229. package/public/image/box/servers_on.svg +31 -0
  230. package/public/image/box/share.svg +24 -0
  231. package/public/image/box/share_on.svg +24 -0
  232. package/public/image/box/shop.svg +52 -0
  233. package/public/image/box/talent.svg +19 -0
  234. package/public/image/box/talent_on.svg +19 -0
  235. package/public/image/box/team.svg +15 -0
  236. package/public/image/box/team_on.svg +18 -0
  237. package/public/image/box/tool.svg +23 -0
  238. package/public/image/box/tool_on.svg +31 -0
  239. package/public/image/box/translator.svg +55 -0
  240. package/public/image/box/translator_on.svg +55 -0
  241. package/public/image/box/wbl.png +0 -0
  242. package/public/image/box/wbl_on.png +0 -0
  243. package/public/image/box/xls.svg +74 -0
  244. package/public/image/box/xls_on.svg +74 -0
  245. package/public/index.html +24 -0
  246. package/service/admin.js +15 -0
  247. package/service/author.js +79 -0
  248. package/service/breadcrumb.js +13 -0
  249. package/service/cms.js +35 -0
  250. package/service/fav.js +17 -0
  251. package/service/follow.js +55 -0
  252. package/service/github.js +15 -0
  253. package/service/header.js +31 -0
  254. package/service/helper.js +7 -0
  255. package/service/thx.js +60 -0
  256. package/src/App.vue +52 -0
  257. package/src/Bottom.vue +23 -0
  258. package/src/Box.vue +149 -0
  259. package/src/Breadcrumb.vue +118 -0
  260. package/src/Footer.vue +45 -0
  261. package/src/Header.vue +95 -0
  262. package/src/LeftSideToggle.vue +64 -0
  263. package/src/LeftSidebar.vue +123 -0
  264. package/src/Main.vue +48 -0
  265. package/src/RightSidebar.vue +25 -0
  266. package/src/bread/Admin.vue +308 -0
  267. package/src/bread/AdminButton.vue +31 -0
  268. package/src/bread/Crumb.vue +27 -0
  269. package/src/header/Asset.vue +180 -0
  270. package/src/header/ClientSwitch.vue +115 -0
  271. package/src/header/GameSwitch.vue +210 -0
  272. package/src/header/Logo.vue +82 -0
  273. package/src/header/Manage.vue +125 -0
  274. package/src/header/Message.vue +89 -0
  275. package/src/header/Nav.vue +287 -0
  276. package/src/header/Publish.vue +21 -0
  277. package/src/header/Search.vue +81 -0
  278. package/src/header/User.vue +141 -0
  279. package/src/header/UserInfo.vue +175 -0
  280. package/src/header/Vip.vue +27 -0
  281. package/src/main.js +30 -0
  282. package/utils/bus.js +5 -0
  283. package/utils/index.js +31 -0
  284. package/vue.config.js +103 -0
@@ -0,0 +1,13 @@
1
+ import { $helper } from "@jx3box/jx3box-common/js/https_v2.js";
2
+
3
+ function getBreadcrumb(name) {
4
+ return $helper().get(`/api/breadcrumb/${name}`);
5
+ }
6
+
7
+ function getBreadcrumbs(params) {
8
+ return $helper().get(`/api/breadcrumbs`, {
9
+ params: params,
10
+ });
11
+ }
12
+
13
+ export { getBreadcrumb, getBreadcrumbs };
package/service/cms.js ADDED
@@ -0,0 +1,35 @@
1
+ import { $cms } from "@jx3box/jx3box-common/js/https_v2";
2
+ import axios from "axios";
3
+ import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
4
+ function getPostAuthors(post_id) {
5
+ return $cms({ mute: true }).get(`/api/cms/post/${post_id}/authors`);
6
+ }
7
+
8
+ function uploadImage(formData) {
9
+ return $cms().post(`/api/cms/upload/avatar`, formData);
10
+ }
11
+ //获取装扮
12
+ function getDecoration(params) {
13
+ return $cms().get(`/api/cms/user/decoration`, {
14
+ params,
15
+ });
16
+ }
17
+ function getDecorationJson() {
18
+ let url = JX3BOX.__imgPath + "decoration/index.json";
19
+ return axios.get(url);
20
+ }
21
+ function getHonorJson() {
22
+ let url = JX3BOX.__imgPath + "decoration/honor.json";
23
+ return axios.get(url);
24
+ }
25
+ // 通用上传
26
+ function upload(formData) {
27
+ return $cms().post(`/api/cms/upload`, formData);
28
+ }
29
+
30
+ // 检测当前用户是否为团队成员
31
+ function checkTeamMember() {
32
+ return $cms().get(`/api/cms/config/teammates/check`);
33
+ }
34
+
35
+ export { getPostAuthors, uploadImage, upload, getDecoration, getDecorationJson, checkTeamMember, getHonorJson };
package/service/fav.js ADDED
@@ -0,0 +1,17 @@
1
+ import { $next } from "@jx3box/jx3box-common/js/https_v2.js";
2
+ const $n = $next();
3
+
4
+ function hasFav(post_type, post_id) {
5
+ return $n.get(`api/article/favorites/is-my/${post_id}/${post_type}`).then((res) => {
6
+ return res.data.data;
7
+ });
8
+ }
9
+ function addFav(post_type, post_id, post_title) {
10
+ return $n.post(`api/article/favorites/add/${post_id}/${post_type}`, { post_title }).then((res) => {
11
+ return res.data.data;
12
+ });
13
+ }
14
+ function delFav(id) {
15
+ return $n.delete(`api/article/favorites/my/${id}`);
16
+ }
17
+ export { hasFav, addFav, delFav };
@@ -0,0 +1,55 @@
1
+ import { $next } from "@jx3box/jx3box-common/js/https_v2";
2
+
3
+ /**
4
+ * 关注用户
5
+ * @param {*} userId 用户id
6
+ */
7
+ function follow(userId) {
8
+ return $next().post(`/api/my-userlist/follow/${userId}`);
9
+ }
10
+
11
+ /**
12
+ * 取消关注用户
13
+ * @param {*} userId 用户id
14
+ */
15
+ function unfollow(userId) {
16
+ return $next().delete(`/api/my-userlist/follow/${userId}`);
17
+ }
18
+
19
+ /**
20
+ * 获取我的关注列表
21
+ * @param {*} param 参数
22
+ * @param {*} param.pageIndex 页码
23
+ * @param {*} param.pageSize 每页数量
24
+ * @param {*} param.user_id 用户id
25
+ * @param {*} param.display_name 用户昵称
26
+ */
27
+ function getMyFollowList(params) {
28
+ return $next().get(`/api/my-userlist/follow`, {
29
+ params,
30
+ });
31
+ }
32
+
33
+ /**
34
+ * 获取我的粉丝列表
35
+ * @param {*} param 参数
36
+ * @param {*} param.pageIndex 页码
37
+ * @param {*} param.pageSize 每页数量
38
+ * @param {*} param.user_id 用户id
39
+ * @param {*} param.display_name 用户昵称
40
+ */
41
+ function getMyFansList(params) {
42
+ return $next().get(`/api/my-userlist/follow-me`, {
43
+ params,
44
+ });
45
+ }
46
+
47
+ /**
48
+ * 获取某个用户的粉丝数量
49
+ * @param {*} userId 用户id
50
+ */
51
+ function getFansCount(userId) {
52
+ return $next().get(`/api/followers/${userId}/count`);
53
+ }
54
+
55
+ export { follow, unfollow, getMyFollowList, getMyFansList, getFansCount };
@@ -0,0 +1,15 @@
1
+ import axios from "axios";
2
+
3
+ function getRepoInfo(repo) {
4
+ return axios.get(`https://api.github.com/github?repo=${repo}`);
5
+ }
6
+
7
+ function getBuilders(coders) {
8
+ return axios.get(`https://server.jx3box.com/user/list?uid=${coders}`);
9
+ }
10
+
11
+ function getRepoCoders(repo) {
12
+ return axios.get(`https://api.github.com/repos/JX3BOX/${repo}/contributors`);
13
+ }
14
+
15
+ export { getRepoInfo, getBuilders, getRepoCoders };
@@ -0,0 +1,31 @@
1
+ import axios from "axios";
2
+ import { $cms, $next } from "@jx3box/jx3box-common/js/https_v2.js";
3
+ import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
4
+
5
+ function getMsg() {
6
+ return $next({ mute: true }).get("/api/letter/unread/count");
7
+ }
8
+
9
+ function getNav(client = "std") {
10
+ let file = client == "origin" ? "header_nav_origin.json" : "header_nav.json";
11
+ return axios.get(JX3BOX.__dataPath + `data/box/${file}`);
12
+ }
13
+
14
+ function getPanel() {
15
+ return axios.get(JX3BOX.__dataPath + "data/box/header_panel.json");
16
+ }
17
+
18
+ function getBox(client = "std") {
19
+ let filename = client == "origin" ? "box_origin.json" : "box.json";
20
+ return axios.get(JX3BOX.__dataPath + "data/box/" + filename);
21
+ }
22
+
23
+ function getMenu(key) {
24
+ return $cms().get(`/api/cms/config/menu/${key}`);
25
+ }
26
+
27
+ function getGames() {
28
+ return axios.get(JX3BOX.__dataPath + "data/product/games.json");
29
+ }
30
+
31
+ export { getMsg, getNav, getPanel, getBox, getMenu, getGames };
@@ -0,0 +1,7 @@
1
+ import { $helper } from "@jx3box/jx3box-common/js/https_v2";
2
+
3
+ function getCollection(id) {
4
+ return $helper().get(`/api/post/collection/${id}`);
5
+ }
6
+
7
+ export { getCollection };
package/service/thx.js ADDED
@@ -0,0 +1,60 @@
1
+ import { $pay, $cms } from "@jx3box/jx3box-common/js/https_v2";
2
+
3
+ function getPostBoxcoinRecords(postType, postId, params) {
4
+ return $pay().get(`/api/inspire/article/${postType}/${postId}/history`, {
5
+ params,
6
+ });
7
+ }
8
+
9
+ function grantBoxcoin(postType, postId, userId, count, data) {
10
+ return $pay().post(`/api/inspire/article/${postType}/${postId}/manager2creator/${userId}/coins/${count}`, data);
11
+ }
12
+
13
+ function rewardBoxcoin(postType, postId, userId, count, data) {
14
+ return $pay().post(`/api/inspire/article/${postType}/${postId}/user2creator/${userId}/coins/${count}`, data);
15
+ }
16
+
17
+ function recoveryBoxcoin(id) {
18
+ return $pay().delete(`/api/inspire/coins/log/${id}/recovery`);
19
+ }
20
+
21
+ function getPostBoxcoinConfig(postType) {
22
+ return $pay().get(`/api/inspire/article/${postType}/boxcoin/limit`);
23
+ }
24
+
25
+ function getBoxcoinStatus() {
26
+ return $cms().get(`/api/cms/config`, {
27
+ params: {
28
+ key: "boxcoin",
29
+ },
30
+ });
31
+ }
32
+
33
+ function sendCny(payUserId, accessUserId, money, remark) {
34
+ return $pay().post(`/api/cny/consume/user-charge/${payUserId}/to/${accessUserId}/${money}`, { remark });
35
+ }
36
+
37
+ function checkCnyStatus(id) {
38
+ return $pay().get(`/api/cny/consume/check-status/${id}`);
39
+ }
40
+
41
+ function checkGiftStatus(accessUserId) {
42
+ return $pay().get(`/api/cny/consume/user-charge/to/${accessUserId}/check-status`);
43
+ }
44
+
45
+ function batchReward(articleType, count, data) {
46
+ return $pay().post(`/api/inspire/batch/article/${articleType}/coins/${count}`, data);
47
+ }
48
+
49
+ export {
50
+ getPostBoxcoinRecords,
51
+ grantBoxcoin,
52
+ rewardBoxcoin,
53
+ recoveryBoxcoin,
54
+ getPostBoxcoinConfig,
55
+ getBoxcoinStatus,
56
+ sendCny,
57
+ checkCnyStatus,
58
+ checkGiftStatus,
59
+ batchReward,
60
+ };
package/src/App.vue ADDED
@@ -0,0 +1,52 @@
1
+ <template>
2
+ <div class="container-page">
3
+ <Header></Header>
4
+ <breadcrumb
5
+ name="频道名称"
6
+ slug="slug"
7
+ root="/slug"
8
+ :publishEnable="true"
9
+ :feedbackEnable="true"
10
+ :adminEnable="true"
11
+ >
12
+ <template #logo>
13
+ <img svg-inline src="../assets/img/jx3.svg" />
14
+ </template>
15
+ bread info
16
+ </breadcrumb>
17
+ <LeftSidebar :open="true" :uid="8">
18
+ <LeftSideToggle :mobileOnly="true" />
19
+ <!-- <Author :author="author" :uid="37" /> -->
20
+ </LeftSidebar>
21
+
22
+ <Main :withoutLeft="false" :withoutRight="false">
23
+ <RightSidebar> </RightSidebar>
24
+ <Footer></Footer>
25
+ <Bottom></Bottom>
26
+ </Main>
27
+ </div>
28
+ </template>
29
+
30
+ <script>
31
+ import Header from "./Header.vue";
32
+ import Breadcrumb from "./Breadcrumb.vue";
33
+ import Main from "./Main.vue";
34
+ import Footer from "./Footer.vue";
35
+ import LeftSidebar from "./LeftSidebar.vue";
36
+ import LeftSideToggle from "./LeftSideToggle.vue";
37
+ import RightSidebar from "./RightSidebar.vue";
38
+ import Bottom from "./Bottom.vue";
39
+ export default {
40
+ name: "App",
41
+ components: {
42
+ Main,
43
+ Header,
44
+ Footer,
45
+ Breadcrumb,
46
+ LeftSidebar,
47
+ LeftSideToggle,
48
+ RightSidebar,
49
+ Bottom,
50
+ },
51
+ };
52
+ </script>
package/src/Bottom.vue ADDED
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <footer class="m-bottom">
3
+ <a :href="homepage" target="_blank">&copy; JX3BOX.COM</a>
4
+ <a class="u-feedback" :href="feedback" target="_blank">❤ Help</a>
5
+ </footer>
6
+ </template>
7
+
8
+ <script>
9
+ import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
10
+ export default {
11
+ name: "CommonBottom",
12
+ data: function () {
13
+ return {
14
+ homepage: JX3BOX.__Root,
15
+ feedback: JX3BOX.feedback + "&subject=" + location.href,
16
+ };
17
+ },
18
+ };
19
+ </script>
20
+
21
+ <style lang="less">
22
+ @import "../assets/css/bottom.less";
23
+ </style>
package/src/Box.vue ADDED
@@ -0,0 +1,149 @@
1
+ <template>
2
+ <div class="c-jx3box" :class="{ on: status, isOverlay: overlayEnable && isOverlay }">
3
+ <!-- search -->
4
+ <header-search @click.stop />
5
+
6
+ <!-- list -->
7
+ <ul class="u-list">
8
+ <li>
9
+ <a class="u-item" href="/index">
10
+ <img class="u-pic" svg-inline :src="homeicon" />
11
+ <img class="u-pic-hover" svg-inline :src="homeicon" />
12
+ <span class="u-txt">首页</span>
13
+ </a>
14
+ </li>
15
+ <li v-for="(item, i) in list" :key="i" :class="{ 'u-app-start': item.lf }">
16
+ <a class="u-item" :href="item.href" :target="getTarget(item.href)">
17
+ <img class="u-pic" :src="getBoxIcon(item.img)" />
18
+ <!-- <img class="u-pic-hover" svg-inline :src="item.hover | getBoxIcon" /> -->
19
+ <span class="u-txt">{{ item.abbr }}</span>
20
+ </a>
21
+ </li>
22
+ </ul>
23
+ <span class="u-close" @click="closeBox($event)">
24
+ <el-icon><Upload /></el-icon>
25
+ <span>收起</span>
26
+ </span>
27
+ </div>
28
+ </template>
29
+
30
+ <script>
31
+ import _ from "lodash";
32
+ import Bus from "../utils/bus";
33
+ import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
34
+ import box from "../assets/data/box.json";
35
+ import { getMenu } from "../service/header.js";
36
+
37
+ import search from "./header/Search.vue";
38
+ export default {
39
+ name: "CommonBox",
40
+ props: ["overlayEnable"],
41
+ data: function () {
42
+ return {
43
+ status: false,
44
+ isOverlay: false,
45
+ data: box,
46
+ client: location.href.includes("origin") ? "origin" : "std",
47
+ };
48
+ },
49
+ computed: {
50
+ homeicon: function () {
51
+ return JX3BOX.__imgPath + "image/box/home.svg";
52
+ },
53
+ homeicon_hover: function () {
54
+ return JX3BOX.__imgPath + "image/box/home_on.svg";
55
+ },
56
+ originicon: function () {
57
+ return JX3BOX.__imgPath + "image/box/origin.svg";
58
+ },
59
+ list: function () {
60
+ return this.data.filter((item) => {
61
+ return item.status && (item.client == this.client || item.client == "all");
62
+ });
63
+ },
64
+ },
65
+ methods: {
66
+ closeBox: function () {
67
+ Bus.emit("toggleBox", false);
68
+ },
69
+ matchedClient: function (client) {
70
+ return client == "all" ? true : client == this.client;
71
+ },
72
+ getBoxIcon: function (val) {
73
+ return JX3BOX.__imgPath + "image/box/" + val;
74
+ },
75
+ getTarget: function (val) {
76
+ if (window.innerWidth < 768 || val?.startsWith("/")) {
77
+ return "_self";
78
+ } else {
79
+ return "_blank";
80
+ }
81
+ },
82
+ loadMenu() {
83
+ try {
84
+ const _box = JSON.parse(sessionStorage.getItem("box"));
85
+ if (_box) {
86
+ this.data = _box;
87
+ } else {
88
+ getMenu("box").then((res) => {
89
+ this.data = res.data?.data?.val;
90
+ sessionStorage.setItem("box", JSON.stringify(this.data));
91
+ });
92
+ }
93
+ } catch (e) {
94
+ this.data = box;
95
+ console.log("loadBox error", e);
96
+ }
97
+ },
98
+ },
99
+ created: function () {
100
+ if (this.overlayEnable) {
101
+ const vm = this;
102
+ window.addEventListener(
103
+ "scroll",
104
+ _.throttle(() => {
105
+ vm.isOverlay = window.scrollY > 200 ? true : false;
106
+ }, 200)
107
+ );
108
+ }
109
+ this.loadMenu();
110
+ },
111
+ mounted: function () {
112
+ Bus.on("toggleBox", (status) => {
113
+ if (status == undefined) {
114
+ this.status = !this.status;
115
+ } else {
116
+ this.status = status;
117
+ }
118
+ });
119
+ document.addEventListener("click", function () {
120
+ Bus.emit("toggleBox", false);
121
+ });
122
+ },
123
+ components: {
124
+ "header-search": search,
125
+ },
126
+ };
127
+ </script>
128
+
129
+ <style lang="less">
130
+ @import "../assets/css/box.less";
131
+ </style>
132
+
133
+ <style scoped lang="less">
134
+ .c-jx3box {
135
+ .c-header-search {
136
+ float: none;
137
+ .w(auto);
138
+ margin: 0 20px 10px 20px;
139
+ box-sizing: border-box;
140
+ padding: 0;
141
+ .none;
142
+ }
143
+ }
144
+ @media screen and (max-width: @phone) {
145
+ .c-jx3box .c-header-search {
146
+ .db;
147
+ }
148
+ }
149
+ </style>
@@ -0,0 +1,118 @@
1
+ <template>
2
+ <div class="c-breadcrumb" v-if="!isApp">
3
+ <div class="u-menu" @click.stop="toggleLeftSide" v-if="!withoutLeft">
4
+ <img class="u-toggle" :class="{ on: isOpen }" svg-inline src="../assets/img/bread/menu.svg" />
5
+ </div>
6
+ <a class="u-channel" :href="rootLink" :class="{ on: withoutLeft }">
7
+ <i class="u-channel-logo">
8
+ <img :src="getAppIcon(slug)" v-if="!$slots.logo" />
9
+ <slot name="logo"></slot>
10
+ </i>
11
+ <span class="u-title">{{ name }}</span>
12
+ </a>
13
+ <!-- 面包屑内容 -->
14
+ <Crumb :name="slug" v-if="crumbEnable" />
15
+ <slot></slot>
16
+ <div class="u-op">
17
+ <slot name="op-append"></slot>
18
+ <a
19
+ v-if="publishEnable"
20
+ :href="publishLink(slug)"
21
+ class="u-publish el-button el-button--primary el-button--medium u-op-public"
22
+ >
23
+ <el-icon><Edit /></el-icon>
24
+ <span>发布</span>
25
+ </a>
26
+ <a
27
+ v-if="feedbackEnable"
28
+ v-show="isNotAdmin"
29
+ :href="feedback"
30
+ class="u-feedback el-button el-button--primary el-button--medium u-op-public"
31
+ target="_blank"
32
+ >
33
+ <el-icon><InfoFilled /></el-icon>
34
+ <span>反馈</span>
35
+ </a>
36
+ <AdminButton v-if="adminEnable" class="u-admin" />
37
+ <Admin v-if="adminEnable" />
38
+ <slot name="op-prepend"></slot>
39
+ </div>
40
+ </div>
41
+ </template>
42
+
43
+ <script>
44
+ import { throttle } from "lodash";
45
+ import { publishLink, getAppIcon } from "@jx3box/jx3box-common/js/utils";
46
+ import User from "@jx3box/jx3box-common/js/user";
47
+ import Admin from "./bread/Admin";
48
+ import Crumb from "./bread/Crumb";
49
+ import AdminButton from "./bread/AdminButton";
50
+
51
+ import { isApp } from "../assets/js/app.js";
52
+ import Bus from "../utils/bus";
53
+
54
+ export default {
55
+ name: "CommonBreadcrumb",
56
+ props: [
57
+ "name",
58
+ "slug",
59
+ "root",
60
+ "publishEnable",
61
+ "adminEnable",
62
+ "feedbackEnable",
63
+ "overlayEnable",
64
+ "crumbEnable",
65
+ "withoutLeft",
66
+ ],
67
+ data: function () {
68
+ return {
69
+ isOpen: true,
70
+ feedback: "/feedback?refer=" + encodeURIComponent(window.location.href),
71
+ isNotAdmin: !User.isEditor(),
72
+ isOverlay: false,
73
+ isApp: isApp(),
74
+ };
75
+ },
76
+ computed: {
77
+ rootLink: function () {
78
+ return this.root || `/${this.slug}`;
79
+ },
80
+ },
81
+ methods: {
82
+ toggleLeftSide: function () {
83
+ let status = !this.isOpen;
84
+ Bus.emit("toggleLeftSide", status);
85
+ },
86
+ publishLink,
87
+ getAppIcon,
88
+ },
89
+ mounted: function () {
90
+ Bus.on("toggleLeftSide", (data) => {
91
+ this.isOpen = data;
92
+ });
93
+
94
+ if (window.innerWidth < 1024) {
95
+ this.isOpen = false;
96
+ }
97
+
98
+ if (this.overlayEnable) {
99
+ const vm = this;
100
+ window.addEventListener(
101
+ "scroll",
102
+ throttle(() => {
103
+ vm.isOverlay = window.scrollY > 200 ? true : false;
104
+ }, 200)
105
+ );
106
+ }
107
+ },
108
+ components: {
109
+ Admin,
110
+ Crumb,
111
+ AdminButton,
112
+ },
113
+ };
114
+ </script>
115
+
116
+ <style lang="less">
117
+ @import "../assets/css/breadcrumb.less";
118
+ </style>
package/src/Footer.vue ADDED
@@ -0,0 +1,45 @@
1
+ <template>
2
+ <footer class="c-footer" id="c-footer" v-if="!isApp" :class="{ 'is--dark': darkMode }">
3
+ <div class="c-footer-inner">
4
+ <div class="c-footer-left">
5
+ <img class="u-flag" svg-inline src="../assets/img/footer/china.svg" />
6
+ <a href="https://beian.miit.gov.cn/" class="u-beian" target="_blank">湘ICP备2021002288号</a>
7
+ </div>
8
+ <div class="c-footer-right">
9
+ <a class="u-about" :href="about" target="_blank">关于我们</a>
10
+ <em>|</em>
11
+ <a class="u-doc" href="/help" target="_blank">帮助文档</a>
12
+ <em>|</em>
13
+ <a class="u-log" href="https://github.com/JX3BOX" target="_blank">代码仓库</a>
14
+ <em>|</em>
15
+ <a class="u-feedback" :href="feedback" target="_blank">反馈建议</a>
16
+ </div>
17
+ <slot></slot>
18
+ </div>
19
+ </footer>
20
+ </template>
21
+
22
+ <script>
23
+ import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
24
+ import { isApp } from "../assets/js/app.js";
25
+ export default {
26
+ name: "CommonFooter",
27
+ props: {
28
+ darkMode: {
29
+ type: Boolean,
30
+ default: false,
31
+ },
32
+ },
33
+ data: function () {
34
+ return {
35
+ about: JX3BOX.__Root + "about",
36
+ feedback: JX3BOX.feedback + "&subject=" + location.href,
37
+ isApp: isApp(),
38
+ };
39
+ },
40
+ };
41
+ </script>
42
+
43
+ <style lang="less">
44
+ @import "../assets/css/footer.less";
45
+ </style>