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,146 +0,0 @@
1
- const errorMap = {
2
- 512002: {
3
- msg: '活动不存在或已删除'
4
- },
5
- 512912: {
6
- msg: '视频已过观看有效期',
7
- cls: 'watch-expired', // 样式
8
- },
9
- 512514: {
10
- msg: '您已被禁止访问当前活动',
11
- },
12
- 512541: {
13
- msg: '活动现场太火爆,已超过人数上限!'
14
- },
15
- // 下面是自定义错误码
16
- 900001: {
17
- msg: '网络出现异常,请刷新重试',
18
- showRefresh: true
19
- },
20
- 900002: {
21
- msg: '账号已在其他设备上观看该活动',
22
- },
23
- 900003: {
24
- msg: '您未参与聊天或点赞,已被踢出直播间\n欢迎再次观看',
25
- cls: 'kick-out'
26
- },
27
- 900004: {
28
- msg: '您未签到已自动退出直播间\n欢迎再次观看',
29
- cls: 'kick-out'
30
- },
31
- // 自定义sdk错误码
32
- 4001: {
33
- msg: '模块缺失',// MODULE_NOT_FOUND
34
- },
35
- 5001: {
36
- msg: '获取活动信息失败', // INIT_BEFORE_FAILD
37
- showRefresh: true,
38
- },
39
- 5002: {
40
- msg: '进入直播间失败', // INIT_ROOM_FAILD 初始化房间失败
41
- showRefresh: true,
42
- },
43
- 5003: {
44
- msg: '进入直播间失败', // INIT_IM_FAILD:初始化IM失败
45
- showRefresh: true,
46
- },
47
- 5004: {
48
- msg: '进入直播间失败', // INIT_PERMISSIONS_FAILD:初始化权限失败
49
- showRefresh: true,
50
- },
51
- 5005: {
52
- msg: '进入化直播间失败', // INIT_COMMON_CONFIG_FAILD:初始化通用配置失败
53
- showRefresh: true,
54
- },
55
- 5006: {
56
- msg: '进入直播间失败', // INIT_INVATOOL_STATUS_FAILD:初始化互动状态失败
57
- showRefresh: true,
58
- },
59
- 5020: {
60
- msg: '进入直播间异常', // INIT_EXCEPTION
61
- showRefresh: true,
62
- },
63
- };
64
-
65
- Component({
66
- properties: {
67
- // 错误响应信息
68
- errorResp: {
69
- type: Object,
70
- value: null,
71
- }
72
- },
73
- data: {
74
- code: '', // 错误码
75
- errMsg: null, // 错误信息
76
- errTip: '', // 附加错误信息
77
- containerCls: 'default',
78
- secondText: 0, // 倒计时秒数
79
- showRefresh: false
80
- },
81
- observers: {
82
- errorResp: function (newVal) {
83
- const code = newVal?.code;
84
- const errorObj = errorMap[code] || errorMap['900001'];
85
- let errTip = '';
86
- if (newVal?.detail) {
87
- if (newVal.detail.errno == 600001 || (newVal.detail.errMsg === 'request:fail' && newVal.detail.errno === undefined)) {
88
- errTip = '请检查网络是否正常'
89
- }
90
- }
91
- this.setData({
92
- code,
93
- errMsg: errorObj.msg || '网络异常',
94
- errTip,
95
- containerCls: errorObj.cls || 'default',
96
- showRefresh: !!errorObj.showRefresh
97
- });
98
-
99
- if (code === 900004) {
100
- // 未签到踢出
101
- this.setData({
102
- secondText: 3 + Math.round(Math.random() * (7 - 3)),
103
- });
104
- let timer = setInterval(() => {
105
- this.setData({
106
- secondText: this.data.secondText - 1,
107
- });
108
- if (this.data.secondText <= 0) {
109
- clearInterval(timer);
110
- }
111
- }, 1000);
112
- } else if (code === 512514) {
113
- // 活动踢出
114
- wx.showToast({
115
- title: '您已被踢出房间',
116
- icon: 'none',
117
- });
118
- }
119
- },
120
- },
121
- methods: {
122
- onTap() {
123
- if (this.data.code === 900004 && this.data.secondText > 0) return;
124
- // 获取页面栈
125
- const pageStack = getCurrentPages();
126
- const currentPage = pageStack[pageStack.length - 1];
127
- const route = currentPage.route;
128
- const options = currentPage.options;
129
-
130
- // 拼接路由参数
131
- let queryStr = '';
132
- const params = [];
133
- for (const key in options) {
134
- params.push(`${key}=${encodeURIComponent(options[key])}`);
135
- }
136
- if (params.length) {
137
- queryStr = '?' + params.join('&');
138
- }
139
-
140
- // redirectTo:关闭当前页面,重新打开同页面,页面栈层级不变
141
- wx.redirectTo({
142
- url: `/${route}${queryStr}`
143
- });
144
- },
145
- },
146
- });
@@ -1,5 +0,0 @@
1
- {
2
- "component": true,
3
- "styleIsolation": "shared",
4
- "usingComponents": {}
5
- }
@@ -1,37 +0,0 @@
1
- <view class="error-container {{containerCls}}">
2
- <!-- 视频观看已过有效期 -->
3
- <view class="error-card" wx:if="{{code===512912}}">
4
- <image class="error-image" mode="widthFix" src="https://cnstatic01.e.vhall.com/common-static/images/mp/playback_expire.png" />
5
- <text class="error-text">{{errMsg}}</text>
6
- </view>
7
- <!-- 相同账号观看踢出 -->
8
- <view class="error-card" wx:elif="{{code===900002}}">
9
- <text class="error-text">{{errMsg}}</text>
10
- <button class="error-btn weui-btn" type="primary" bindtap="onTap">继续观看</button>
11
- </view>
12
- <!-- 未签到踢出 -->
13
- <view class="error-card" wx:elif="{{code===900004}}">
14
- <image class="error-image" mode="widthFix" src="https://cnstatic01.e.vhall.com/common-static/images/mp/kick_out.png" />
15
- <text class="error-text">{{errMsg}}</text>
16
- <button class="error-btn weui-btn" type="primary" bindtap="onTap" disabled="{{secondText>0}}">
17
- 继续观看
18
- <text wx:if="{{secondText>0}}">{{secondText}}s</text>
19
- </button>
20
- </view>
21
- <!-- 通用,显示“刷新重试”按钮 -->
22
- <view class="error-card" wx:elif="{{showRefresh}}">
23
- <text class="error-text">{{errMsg}}</text>
24
- <view wx:if="{{errTip}}" class="error-tip">{{errTip}}</view>
25
- <button class="weui-btn error-btn" type="primary" bindtap="onTap">刷新</button>
26
- <view class="error-code">
27
- <view>code: {{code}}</view>
28
- <!-- <view>errMsg: 请检查直播间是否设置了观看限制</view> -->
29
- </view>
30
- </view>
31
- <!-- 通用 -->
32
- <block wx:else>
33
- <text class="error-text">{{errMsg}}</text>
34
- <view class="error-code">code: {{code}}</view>
35
- </block>
36
- </view>
37
-
@@ -1 +0,0 @@
1
- .error-container{align-items:center;background-color:#fff;bottom:0;display:flex;flex-direction:column;justify-content:center;left:0;position:fixed;right:0;top:0}.error-container .error-icon{color:#999;font-size:100px}.error-container .error-text{color:#fff;font-size:1.21rem;margin-top:40rpx}.error-container .error-tip{color:#ddd;font-size:1rem;line-height:2;white-space:normal;word-break:break-all}.error-container .error-card{align-items:center;display:flex;flex-direction:column;margin-bottom:10px}.error-container .error-card .error-image{width:300rpx}.error-container .error-card .error-text{color:#262626;font-size:1.21rem;text-align:center;-webkit-user-select:none;user-select:none}.error-container .error-card .error-tip{color:#494949;font-size:1rem;line-height:2;white-space:normal;word-break:break-all}.error-container .error-card .error-btn{margin-top:20px}.error-container.watch-expired .error-image{width:200rpx}.error-container.default{background-color:#1e1e1e;background-image:url(https://cnstatic01.e.vhall.com/common-static/images/mp/error_bg.jpg);background-position:top;background-repeat:no-repeat;background-size:cover}.error-container.default .error-card .error-text{color:#fff;font-size:1.21rem;margin-top:40rpx}.error-container.default .error-card .error-tip{color:#ddd;font-size:1rem;line-height:2;white-space:normal;word-break:break-all}.error-code{align-items:center;border-top:1rpx solid hsla(0,0%,100%,.15);color:gray;display:flex;flex-direction:column;font-size:12px;margin-top:40rpx;padding-top:16rpx;width:100%}
@@ -1,161 +0,0 @@
1
- // 全局弹框层级管理器:统一维护弹框层级,确保新弹框层级最高
2
- const popupManager = {
3
- // 存储当前所有已显示弹框的层级
4
- activeZIndexes: [],
5
- // 默认基础层级
6
- defaultBaseZIndex: 6000,
7
-
8
- /**
9
- * 注册弹框层级(弹框显示时调用)
10
- * @param {number} customZIndex - 手动指定的层级(可选)
11
- * @returns {number} - 最终分配的层级
12
- */
13
- registerZIndex(customZIndex) {
14
- let zIndex;
15
-
16
- if (typeof customZIndex === 'number' && customZIndex > 0) {
17
- // 使用手动指定的层级
18
- zIndex = customZIndex;
19
- } else {
20
- // 自动计算最高层级
21
- if (this.activeZIndexes.length === 0) {
22
- zIndex = this.defaultBaseZIndex;
23
- } else {
24
- // 找到当前最大层级并加1
25
- zIndex = Math.max(...this.activeZIndexes) + 1;
26
- }
27
- }
28
-
29
- // 注册层级
30
- this.activeZIndexes.push(zIndex);
31
- return zIndex;
32
- },
33
-
34
- /**
35
- * 移除层级注册(弹框关闭时调用)
36
- * @param {number} zIndex - 需要移除的层级
37
- */
38
- unregisterZIndex(zIndex) {
39
- const index = this.activeZIndexes.indexOf(zIndex);
40
- if (index !== -1) {
41
- this.activeZIndexes.splice(index, 1);
42
- }
43
- },
44
- };
45
- Component({
46
- properties: {
47
- // 标识,关闭popup时会返回去
48
- key: String,
49
- // 控制弹框显示/隐藏
50
- visible: {
51
- type: Boolean,
52
- value: false,
53
- observer: function (newVal, oldVal) {
54
- if (newVal && !oldVal) {
55
- // 弹框显示时初始化层级
56
- this.initZIndex();
57
- } else if (!newVal && oldVal) {
58
- // 弹框隐藏时移除层级注册
59
- this.unregisterZIndex();
60
- }
61
- },
62
- },
63
-
64
- // 弹出模式:bottom(底部)或center(中间) bottom-right(底部居右)
65
- mode: {
66
- type: String,
67
- value: 'center', // 默认底部弹出
68
- },
69
-
70
- // 标题
71
- title: {
72
- type: String,
73
- value: '',
74
- },
75
-
76
- // 是否显示关闭按钮
77
- showClose: {
78
- type: Boolean,
79
- value: true,
80
- },
81
-
82
- hasMask: {
83
- type: Boolean,
84
- value: true,
85
- },
86
-
87
- // 点击遮罩是否可以关闭
88
- maskClosable: {
89
- type: Boolean,
90
- value: true,
91
- },
92
-
93
- hasGap: {
94
- type: Boolean,
95
- value: true,
96
- },
97
- bgColor: {
98
- type: String,
99
- value: '#ffffff',
100
- },
101
- },
102
-
103
- data: {
104
- // 弹框整体层级(遮罩和内容共用)
105
- zIndex: 0,
106
- // 当前弹框使用的层级
107
- currentZIndex: null,
108
- },
109
-
110
- methods: {
111
- /**
112
- * 初始化层级
113
- */
114
- initZIndex() {
115
- // 注册并获取层级
116
- const zIndex = popupManager.registerZIndex(this.data.zIndex);
117
-
118
- this.setData({
119
- currentZIndex: zIndex,
120
- zIndex: zIndex,
121
- });
122
- },
123
-
124
- /**
125
- * 移除层级注册
126
- */
127
- unregisterZIndex() {
128
- if (this.data.currentZIndex !== null) {
129
- popupManager.unregisterZIndex(this.data.currentZIndex);
130
- this.setData({
131
- currentZIndex: null,
132
- });
133
- }
134
- },
135
-
136
- /**
137
- * 点击遮罩层 - 抛出关闭事件
138
- */
139
- handleMaskClick() {
140
- if (this.data.maskClosable) {
141
- // 抛出关闭事件,附带来源信息
142
- this.triggerEvent('close', { source: 'mask', key: this.properties.key });
143
- }
144
- },
145
-
146
- /**
147
- * 点击关闭按钮 - 抛出关闭事件
148
- */
149
- handleCloseClick() {
150
- // 抛出关闭事件,附带来源信息
151
- this.triggerEvent('close', { source: 'closeButton', key: this.properties.key });
152
- },
153
- },
154
-
155
- lifetimes: {
156
- ready() {},
157
- detached() {
158
- this.unregisterZIndex();
159
- },
160
- },
161
- });
@@ -1,5 +0,0 @@
1
- {
2
- "component": true,
3
- "usingComponents": {}
4
- }
5
-
@@ -1,17 +0,0 @@
1
- <view class="popup-container" wx:if="{{visible}}" style="z-index: {{zIndex}};">
2
- <!-- 遮罩层 -->
3
- <view class="popup-mask" wx:if="{{hasMask}}" bindtap="{{maskClosable ? 'handleMaskClick' : ''}}" style="opacity: {{visible ? 1 : 0}}; transition: opacity {{duration}}ms;"></view>
4
- <!-- 弹框内容 -->
5
- <view class="popup-content {{mode}}" style="{{bgColor?'background-color:'+bgColor+';': '#fff'}};transition: transform {{duration}}ms, opacity {{duration}}ms;opacity: {{visible ? 1 : 0}};">
6
- <!-- 关闭按钮 -->
7
- <view class="popup-close" wx:if="{{showClose}}" bindtap="handleCloseClick">
8
- <view class="close-icon"></view>
9
- </view>
10
- <!-- 头部区域(带关闭按钮) -->
11
- <view class="popup-header" wx:if="{{title}}">{{title}}</view>
12
- <!-- 内容区域 -->
13
- <view class="popup-body {{hasGap ? 'has-gap' : ''}}">
14
- <slot></slot>
15
- </view>
16
- </view>
17
- </view>
@@ -1 +0,0 @@
1
- .popup-container{pointer-events:none;position:fixed;z-index:1000}.popup-container,.popup-mask{bottom:0;left:0;right:0;top:0}.popup-mask{animation:maskFadeIn .25s ease;background-color:rgba(0,0,0,.5);pointer-events:auto;position:absolute}@keyframes maskFadeIn{0%{opacity:0}to{opacity:1}}.popup-content{background-color:#fff;border-radius:16rpx;box-sizing:border-box;pointer-events:auto;position:absolute;width:100%}.popup-content.bottom{animation:slideUp .3s ease;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:24rpx;border-top-right-radius:24rpx;bottom:0}@keyframes slideUp{0%{transform:translateY(100%)}to{transform:translateY(0)}}.popup-content.center{left:50%;max-width:100%;top:50%;transform:translate(-50%,-50%) scale(.9);width:auto}.popup-content.bottom-right{bottom:0;right:0;width:auto}.popup-header{align-items:center;border-bottom:1rpx solid #eee;color:#333;display:flex;font-size:1.21rem;font-weight:700;justify-content:center;padding:30rpx 32rpx;position:relative}.popup-close{height:40rpx;position:absolute;right:32rpx;top:20rpx;width:40rpx;z-index:6500}.close-icon{height:40rpx;position:relative;width:40rpx}.close-icon:after,.close-icon:before{background-color:#999;content:"";height:2rpx;left:0;position:absolute;top:20rpx;width:40rpx}.close-icon:before{transform:rotate(45deg)}.close-icon:after{transform:rotate(-45deg)}.popup-body{color:#666;font-size:1.07rem;line-height:1.6;padding:0}.popup-body.has-gap{padding:40rpx 32rpx}
@@ -1,95 +0,0 @@
1
- Component({
2
- options: {
3
- addGlobalClass: true,
4
- pureDataPattern: /^_/,
5
- multipleSlots: true,
6
- },
7
- properties: {
8
- tabs: {
9
- type: Array,
10
- value: [],
11
- },
12
- tabClass: {
13
- type: String,
14
- value: '',
15
- },
16
- swiperClass: {
17
- type: String,
18
- value: '',
19
- },
20
- activeClass: {
21
- type: String,
22
- value: '',
23
- },
24
- tabUnderlineColor: {
25
- type: String,
26
- value: 'rgba(251, 38, 38, 1)',
27
- },
28
- tabActiveTextColor: {
29
- type: String,
30
- value: '#000000',
31
- },
32
- tabInactiveTextColor: {
33
- type: String,
34
- value: '#000000',
35
- },
36
- tabBackgroundColor: {
37
- type: String,
38
- value: '#ffffff',
39
- },
40
- activeTab: {
41
- type: Number,
42
- value: 0,
43
- },
44
- swipeable: {
45
- type: Boolean,
46
- value: true,
47
- },
48
- animation: {
49
- type: Boolean,
50
- value: false,
51
- },
52
- duration: {
53
- type: Number,
54
- value: 0,
55
- },
56
- },
57
- data: {
58
- currentView: 0,
59
- },
60
- observers: {
61
- activeTab: function activeTab(_activeTab) {
62
- var len = this.data.tabs.length;
63
- if (len === 0) return;
64
- var currentView = _activeTab - 1;
65
- if (currentView < 0) currentView = 0;
66
- if (currentView > len - 1) currentView = len - 1;
67
- this.setData({
68
- currentView: currentView,
69
- });
70
- },
71
- },
72
- lifetimes: {
73
- created: function created() {},
74
- },
75
- methods: {
76
- handleTabClick: function handleTabClick(e) {
77
- var index = e.currentTarget.dataset.index;
78
- this.setData({
79
- activeTab: index,
80
- });
81
- this.triggerEvent('tabclick', {
82
- index: index,
83
- });
84
- },
85
- handleSwiperChange: function handleSwiperChange(e) {
86
- var index = e.detail.current;
87
- this.setData({
88
- activeTab: index,
89
- });
90
- this.triggerEvent('change', {
91
- index: index,
92
- });
93
- },
94
- },
95
- });
@@ -1,4 +0,0 @@
1
- {
2
- "component": true,
3
- "usingComponents": {}
4
- }
@@ -1,22 +0,0 @@
1
- <view class="weui-tabs">
2
- <view class="weui-tabs-bar__wrp">
3
- <scroll-view scroll-x scroll-into-view="item_{{currentView}}" scroll-with-animation="{{animation}}">
4
- <view class="weui-tabs-bar__content">
5
- <block wx:for="{{tabs}}" wx:key="id">
6
- <view id="item_{{index}}" class="weui-tabs-bar__item" style="background-color: {{tabBackgroundColor}}; color: {{activeTab === index ? tabActiveTextColor : tabInactiveTextColor}};" bindtap="handleTabClick" data-index="{{index}}">
7
- <view class="weui-tabs-bar__title {{tabClass}} {{activeTab === index ? activeClass : ''}}">
8
- <text class="item-name">{{item.name}}</text>
9
- <view class="active-line" wx:if="{{activeTab === index}}"></view>
10
- </view>
11
- </view>
12
- </block>
13
- </view>
14
- </scroll-view>
15
- </view>
16
- <swiper class="{{swiperClass}}" current="{{activeTab}}" duration="{{duration}}" bindchange="handleSwiperChange">
17
- <swiper-item wx:for="{{tabs}}" wx:key="id">
18
- <slot data-set=" {{item}}" name="tab-content-{{index}}-{{id}}"></slot>
19
- </swiper-item>
20
- </swiper>
21
- </view>
22
-
@@ -1 +0,0 @@
1
- .weui-tabs{display:flex;flex-direction:column;height:100%;width:100%}.weui-tabs-bar__wrp{background-color:initial;width:100%}.weui-tabs-bar__content{background-color:#fff;min-width:100%;white-space:nowrap}.weui-tabs-bar__item{background-color:initial!important;display:inline-block;height:95%;max-width:28%}.weui-tabs-bar__title{border-bottom:2px solid transparent;display:inline-block;margin:4px 4px 0;max-width:100%}.weui-tabs-bar__title .active-line{background:#fb2626;border-radius:3rpx;height:6rpx;margin:0 auto;width:40rpx}.weui-tabs-bar__title .item-name{display:inline-block;font-size:1rem;max-width:100%;overflow:hidden;padding:0 32rpx;text-overflow:ellipsis;white-space:nowrap}.menu-swiper{flex:1;height:0;width:100%}.p-swiper{height:480px}
@@ -1 +0,0 @@
1
- !function(){"use strict";var t={d:function(n,e){for(var o in e)t.o(e,o)&&!t.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:e[o]})},o:function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},n={};t.r(n),t.d(n,{_PLATFORM:function(){return o},envConfig:function(){return e}});const e={production:{BASE_URL:"https://open-api.vhall.com",VHALLYUN_API_BASE:"https://api.vhallyun.com",LOG_REPORT_BASE_URL:"https://dc.e.vhall.com/login",PUBLIC_KEY:"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0eUJFtW3vryA2NXx4M4f\n1w7dg3PHwOCA6Kx7JVfD/9eBGfqLhqsp+pg4AXG4PhuQx8EsV+sncQIiQO5J2//T\n3pO8LftDtCQztLnxnhq+BjhbFeswgfez2CwV2YKLTX2zyZ69T1Vu/M4H4gWSLeiV\n1FcH6xycA2+jG+EvOxSSItCKYT9EkB9BZSKf5RU7gM+qPtzdPtJP5vlsMCa0WnpY\nI6Qrmu/w9CZkL0397gUek9nBpPHkyPYg7ZijF3Gj8EqCMCVVTYpX96k4dd/Rz1em\ns4OSPF5jDsYZi58p+LmTcc3g7W9bD3QWWxzn47ie/Dh9LbnWfCqpGjUaHd3d42vR\ncQIDAQAB\n-----END PUBLIC KEY-----"},test:{BASE_URL:"https://test01-open-api.vhou.tv",VHALLYUN_API_BASE:"https://test01-api.vhallyun.com",LOG_REPORT_BASE_URL:"https://t-dc.e.vhall.com/login",PUBLIC_KEY:"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxWGCgHz2NLdVNa91CsNX\nFfCsxfgkTx738t3yMpuPYLL/5wwuWRrX7hBfNsfC+R5BW5b13ISzD001NNt+BWGK\np3V5fdWO18j9M/AhaTV2Ao/IpdP5huvVoNFVWPUQvX70FHu0sPVTev8ycAZHUpKx\n+mm83wxOpWBN5vAMJYx75pRCQfidb73XbOm6JXLJlxN91TUTrTiblxBhRwH0AQyr\ns9dUr+IJUZ1ea2uU3fkB4uYh7V/cHuNDMsJowfLtEU2+9IqEuJY4OwqX0qdfPF72\nsGMjCgghgL0z/7kv7Qe1+tOkJTBQTzODXBheGTVbF7hH2+5XuZsK2TfgBIew0I4k\n1wIDAQAB\n-----END PUBLIC KEY-----"}},o=19;module.exports=n}();