vhall-mini-sdk 0.1.0 → 0.1.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 (261) hide show
  1. package/lib/components/player/components/online-hot/index.js +2 -2
  2. package/lib/sdk/main/index.js +1 -0
  3. package/package.json +2 -4
  4. package/postinstall.js +21 -51
  5. package/dist/components/chat/chat-edit/chat-edit.js +0 -127
  6. package/dist/components/chat/chat-edit/chat-edit.json +0 -4
  7. package/dist/components/chat/chat-edit/chat-edit.wxml +0 -7
  8. package/dist/components/chat/chat-edit/chat-edit.wxss +0 -1
  9. package/dist/components/chat/chat-item/chat-item.js +0 -253
  10. package/dist/components/chat/chat-item/chat-item.json +0 -3
  11. package/dist/components/chat/chat-item/chat-item.wxml +0 -96
  12. package/dist/components/chat/chat-item/chat-item.wxss +0 -1
  13. package/dist/components/chat/chat-list/chat-list.js +0 -216
  14. package/dist/components/chat/chat-list/chat-list.json +0 -6
  15. package/dist/components/chat/chat-list/chat-list.wxml +0 -9
  16. package/dist/components/chat/chat-list/chat-list.wxss +0 -1
  17. package/dist/components/chat/chat.js +0 -98
  18. package/dist/components/chat/chat.json +0 -7
  19. package/dist/components/chat/chat.wxml +0 -7
  20. package/dist/components/chat/chat.wxss +0 -1
  21. package/dist/components/gift/gift-display/gift-display.js +0 -118
  22. package/dist/components/gift/gift-display/gift-display.json +0 -3
  23. package/dist/components/gift/gift-display/gift-display.wxml +0 -16
  24. package/dist/components/gift/gift-display/gift-display.wxss +0 -1
  25. package/dist/components/gift/gift-sender/gift-sender.js +0 -63
  26. package/dist/components/gift/gift-sender/gift-sender.json +0 -6
  27. package/dist/components/gift/gift-sender/gift-sender.wxml +0 -19
  28. package/dist/components/gift/gift-sender/gift-sender.wxss +0 -1
  29. package/dist/components/introduction/introduction.js +0 -43
  30. package/dist/components/introduction/introduction.json +0 -3
  31. package/dist/components/introduction/introduction.wxml +0 -8
  32. package/dist/components/introduction/introduction.wxss +0 -1
  33. package/dist/components/invite-rank/img/bronze.png +0 -0
  34. package/dist/components/invite-rank/img/gold.png +0 -0
  35. package/dist/components/invite-rank/img/silver.png +0 -0
  36. package/dist/components/invite-rank/index.js +0 -135
  37. package/dist/components/invite-rank/index.json +0 -8
  38. package/dist/components/invite-rank/index.wxml +0 -42
  39. package/dist/components/invite-rank/index.wxss +0 -1
  40. package/dist/components/invite-rank/invite-rank-item.js +0 -12
  41. package/dist/components/invite-rank/invite-rank-item.json +0 -4
  42. package/dist/components/invite-rank/invite-rank-item.wxml +0 -21
  43. package/dist/components/invite-rank/invite-rank-item.wxss +0 -1
  44. package/dist/components/invite-rank/my-invite-detail.js +0 -82
  45. package/dist/components/invite-rank/my-invite-detail.json +0 -7
  46. package/dist/components/invite-rank/my-invite-detail.wxml +0 -27
  47. package/dist/components/invite-rank/my-invite-detail.wxss +0 -1
  48. package/dist/components/invite-rank/util.wxs +0 -21
  49. package/dist/components/live-landscape/live-landscape.js +0 -216
  50. package/dist/components/live-landscape/live-landscape.json +0 -39
  51. package/dist/components/live-landscape/live-landscape.wxml +0 -73
  52. package/dist/components/live-landscape/live-landscape.wxss +0 -1
  53. package/dist/components/live-portrait/live-portrait.js +0 -274
  54. package/dist/components/live-portrait/live-portrait.json +0 -38
  55. package/dist/components/live-portrait/live-portrait.wxml +0 -106
  56. package/dist/components/live-portrait/live-portrait.wxss +0 -1
  57. package/dist/components/lottery/lottery-accept/index.js +0 -249
  58. package/dist/components/lottery/lottery-accept/index.json +0 -4
  59. package/dist/components/lottery/lottery-accept/index.wxml +0 -49
  60. package/dist/components/lottery/lottery-accept/index.wxss +0 -1
  61. package/dist/components/lottery/lottery-history/index.js +0 -36
  62. package/dist/components/lottery/lottery-history/index.json +0 -3
  63. package/dist/components/lottery/lottery-history/index.wxml +0 -28
  64. package/dist/components/lottery/lottery-history/index.wxss +0 -1
  65. package/dist/components/lottery/lottery-shake/lottery-shake.js +0 -328
  66. package/dist/components/lottery/lottery-shake/lottery-shake.json +0 -1
  67. package/dist/components/lottery/lottery-shake/lottery-shake.wxml +0 -52
  68. package/dist/components/lottery/lottery-shake/lottery-shake.wxss +0 -1
  69. package/dist/components/lottery/lottery-slot/lottery-slot.js +0 -230
  70. package/dist/components/lottery/lottery-slot/lottery-slot.json +0 -1
  71. package/dist/components/lottery/lottery-slot/lottery-slot.wxml +0 -62
  72. package/dist/components/lottery/lottery-slot/lottery-slot.wxss +0 -1
  73. package/dist/components/lottery/lottery-wheel/lottery-wheel.js +0 -153
  74. package/dist/components/lottery/lottery-wheel/lottery-wheel.json +0 -4
  75. package/dist/components/lottery/lottery-wheel/lottery-wheel.wxml +0 -91
  76. package/dist/components/lottery/lottery-wheel/lottery-wheel.wxss +0 -1
  77. package/dist/components/lottery/lottery-winners/index.js +0 -101
  78. package/dist/components/lottery/lottery-winners/index.json +0 -4
  79. package/dist/components/lottery/lottery-winners/index.wxml +0 -39
  80. package/dist/components/lottery/lottery-winners/index.wxss +0 -1
  81. package/dist/components/lottery/lottery.js +0 -388
  82. package/dist/components/lottery/lottery.json +0 -11
  83. package/dist/components/lottery/lottery.wxml +0 -78
  84. package/dist/components/lottery/lottery.wxss +0 -1
  85. package/dist/components/lottery/wheel.json +0 -49
  86. package/dist/components/mall-reward/common/reward-card.wxss +0 -0
  87. package/dist/components/mall-reward/duration-icon/index.js +0 -101
  88. package/dist/components/mall-reward/duration-icon/index.json +0 -3
  89. package/dist/components/mall-reward/duration-icon/index.wxml +0 -7
  90. package/dist/components/mall-reward/duration-icon/index.wxss +0 -1
  91. package/dist/components/mall-reward/f-count-down/index.js +0 -61
  92. package/dist/components/mall-reward/f-count-down/index.json +0 -3
  93. package/dist/components/mall-reward/f-count-down/index.wxml +0 -9
  94. package/dist/components/mall-reward/f-count-down/index.wxss +0 -1
  95. package/dist/components/mall-reward/f-empty/index.js +0 -11
  96. package/dist/components/mall-reward/f-empty/index.json +0 -3
  97. package/dist/components/mall-reward/f-empty/index.wxml +0 -8
  98. package/dist/components/mall-reward/f-empty/index.wxss +0 -1
  99. package/dist/components/mall-reward/f-history/index.js +0 -84
  100. package/dist/components/mall-reward/f-history/index.json +0 -4
  101. package/dist/components/mall-reward/f-history/index.wxml +0 -38
  102. package/dist/components/mall-reward/f-history/index.wxss +0 -1
  103. package/dist/components/mall-reward/f-open/index.js +0 -36
  104. package/dist/components/mall-reward/f-open/index.json +0 -3
  105. package/dist/components/mall-reward/f-open/index.wxml +0 -10
  106. package/dist/components/mall-reward/f-open/index.wxss +0 -1
  107. package/dist/components/mall-reward/f-receive/index.js +0 -36
  108. package/dist/components/mall-reward/f-receive/index.json +0 -3
  109. package/dist/components/mall-reward/f-receive/index.wxml +0 -9
  110. package/dist/components/mall-reward/f-receive/index.wxss +0 -1
  111. package/dist/components/mall-reward/index.js +0 -374
  112. package/dist/components/mall-reward/index.json +0 -8
  113. package/dist/components/mall-reward/index.wxml +0 -4
  114. package/dist/components/mall-reward/index.wxss +0 -0
  115. package/dist/components/mall-reward/main-popup/index.js +0 -46
  116. package/dist/components/mall-reward/main-popup/index.json +0 -12
  117. package/dist/components/mall-reward/main-popup/index.wxml +0 -16
  118. package/dist/components/mall-reward/main-popup/index.wxss +0 -1
  119. package/dist/components/player/assets/image/arrow-left.png +0 -0
  120. package/dist/components/player/assets/image/arrow-right.png +0 -0
  121. package/dist/components/player/assets/image/enterFullScreen.png +0 -0
  122. package/dist/components/player/assets/image/exitFullScreen.png +0 -0
  123. package/dist/components/player/assets/image/fullscreen_1.png +0 -0
  124. package/dist/components/player/assets/image/fullscreen_2.png +0 -0
  125. package/dist/components/player/assets/image/pause.png +0 -0
  126. package/dist/components/player/assets/image/pause_1.png +0 -0
  127. package/dist/components/player/assets/image/play.png +0 -0
  128. package/dist/components/player/assets/image/play_1.png +0 -0
  129. package/dist/components/player/assets/image/refresh.png +0 -0
  130. package/dist/components/player/assets/image/refresh_1.png +0 -0
  131. package/dist/components/player/assets/image/subtitle_close.png +0 -0
  132. package/dist/components/player/assets/image/subtitle_default.png +0 -0
  133. package/dist/components/player/assets/image/volume-off.png +0 -0
  134. package/dist/components/player/assets/image/volume-on.png +0 -0
  135. package/dist/components/player/common/config.js +0 -7
  136. package/dist/components/player/common/veComponent.js +0 -4
  137. package/dist/components/player/components/barrage/barrage-canvas.js +0 -488
  138. package/dist/components/player/components/barrage/barrage-dom.js +0 -471
  139. package/dist/components/player/components/barrage/index.js +0 -62
  140. package/dist/components/player/components/barrage/index.json +0 -4
  141. package/dist/components/player/components/barrage/index.wxml +0 -39
  142. package/dist/components/player/components/barrage/index.wxss +0 -1
  143. package/dist/components/player/components/barrage/utils.js +0 -71
  144. package/dist/components/player/components/controls/controls.js +0 -93
  145. package/dist/components/player/components/controls/controls.json +0 -6
  146. package/dist/components/player/components/controls/controls.wxml +0 -60
  147. package/dist/components/player/components/controls/controls.wxss +0 -1
  148. package/dist/components/player/components/danmaku/danmaku.js +0 -23
  149. package/dist/components/player/components/danmaku/danmaku.json +0 -4
  150. package/dist/components/player/components/danmaku/danmaku.wxml +0 -1
  151. package/dist/components/player/components/danmaku/danmaku.wxss +0 -0
  152. package/dist/components/player/components/error/error.js +0 -15
  153. package/dist/components/player/components/error/error.json +0 -3
  154. package/dist/components/player/components/error/error.wxml +0 -6
  155. package/dist/components/player/components/error/error.wxss +0 -1
  156. package/dist/components/player/components/loading/loading.js +0 -9
  157. package/dist/components/player/components/loading/loading.json +0 -3
  158. package/dist/components/player/components/loading/loading.wxml +0 -4
  159. package/dist/components/player/components/loading/loading.wxss +0 -1
  160. package/dist/components/player/components/main/extensions/data.js +0 -8
  161. package/dist/components/player/components/main/extensions/export.js +0 -83
  162. package/dist/components/player/components/main/extensions/methods.js +0 -110
  163. package/dist/components/player/components/main/extensions/observers.js +0 -41
  164. package/dist/components/player/components/main/extensions/props.js +0 -177
  165. package/dist/components/player/components/main/index.js +0 -44
  166. package/dist/components/player/components/main/index.json +0 -4
  167. package/dist/components/player/components/main/index.wxml +0 -7
  168. package/dist/components/player/components/main/index.wxss +0 -1
  169. package/dist/components/player/components/marquee/marquee.js +0 -304
  170. package/dist/components/player/components/marquee/marquee.json +0 -4
  171. package/dist/components/player/components/marquee/marquee.wxml +0 -14
  172. package/dist/components/player/components/marquee/marquee.wxss +0 -1
  173. package/dist/components/player/components/online-hot/assets/line-hot.png +0 -0
  174. package/dist/components/player/components/online-hot/assets/line-user.png +0 -0
  175. package/dist/components/player/components/online-hot/index.js +0 -66
  176. package/dist/components/player/components/online-hot/index.json +0 -3
  177. package/dist/components/player/components/online-hot/index.wxml +0 -15
  178. package/dist/components/player/components/online-hot/index.wxss +0 -1
  179. package/dist/components/player/components/poster/poster.js +0 -12
  180. package/dist/components/player/components/poster/poster.json +0 -3
  181. package/dist/components/player/components/poster/poster.wxml +0 -5
  182. package/dist/components/player/components/poster/poster.wxss +0 -1
  183. package/dist/components/player/components/watermark/watermark.js +0 -52
  184. package/dist/components/player/components/watermark/watermark.json +0 -4
  185. package/dist/components/player/components/watermark/watermark.wxml +0 -8
  186. package/dist/components/player/components/watermark/watermark.wxss +0 -1
  187. package/dist/components/player/extensions/data.js +0 -63
  188. package/dist/components/player/extensions/export.js +0 -325
  189. package/dist/components/player/extensions/methods.js +0 -406
  190. package/dist/components/player/extensions/observers.js +0 -114
  191. package/dist/components/player/extensions/props.js +0 -162
  192. package/dist/components/player/player.js +0 -83
  193. package/dist/components/player/player.json +0 -33
  194. package/dist/components/player/player.wxml +0 -48
  195. package/dist/components/player/player.wxss +0 -1
  196. package/dist/components/praise/praise.js +0 -150
  197. package/dist/components/praise/praise.json +0 -5
  198. package/dist/components/praise/praise.wxml +0 -17
  199. package/dist/components/praise/praise.wxss +0 -1
  200. package/dist/components/product/product-card/product-card.js +0 -109
  201. package/dist/components/product/product-card/product-card.json +0 -3
  202. package/dist/components/product/product-card/product-card.wxml +0 -47
  203. package/dist/components/product/product-card/product-card.wxss +0 -1
  204. package/dist/components/product/product-detail/product-detail.js +0 -127
  205. package/dist/components/product/product-detail/product-detail.json +0 -3
  206. package/dist/components/product/product-detail/product-detail.wxml +0 -57
  207. package/dist/components/product/product-detail/product-detail.wxss +0 -1
  208. package/dist/components/product/product-item/product-item.js +0 -56
  209. package/dist/components/product/product-item/product-item.json +0 -3
  210. package/dist/components/product/product-item/product-item.wxml +0 -35
  211. package/dist/components/product/product-item/product-item.wxss +0 -1
  212. package/dist/components/product/product-list/product-list.js +0 -67
  213. package/dist/components/product/product-list/product-list.json +0 -6
  214. package/dist/components/product/product-list/product-list.wxml +0 -16
  215. package/dist/components/product/product-list/product-list.wxss +0 -1
  216. package/dist/components/product/product-order/product-order.js +0 -394
  217. package/dist/components/product/product-order/product-order.json +0 -3
  218. package/dist/components/product/product-order/product-order.wxml +0 -75
  219. package/dist/components/product/product-order/product-order.wxss +0 -1
  220. package/dist/components/signin/signin-dialog.js +0 -305
  221. package/dist/components/signin/signin-dialog.json +0 -7
  222. package/dist/components/signin/signin-dialog.wxml +0 -19
  223. package/dist/components/signin/signin-dialog.wxss +0 -1
  224. package/dist/components/top-notify/index.js +0 -14
  225. package/dist/components/top-notify/index.json +0 -3
  226. package/dist/components/top-notify/index.wxml +0 -2
  227. package/dist/components/top-notify/index.wxss +0 -1
  228. package/dist/pubComponents/countdown/countdown.js +0 -97
  229. package/dist/pubComponents/countdown/countdown.json +0 -5
  230. package/dist/pubComponents/countdown/countdown.wxml +0 -19
  231. package/dist/pubComponents/countdown/countdown.wxss +0 -1
  232. package/dist/pubComponents/error-page/index.js +0 -146
  233. package/dist/pubComponents/error-page/index.json +0 -5
  234. package/dist/pubComponents/error-page/index.wxml +0 -37
  235. package/dist/pubComponents/error-page/index.wxss +0 -1
  236. package/dist/pubComponents/popup/popup.js +0 -161
  237. package/dist/pubComponents/popup/popup.json +0 -5
  238. package/dist/pubComponents/popup/popup.wxml +0 -17
  239. package/dist/pubComponents/popup/popup.wxss +0 -1
  240. package/dist/pubComponents/tabs/index.js +0 -95
  241. package/dist/pubComponents/tabs/index.json +0 -4
  242. package/dist/pubComponents/tabs/index.wxml +0 -22
  243. package/dist/pubComponents/tabs/index.wxss +0 -1
  244. package/dist/sdk/config/index.js +0 -1
  245. package/dist/sdk/main/index.js +0 -1
  246. package/dist/sdk/player/index.js +0 -1
  247. package/dist/sdk/plugins/ChatServer.js +0 -1
  248. package/dist/sdk/plugins/CustomMenuServer.js +0 -1
  249. package/dist/sdk/plugins/InteractServer.js +0 -1
  250. package/dist/sdk/plugins/InviteCardServer.js +0 -1
  251. package/dist/sdk/plugins/LotteryServer.js +0 -1
  252. package/dist/sdk/plugins/MallRewardServer.js +0 -1
  253. package/dist/sdk/plugins/ProductServer.js +0 -1
  254. package/dist/shared/RequestUtil.js +0 -1
  255. package/dist/shared/SerializableMap.js +0 -1
  256. package/dist/shared/base.server.js +0 -1
  257. package/dist/shared/cacheUtil.js +0 -1
  258. package/dist/shared/dateUtil.js +0 -1
  259. package/dist/shared/logger.js +0 -1
  260. package/dist/shared/mpUtils.js +0 -1
  261. package/dist/shared/utils.js +0 -1
