@jx3box/jx3box-ui 0.0.1

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 (408) hide show
  1. package/.env +6 -0
  2. package/README.md +4 -0
  3. package/assets/css/bread/admin.less +131 -0
  4. package/assets/css/bread/breadcrumb.less +163 -0
  5. package/assets/css/bread/crumb.less +17 -0
  6. package/assets/css/comment/quick-reply.less +56 -0
  7. package/assets/css/common/bottom.less +21 -0
  8. package/assets/css/common/footer.less +78 -0
  9. package/assets/css/common/left-sidebar.less +137 -0
  10. package/assets/css/common/main.less +75 -0
  11. package/assets/css/common/right-sidebar.less +193 -0
  12. package/assets/css/common/suspend-common.less +343 -0
  13. package/assets/css/editor/article.less +36 -0
  14. package/assets/css/editor/combo.less +311 -0
  15. package/assets/css/editor/resource.less +335 -0
  16. package/assets/css/editor/tinymce.less +80 -0
  17. package/assets/css/editor/upload.less +111 -0
  18. package/assets/css/filters/client-by.less +33 -0
  19. package/assets/css/header/box.less +181 -0
  20. package/assets/css/interact/like2.less +20 -0
  21. package/assets/css/interact/share2.less +101 -0
  22. package/assets/css/mixin.less +64 -0
  23. package/assets/css/module/author.less +190 -0
  24. package/assets/css/module/buff.less +78 -0
  25. package/assets/css/module/directory.less +143 -0
  26. package/assets/css/module/icon.less +21 -0
  27. package/assets/css/module/item.less +229 -0
  28. package/assets/css/module/item_simple.less +51 -0
  29. package/assets/css/module/jx3_element.less +4 -0
  30. package/assets/css/module/macro.less +72 -0
  31. package/assets/css/module/npc.less +220 -0
  32. package/assets/css/module/resource.less +80 -0
  33. package/assets/css/module/skill.less +65 -0
  34. package/assets/css/module/talent.less +424 -0
  35. package/assets/css/single/author.less +101 -0
  36. package/assets/css/single/cms-single.less +55 -0
  37. package/assets/css/single/thx.less +230 -0
  38. package/assets/css/tinymce/_.less +28 -0
  39. package/assets/css/tinymce/a.less +29 -0
  40. package/assets/css/tinymce/code.less +159 -0
  41. package/assets/css/tinymce/combo.less +86 -0
  42. package/assets/css/tinymce/fold.less +70 -0
  43. package/assets/css/tinymce/h.less +58 -0
  44. package/assets/css/tinymce/hr.less +9 -0
  45. package/assets/css/tinymce/img.less +16 -0
  46. package/assets/css/tinymce/imgpreview.less +14 -0
  47. package/assets/css/tinymce/latex.less +43 -0
  48. package/assets/css/tinymce/list.less +65 -0
  49. package/assets/css/tinymce/macro.less +40 -0
  50. package/assets/css/tinymce/nextpage.less +65 -0
  51. package/assets/css/tinymce/p.less +8 -0
  52. package/assets/css/tinymce/plugin.less +3 -0
  53. package/assets/css/tinymce/pz.less +39 -0
  54. package/assets/css/tinymce/qixue.less +39 -0
  55. package/assets/css/tinymce/quote.less +12 -0
  56. package/assets/css/tinymce/table.less +59 -0
  57. package/assets/css/tinymce/video.less +61 -0
  58. package/assets/css/var.less +1 -0
  59. package/assets/data/box.json +184 -0
  60. package/assets/data/box2.json +606 -0
  61. package/assets/data/detach_type.json +29 -0
  62. package/assets/data/game_font.json +242 -0
  63. package/assets/data/nav.json +12 -0
  64. package/assets/data/panel.json +27 -0
  65. package/assets/data/reply_template.json +6 -0
  66. package/assets/data/weapon_type.json +20 -0
  67. package/assets/data/zlp.json +5 -0
  68. package/assets/img/author/bilibili.png +0 -0
  69. package/assets/img/author/bilibili.svg +1 -0
  70. package/assets/img/author/chat.png +0 -0
  71. package/assets/img/author/douyu.png +0 -0
  72. package/assets/img/author/douyu.svg +1 -0
  73. package/assets/img/author/github.svg +1 -0
  74. package/assets/img/author/huya.png +0 -0
  75. package/assets/img/author/huya.svg +1 -0
  76. package/assets/img/author/msg.svg +55 -0
  77. package/assets/img/author/tuilan.png +0 -0
  78. package/assets/img/author/weibo.svg +70 -0
  79. package/assets/img/bread/menu.svg +1 -0
  80. package/assets/img/comment/comment.svg +1 -0
  81. package/assets/img/comment/heart_1.svg +1 -0
  82. package/assets/img/comment/heart_2.svg +1 -0
  83. package/assets/img/comment/hide.svg +1 -0
  84. package/assets/img/common/add.svg +1 -0
  85. package/assets/img/common/android.svg +1 -0
  86. package/assets/img/common/bell.svg +1 -0
  87. package/assets/img/common/bilibili-black.svg +1 -0
  88. package/assets/img/common/bilibili.svg +1 -0
  89. package/assets/img/common/check.svg +1 -0
  90. package/assets/img/common/coin.svg +1 -0
  91. package/assets/img/common/coupon.svg +56 -0
  92. package/assets/img/common/douyin.svg +1 -0
  93. package/assets/img/common/edit.svg +1 -0
  94. package/assets/img/common/followus.svg +18 -0
  95. package/assets/img/common/gift.svg +1 -0
  96. package/assets/img/common/harmony.svg +1 -0
  97. package/assets/img/common/ios.svg +1 -0
  98. package/assets/img/common/jx3-origin.svg +15 -0
  99. package/assets/img/common/jx3-www.svg +9 -0
  100. package/assets/img/common/lang.svg +6 -0
  101. package/assets/img/common/logo.svg +5 -0
  102. package/assets/img/common/manage.svg +1 -0
  103. package/assets/img/common/miniprogram.jpg +0 -0
  104. package/assets/img/common/miniprogram.svg +1 -0
  105. package/assets/img/common/mp.jpg +0 -0
  106. package/assets/img/common/msg.svg +1 -0
  107. package/assets/img/common/news.svg +20 -0
  108. package/assets/img/common/qqbot.svg +7 -0
  109. package/assets/img/common/qrcode.svg +1 -0
  110. package/assets/img/common/search-key-slash.svg +5 -0
  111. package/assets/img/common/send.svg +56 -0
  112. package/assets/img/common/setting.svg +1 -0
  113. package/assets/img/common/vip.svg +1 -0
  114. package/assets/img/common/wechat.svg +48 -0
  115. package/assets/img/common/weibo.svg +70 -0
  116. package/assets/img/editor/buff.svg +1 -0
  117. package/assets/img/editor/file.svg +51 -0
  118. package/assets/img/editor/icons.svg +15 -0
  119. package/assets/img/editor/item.svg +46 -0
  120. package/assets/img/editor/jx3.svg +11 -0
  121. package/assets/img/editor/jx3box.svg +5 -0
  122. package/assets/img/editor/skill.svg +53 -0
  123. package/assets/img/editor/view.svg +1 -0
  124. package/assets/img/footer/android.svg +1 -0
  125. package/assets/img/footer/china.svg +1 -0
  126. package/assets/img/footer/harmony.svg +1 -0
  127. package/assets/img/footer/ios.svg +1 -0
  128. package/assets/img/footer/logo.svg +5 -0
  129. package/assets/img/footer/miniprogram.svg +1 -0
  130. package/assets/img/footer/qqbot.svg +7 -0
  131. package/assets/img/header/add.svg +1 -0
  132. package/assets/img/header/bell.svg +1 -0
  133. package/assets/img/header/check.svg +1 -0
  134. package/assets/img/header/coin.svg +1 -0
  135. package/assets/img/header/edit.svg +1 -0
  136. package/assets/img/header/gift.svg +1 -0
  137. package/assets/img/header/logo.svg +5 -0
  138. package/assets/img/header/manage.svg +1 -0
  139. package/assets/img/header/msg.svg +1 -0
  140. package/assets/img/header/search-key-slash.svg +5 -0
  141. package/assets/img/header/send.svg +56 -0
  142. package/assets/img/header/setting.svg +1 -0
  143. package/assets/img/header/translator.svg +1 -0
  144. package/assets/img/header/vip.svg +1 -0
  145. package/assets/img/leftsidebar/arrow.svg +64 -0
  146. package/assets/img/leftsidebar/close.svg +49 -0
  147. package/assets/img/leftsidebar/fans.svg +1 -0
  148. package/assets/img/leftsidebar/medal.svg +1 -0
  149. package/assets/img/leftsidebar/more.svg +50 -0
  150. package/assets/img/leftsidebar/open.svg +51 -0
  151. package/assets/img/leftsidebar/post.svg +46 -0
  152. package/assets/img/leftsidebar/team.svg +1 -0
  153. package/assets/img/leftsidebar/united.svg +1 -0
  154. package/assets/img/list/post.svg +1 -0
  155. package/assets/img/mobile/miniprogram.jpg +0 -0
  156. package/assets/img/mobile/mp.jpg +0 -0
  157. package/assets/img/npc/attack.svg +69 -0
  158. package/assets/img/npc/buff.svg +20 -0
  159. package/assets/img/npc/energy.svg +1 -0
  160. package/assets/img/npc/miss.svg +1 -0
  161. package/assets/img/npc/npc.svg +1 -0
  162. package/assets/img/npc/radar.svg +45 -0
  163. package/assets/img/npc/shield.svg +1 -0
  164. package/assets/img/npc/sight.svg +1 -0
  165. package/assets/img/npc/skull.svg +15 -0
  166. package/assets/img/npc/target.svg +55 -0
  167. package/assets/img/price/jin.png +0 -0
  168. package/assets/img/price/tong.png +0 -0
  169. package/assets/img/price/yin.png +0 -0
  170. package/assets/img/price/zhuan.png +0 -0
  171. package/assets/img/rightsidebar/ac.svg +1 -0
  172. package/assets/img/rightsidebar/github.svg +1 -0
  173. package/assets/img/rightsidebar/repo.svg +1 -0
  174. package/assets/img/rightsidebar/topic_bg.svg +1 -0
  175. package/assets/img/rightsidebar/topic_bg_bps.svg +113 -0
  176. package/assets/img/single/author.svg +1 -0
  177. package/assets/img/single/directory-header.svg +1 -0
  178. package/assets/img/single/lock.svg +1 -0
  179. package/assets/img/single/modate.svg +24 -0
  180. package/assets/img/single/podate.svg +23 -0
  181. package/assets/img/single/ticket.svg +1 -0
  182. package/assets/img/suspend/ArrowsLeftRight.svg +1 -0
  183. package/assets/img/suspend/circle.svg +7 -0
  184. package/assets/img/suspend/collect.svg +1 -0
  185. package/assets/img/suspend/collect_slash.svg +1 -0
  186. package/assets/img/suspend/collect_slash_touchbar.svg +1 -0
  187. package/assets/img/suspend/collect_slash_touchbar_100.svg +1 -0
  188. package/assets/img/suspend/collect_touchbar.svg +1 -0
  189. package/assets/img/suspend/collect_touchbar_100.svg +1 -0
  190. package/assets/img/suspend/lafter_touchbar.svg +1 -0
  191. package/assets/img/suspend/later-on.svg +1 -0
  192. package/assets/img/suspend/line.svg +3 -0
  193. package/assets/img/suspend/more.svg +1 -0
  194. package/assets/img/suspend/pin_slash_24.svg +1 -0
  195. package/assets/img/suspend/pin_slash_touchbar.svg +1 -0
  196. package/assets/img/suspend/pin_slash_touchbar_24.svg +1 -0
  197. package/assets/img/suspend/pin_slash_touchbar_40.svg +1 -0
  198. package/assets/img/suspend/pin_touchbar.svg +1 -0
  199. package/assets/img/suspend/pin_touchbar_100.svg +1 -0
  200. package/assets/img/suspend/pin_touchbar_24.svg +1 -0
  201. package/assets/img/suspend/report_100.svg +1 -0
  202. package/assets/img/suspend/rss_touchbar.svg +1 -0
  203. package/assets/img/suspend/rss_touchbar_100.svg +1 -0
  204. package/assets/img/suspend/search.svg +3 -0
  205. package/assets/img/suspend/search_touchbar.svg +1 -0
  206. package/assets/img/widget/admin_gift.svg +10 -0
  207. package/assets/img/widget/gift.svg +1 -0
  208. package/assets/img/widget/heart.svg +17 -0
  209. package/assets/img/widget/heart1.svg +1 -0
  210. package/assets/img/widget/heart2.svg +11 -0
  211. package/assets/img/widget/heart3.svg +37 -0
  212. package/assets/img/widget/like.svg +1 -0
  213. package/assets/img/widget/like2.svg +1 -0
  214. package/assets/img/widget/like3.svg +14 -0
  215. package/assets/img/widget/like4.png +0 -0
  216. package/assets/img/widget/like4ing.gif +0 -0
  217. package/assets/img/widget/qq.svg +1 -0
  218. package/assets/img/widget/qr-code.svg +1 -0
  219. package/assets/img/widget/qzone.svg +1 -0
  220. package/assets/img/widget/records.svg +1 -0
  221. package/assets/img/widget/share-link.png +0 -0
  222. package/assets/img/widget/share.svg +13 -0
  223. package/assets/img/widget/share2.svg +19 -0
  224. package/assets/img/widget/star.svg +9 -0
  225. package/assets/img/widget/tieba.svg +1 -0
  226. package/assets/img/widget/unstar.svg +21 -0
  227. package/assets/img/widget/web_heart_animation.png +0 -0
  228. package/assets/img/widget/weibo.svg +1 -0
  229. package/assets/img/widget/weixin.svg +1 -0
  230. package/assets/js/a.js +46 -0
  231. package/assets/js/app.js +7 -0
  232. package/assets/js/code.js +13 -0
  233. package/assets/js/combo.js +40 -0
  234. package/assets/js/directory.js +114 -0
  235. package/assets/js/filter2.js +186 -0
  236. package/assets/js/fold.js +11 -0
  237. package/assets/js/gallery.js +14 -0
  238. package/assets/js/hljs_languages.js +177 -0
  239. package/assets/js/iframe.js +38 -0
  240. package/assets/js/img.js +23 -0
  241. package/assets/js/item/attribute_percent.js +88 -0
  242. package/assets/js/item/bind.js +18 -0
  243. package/assets/js/item/border.js +19 -0
  244. package/assets/js/item/border_quest.js +12 -0
  245. package/assets/js/item/color.js +25 -0
  246. package/assets/js/item/hljs_languages.js +177 -0
  247. package/assets/js/item/icon_url.js +15 -0
  248. package/assets/js/item/second_format.js +19 -0
  249. package/assets/js/jx3_element.js +73 -0
  250. package/assets/js/katex.js +181 -0
  251. package/assets/js/macro.js +16 -0
  252. package/assets/js/nextpage.js +4 -0
  253. package/assets/js/pswp.js +67 -0
  254. package/assets/js/pswp_template.js +66 -0
  255. package/assets/js/pz_iframe.js +30 -0
  256. package/assets/js/qixue.js +28 -0
  257. package/assets/js/renderImgPreview.js +18 -0
  258. package/assets/js/script.js +6 -0
  259. package/assets/js/stat.js +107 -0
  260. package/assets/js/talent2.js +21 -0
  261. package/assets/js/tex-mml-chtml.js +36310 -0
  262. package/assets/js/voice.js +238 -0
  263. package/assets/js/xss.js +130 -0
  264. package/babel.config.js +3 -0
  265. package/docs/README.md +78 -0
  266. package/i18n/index.js +134 -0
  267. package/i18n/messages/en-US.js +124 -0
  268. package/i18n/messages/vi.js +124 -0
  269. package/i18n/messages/zh-CN.js +124 -0
  270. package/i18n/messages/zh-TW.js +124 -0
  271. package/i18n/mixin.js +23 -0
  272. package/index.js +73 -0
  273. package/package.json +97 -0
  274. package/postcss.config.js +3 -0
  275. package/service/admin.js +20 -0
  276. package/service/author.js +94 -0
  277. package/service/breadcrumb.js +13 -0
  278. package/service/cms.js +137 -0
  279. package/service/comment.js +187 -0
  280. package/service/database.js +115 -0
  281. package/service/design.js +13 -0
  282. package/service/enum/CollectionPublic.js +13 -0
  283. package/service/enum/EquipPosition.js +48 -0
  284. package/service/enum/EquipType.js +33 -0
  285. package/service/fav.js +27 -0
  286. package/service/follow.js +55 -0
  287. package/service/github.js +15 -0
  288. package/service/header.js +42 -0
  289. package/service/item.js +22 -0
  290. package/service/resource.js +31 -0
  291. package/service/suspend.js +81 -0
  292. package/service/thx.js +60 -0
  293. package/src/App.vue +212 -0
  294. package/src/Bottom.vue +23 -0
  295. package/src/Box.vue +149 -0
  296. package/src/Breadcrumb.vue +141 -0
  297. package/src/CommonFooter.vue +69 -0
  298. package/src/CommonHeader.vue +270 -0
  299. package/src/Footer.vue +45 -0
  300. package/src/LeftSideToggle.vue +64 -0
  301. package/src/LeftSidebar.vue +123 -0
  302. package/src/Main.vue +48 -0
  303. package/src/RightSidebar.vue +61 -0
  304. package/src/SuspendCommon.vue +705 -0
  305. package/src/author/AuthorFans.vue +170 -0
  306. package/src/author/AuthorFollow.vue +205 -0
  307. package/src/author/AuthorGift.vue +286 -0
  308. package/src/author/AuthorHonor.vue +128 -0
  309. package/src/author/AuthorInfo.vue +245 -0
  310. package/src/author/AuthorLink.vue +113 -0
  311. package/src/author/AuthorMedals.vue +87 -0
  312. package/src/author/AuthorMsg.vue +25 -0
  313. package/src/author/AuthorPosts.vue +114 -0
  314. package/src/author/AuthorRss.vue +160 -0
  315. package/src/author/AuthorTeams.vue +106 -0
  316. package/src/author/Avatar.vue +168 -0
  317. package/src/author/UserPop.vue +198 -0
  318. package/src/bread/Admin.vue +400 -0
  319. package/src/bread/AdminButton.vue +31 -0
  320. package/src/bread/AdminDirectMessage.vue +73 -0
  321. package/src/bread/AdminDrop.vue +155 -0
  322. package/src/bread/Crumb.vue +27 -0
  323. package/src/bread/DesignTask.vue +194 -0
  324. package/src/comment/Avatar.vue +124 -0
  325. package/src/comment/CommentContent.vue +486 -0
  326. package/src/comment/CommentContentSimple.vue +240 -0
  327. package/src/comment/CommentInputForm.vue +182 -0
  328. package/src/comment/CommentWithReply.vue +261 -0
  329. package/src/comment/QuickReply.vue +64 -0
  330. package/src/comment/ReplyForReply.vue +127 -0
  331. package/src/comment/ReplyItem.vue +92 -0
  332. package/src/comment/ReplyList.vue +126 -0
  333. package/src/comment/Upload.vue +108 -0
  334. package/src/editor/Article.vue +230 -0
  335. package/src/editor/BoxResource.vue +441 -0
  336. package/src/editor/Resource.vue +623 -0
  337. package/src/editor/Tinymce.vue +204 -0
  338. package/src/editor/Upload.vue +277 -0
  339. package/src/editor/UploadAlum.vue +176 -0
  340. package/src/editor/UploadBanner.vue +156 -0
  341. package/src/editor/components/Author.vue +322 -0
  342. package/src/editor/components/Avatar.vue +95 -0
  343. package/src/editor/components/Buff.vue +80 -0
  344. package/src/editor/components/Combo.vue +259 -0
  345. package/src/editor/components/Equip.vue +299 -0
  346. package/src/editor/components/GameText.vue +242 -0
  347. package/src/editor/components/Item.vue +325 -0
  348. package/src/editor/components/ItemSimple.vue +134 -0
  349. package/src/editor/components/Medal.vue +43 -0
  350. package/src/editor/components/Npc.vue +215 -0
  351. package/src/editor/components/PostAuthor.vue +102 -0
  352. package/src/editor/components/Skill.vue +71 -0
  353. package/src/filters/clientBy.vue +96 -0
  354. package/src/filters/markBy.vue +177 -0
  355. package/src/filters/menuBy.vue +63 -0
  356. package/src/filters/orderBy.vue +170 -0
  357. package/src/filters/tagBy.vue +171 -0
  358. package/src/filters/topicBy.vue +151 -0
  359. package/src/filters/versionBy.vue +49 -0
  360. package/src/filters/zlpBy.vue +70 -0
  361. package/src/footer/copyright.vue +59 -0
  362. package/src/footer/links.vue +79 -0
  363. package/src/footer/official.vue +142 -0
  364. package/src/footer/resource.vue +146 -0
  365. package/src/header/alternate.vue +299 -0
  366. package/src/header/asset.vue +180 -0
  367. package/src/header/box.vue +161 -0
  368. package/src/header/box2.vue +479 -0
  369. package/src/header/bus.js +9 -0
  370. package/src/header/client.vue +183 -0
  371. package/src/header/lang.vue +136 -0
  372. package/src/header/logo.vue +95 -0
  373. package/src/header/manage.vue +200 -0
  374. package/src/header/message.vue +93 -0
  375. package/src/header/nav.vue +356 -0
  376. package/src/header/publish.vue +38 -0
  377. package/src/header/search.vue +120 -0
  378. package/src/header/search_map.json +3 -0
  379. package/src/header/shop.vue +121 -0
  380. package/src/header/user.vue +250 -0
  381. package/src/header/userInfo.vue +621 -0
  382. package/src/header/utils.js +126 -0
  383. package/src/header/vip.vue +120 -0
  384. package/src/interact/BoxcoinAdmin.vue +185 -0
  385. package/src/interact/BoxcoinRecords.vue +153 -0
  386. package/src/interact/BoxcoinUser.vue +194 -0
  387. package/src/interact/Contributors.vue +111 -0
  388. package/src/interact/Fav.vue +95 -0
  389. package/src/interact/Like.vue +61 -0
  390. package/src/interact/Rss.vue +163 -0
  391. package/src/interact/Share.vue +166 -0
  392. package/src/interact/WatchLater.vue +108 -0
  393. package/src/main.js +72 -0
  394. package/src/single/Author.vue +72 -0
  395. package/src/single/Collection.vue +176 -0
  396. package/src/single/Comment.vue +454 -0
  397. package/src/single/Creators.vue +214 -0
  398. package/src/single/PostDirectory.vue +147 -0
  399. package/src/single/PostHeader.vue +397 -0
  400. package/src/single/PostTopic.vue +127 -0
  401. package/src/single/SimpleThx.vue +217 -0
  402. package/src/single/Thx.vue +260 -0
  403. package/src/single/cms-single.vue +235 -0
  404. package/tailwind.config.js +13 -0
  405. package/utils/bus.js +5 -0
  406. package/utils/emotion.js +21 -0
  407. package/utils/index.js +36 -0
  408. package/vue.config.js +158 -0
