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,98 +0,0 @@
1
- // src/components/vhall-im/vhall-im.js
2
- import { formatDateTime } from '../../shared/utils';
3
- Component({
4
- options: {
5
- styleIsolation: 'shared',
6
- },
7
- /**
8
- * 组件的属性列表
9
- */
10
- properties: {
11
- sdkInstance: {
12
- type: Object,
13
- value: null,
14
- },
15
- mode: {
16
- type: Number,
17
- value: 1,
18
- },
19
- },
20
-
21
- /**
22
- * 组件的初始数据
23
- */
24
- data: {
25
- messages: [], // 存储聊天消息
26
- inputValue: '', // 输入框的值
27
- scrollTop: 0,
28
- vhallImInstance: null, //消息sdk实例
29
- },
30
-
31
- lifetimes: {
32
- created() {
33
- console.debug('chat-comp created');
34
- },
35
- attached() {
36
- console.debug('chat-comp attached');
37
- },
38
- async ready() {
39
- console.debug('chat-comp ready');
40
- },
41
- detached() {
42
- console.debug('chat-comp detached');
43
- },
44
- },
45
-
46
- /**
47
- * 组件的方法列表
48
- */
49
- methods: {
50
- // 显示接收到的消息
51
- showMessage(type, message) {
52
- const newMessage = {
53
- msg_id: message.msg_id || Date.now().toString(),
54
- type: type,
55
- user_id: message.user_id || '系统',
56
- date_time: message.date_time || formatDateTime(new Date()),
57
- text_content: message.text_content || message.data,
58
- data: message.data,
59
- };
60
-
61
- this.setData({
62
- messages: [...this.data.messages, newMessage],
63
- scrollTop: 99999, // 滚动到底部
64
- });
65
- },
66
- // 输入框输入事件
67
- onInput: function (e) {
68
- this.setData({
69
- inputValue: e.detail.value,
70
- });
71
- },
72
- // 发送消息
73
- send() {
74
- // 内容
75
- const message = this.data.inputValue.trim();
76
- if (message === '') {
77
- return;
78
- }
79
- // 按所选类型调用实例方法
80
- const methodName = this.data.msgTypes[this.data.typeIndex]['value'];
81
- if (typeof this.vhallImInstance[methodName] === 'function') {
82
- this.vhallImInstance[methodName]({
83
- data: message,
84
- })
85
- .then((data) => {
86
- console.log(`${methodName}发送消息success: `, data);
87
- const rand = this.generateRandomString();
88
- this.setData({
89
- inputValue: rand,
90
- });
91
- })
92
- .catch((e) => {
93
- console.log(`${methodName}发送消息failed: `, e);
94
- });
95
- }
96
- },
97
- },
98
- });
@@ -1,7 +0,0 @@
1
- {
2
- "component": true,
3
- "usingComponents": {
4
- "chat-list": "./chat-list/chat-list",
5
- "chat-edit": "./chat-edit/chat-edit"
6
- }
7
- }
@@ -1,7 +0,0 @@
1
- <view class="chat-wrap mode{{mode}}">
2
- <chat-list class="chat-list" mode="{{mode}}" id="chatList" sdkInstance="{{sdkInstance}}" chat-list="{{ chatList }}" />
3
- <chat-edit class="chat-edit" sdkInstance="{{sdkInstance}}">
4
- <slot></slot>
5
- </chat-edit>
6
- </view>
7
-
@@ -1 +0,0 @@
1
- .chat-wrap{display:flex;flex-direction:column;font-family:PingFang SC,Helvetica Neue,Helvetica,Hiragino Sans GB,Microsoft YaHei,微软雅黑,Arial,sans-serif;height:100%;width:100%}.chat-wrap .chat-edit{height:3.2rem;padding-bottom:env(safe-area-inset-bottom);width:100%}.chat-wrap.mode1 .chat-edit{background-color:#fff}.chat-wrap.mode0 .comment-wrapper .chat-edit-input-box{flex:1;width:auto}.chat-wrap.mode0 .comment-wrapper .chat-edit-input,.chat-wrap.mode0 .comment-wrapper .chat-edit-input-placeholder{color:#fff}.chat-list{flex:1;height:0;position:relative}
@@ -1,118 +0,0 @@
1
- Component({
2
- properties: {
3
- sdkInstance: {
4
- type: Object,
5
- value: null,
6
- }
7
- },
8
- data: {
9
- giftMessages: []
10
- },
11
- observers: {
12
- sdkInstance: function sdkInstance(_sdkInstance) {
13
- if (!_sdkInstance) return;
14
- this.sdkInstance = _sdkInstance;
15
- this.initListener();
16
- },
17
- },
18
- lifetimes: {
19
- detached() {
20
- // 组件销毁时清除监听
21
- this.unlistener && this.unlistener();
22
- },
23
- },
24
- methods: {
25
- // 初始化事件监听
26
- initListener() {
27
- this.unlistener && this.unlistener();
28
- const obj = {};
29
- obj[this.sdkInstance.EVENT.GIFT_MSG] = (msg) => {
30
- this.handleGiftMessage(msg);
31
- };
32
- this.unlistener = this.sdkInstance.on(obj);
33
- },
34
-
35
- // 处理礼物消息
36
- handleGiftMessage(data) {
37
- // 生成唯一ID
38
- const id = Date.now() + Math.random().toString(36).substr(2, 9);
39
-
40
- // 构建礼物消息对象
41
- const giftMessage = {
42
- id,
43
- nickname: data.gift_user_name || '匿名用户',
44
- gift: {
45
- icon: data.gift_image_url || '',
46
- name: data.gift_name || '礼物'
47
- }
48
- };
49
-
50
- // 添加到礼物消息列表
51
- const newGiftMessages = [...this.data.giftMessages, giftMessage];
52
- this.setData({ giftMessages: newGiftMessages });
53
-
54
- // 触发动画
55
- this.triggerAnimation(id);
56
-
57
- // 3秒后移除礼物消息
58
- setTimeout(() => {
59
- this.removeGiftMessage(id);
60
- }, 3000);
61
- },
62
-
63
- // 触发动画
64
- triggerAnimation(id) {
65
- // 创建进入动画
66
- const animation = wx.createAnimation({
67
- duration: 500,
68
- timingFunction: 'ease-out'
69
- });
70
-
71
- // 从左侧滑入并稍微向上移动
72
- animation.translateX(0).translateY(-20).opacity(1).step();
73
-
74
- // 更新动画
75
- const newGiftMessages = this.data.giftMessages.map(item => {
76
- if (item.id === id) {
77
- return { ...item, animation: animation.export() };
78
- }
79
- return item;
80
- });
81
-
82
- this.setData({ giftMessages: newGiftMessages });
83
-
84
- // 2秒后开始飘出动画
85
- setTimeout(() => {
86
- this.floatAnimation(id);
87
- }, 2000);
88
- },
89
-
90
- // 飘出动画
91
- floatAnimation(id) {
92
- // 创建飘出动画
93
- const animation = wx.createAnimation({
94
- duration: 1000,
95
- timingFunction: 'ease-in-out'
96
- });
97
-
98
- // 向上飘动并逐渐透明
99
- animation.translateY(-60).opacity(0).step();
100
-
101
- // 更新动画
102
- const newGiftMessages = this.data.giftMessages.map(item => {
103
- if (item.id === id) {
104
- return { ...item, animation: animation.export() };
105
- }
106
- return item;
107
- });
108
-
109
- this.setData({ giftMessages: newGiftMessages });
110
- },
111
-
112
- // 移除礼物消息
113
- removeGiftMessage(id) {
114
- const finalGiftMessages = this.data.giftMessages.filter(item => item.id !== id);
115
- this.setData({ giftMessages: finalGiftMessages });
116
- },
117
- },
118
- });
@@ -1,3 +0,0 @@
1
- {
2
- "component": true
3
- }
@@ -1,16 +0,0 @@
1
- <view class="gift-display">
2
- <view
3
- wx:for="{{giftMessages}}"
4
- wx:key="id"
5
- class="gift-item"
6
- style="top: {{index * 80}}rpx;"
7
- animation="{{item.animation}}"
8
- >
9
- <view class="gift-content">
10
- <text class="gift-user">{{item.nickname}}</text>
11
- <text class="gift-action">送出了</text>
12
- <text class="gift-name">{{item.gift.name}}</text>
13
- <image class="gift-icon" src="{{item.gift.icon}}" mode="aspectFit"></image>
14
- </view>
15
- </view>
16
- </view>
@@ -1 +0,0 @@
1
- .gift-display{left:0;pointer-events:none;position:absolute;top:100rpx;z-index:9999;z-index:100}.gift-item{background:linear-gradient(90deg,#8274ff 2.98%,rgba(249,51,249,.4) 118.57%);border-radius:25rpx;left:20rpx;margin-bottom:10rpx;min-width:300rpx;opacity:0;padding:10rpx 20rpx;position:absolute;transform:translateX(-100%)}.gift-content,.gift-item{align-items:center;display:flex}.gift-content{flex-wrap:nowrap}.gift-action,.gift-user{color:#fff;font-size:.86rem;margin-right:10rpx;white-space:nowrap}.gift-icon{height:40rpx;margin-right:10rpx;transform:scale(2);transform-origin:left center;width:40rpx}.gift-name{color:gold;font-size:.86rem;font-weight:700;white-space:nowrap}
@@ -1,63 +0,0 @@
1
- Component({
2
- properties: {
3
- sdkInstance: {
4
- type: Object,
5
- value: null,
6
- }
7
- },
8
- data: {
9
- giftList: [],
10
- selectedGift: null
11
- },
12
- lifetimes: {
13
- attached() {
14
- // 组件挂载时调用获取礼物列表
15
- if (this.properties.sdkInstance) {
16
- this.sdkInstance = this.properties.sdkInstance;
17
- this.getGiftList();
18
- }
19
- }
20
- },
21
- methods: {
22
- // 获取礼物列表
23
- async getGiftList() {
24
-
25
- const interactServer = this.sdkInstance.get('interactServer');
26
- if (!interactServer) {
27
- console.error('InteractServer不存在');
28
- return;
29
- }
30
-
31
- // 调用 InteractServer 的 getGiftList 方法获取礼物列表
32
- const giftList = await interactServer.getGiftList();
33
- this.setData({ giftList });
34
- },
35
-
36
- // 选择礼物
37
- selectGift(e) {
38
- const gift = e.currentTarget.dataset.gift;
39
- this.setData({ selectedGift: gift });
40
- },
41
-
42
- // 发送礼物
43
- async sendGift(e) {
44
-
45
- if (!this.data.selectedGift) return;
46
-
47
- const interactServer = this.sdkInstance.get('interactServer');
48
- if (interactServer) {
49
- const res = await interactServer.sendGift(this.data.selectedGift);
50
- if(res.code==200){
51
- // 触发关闭事件,通知父组件关闭弹窗
52
- this.triggerEvent('onSendFinished');
53
- }else{
54
- wx.showToast({
55
- title: res.msg,
56
- icon: 'none',
57
- duration: 2000
58
- });
59
- }
60
- }
61
- },
62
- },
63
- });
@@ -1,6 +0,0 @@
1
- {
2
- "component": true,
3
- "usingComponents": {
4
- "vh-popup": "../../../pubComponents/popup/popup"
5
- }
6
- }
@@ -1,19 +0,0 @@
1
- <view class="gift-popup-content">
2
- <view class="gift-popup-header">
3
- </view>
4
- <view class="gift-list">
5
- <view
6
- wx:for="{{giftList}}"
7
- wx:key="id"
8
- class="gift-item {{selectedGift && selectedGift.id == item.id ? 'gift-item-selected' : ''}}"
9
- bindtap="selectGift"
10
- data-gift="{{item}}"
11
- >
12
- <image class="gift-item-icon" src="{{item.icon}}" mode="aspectFit"></image>
13
- <text class="gift-item-name" wx:if="{{selectedGift.id != item.id}}">{{item.name}}</text>
14
- <view class="gift-item-button" wx:if="{{selectedGift && selectedGift.id == item.id}}" catchtap="sendGift">
15
- <text class="gift-item-button-text">赠送</text>
16
- </view>
17
- </view>
18
- </view>
19
- </view>
@@ -1 +0,0 @@
1
- .gift-popup-content{background:#fff;border-radius:20rpx 20rpx 0 0;padding:20rpx}.gift-list{display:grid;gap:20rpx;grid-template-columns:repeat(4,1fr);max-height:400rpx;overflow-y:auto;padding:20rpx 0}.gift-item{align-items:center;border-radius:10rpx;box-sizing:border-box;display:flex;flex-direction:column;height:180rpx;justify-content:space-between;position:relative;transition:all .3s}.gift-item:active{background:#f5f5f5;transform:scale(.95)}.gift-item-selected{border:1px solid #ff4d4f}.gift-item-icon{height:120rpx;margin-bottom:10rpx;width:120rpx}.gift-item-name{color:#333;margin-bottom:5rpx}.gift-item-button,.gift-item-name{font-size:.86rem;text-align:center}.gift-item-button{background:#ff4d4f;color:#fff;display:block;line-height:1.71rem;width:100%}.gift-popup-footer{border-top:1rpx solid #f0f0f0;justify-content:space-between;margin-top:20rpx;padding:20rpx 0}.gift-popup-footer,.selected-gift-info{align-items:center;display:flex}.selected-gift-icon{height:40rpx;margin-right:10rpx;width:40rpx}.selected-gift-name{color:#333;font-size:1rem;margin-right:10rpx}.selected-gift-price{color:#ff4d4f;font-size:1rem;font-weight:700}.send-button{background:#ff4d4f;border-radius:25rpx;color:#fff;font-size:1rem;font-weight:700;padding:15rpx 40rpx}.send-button:active{background:#ff7875;transform:scale(.95)}.gift-loading{align-items:center;display:flex;flex-direction:column;justify-content:center;padding:100rpx 0}.gift-loading-spinner{animation:spin 1s linear infinite;border:4rpx solid #f0f0f0;border-radius:50%;border-top-color:#ff4d4f;height:60rpx;margin-bottom:20rpx;width:60rpx}.gift-loading-text{color:#999;font-size:1rem}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}
@@ -1,43 +0,0 @@
1
- Component({
2
- properties: {
3
- sdkInstance: {
4
- type: Object,
5
- value: null,
6
- },
7
- },
8
- data: {
9
- introduction: '',
10
- title: '',
11
- startTime: '',
12
- },
13
- lifetimes: {
14
- detached: function detached() {
15
- this.unsub && this.unsub();
16
- },
17
- },
18
- observers: {
19
- sdkInstance: function sdkInstance(_sdkInstance) {
20
- if (!_sdkInstance) return;
21
-
22
- this.sdkInstance = _sdkInstance;
23
- this.store = _sdkInstance.store;
24
- const _that = this;
25
- this.unsub = this.store.get({
26
- liveInfo: function (liveInfo) {
27
- liveInfo.introduction &&
28
- _that.setData({
29
- introduction: liveInfo.introduction.replace(
30
- /\<img/gi,
31
- "<img class='richTextImg' style='max-width:100%; height:auto !important;'"
32
- ),
33
- });
34
- _that.setData({
35
- title: liveInfo.title,
36
- startTime: liveInfo.startTime.slice(0, -3),
37
- });
38
- },
39
- });
40
- },
41
- },
42
- methods: {},
43
- });
@@ -1,3 +0,0 @@
1
- {
2
- "component": true
3
- }
@@ -1,8 +0,0 @@
1
- <view class="live-introduction">
2
- <scroll-view scroll-y="true" style="height: 100%">
3
- <view class="live-title">{{title}}</view>
4
- <view class="live-start-time">{{startTime}}</view>
5
- <rich-text style="overflow-wrap:break-word" nodes="{{introduction}}"></rich-text>
6
- </scroll-view>
7
- </view>
8
-
@@ -1 +0,0 @@
1
- .live-introduction{height:100%}.live-introduction .live-title{-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;color:#262626;display:-webkit-box;font-size:1.14rem;font-weight:500;line-height:1.79rem;overflow:hidden;text-overflow:ellipsis;word-break:break-word}.live-introduction .live-start-time{color:#595959;font-size:1rem;font-weight:400;height:40rpx;line-height:1.43rem;margin-top:8rpx}.live-introduction .rich-text{word-break:break-word}
@@ -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}