vhall-mini-sdk 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (280) hide show
  1. package/lib/components/chat/chat-edit/chat-edit.js +7 -4
  2. package/lib/components/chat/chat-list/chat-list.js +1 -1
  3. package/lib/components/live-landscape/live-landscape.js +11 -7
  4. package/lib/components/live-landscape/live-landscape.wxml +2 -2
  5. package/lib/components/live-portrait/live-portrait.js +11 -7
  6. package/lib/components/live-portrait/live-portrait.wxml +3 -3
  7. package/lib/components/live-portrait/live-portrait.wxss +1 -1
  8. package/lib/components/lottery/lottery.wxml +2 -2
  9. package/lib/components/player/components/online-hot/index.js +2 -2
  10. package/lib/components/player/extensions/observers.js +5 -5
  11. package/lib/components/player/player.js +5 -0
  12. package/lib/components/player/player.wxml +3 -3
  13. package/lib/components/product/product-list/product-list.wxml +3 -11
  14. package/lib/components/signin/signin-dialog.js +1 -0
  15. package/lib/sdk/main/index.js +2 -1
  16. package/lib/sdk/player/index.js +1 -1
  17. package/lib/sdk/plugins/InviteCardServer.js +1 -1
  18. package/lib/sdk/plugins/MallRewardServer.js +1 -1
  19. package/lib/sdk/plugins/ProductServer.js +1 -1
  20. package/lib/shared/RequestUtil.js +1 -1
  21. package/lib/shared/logger.js +1 -1
  22. package/package.json +2 -4
  23. package/postinstall.js +21 -51
  24. package/dist/components/chat/chat-edit/chat-edit.js +0 -127
  25. package/dist/components/chat/chat-edit/chat-edit.json +0 -4
  26. package/dist/components/chat/chat-edit/chat-edit.wxml +0 -7
  27. package/dist/components/chat/chat-edit/chat-edit.wxss +0 -1
  28. package/dist/components/chat/chat-item/chat-item.js +0 -253
  29. package/dist/components/chat/chat-item/chat-item.json +0 -3
  30. package/dist/components/chat/chat-item/chat-item.wxml +0 -96
  31. package/dist/components/chat/chat-item/chat-item.wxss +0 -1
  32. package/dist/components/chat/chat-list/chat-list.js +0 -216
  33. package/dist/components/chat/chat-list/chat-list.json +0 -6
  34. package/dist/components/chat/chat-list/chat-list.wxml +0 -9
  35. package/dist/components/chat/chat-list/chat-list.wxss +0 -1
  36. package/dist/components/chat/chat.js +0 -98
  37. package/dist/components/chat/chat.json +0 -7
  38. package/dist/components/chat/chat.wxml +0 -7
  39. package/dist/components/chat/chat.wxss +0 -1
  40. package/dist/components/gift/gift-display/gift-display.js +0 -118
  41. package/dist/components/gift/gift-display/gift-display.json +0 -3
  42. package/dist/components/gift/gift-display/gift-display.wxml +0 -16
  43. package/dist/components/gift/gift-display/gift-display.wxss +0 -1
  44. package/dist/components/gift/gift-sender/gift-sender.js +0 -63
  45. package/dist/components/gift/gift-sender/gift-sender.json +0 -6
  46. package/dist/components/gift/gift-sender/gift-sender.wxml +0 -19
  47. package/dist/components/gift/gift-sender/gift-sender.wxss +0 -1
  48. package/dist/components/introduction/introduction.js +0 -43
  49. package/dist/components/introduction/introduction.json +0 -3
  50. package/dist/components/introduction/introduction.wxml +0 -8
  51. package/dist/components/introduction/introduction.wxss +0 -1
  52. package/dist/components/invite-rank/img/bronze.png +0 -0
  53. package/dist/components/invite-rank/img/gold.png +0 -0
  54. package/dist/components/invite-rank/img/silver.png +0 -0
  55. package/dist/components/invite-rank/index.js +0 -135
  56. package/dist/components/invite-rank/index.json +0 -8
  57. package/dist/components/invite-rank/index.wxml +0 -42
  58. package/dist/components/invite-rank/index.wxss +0 -1
  59. package/dist/components/invite-rank/invite-rank-item.js +0 -12
  60. package/dist/components/invite-rank/invite-rank-item.json +0 -4
  61. package/dist/components/invite-rank/invite-rank-item.wxml +0 -21
  62. package/dist/components/invite-rank/invite-rank-item.wxss +0 -1
  63. package/dist/components/invite-rank/my-invite-detail.js +0 -82
  64. package/dist/components/invite-rank/my-invite-detail.json +0 -7
  65. package/dist/components/invite-rank/my-invite-detail.wxml +0 -27
  66. package/dist/components/invite-rank/my-invite-detail.wxss +0 -1
  67. package/dist/components/invite-rank/util.wxs +0 -21
  68. package/dist/components/live-landscape/live-landscape.js +0 -216
  69. package/dist/components/live-landscape/live-landscape.json +0 -39
  70. package/dist/components/live-landscape/live-landscape.wxml +0 -73
  71. package/dist/components/live-landscape/live-landscape.wxss +0 -1
  72. package/dist/components/live-portrait/live-portrait.js +0 -274
  73. package/dist/components/live-portrait/live-portrait.json +0 -38
  74. package/dist/components/live-portrait/live-portrait.wxml +0 -106
  75. package/dist/components/live-portrait/live-portrait.wxss +0 -1
  76. package/dist/components/lottery/lottery-accept/index.js +0 -249
  77. package/dist/components/lottery/lottery-accept/index.json +0 -4
  78. package/dist/components/lottery/lottery-accept/index.wxml +0 -49
  79. package/dist/components/lottery/lottery-accept/index.wxss +0 -1
  80. package/dist/components/lottery/lottery-history/index.js +0 -36
  81. package/dist/components/lottery/lottery-history/index.json +0 -3
  82. package/dist/components/lottery/lottery-history/index.wxml +0 -28
  83. package/dist/components/lottery/lottery-history/index.wxss +0 -1
  84. package/dist/components/lottery/lottery-shake/lottery-shake.js +0 -328
  85. package/dist/components/lottery/lottery-shake/lottery-shake.json +0 -1
  86. package/dist/components/lottery/lottery-shake/lottery-shake.wxml +0 -52
  87. package/dist/components/lottery/lottery-shake/lottery-shake.wxss +0 -1
  88. package/dist/components/lottery/lottery-slot/lottery-slot.js +0 -230
  89. package/dist/components/lottery/lottery-slot/lottery-slot.json +0 -1
  90. package/dist/components/lottery/lottery-slot/lottery-slot.wxml +0 -62
  91. package/dist/components/lottery/lottery-slot/lottery-slot.wxss +0 -1
  92. package/dist/components/lottery/lottery-wheel/lottery-wheel.js +0 -153
  93. package/dist/components/lottery/lottery-wheel/lottery-wheel.json +0 -4
  94. package/dist/components/lottery/lottery-wheel/lottery-wheel.wxml +0 -91
  95. package/dist/components/lottery/lottery-wheel/lottery-wheel.wxss +0 -1
  96. package/dist/components/lottery/lottery-winners/index.js +0 -101
  97. package/dist/components/lottery/lottery-winners/index.json +0 -4
  98. package/dist/components/lottery/lottery-winners/index.wxml +0 -39
  99. package/dist/components/lottery/lottery-winners/index.wxss +0 -1
  100. package/dist/components/lottery/lottery.js +0 -388
  101. package/dist/components/lottery/lottery.json +0 -11
  102. package/dist/components/lottery/lottery.wxml +0 -78
  103. package/dist/components/lottery/lottery.wxss +0 -1
  104. package/dist/components/lottery/wheel.json +0 -49
  105. package/dist/components/mall-reward/common/reward-card.wxss +0 -0
  106. package/dist/components/mall-reward/duration-icon/index.js +0 -101
  107. package/dist/components/mall-reward/duration-icon/index.json +0 -3
  108. package/dist/components/mall-reward/duration-icon/index.wxml +0 -7
  109. package/dist/components/mall-reward/duration-icon/index.wxss +0 -1
  110. package/dist/components/mall-reward/f-count-down/index.js +0 -61
  111. package/dist/components/mall-reward/f-count-down/index.json +0 -3
  112. package/dist/components/mall-reward/f-count-down/index.wxml +0 -9
  113. package/dist/components/mall-reward/f-count-down/index.wxss +0 -1
  114. package/dist/components/mall-reward/f-empty/index.js +0 -11
  115. package/dist/components/mall-reward/f-empty/index.json +0 -3
  116. package/dist/components/mall-reward/f-empty/index.wxml +0 -8
  117. package/dist/components/mall-reward/f-empty/index.wxss +0 -1
  118. package/dist/components/mall-reward/f-history/index.js +0 -84
  119. package/dist/components/mall-reward/f-history/index.json +0 -4
  120. package/dist/components/mall-reward/f-history/index.wxml +0 -38
  121. package/dist/components/mall-reward/f-history/index.wxss +0 -1
  122. package/dist/components/mall-reward/f-open/index.js +0 -36
  123. package/dist/components/mall-reward/f-open/index.json +0 -3
  124. package/dist/components/mall-reward/f-open/index.wxml +0 -10
  125. package/dist/components/mall-reward/f-open/index.wxss +0 -1
  126. package/dist/components/mall-reward/f-receive/index.js +0 -36
  127. package/dist/components/mall-reward/f-receive/index.json +0 -3
  128. package/dist/components/mall-reward/f-receive/index.wxml +0 -9
  129. package/dist/components/mall-reward/f-receive/index.wxss +0 -1
  130. package/dist/components/mall-reward/index.js +0 -374
  131. package/dist/components/mall-reward/index.json +0 -8
  132. package/dist/components/mall-reward/index.wxml +0 -4
  133. package/dist/components/mall-reward/index.wxss +0 -0
  134. package/dist/components/mall-reward/main-popup/index.js +0 -46
  135. package/dist/components/mall-reward/main-popup/index.json +0 -12
  136. package/dist/components/mall-reward/main-popup/index.wxml +0 -16
  137. package/dist/components/mall-reward/main-popup/index.wxss +0 -1
  138. package/dist/components/player/assets/image/arrow-left.png +0 -0
  139. package/dist/components/player/assets/image/arrow-right.png +0 -0
  140. package/dist/components/player/assets/image/enterFullScreen.png +0 -0
  141. package/dist/components/player/assets/image/exitFullScreen.png +0 -0
  142. package/dist/components/player/assets/image/fullscreen_1.png +0 -0
  143. package/dist/components/player/assets/image/fullscreen_2.png +0 -0
  144. package/dist/components/player/assets/image/pause.png +0 -0
  145. package/dist/components/player/assets/image/pause_1.png +0 -0
  146. package/dist/components/player/assets/image/play.png +0 -0
  147. package/dist/components/player/assets/image/play_1.png +0 -0
  148. package/dist/components/player/assets/image/refresh.png +0 -0
  149. package/dist/components/player/assets/image/refresh_1.png +0 -0
  150. package/dist/components/player/assets/image/subtitle_close.png +0 -0
  151. package/dist/components/player/assets/image/subtitle_default.png +0 -0
  152. package/dist/components/player/assets/image/volume-off.png +0 -0
  153. package/dist/components/player/assets/image/volume-on.png +0 -0
  154. package/dist/components/player/common/config.js +0 -7
  155. package/dist/components/player/common/veComponent.js +0 -4
  156. package/dist/components/player/components/barrage/barrage-canvas.js +0 -488
  157. package/dist/components/player/components/barrage/barrage-dom.js +0 -471
  158. package/dist/components/player/components/barrage/index.js +0 -62
  159. package/dist/components/player/components/barrage/index.json +0 -4
  160. package/dist/components/player/components/barrage/index.wxml +0 -39
  161. package/dist/components/player/components/barrage/index.wxss +0 -1
  162. package/dist/components/player/components/barrage/utils.js +0 -71
  163. package/dist/components/player/components/controls/controls.js +0 -93
  164. package/dist/components/player/components/controls/controls.json +0 -6
  165. package/dist/components/player/components/controls/controls.wxml +0 -60
  166. package/dist/components/player/components/controls/controls.wxss +0 -1
  167. package/dist/components/player/components/danmaku/danmaku.js +0 -23
  168. package/dist/components/player/components/danmaku/danmaku.json +0 -4
  169. package/dist/components/player/components/danmaku/danmaku.wxml +0 -1
  170. package/dist/components/player/components/danmaku/danmaku.wxss +0 -0
  171. package/dist/components/player/components/error/error.js +0 -15
  172. package/dist/components/player/components/error/error.json +0 -3
  173. package/dist/components/player/components/error/error.wxml +0 -6
  174. package/dist/components/player/components/error/error.wxss +0 -1
  175. package/dist/components/player/components/loading/loading.js +0 -9
  176. package/dist/components/player/components/loading/loading.json +0 -3
  177. package/dist/components/player/components/loading/loading.wxml +0 -4
  178. package/dist/components/player/components/loading/loading.wxss +0 -1
  179. package/dist/components/player/components/main/extensions/data.js +0 -8
  180. package/dist/components/player/components/main/extensions/export.js +0 -83
  181. package/dist/components/player/components/main/extensions/methods.js +0 -110
  182. package/dist/components/player/components/main/extensions/observers.js +0 -41
  183. package/dist/components/player/components/main/extensions/props.js +0 -177
  184. package/dist/components/player/components/main/index.js +0 -44
  185. package/dist/components/player/components/main/index.json +0 -4
  186. package/dist/components/player/components/main/index.wxml +0 -7
  187. package/dist/components/player/components/main/index.wxss +0 -1
  188. package/dist/components/player/components/marquee/marquee.js +0 -304
  189. package/dist/components/player/components/marquee/marquee.json +0 -4
  190. package/dist/components/player/components/marquee/marquee.wxml +0 -14
  191. package/dist/components/player/components/marquee/marquee.wxss +0 -1
  192. package/dist/components/player/components/online-hot/assets/line-hot.png +0 -0
  193. package/dist/components/player/components/online-hot/assets/line-user.png +0 -0
  194. package/dist/components/player/components/online-hot/index.js +0 -66
  195. package/dist/components/player/components/online-hot/index.json +0 -3
  196. package/dist/components/player/components/online-hot/index.wxml +0 -15
  197. package/dist/components/player/components/online-hot/index.wxss +0 -1
  198. package/dist/components/player/components/poster/poster.js +0 -12
  199. package/dist/components/player/components/poster/poster.json +0 -3
  200. package/dist/components/player/components/poster/poster.wxml +0 -5
  201. package/dist/components/player/components/poster/poster.wxss +0 -1
  202. package/dist/components/player/components/watermark/watermark.js +0 -52
  203. package/dist/components/player/components/watermark/watermark.json +0 -4
  204. package/dist/components/player/components/watermark/watermark.wxml +0 -8
  205. package/dist/components/player/components/watermark/watermark.wxss +0 -1
  206. package/dist/components/player/extensions/data.js +0 -63
  207. package/dist/components/player/extensions/export.js +0 -325
  208. package/dist/components/player/extensions/methods.js +0 -406
  209. package/dist/components/player/extensions/observers.js +0 -114
  210. package/dist/components/player/extensions/props.js +0 -162
  211. package/dist/components/player/player.js +0 -83
  212. package/dist/components/player/player.json +0 -33
  213. package/dist/components/player/player.wxml +0 -48
  214. package/dist/components/player/player.wxss +0 -1
  215. package/dist/components/praise/praise.js +0 -150
  216. package/dist/components/praise/praise.json +0 -5
  217. package/dist/components/praise/praise.wxml +0 -17
  218. package/dist/components/praise/praise.wxss +0 -1
  219. package/dist/components/product/product-card/product-card.js +0 -109
  220. package/dist/components/product/product-card/product-card.json +0 -3
  221. package/dist/components/product/product-card/product-card.wxml +0 -47
  222. package/dist/components/product/product-card/product-card.wxss +0 -1
  223. package/dist/components/product/product-detail/product-detail.js +0 -127
  224. package/dist/components/product/product-detail/product-detail.json +0 -3
  225. package/dist/components/product/product-detail/product-detail.wxml +0 -57
  226. package/dist/components/product/product-detail/product-detail.wxss +0 -1
  227. package/dist/components/product/product-item/product-item.js +0 -56
  228. package/dist/components/product/product-item/product-item.json +0 -3
  229. package/dist/components/product/product-item/product-item.wxml +0 -35
  230. package/dist/components/product/product-item/product-item.wxss +0 -1
  231. package/dist/components/product/product-list/product-list.js +0 -67
  232. package/dist/components/product/product-list/product-list.json +0 -6
  233. package/dist/components/product/product-list/product-list.wxml +0 -16
  234. package/dist/components/product/product-list/product-list.wxss +0 -1
  235. package/dist/components/product/product-order/product-order.js +0 -394
  236. package/dist/components/product/product-order/product-order.json +0 -3
  237. package/dist/components/product/product-order/product-order.wxml +0 -75
  238. package/dist/components/product/product-order/product-order.wxss +0 -1
  239. package/dist/components/signin/signin-dialog.js +0 -305
  240. package/dist/components/signin/signin-dialog.json +0 -7
  241. package/dist/components/signin/signin-dialog.wxml +0 -19
  242. package/dist/components/signin/signin-dialog.wxss +0 -1
  243. package/dist/components/top-notify/index.js +0 -14
  244. package/dist/components/top-notify/index.json +0 -3
  245. package/dist/components/top-notify/index.wxml +0 -2
  246. package/dist/components/top-notify/index.wxss +0 -1
  247. package/dist/pubComponents/countdown/countdown.js +0 -97
  248. package/dist/pubComponents/countdown/countdown.json +0 -5
  249. package/dist/pubComponents/countdown/countdown.wxml +0 -19
  250. package/dist/pubComponents/countdown/countdown.wxss +0 -1
  251. package/dist/pubComponents/error-page/index.js +0 -146
  252. package/dist/pubComponents/error-page/index.json +0 -5
  253. package/dist/pubComponents/error-page/index.wxml +0 -37
  254. package/dist/pubComponents/error-page/index.wxss +0 -1
  255. package/dist/pubComponents/popup/popup.js +0 -161
  256. package/dist/pubComponents/popup/popup.json +0 -5
  257. package/dist/pubComponents/popup/popup.wxml +0 -17
  258. package/dist/pubComponents/popup/popup.wxss +0 -1
  259. package/dist/pubComponents/tabs/index.js +0 -95
  260. package/dist/pubComponents/tabs/index.json +0 -4
  261. package/dist/pubComponents/tabs/index.wxml +0 -22
  262. package/dist/pubComponents/tabs/index.wxss +0 -1
  263. package/dist/sdk/config/index.js +0 -1
  264. package/dist/sdk/main/index.js +0 -1
  265. package/dist/sdk/player/index.js +0 -1
  266. package/dist/sdk/plugins/ChatServer.js +0 -1
  267. package/dist/sdk/plugins/CustomMenuServer.js +0 -1
  268. package/dist/sdk/plugins/InteractServer.js +0 -1
  269. package/dist/sdk/plugins/InviteCardServer.js +0 -1
  270. package/dist/sdk/plugins/LotteryServer.js +0 -1
  271. package/dist/sdk/plugins/MallRewardServer.js +0 -1
  272. package/dist/sdk/plugins/ProductServer.js +0 -1
  273. package/dist/shared/RequestUtil.js +0 -1
  274. package/dist/shared/SerializableMap.js +0 -1
  275. package/dist/shared/base.server.js +0 -1
  276. package/dist/shared/cacheUtil.js +0 -1
  277. package/dist/shared/dateUtil.js +0 -1
  278. package/dist/shared/logger.js +0 -1
  279. package/dist/shared/mpUtils.js +0 -1
  280. package/dist/shared/utils.js +0 -1