@@ -0,0 +1,217 @@
1
+ <template>
2
+ <div class="w-thx">
3
+ <div class="w-thx-panel">
4
+ <boxcoin-admin
5
+ :postId="postId"
6
+ :postType="postType"
7
+ v-if="hasRight && adminBoxcoinEnable && boxcoin_enable"
8
+ :userId="userId"
9
+ :max="admin_max"
10
+ :min="admin_min"
11
+ :own="admin_left"
12
+ :total="admin_total"
13
+ :points="admin_points"
14
+ :authors="authors"
15
+ @updateRecord="updateRecord"
16
+ :client="client"
17
+ />
18
+ <Like :postId="postId" :postType="postType"></Like>
19
+ <fav :postId="postId" :postType="postType" :postTitle="postTitle"></fav>
20
+ <boxcoin-user
21
+ :postId="postId"
22
+ :postType="postType"
23
+ :boxcoin="boxcoin"
24
+ :userId="userId"
25
+ :own="user_left"
26
+ :points="user_points"
27
+ :authors="authors"
28
+ v-if="userBoxcoinEnable && boxcoin_enable && allowGift"
29
+ @updateRecord="updateRecord"
30
+ :client="client"
31
+ />
32
+ <el-tooltip effect="dark" content="打赏记录" placement="top-start">
33
+ <!-- <div class="w-boxcoin-block"> -->
34
+ <img
35
+ src="../../assets/img/widget/records.svg"
36
+ svg-inline
37
+ class="u-record-icon"
38
+ alt=""
39
+ @click="onRecord"
40
+ />
41
+ <!-- </div> -->
42
+ </el-tooltip>
43
+ </div>
44
+
45
+ <el-drawer v-model="showDrawer" title="打赏记录" append-to-body>
46
+ <BoxcoinRecords
47
+ :postId="postId"
48
+ :postType="postType"
49
+ :postClient="client"
50
+ :cacheRecord="cacheRecord"
51
+ :mode="mode"
52
+ @update:boxcoin="updateBoxcoin"
53
+ />
54
+ </el-drawer>
55
+ </div>
56
+ </template>
57
+
58
+ <script>
59
+ import Like from "../interact/Like.vue";
60
+ import Fav from "../interact/Fav.vue";
61
+ import BoxcoinAdmin from "../interact/BoxcoinAdmin.vue";
62
+ import BoxcoinUser from "../interact/BoxcoinUser.vue";
63
+ import BoxcoinRecords from "../interact/BoxcoinRecords.vue";
64
+ import User from "@jx3box/jx3box-common/js/user";
65
+ import { getBoxcoinStatus, getPostBoxcoinConfig } from "../../service/thx";
66
+
67
+ export default {
68
+ name: "SimpleThx",
69
+ components: {
70
+ Like,
71
+ Fav,
72
+ BoxcoinAdmin,
73
+ BoxcoinUser,
74
+ BoxcoinRecords,
75
+ },
76
+ props: {
77
+ type: {
78
+ type: String,
79
+ default: "normal",
80
+ },
81
+ postId: {
82
+ type: Number,
83
+ default: 0,
84
+ },
85
+ postType: {
86
+ type: String,
87
+ default: "",
88
+ },
89
+ postTitle: {
90
+ type: String,
91
+ default: "",
92
+ },
93
+ userId: {
94
+ type: Number,
95
+ default: 0,
96
+ },
97
+ authors: {
98
+ type: Array,
99
+ default: () => [],
100
+ },
101
+ mode: {
102
+ type: String,
103
+ default: "normal",
104
+ },
105
+ client: {
106
+ type: String,
107
+ default: "std",
108
+ },
109
+ allowGift: {
110
+ type: [Number, Boolean],
111
+ default: 1,
112
+ },
113
+ adminBoxcoinEnable: {
114
+ type: Boolean,
115
+ default: false,
116
+ },
117
+ userBoxcoinEnable: {
118
+ type: Boolean,
119
+ default: false,
120
+ },
121
+ presetConfig: {
122
+ type: Object,
123
+ default: () => ({}),
124
+ },
125
+ },
126
+ data: function () {
127
+ return {
128
+ boxcoin: 0,
129
+ hasRight: User.getInfo().group >= 32,
130
+ user: User.getInfo(),
131
+
132
+ admin_max: 0,
133
+ admin_min: 0,
134
+ admin_left: 0,
135
+ admin_total: 0,
136
+ admin_points: [100],
137
+
138
+ user_left: 0,
139
+ user_points: [100],
140
+
141
+ cacheRecord: null,
142
+ boxcoin_enable: 0,
143
+
144
+ showDrawer: false,
145
+ };
146
+ },
147
+ computed: {
148
+ post_keys: function () {
149
+ return [this.postId, this.postType];
150
+ },
151
+ },
152
+ watch: {
153
+ post_keys: {
154
+ immediate: true,
155
+ deep: true,
156
+ handler: function () {
157
+ this.postType && this.postId && this.loadBoxcoinConfig();
158
+ },
159
+ },
160
+ },
161
+ methods: {
162
+ loadBoxcoinConfig: function () {
163
+ if (Object.keys(this.presetConfig)?.length) {
164
+ this.admin_max = this.presetConfig.admin_max || 0;
165
+ this.admin_min = this.presetConfig.admin_min || 0;
166
+ this.admin_points = this.presetConfig.admin_points || [10, 1000];
167
+ this.admin_left = this.presetConfig.admin_left || 0;
168
+ this.admin_total = this.presetConfig.admin_total || 0;
169
+
170
+ this.user_points = this.presetConfig.user_points || [10, 1000];
171
+ this.user_left = this.presetConfig.user_left || 0;
172
+ this.boxcoin_enable = this.presetConfig.boxcoin_enable || 0;
173
+ return;
174
+ }
175
+ User.isLogin() &&
176
+ getPostBoxcoinConfig(this.postType).then((res) => {
177
+ this.admin_max = res.data.data.limit.admin_max || 0;
178
+ this.admin_min = res.data.data.limit.admin_min || 0;
179
+ this.admin_points = res.data.data.limit.admin_points || [10, 1000];
180
+ this.admin_left = res.data.data.asManagerBoxCoinRemain || 0;
181
+ this.admin_total = res.data.data.asManagerBoxCoinTotal || 0;
182
+
183
+ this.user_points = res.data.data.limit.user_points || [10, 1000];
184
+ // 根据多端展示剩余币
185
+ // 作品是n端,接受n端币+all币
186
+ if (this.client == "origin") {
187
+ this.user_left = res.data.data.asUserBoxCoinRemainOrigin + res.data.data.asUserBoxCoinRemainAll;
188
+ } else if (this.client == "std") {
189
+ this.user_left = res.data.data.asUserBoxCoinRemainStd + res.data.data.asUserBoxCoinRemainAll;
190
+ } else {
191
+ this.user_left =
192
+ res.data.data.asUserBoxCoinRemainAll +
193
+ res.data.data.asUserBoxCoinRemainStd +
194
+ res.data.data.asUserBoxCoinRemainOrigin;
195
+ }
196
+ });
197
+ getBoxcoinStatus().then((res) => {
198
+ this.boxcoin_enable = !!~~res.data?.data?.val;
199
+ });
200
+ },
201
+ // 用户打赏
202
+ updateRecord: function (data) {
203
+ this.cacheRecord = data;
204
+ },
205
+ onRecord: function () {
206
+ this.showDrawer = true;
207
+ },
208
+ updateBoxcoin: function (data) {
209
+ this.boxcoin = data;
210
+ },
211
+ },
212
+ };
213
+ </script>
214
+
215
+ <style lang="less">
216
+ @import "../../assets/css/single/thx.less";
217
+ </style>
@@ -0,0 +1,260 @@
1
+ <template>
2
+ <div class="w-thx">
3
+ <div class="w-thx-panel">
4
+ <boxcoin-admin
5
+ :postId="postId"
6
+ :postType="postType"
7
+ v-if="hasRight && adminBoxcoinEnable && boxcoin_enable && hasPermission"
8
+ :userId="userId"
9
+ :max="admin_max"
10
+ :min="admin_min"
11
+ :own="admin_left"
12
+ :total="admin_total"
13
+ :points="admin_points"
14
+ :authors="authors"
15
+ @updateRecord="updateRecord"
16
+ :client="finalClient"
17
+ :totalLimit="total_limit"
18
+ :postTypeUsed="post_type_used"
19
+ :category="category"
20
+ />
21
+ <Like :postId="postId" :postType="postType"></Like>
22
+ <fav :postId="postId" :postType="postType" :postTitle="postTitle"></fav>
23
+ <Rss v-if="showRss" :type="postType" :id="postId" :title="postTitle"></Rss>
24
+ <boxcoin-user
25
+ :postId="postId"
26
+ :postType="postType"
27
+ :boxcoin="boxcoin"
28
+ :userId="userId"
29
+ :own="user_left"
30
+ :points="user_points"
31
+ :authors="authors"
32
+ v-if="userBoxcoinEnable && boxcoin_enable && allowGift"
33
+ @updateRecord="updateRecord"
34
+ :client="finalClient"
35
+ :category="category"
36
+ :can-gift="lvEnough"
37
+ />
38
+ <Share :postId="postId" :postType="postType" :client="client" />
39
+ <watch-later :category="postType" :title="postTitle" :author-id="authorId" :banner="banner" :content-id="contentMetaId"></watch-later>
40
+ </div>
41
+ <div class="w-thx-records">
42
+ <boxcoin-records :postId="postId" :postType="postType" :postClient="finalClient" :cacheRecord="cacheRecord"
43
+ :mode="mode" @update:boxcoin="updateBoxcoin" v-if="showRecord" />
44
+ </div>
45
+ <div class="w-thx-copyright">
46
+ &copy;
47
+ 所有原创作品,著作权归作者所有,所有未经授权的非署名转载或抄袭将有权追究法律责任,所有法律事务由专聘律师代理。<br />
48
+ 签约作者独家特约稿件,及所有魔盒官方评分作品用户一经兑现则视为有偿付费稿件,所有商业稿件的转载引用需同时征得魔盒平台授权。
49
+ </div>
50
+ </div>
51
+ </template>
52
+
53
+ <script>
54
+ import Like from "../interact/Like.vue";
55
+ import Fav from "../interact/Fav.vue";
56
+ import BoxcoinAdmin from "../interact/BoxcoinAdmin.vue";
57
+ import BoxcoinUser from "../interact/BoxcoinUser.vue";
58
+ import BoxcoinRecords from "../interact/BoxcoinRecords.vue";
59
+ import Share from "../interact/Share.vue";
60
+ import WatchLater from "../interact/WatchLater.vue";
61
+ import Rss from "../interact/Rss.vue";
62
+
63
+ import User from "@jx3box/jx3box-common/js/user";
64
+ import { getBoxcoinStatus, getPostBoxcoinConfig } from "../../service/thx";
65
+ import {getConfig,getUserPermission} from "../../service/cms"
66
+
67
+ export default {
68
+ name: "ThxComp",
69
+ components: {
70
+ Like,
71
+ Fav,
72
+ BoxcoinAdmin,
73
+ BoxcoinUser,
74
+ BoxcoinRecords,
75
+ Share,
76
+ WatchLater,
77
+ Rss,
78
+ },
79
+ props: {
80
+ type: {
81
+ type: String,
82
+ default: "normal",
83
+ },
84
+ postId: {
85
+ type: Number,
86
+ default: 0,
87
+ },
88
+ postType: {
89
+ type: String,
90
+ default: "",
91
+ },
92
+ postTitle: {
93
+ type: String,
94
+ default: "",
95
+ },
96
+ userId: {
97
+ type: Number,
98
+ default: 0,
99
+ },
100
+ authors: {
101
+ type: Array,
102
+ default: () => [],
103
+ },
104
+ mode: {
105
+ type: String,
106
+ default: "normal",
107
+ },
108
+ client: {
109
+ type: String,
110
+ default: "std",
111
+ },
112
+ allowGift: {
113
+ type: [Number, Boolean],
114
+ default: 1,
115
+ },
116
+ adminBoxcoinEnable: {
117
+ type: Boolean,
118
+ default: false,
119
+ },
120
+ userBoxcoinEnable: {
121
+ type: Boolean,
122
+ default: false,
123
+ },
124
+ showRss: {
125
+ type: Boolean,
126
+ default: false,
127
+ },
128
+ authorId: {
129
+ type: Number,
130
+ default: 0,
131
+ },
132
+ banner: {
133
+ type: String,
134
+ default: "",
135
+ },
136
+ contentMetaId: {
137
+ type: Number,
138
+ default: 0,
139
+ }
140
+ },
141
+ data: function () {
142
+ return {
143
+ boxcoin: 0,
144
+ hasRight: User.getInfo().group >= 64,
145
+ user: User.getInfo(),
146
+
147
+ admin_max: 0,
148
+ admin_min: 0,
149
+ admin_left: 0,
150
+ admin_total: 0,
151
+ admin_points: [100],
152
+ total_limit: 0,
153
+ post_type_used: 0,
154
+
155
+ user_left: 0,
156
+ user_points: [100],
157
+
158
+ cacheRecord: null,
159
+ boxcoin_enable: 0,
160
+
161
+ showDrawer: false,
162
+
163
+ admin_boxcoin_visible: 1,
164
+ hasPermission: false,
165
+
166
+ lvEnough: false, // 用户等级是否足够
167
+ };
168
+ },
169
+ computed: {
170
+ post_keys: function () {
171
+ return [this.postId, this.postType];
172
+ },
173
+ finalClient: function() {
174
+ if (this.client == 'wujie') {
175
+ return "std"
176
+ }
177
+ return this.client
178
+ },
179
+ showRecord() {
180
+ // 当admin_boxcoin_visible为0时,作者本人和64及以上权限可见打赏记录
181
+ if (this.admin_boxcoin_visible === 0) {
182
+ return this.userId == this.user.uid || this.user.group >= 64;
183
+ }
184
+ return true;
185
+ }
186
+ },
187
+ watch: {
188
+ post_keys: {
189
+ immediate: true,
190
+ deep: true,
191
+ handler: function () {
192
+ this.postType && this.postId && this.loadBoxcoinConfig();
193
+ },
194
+ },
195
+ },
196
+ methods: {
197
+ loadBoxcoinConfig: function () {
198
+ User.isLogin() &&
199
+ getPostBoxcoinConfig(this.postType).then((res) => {
200
+ this.admin_max = res.data.data.limit.admin_max || 0;
201
+ this.admin_min = res.data.data.limit.admin_min || 0;
202
+ this.admin_points = res.data.data.limit.admin_points || [10, 1000];
203
+ this.admin_left = res.data.data.asManagerBoxCoinRemain || 0;
204
+ this.admin_total = res.data.data.asManagerBoxCoinTotal || 0;
205
+ this.total_limit = res.data.data.limit.total_limit || 0;
206
+ this.post_type_used = res.data.data.asPostTypeBoxcoinHasUsedTotalAtCurrentYear || 0;
207
+
208
+ this.user_points = res.data.data.limit.user_points || [10, 1000];
209
+ // 根据多端展示剩余币
210
+ // 作品是n端,接受n端币+all币
211
+ if (this.finalClient == "origin") {
212
+ this.user_left = res.data.data.asUserBoxCoinRemainOrigin + res.data.data.asUserBoxCoinRemainAll;
213
+ } else if (this.finalClient == "std") {
214
+ this.user_left = res.data.data.asUserBoxCoinRemainStd + res.data.data.asUserBoxCoinRemainAll;
215
+ } else {
216
+ this.user_left =
217
+ res.data.data.asUserBoxCoinRemainAll +
218
+ res.data.data.asUserBoxCoinRemainStd +
219
+ res.data.data.asUserBoxCoinRemainOrigin;
220
+ }
221
+ });
222
+ getBoxcoinStatus().then((res) => {
223
+ this.boxcoin_enable = !!~~res.data?.data?.val;
224
+ });
225
+
226
+ getConfig({
227
+ key: 'admin_boxcoin_visible'
228
+ }).then((res) => {
229
+ this.admin_boxcoin_visible = Number(res?.val)
230
+ });
231
+
232
+ getConfig({
233
+ key: `level_has_gift_permission`
234
+ }).then((res) => {
235
+ User.isLogin() && User.getAsset().then((data) => {
236
+ const asset = data;
237
+ this.lvEnough = asset && asset.experience >= Number(res?.val);
238
+ });
239
+ });
240
+
241
+
242
+ User.isLogin() && getUserPermission().then(res => {
243
+ const permissions = res.data.data.permission?.map(item => item.action)
244
+ this.hasPermission = permissions.includes(`manage_boxcoin_${this.postType}`)
245
+ })
246
+ },
247
+ // 用户打赏
248
+ updateRecord: function (data) {
249
+ this.cacheRecord = data;
250
+ },
251
+ updateBoxcoin: function (data) {
252
+ this.boxcoin = data;
253
+ },
254
+ },
255
+ };
256
+ </script>
257
+
258
+ <style lang="less">
259
+ @import "../../assets/css/single/thx.less";
260
+ </style>