@@ -1,135 +0,0 @@
1
- import { isEmpty } from '../../shared/utils.js'
2
-
3
- Component({
4
- /**
5
- * 组件的属性列表
6
- */
7
- properties: {
8
- sdkInstance: {
9
- type: Object,
10
- value: null,
11
- },
12
- item: {
13
- type: Object,
14
- value: null,
15
- },
16
- },
17
-
18
- /**
19
- * 组件的初始数据
20
- */
21
- data: {
22
- isInited: false,
23
- isLoading: false,
24
- showDetail: false, // 是否展示我的邀约明细
25
- total: 0,
26
- dataList: [],
27
- my: {},
28
-
29
- showRulePanel: false,
30
- ruleInContent: '',
31
- },
32
- lifetimes: {
33
- created() {
34
- console.debug('vhall-invite-rank created');
35
- },
36
- attached() {
37
- console.debug('vhall-invite-rank attached');
38
- if (this.sdkInstance) {
39
- const inviteCardInfo = this.sdkInstance.store.get('inviteCardInfo');
40
- if (isEmpty(inviteCardInfo)) {
41
- // 邀请卡初始化信息为空,则调用接口初始化
42
- const inviteCardServer = this.sdkInstance.get('inviteCardServer');
43
- if (inviteCardServer) {
44
- inviteCardServer.getInviteCardInfo();
45
- }
46
- }
47
- }
48
-
49
- },
50
- async ready() {
51
- console.debug('vhall-invite-rank ready');
52
- },
53
- detached() {
54
- console.debug('vhall-invite-rank detached');
55
- this.unsub && this.unsub();
56
- },
57
- },
58
-
59
- observers: {
60
- sdkInstance: function sdkInstance(_sdkInstance) {
61
- if (!_sdkInstance) return;
62
- this.sdkInstance = _sdkInstance;
63
- this.store = _sdkInstance.store;
64
- this.unsub = this.store.get({
65
- liveInfo: (val) => {
66
- this.setData({
67
- liveInfo: val,
68
- });
69
- this.loadInviteRankList();
70
- },
71
- inviteCardInfo: (_inviteCardInfo) => {
72
- if (!isEmpty(_inviteCardInfo)) {
73
- this.setData({
74
- showDetail: _inviteCardInfo.invite_detail_switch === 1,
75
- });
76
- }
77
- },
78
- });
79
- const detail = this.store.get(`customMenuDetail.${this.properties.item.id}`);
80
- if (detail?.components?.[0].inContent) {
81
- this.setData({
82
- ruleInContent: detail.components[0].inContent,
83
- });
84
- }
85
- },
86
- },
87
-
88
- /**
89
- * 组件的方法列表
90
- */
91
- methods: {
92
- async loadInviteRankList() {
93
- console.log('loadInviteRankList start');
94
- if (!this.sdkInstance) return;
95
- if (this.data.isLoading) return;
96
- this.setData({
97
- isLoading: true,
98
- });
99
- try {
100
- const resData = await this.sdkInstance.get('inviteCardServer').getInviteRankList();
101
- // console.log('resData:', resData);
102
- this.setData({
103
- isLoading: false,
104
- });
105
- if (resData) {
106
- this.setData({
107
- isInited: true,
108
- total: resData.total,
109
- dataList: resData.list,
110
- my: resData.my,
111
- });
112
- }
113
- } catch (ex) {
114
- this.setData({
115
- isLoading: false,
116
- });
117
- }
118
- },
119
-
120
- // 查看我的邀约明细
121
- onTapMyDetail() {
122
- this.sdkInstance.emit('dialog:openMyInviteDetail');
123
- },
124
-
125
- // 邀请榜规则
126
- onTapRankRule() {
127
- this.setData({
128
- showRulePanel: !this.data.showRulePanel,
129
- });
130
- },
131
- handleReload() {
132
- this.loadInviteRankList();
133
- }
134
- },
135
- });
@@ -1,8 +0,0 @@
1
- {
2
- "component": true,
3
- "styleIsolation": "shared",
4
- "usingComponents": {
5
- "mp-loading": "weui-miniprogram/loading/loading",
6
- "invite-rank-item": "./invite-rank-item"
7
- }
8
- }
@@ -1,42 +0,0 @@
1
- <view class="invite-rank">
2
- <!-- 邀请榜顶部 -->
3
- <view class="invite-rank__hd">
4
- <view class="text-rank-title">邀请榜</view>
5
- <view class="btn-rank-detail" wx:if="{{isInited && showDetail}}" bindtap="onTapMyDetail">
6
- 我的邀请明细
7
- </view>
8
- <view class="flex-1"></view>
9
- <view wx:if="{{ruleInContent.length>0}}" class="btn-rank-rule" bindtap="onTapRankRule">
10
- 邀请榜规则
11
- <image wx:if="{{showRulePanel}}" src="data:image/svg+xml;base64,PHN2ZyB0PSIxNzU1NzQ0NDE2MzkzIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjE2NjI5IiB3aWR0aD0iNDgiIGhlaWdodD0iNDgiPjxwYXRoIGQ9Ik0yMjguODY0IDY2Ny4xMzZhMzguNCAzOC40IDAgMCAwIDU0LjI3MiAwTDUxMiA0MzguMzIzMmwyMjguODY0IDIyOC44NjRhMzguNCAzOC40IDAgMCAwIDU0LjI3Mi01NC4zMjMybC0yNTYtMjU2YTM4LjQgMzguNCAwIDAgMC01NC4yNzIgMGwtMjU2IDI1NmEzOC40IDM4LjQgMCAwIDAgMCA1NC4zMjMyeiIgZmlsbD0iIzhDOEM4QyIgcC1pZD0iMTY2MzAiPjwvcGF0aD48L3N2Zz4=" mode="widthFix" style="width: 24px; height: 24px;" />
12
- <image wx:else src="data:image/svg+xml;base64,PHN2ZyB0PSIxNzU1NzQ0Mjk3MTI0IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjE2MzA3IiB3aWR0aD0iNDgiIGhlaWdodD0iNDgiPjxwYXRoIGQ9Ik0yMjguODY0IDM1Ni44NjRhMzguNCAzOC40IDAgMCAxIDU0LjI3MiAwTDUxMiA1ODUuNjc2OGwyMjguODY0LTIyOC44NjRhMzguNCAzOC40IDAgMCAxIDU0LjI3MiA1NC4zMjMybC0yNTYgMjU2YTM4LjQgMzguNCAwIDAgMS01NC4yNzIgMGwtMjU2LTI1NmEzOC40IDM4LjQgMCAwIDEgMC01NC4zMjMyeiIgZmlsbD0iIzhDOEM4QyIgcC1pZD0iMTYzMDgiPjwvcGF0aD48L3N2Zz4=" mode="widthFix" style="width: 24px; height: 24px;" />
13
- </view>
14
- </view>
15
- <!-- 邀请榜中间内容区 -->
16
- <scroll-view class="invite-rank__bd" scroll-y>
17
- <view class="invite-rank-list" wx:if="{{isInited && total>0}}" wx:for="{{dataList}}" wx:key="invite_id">
18
- <invite-rank-item item="{{item}}" hasCrown="{{true}}"></invite-rank-item>
19
- </view>
20
- <view class="empty-data" wx:if="{{isInited && total===0}}">
21
- <image class="empty-img" src="https://cnstatic01.e.vhall.com/common-static/images/mp/sofa.png" />
22
- <view>您还未邀请,快去抢沙发吧~</view>
23
- </view>
24
- </scroll-view>
25
- <!-- 邀请榜底部 -->
26
- <view class="invite-rank__ft" wx:if="{{isInited}}">
27
- <invite-rank-item item="{{my}}" bind:onTapNum="onTapMyDetail"></invite-rank-item>
28
- </view>
29
- <!-- loading -->
30
- <view class="loading-box" wx:if="{{isLoading}}">
31
- <mp-loading type="circle" show="{{isLoading}}" />
32
- </view>
33
- <!-- 加载失败显示 -->
34
- <view class="loading-faild" wx:if="{{!isLoading && !isInited}}">
35
- <view style="margin-bottom:10px">数据加载失败!</view>
36
- <button class="weui-btn" type="primary" size="small" bindtap="handleReload">重新加载</button>
37
- </view>
38
- <!-- 邀请榜规则悬浮面板 -->
39
- <scroll-view wx:if="{{showRulePanel}}" class="invite-rank-rulebox" scroll-y>
40
- <rich-text class="rich-text" nodes="{{ruleInContent}}"></rich-text>
41
- </scroll-view>
42
- </view>
@@ -1 +0,0 @@
1
- .invite-rank{color:rgba(0,0,0,.65);display:flex;flex-direction:column;height:calc(100% - 48rpx);overflow:hidden;padding-top:24rpx;position:relative;width:100%}.invite-rank .flex-1{flex:1}.invite-rank__hd{display:flex;flex-direction:row;padding:0 24rpx}.invite-rank__hd .text-rank-title{font-size:1rem}.invite-rank__hd .btn-rank-detail{color:#0a7ff5;font-size:1rem;margin-left:36rpx}.invite-rank__bd{flex:1;overflow-y:auto;padding:24rpx;width:calc(100% - 48rpx)}.invite-rank__ft{background-color:#f0f0f0;padding:0 24rpx}.invite-rank .empty-data{align-items:center;display:flex;flex-direction:column;font-size:1rem;height:100%;justify-content:center;margin-top:-20rpx;overflow:hidden}.invite-rank .empty-data .empty-img{height:168rpx;margin-left:50rpx;width:242rpx}.invite-rank .loading-box,.invite-rank .loading-faild{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;overflow:hidden}.invite-rank .btn-rank-rule{align-items:center;display:flex;font-size:1rem}.invite-rank .invite-rank-rulebox{background-color:#fff;box-shadow:2px 2px 10px rgba(0,0,0,.2);height:300rpx;left:0;overflow:auto;position:absolute;right:0;top:100rpx}.invite-rank .invite-rank-rulebox .rich-text{bottom:24rpx;left:24rpx;position:absolute;right:24rpx;top:24rpx}
@@ -1,12 +0,0 @@
1
- Component({
2
- properties: {
3
- item: {
4
- type: Object,
5
- },
6
- },
7
- methods: {
8
- onTapNum() {
9
- this.triggerEvent('onTapNum', this.properties.item); // 事件名 + 数据
10
- },
11
- },
12
- });
@@ -1,4 +0,0 @@
1
- {
2
- "component": true,
3
- "styleIsolation": "shared"
4
- }
@@ -1,21 +0,0 @@
1
- <wxs src="./util.wxs" module="util" />
2
- <view class="invite-rank-item">
3
- <view class="invite-rank-item__seq">
4
- <view class="text-seq {{util.medalClass(item.position)}}">
5
- {{ util.formatSeq(item.position)}}
6
- </view>
7
- </view>
8
- <view class="invite-rank-item__avatar {{util.medalClass(item.position)}}">
9
- <image class="avatar-img" lazy-load src="{{item.img_url||'https://cnstatic01.e.vhall.com/common-static/images/default_avatar.png'}}" />
10
- <image class="crown-img" lazy-load wx:if="{{item.position===1}}" src="./img/gold.png" />
11
- <image class="crown-img" lazy-load wx:if="{{item.position===2}}" src="./img/silver.png" />
12
- <image class="crown-img" lazy-load wx:if="{{item.position===3}}" src="./img/bronze.png" />
13
- </view>
14
- <view class="invite-rank-item__name">{{item.nick_name}}</view>
15
- <view class="invite-rank-item__content">
16
- 邀请
17
- <text class="user-num" bindtap="onTapNum">{{item.num}}</text>
18
- 人
19
- </view>
20
- </view>
21
-
@@ -1 +0,0 @@
1
- .invite-rank-item{align-items:center;display:flex;flex-direction:row;font-size:1rem;line-height:1.5;padding:16rpx 0}.invite-rank-item__seq{width:40rpx}.invite-rank-item__seq .text-seq{font-weight:700}.invite-rank-item__seq .text-seq.is-gold{color:#ffcd5c}.invite-rank-item__seq .text-seq.is-silver{color:#aeb7d4}.invite-rank-item__seq .text-seq.is-bronze{color:#f4a37a}.invite-rank-item__avatar{background-repeat:no-repeat;background-size:contain;border:2rpx solid transparent;border-radius:50px;height:60rpx;margin-left:16rpx;position:relative;width:60rpx}.invite-rank-item__avatar.is-gold{border-color:#ffcd5c}.invite-rank-item__avatar.is-silver{border-color:#aeb7d4}.invite-rank-item__avatar.is-bronze{border-color:#f4a37a}.invite-rank-item__avatar .avatar-img{border-radius:50px;height:100%;overflow:hidden;width:100%}.invite-rank-item__avatar .crown-img{height:24rpx;position:absolute;right:-6rpx;top:-10rpx;width:24rpx}.invite-rank-item__name{flex:1;padding-left:20rpx}.invite-rank-item__content{text-align:right;width:200rpx}.invite-rank-item__content .user-num{color:#fb2626;padding:2rpx}
@@ -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
- }