@@ -1,82 +0,0 @@
1
- Component({
2
- properties: {
3
- sdkInstance: {
4
- type: Object,
5
- value: null,
6
- },
7
- },
8
- data: {
9
- show: false, // 是否显对话框
10
- total: 0,
11
- list: [],
12
- downloadAuth: false, // 是否有下载权限
13
- },
14
- lifetimes: {
15
- ready() {},
16
- detached() {},
17
- },
18
- observers: {
19
- sdkInstance: function sdkInstance(_sdkInstance) {
20
- if (!_sdkInstance) return;
21
- this.sdkInstance = _sdkInstance;
22
- this.store = _sdkInstance.store;
23
- this.sdkInstance.on('dialog:openMyInviteDetail', this.openMyInviteDetail.bind(this));
24
- this.store.get({
25
- inviteCardInfo: (_inviteCardInfo) => {
26
- this.setData({
27
- downloadAuth: !!_inviteCardInfo?.self_download_switch,
28
- });
29
- },
30
- });
31
- },
32
- },
33
- methods: {
34
- // 查看我的邀约明细
35
- openMyInviteDetail() {
36
- this.setData({
37
- show: true,
38
- });
39
- this.loadMyInviteDetail();
40
- },
41
- async loadMyInviteDetail() {
42
- const resData = await this.sdkInstance.get('inviteCardServer')?.getMyInviteDetails();
43
- if (resData) {
44
- this.setData({
45
- total: resData.total,
46
- list: resData.list,
47
- });
48
- }
49
- },
50
- async handleDownload() {
51
- const resData = await this.sdkInstance.get('inviteCardServer')?.getMyInviteDetailsUrl();
52
- if (resData?.details_url) {
53
- // 1. 下载文件到本地
54
- wx.downloadFile({
55
- url: resData?.details_url, // 替换为实际文件的HTTPS链接
56
- filePath: wx.env.USER_DATA_PATH + '/邀约明细.xlsx', // 指定存储路径
57
- success: (downloadRes) => {
58
- if (downloadRes.statusCode === 200) {
59
- console.log('文件下载成功,路径:', downloadRes.filePath);
60
-
61
- // 2. 打开下载后的文件
62
- wx.openDocument({
63
- filePath: downloadRes.filePath, // 传入文件路径
64
- fileType: 'xlsx', // 可选,指定文件类型(如pdf、doc、xls等)
65
- showMenu: true, // 关键:显示右上角菜单,支持保存、转发等操作
66
- success: (openRes) => {
67
- console.log('文件打开成功');
68
- },
69
- fail: (openErr) => {
70
- console.log('文件打开失败', openErr);
71
- },
72
- });
73
- }
74
- },
75
- fail: (downloadErr) => {
76
- console.log('文件下载失败', downloadErr);
77
- },
78
- });
79
- }
80
- },
81
- },
82
- });
@@ -1,7 +0,0 @@
1
- {
2
- "component": true,
3
- "styleIsolation": "shared",
4
- "usingComponents": {
5
- "mp-half-screen-dialog": "weui-miniprogram/half-screen-dialog/half-screen-dialog"
6
- }
7
- }
@@ -1,27 +0,0 @@
1
- <!-- 我的邀约明细 -->
2
- <mp-half-screen-dialog extClass="vh-invite-detail-dialog" closabled="{{true}}" show="{{show}}" maskClosable="{{true}}">
3
- <view slot='title' class="invite-detail-title">
4
- <text>我的邀约明细</text>
5
- </view>
6
- <scroll-view slot="desc" class="invite-detail-box" scroll-y>
7
- <view class="content-list" wx:if="{{total>0}}">
8
- <view class="content-item">
9
- <view class="content-item__cell">用户名</view>
10
- <view class="content-item__cell">进入时间</view>
11
- </view>
12
- <view wx:for="{{list}}" wx:key="*this" class="content-item">
13
- <view class="content-item__cell">{{item.nickname}}</view>
14
- <view class="content-item__cell">{{item.enter_time}}</view>
15
- </view>
16
- </view>
17
- <view class="empty-data" wx:else>
18
- <image class="empty-img" src="https://cnstatic01.e.vhall.com/common-static/images/mp/sofa.png" />
19
- <view>暂无数据</view>
20
- </view>
21
- </scroll-view>
22
- <view slot="footer">
23
- <button wx:if="{{downloadAuth && total>0}}" class="weui-btn" type="primary" bindtap="handleDownload">
24
- 查看明细
25
- </button>
26
- </view>
27
- </mp-half-screen-dialog>
@@ -1 +0,0 @@
1
- .vh-invite-detail-dialog{background-color:#fff;background-image:url(https://cnstatic01.e.vhall.com/common-static/images/mp/colorful_bg.png);background-position:top;background-repeat:no-repeat;background-size:cover;display:flex;flex-direction:column;height:70%}.vh-invite-detail-dialog .weui-half-screen-dialog__hd__side{left:calc(100% - 48rpx)}.vh-invite-detail-dialog .invite-detail-box{height:45vh}.vh-invite-detail-dialog .invite-detail-title{text-align:center}.vh-invite-detail-dialog .content-list{display:flex;flex-direction:column;font-size:1rem}.vh-invite-detail-dialog .content-list .content-item{display:flex;flex-direction:row;padding:12rpx 0}.vh-invite-detail-dialog .content-list .content-item__cell{flex:1}.vh-invite-detail-dialog .empty-data{align-items:center;display:flex;flex-direction:column;font-size:1rem;justify-content:center;left:50%;overflow:hidden;position:relative;top:50%;transform:translate(-50%,-50%)}.vh-invite-detail-dialog .empty-data .empty-img{height:168rpx;margin-left:50rpx;width:242rpx}.vh-invite-detail-dialog .weui-half-screen-dialog__ft{padding:0 0 48rpx}
@@ -1,21 +0,0 @@
1
- function formatSeq(seq) {
2
- if (seq > 0) {
3
- return seq < 10 ? '0' + seq : seq.toString();
4
- }
5
- return '--';
6
- }
7
-
8
- function medalClass(position) {
9
- return position === 1
10
- ? 'is-gold'
11
- : position === 2
12
- ? 'is-silver'
13
- : position === 3
14
- ? 'is-bronze'
15
- : '';
16
- }
17
-
18
- module.exports = {
19
- formatSeq: formatSeq,
20
- medalClass: medalClass,
21
- };
@@ -1,216 +0,0 @@
1
- Component({
2
- properties: {
3
- sdkInstance: {
4
- type: Object,
5
- value: null,
6
- },
7
- },
8
- data: {
9
- tabList: [],
10
- activeTab: 0,
11
- liveInfo: null,
12
- showStartDialog: false, // 是否显示开始直播弹窗
13
-
14
- showRecordWatchExpireDialog: false, // 是否显示回放视频已过观看有效期提示框
15
-
16
- errorResp: null, // 错误响应(错误码/错误详情)
17
- giftAuth: false,
18
- showOrder: false, // 是否显示下单弹窗
19
- selectedProduct: null, // 选中的商品
20
- showProductDetail: false, // 是否显示商品详情弹窗
21
- showGiftList: false, // 是否显示礼物列表弹窗
22
- },
23
- observers: {
24
- sdkInstance: function sdkInstance(_sdkInstance) {
25
- if (!_sdkInstance) return;
26
- this.sdkInstance = _sdkInstance;
27
- this.store = _sdkInstance.store;
28
- this.unsub = this.store.get({
29
- liveInfo: (val) => {
30
- this.setData({
31
- liveInfo: val,
32
- });
33
- },
34
- customMenu: (_customMenu) => {
35
- if (_customMenu) {
36
- this.handleCustomMenu(_customMenu);
37
- }
38
- },
39
- errorResp: (val) => {
40
- if (val !== undefined) {
41
- this.setData({
42
- errorResp: val,
43
- });
44
- }
45
- },
46
- permissionValue: (val) => {
47
- if (val !== undefined) {
48
- this.setData({
49
- giftAuth: val['ui.hide_gifts'] != 1
50
- })
51
- }
52
- }
53
- });
54
- this.initListenerEvent();
55
- },
56
- },
57
- lifetimes: {
58
- detached() {
59
- // 组件销毁时清除定时器
60
- this.unsub && this.unsub();
61
- this.unlistener && this.unlistener();
62
- },
63
- },
64
- methods: {
65
- // 处理自定义菜单
66
- async handleCustomMenu(cm) {
67
- // 返回的数组顺序即菜单顺序
68
- // console.log('cm:', cm)
69
- const tabList = [];
70
- for (const tabItem of cm.list || []) {
71
- // type=2: 文档;3:聊天;4:简介;5:商品;6:推荐;9:文件下载;11:精彩时刻;12:概要总结 13:问答;1:自定义菜单
72
- if ([4, 5].includes(tabItem.type)) {
73
- // 简介
74
- if (tabItem.status == 1) {
75
- tabList.push({ id: tabItem.id, name: tabItem.name, type: tabItem.type })
76
- }
77
- } else if (tabItem.type == 3) {
78
- // 聊天 ( 预约页 和 结束 不展示聊天)
79
- const liveInfo = this.sdkInstance.store.get('liveInfo');
80
- if (tabItem.status == 1 && (liveInfo.status !== 2 && liveInfo.status !== 3)) {
81
- tabList.push({ id: tabItem.id, name: tabItem.name, type: tabItem.type })
82
- }
83
- } else if (tabItem.type === 1) {
84
- const customMenuServer = this.sdkInstance.get('customMenuServer');
85
- if (customMenuServer) {
86
- const menuDetail = await customMenuServer.getCustomMenuDetail(tabItem.id);
87
- if (menuDetail?.components?.[0]?.component_id === 9) {
88
- // 邀请榜菜单处理
89
- this.handleInviteRankMenu(tabList, tabItem, menuDetail);
90
- }
91
- }
92
- } else {
93
- // TODO: 其它类型暂不支持
94
- }
95
- }
96
- this.setData({
97
- tabList: tabList
98
- })
99
- },
100
- // 邀请榜菜单处理
101
- async handleInviteRankMenu(tabList, tabItem, menuDetail) {
102
- const inviteRankMenu = {
103
- id: tabItem.id,
104
- name: tabItem.name,
105
- type: tabItem.type,
106
- status: tabItem.status, // status 1显示,2隐藏,3预告结束隐藏,4预告结束显示
107
- cid: menuDetail.components[0].component_id,
108
- };
109
- const liveInfo = this.sdkInstance.store.get('liveInfo');
110
- if (liveInfo?.status && inviteRankMenu.id) {
111
- // 预告页和结束页不展示
112
- if (liveInfo.status === 2 && inviteRankMenu.status === 3) return;
113
- const idx = tabList.findIndex((item) => item.id === inviteRankMenu.id);
114
- if (idx == -1) {
115
- tabList.push(inviteRankMenu)
116
- }
117
- }
118
- },
119
- toWatch() {
120
- this.setData({
121
- showStartDialog: false,
122
- });
123
- this.sdkInstance.init();
124
- },
125
- handleExprie() {
126
- this.sdkInstance._handleBizErrorCode(512912)
127
- },
128
- // 点击更多icon(三个点)
129
- handleMore(e) {
130
- this.triggerEvent('clickMoreMenu')
131
- },
132
-
133
- initListenerEvent() {
134
- this.unlistener && this.unlistener();
135
- const obj = {};
136
- obj[this.sdkInstance.EVENT.LIVE_START] = () => {
137
- this.setData({
138
- showStartDialog: true,
139
- });
140
- };
141
- obj[this.sdkInstance.EVENT.LIVE_END] = () => {
142
- this.sdkInstance.leaveRoom(true);
143
- this.sdkInstance.store.set('liveInfo.status', 3);
144
- };
145
- obj[this.sdkInstance.EVENT.KICKOUT] = () => {};
146
- obj[this.sdkInstance.EVENT.RECORD_WATCH_EXPIRE_ALERT] = () => {
147
- this.setData({
148
- showRecordWatchExpireDialog: true,
149
- });
150
- }
151
- this.unlistener = this.sdkInstance.on(obj);
152
- },
153
- onTabClick: function onTabClick(e) {
154
- var index = e.detail.index;
155
- this.setData({
156
- activeTab: index,
157
- });
158
- const item = this.data.tabList[index];
159
- this.sdkInstance.emit('tab:click', item);
160
- },
161
- onTabChange: function onTabChange(e) {
162
- var index = e.detail.index;
163
- this.setData({
164
- activeTab: index,
165
- });
166
- const item = this.data.tabList[index];
167
- this.sdkInstance.emit('tab:change', item);
168
- },
169
- // 处理商品点击
170
- handleProductClick(e) {
171
- this.setData({
172
- selectedProduct: e.detail,
173
- showProductDetail: true,
174
- });
175
- },
176
- // 关闭商品详情
177
- closeProductDetail() {
178
- this.setData({
179
- showProductDetail: false,
180
- selectedProduct: null,
181
- });
182
- },
183
- // 显示下单弹窗(统一处理商品卡片和商品详情的购买)
184
- showOrderDialog(e) {
185
- // 判断是事件对象还是直接传入的商品对象
186
- const product = e.detail ? e.detail : e;
187
- this.setData({
188
- selectedProduct: product,
189
- showProductDetail: false,
190
- showOrder: true,
191
- });
192
- },
193
- // 关闭下单弹窗
194
- closeOrder() {
195
- this.setData({
196
- showOrder: false,
197
- selectedProduct: null,
198
- });
199
- },
200
- // 显示礼物列表
201
- showGiftList() {
202
- // 只负责显示弹窗,礼物列表由组件内部请求
203
- this.setData({ showGiftList: true });
204
- },
205
- // 隐藏礼物列表
206
- hideGiftList() {
207
- this.setData({ showGiftList: false });
208
- },
209
- // 支付成功回调
210
- onPaySuccess(data) {
211
- console.log('支付成功:', data);
212
- // 支付成功后的处理
213
- },
214
- },
215
- });
216
-
@@ -1,39 +0,0 @@
1
- {
2
- "component": true,
3
- "styleIsolation": "apply-shared",
4
- "usingComponents": {
5
- "vhall-tabs": "../../pubComponents/tabs/index",
6
- "vhall-chat": "../chat/chat",
7
- "vhall-player": "../player/player",
8
- "vhall-introduction": "../introduction/introduction",
9
- "vhall-invite-rank": "../invite-rank/index",
10
- "vhall-product-list": "../product/product-list/product-list",
11
- "vhall-product-detail": "../product/product-detail/product-detail",
12
- "vhall-product-card": "../product/product-card/product-card",
13
- "vhall-product-order": "../product/product-order/product-order",
14
- "vhall-lottery": "../lottery/lottery",
15
- "vhall-mall-reward":"../mall-reward/index",
16
- "start-countdown": "../../pubComponents/countdown/countdown",
17
- "signin-dialog": "../signin/signin-dialog",
18
- "my-invite-detail": "../invite-rank/my-invite-detail",
19
- "vhall-praise": "../praise/praise",
20
- "vhall-gift-sender": "../gift/gift-sender/gift-sender",
21
- "vhall-gift-display": "../gift/gift-display/gift-display",
22
- "vh-popup": "../../pubComponents/popup/popup",
23
- "error-page": "../../pubComponents/error-page/index",
24
- "mp-icon": "weui-miniprogram/icon/icon"
25
- },
26
- "componentPlaceholder": {
27
- "vhall-product-list": "view",
28
- "vhall-product-detail": "view",
29
- "vhall-product-card": "view",
30
- "signin-dialog": "view",
31
- "vhall-gift-sender": "view",
32
- "vhall-lottery": "view",
33
- "vhall-mall-reward":"view",
34
- "vhall-invite-rank": "view"
35
- },
36
- "permissiion": {
37
- "scope.clipboard": true
38
- }
39
- }
@@ -1,73 +0,0 @@
1
- <view class="live_landscape" wx:if="{{!errorResp || !errorResp.code}}">
2
- <view class="live_landscape_player">
3
- <vhall-player sdkInstance="{{sdkInstance}}"></vhall-player>
4
- </view>
5
- <start-countdown sdkInstance="{{sdkInstance}}" wx:if="{{liveInfo.status==2}}"></start-countdown>
6
- <vhall-tabs class="live-landscape-tab" tab-class="tab-action" swiper-class="menu-swiper" wx:if="{{tabList.length > 0}}" tabs="{{tabList}}" activeTab="{{activeTab}}" bindtabclick="onTabClick" bindchange="onTabChange">
7
- <block wx:for="{{tabList}}" wx:key="id">
8
- <view class="tab-content" data-set="{{item}}" slot="tab-content-{{index}}-{{id}}" wx:if="{{activeTab==index}}">
9
- <!-- 礼物显示组件 -->
10
- <vhall-gift-display wx:if="{{item.type == '3'}}" sdkInstance="{{sdkInstance}}" />
11
- <vhall-chat class="tab-chat" wx:if="{{item.type == '3'}}" mode="{{1}}" bind:commentCheck="commentCheck" sdkInstance="{{sdkInstance}}">
12
- <view class="gift-button" wx:if="{{giftAuth}}" bindtap="showGiftList">
13
- <image class="gift-icon" src="https://cnstatic01.e.vhall.com/common-static/saas-wap/static/img/icon_gift.020803f8.png" mode="aspectFit"></image>
14
- </view>
15
- <vhall-praise sdkInstance="{{ sdkInstance }}"></vhall-praise>
16
- </vhall-chat>
17
- <vhall-introduction class="tab-introduction" wx:if="{{item.type == '4'}}" sdkInstance="{{sdkInstance}}"></vhall-introduction>
18
- <vhall-invite-rank class="" item="{{item}}" wx:if="{{item.cid == 9}}" sdkInstance="{{sdkInstance}}"></vhall-invite-rank>
19
- <vhall-product-list class="tab-product" wx:if="{{item.type == 5}}" sdkInstance="{{sdkInstance}}" bind:productClick="handleProductClick" bind:buyClick="showOrderDialog"></vhall-product-list>
20
- </view>
21
- </block>
22
- </vhall-tabs>
23
- <!-- 我的邀请明细 -->
24
- <my-invite-detail sdkInstance="{{sdkInstance}}"></my-invite-detail>
25
- <!-- 直播开始提示弹框(居中展示) -->
26
- <vh-popup wx:if="{{liveInfo.status==2||liveInfo.status==3}}" visible="{{showStartDialog}}" showClose="{{false}}">
27
- <view class="start-dialog dialog-content">
28
- <view class="dialog-image">
29
- <image class="image-item start_live_img" src="https://cnstatic01.e.vhall.com/common-static/images/mp/live_start.png" mode="widthFix" alt="开始直播"></image>
30
- </view>
31
- <view class="dialog-text">
32
- <text class="desc">直播已开始,请观看直播吧</text>
33
- </view>
34
- <view class="start-dialog-footer">
35
- <button class="light-button" plain bindtap="toWatch">立即观看</button>
36
- </view>
37
- </view>
38
- </vh-popup>
39
- <!-- 回放视频已过观看有效期提示框(居中展示) -->
40
- <vh-popup visible="{{showRecordWatchExpireDialog}}" showClose="{{false}}">
41
- <view class="dialog-content dialog-content--expire">
42
- <view class="dialog-image">
43
- <image src="https://cnstatic01.e.vhall.com/common-static/images/mp/playback_expire.png" mode="widthFix" alt="开始直播"></image>
44
- </view>
45
- <view class="dialog-text">
46
- <text class="desc">视频已过观看有效期</text>
47
- </view>
48
- <view class="dialog-footer">
49
- <button class="weui-btn" type="primary" bindtap="handleExprie">我知道了</button>
50
- </view>
51
- </view>
52
- </vh-popup>
53
- <!-- 签到组件 -->
54
- <signin-dialog sdkInstance="{{ sdkInstance }}"></signin-dialog>
55
- <!-- 商品详情弹窗 -->
56
- <vh-popup visible="{{showProductDetail}}" mode="bottom" maskClosable="true" bind:close="closeProductDetail">
57
- <vhall-product-detail product="{{selectedProduct}}" show="{{showProductDetail}}" sdkInstance="{{sdkInstance}}" bind:close="closeProductDetail" bind:buy="showOrderDialog" />
58
- </vh-popup>
59
- <!-- 商品卡片 -->
60
- <vhall-product-card sdkInstance="{{sdkInstance}}" bind:cardClick="handleProductClick" bind:buyClick="showOrderDialog" />
61
- <!-- 礼物列表弹窗 -->
62
- <vh-popup visible="{{showGiftList}}" mode="bottom" closeable maskClosable="true" bind:close="hideGiftList">
63
- <vhall-gift-sender wx:if="{{showGiftList}}" sdkInstance="{{sdkInstance}}" bind:onSendFinished="hideGiftList"></vhall-gift-sender>
64
- </vh-popup>
65
- <!-- 下单弹窗 -->
66
- <vh-popup visible="{{showOrder}}" mode="bottom" maskClosable="true" bind:close="closeOrder">
67
- <vhall-product-order show="{{showOrder}}" product="{{selectedProduct}}" sdkInstance="{{sdkInstance}}" bind:close="closeOrder" bind:paySuccess="onPaySuccess" />
68
- </vh-popup>
69
- <vhall-lottery sdkInstance="{{sdkInstance}}" />
70
- <!-- 商城奖励 -->
71
- <vhall-mall-reward sdkInstance="{{sdkInstance}}" />
72
- </view>
73
- <error-page wx:else errorResp="{{errorResp}}"></error-page>
@@ -1 +0,0 @@
1
- .live_landscape{background:#fff;display:flex;flex-direction:column;height:100vh;height:100%;overflow:hidden;position:relative;width:100%}.live_landscape .live_landscape_player{display:block;height:56.25vw;width:100vw}.live_landscape .live-landscape-tab{background:#f0f0f0;box-sizing:border-box;display:flex;flex:1;height:0;width:100vw}.live_landscape .live-landscape-tab .tab-action{color:#fff!important}.live_landscape .live-landscape-tab .tab-content{background-color:#f0f0f0;box-sizing:border-box;height:100%;overflow:auto;width:100%}.live_landscape .live-landscape-tab .tab-chat{display:block;height:100%;width:100%}.live_landscape .live-landscape-tab .tab-introduction{display:block;padding:20rpx}.live_landscape .menu_icon{align-items:center;background-color:#f0f0f0;border-radius:50%;display:flex;height:1.5rem;justify-content:center;margin-left:20rpx;padding:4px;width:1.5rem}.live_landscape .start_live_img{margin-bottom:20rpx;width:150rpx}.start-dialog{align-items:center;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;padding-top:24rpx;width:520rpx}.start-dialog .light-button{border:none;color:#fb2626}.start-dialog .start-dialog-footer{margin-top:24rpx}.weui-dialog__btn{color:#fb2626}.dialog-content--expire,.gift-button{align-items:center;display:flex;justify-content:center}.gift-button{background:rgba(6,6,6,.25);border-radius:50%;margin-right:16rpx;position:relative}.gift-button,.gift-icon{height:2rem;width:2rem}