vhall-mini-sdk 0.4.0 → 0.4.3

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 (110) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/components/gift/gift-display/gift-display.js +118 -0
  3. package/dist/components/gift/gift-display/gift-display.json +3 -0
  4. package/dist/components/gift/gift-display/gift-display.wxml +16 -0
  5. package/dist/components/gift/gift-display/gift-display.wxss +1 -0
  6. package/dist/components/gift/gift-sender/gift-sender.js +63 -0
  7. package/dist/components/gift/gift-sender/gift-sender.json +6 -0
  8. package/dist/components/gift/gift-sender/gift-sender.wxml +19 -0
  9. package/dist/components/gift/gift-sender/gift-sender.wxss +1 -0
  10. package/dist/components/lottery/lottery-accept/index.js +249 -0
  11. package/dist/components/lottery/lottery-accept/index.json +4 -0
  12. package/dist/components/lottery/lottery-accept/index.wxml +49 -0
  13. package/dist/components/lottery/lottery-accept/index.wxss +1 -0
  14. package/dist/components/lottery/lottery-history/index.js +36 -0
  15. package/dist/components/lottery/lottery-history/index.json +3 -0
  16. package/dist/components/lottery/lottery-history/index.wxml +28 -0
  17. package/dist/components/lottery/lottery-history/index.wxss +1 -0
  18. package/dist/components/lottery/lottery-shake/lottery-shake.js +328 -0
  19. package/dist/components/lottery/lottery-shake/lottery-shake.json +1 -0
  20. package/dist/components/lottery/lottery-shake/lottery-shake.wxml +52 -0
  21. package/dist/components/lottery/lottery-shake/lottery-shake.wxss +1 -0
  22. package/dist/components/lottery/lottery-slot/lottery-slot.js +230 -0
  23. package/dist/components/lottery/lottery-slot/lottery-slot.json +1 -0
  24. package/dist/components/lottery/lottery-slot/lottery-slot.wxml +62 -0
  25. package/dist/components/lottery/lottery-slot/lottery-slot.wxss +1 -0
  26. package/dist/components/lottery/lottery-wheel/lottery-wheel.js +153 -0
  27. package/dist/components/lottery/lottery-wheel/lottery-wheel.json +4 -0
  28. package/dist/components/lottery/lottery-wheel/lottery-wheel.wxml +91 -0
  29. package/dist/components/lottery/lottery-wheel/lottery-wheel.wxss +1 -0
  30. package/dist/components/lottery/lottery-winners/index.js +101 -0
  31. package/dist/components/lottery/lottery-winners/index.json +4 -0
  32. package/dist/components/lottery/lottery-winners/index.wxml +39 -0
  33. package/dist/components/lottery/lottery-winners/index.wxss +1 -0
  34. package/dist/components/lottery/lottery.js +388 -0
  35. package/dist/components/lottery/lottery.json +11 -0
  36. package/dist/components/lottery/lottery.wxml +78 -0
  37. package/dist/components/lottery/lottery.wxss +1 -0
  38. package/dist/components/lottery/wheel.json +49 -0
  39. package/dist/components/mall-reward/common/reward-card.wxss +0 -0
  40. package/dist/components/mall-reward/duration-icon/index.js +101 -0
  41. package/dist/components/mall-reward/duration-icon/index.json +3 -0
  42. package/dist/components/mall-reward/duration-icon/index.wxml +7 -0
  43. package/dist/components/mall-reward/duration-icon/index.wxss +1 -0
  44. package/dist/components/mall-reward/f-count-down/index.js +61 -0
  45. package/dist/components/mall-reward/f-count-down/index.json +3 -0
  46. package/dist/components/mall-reward/f-count-down/index.wxml +9 -0
  47. package/dist/components/mall-reward/f-count-down/index.wxss +1 -0
  48. package/dist/components/mall-reward/f-empty/index.js +11 -0
  49. package/dist/components/mall-reward/f-empty/index.json +3 -0
  50. package/dist/components/mall-reward/f-empty/index.wxml +8 -0
  51. package/dist/components/mall-reward/f-empty/index.wxss +1 -0
  52. package/dist/components/mall-reward/f-history/index.js +84 -0
  53. package/dist/components/mall-reward/f-history/index.json +4 -0
  54. package/dist/components/mall-reward/f-history/index.wxml +38 -0
  55. package/dist/components/mall-reward/f-history/index.wxss +1 -0
  56. package/dist/components/mall-reward/f-open/index.js +36 -0
  57. package/dist/components/mall-reward/f-open/index.json +3 -0
  58. package/dist/components/mall-reward/f-open/index.wxml +10 -0
  59. package/dist/components/mall-reward/f-open/index.wxss +1 -0
  60. package/dist/components/mall-reward/f-receive/index.js +36 -0
  61. package/dist/components/mall-reward/f-receive/index.json +3 -0
  62. package/dist/components/mall-reward/f-receive/index.wxml +9 -0
  63. package/dist/components/mall-reward/f-receive/index.wxss +1 -0
  64. package/dist/components/mall-reward/index.js +374 -0
  65. package/dist/components/mall-reward/index.json +8 -0
  66. package/dist/components/mall-reward/index.wxml +4 -0
  67. package/dist/components/mall-reward/index.wxss +0 -0
  68. package/dist/components/mall-reward/main-popup/index.js +46 -0
  69. package/dist/components/mall-reward/main-popup/index.json +12 -0
  70. package/dist/components/mall-reward/main-popup/index.wxml +16 -0
  71. package/dist/components/mall-reward/main-popup/index.wxss +1 -0
  72. package/dist/components/praise/praise.js +150 -0
  73. package/dist/components/praise/praise.json +5 -0
  74. package/dist/components/praise/praise.wxml +17 -0
  75. package/dist/components/praise/praise.wxss +1 -0
  76. package/dist/components/product/product-card/product-card.js +109 -0
  77. package/dist/components/product/product-card/product-card.json +3 -0
  78. package/dist/components/product/product-card/product-card.wxml +47 -0
  79. package/dist/components/product/product-card/product-card.wxss +1 -0
  80. package/dist/components/product/product-detail/product-detail.js +127 -0
  81. package/dist/components/product/product-detail/product-detail.json +3 -0
  82. package/dist/components/product/product-detail/product-detail.wxml +57 -0
  83. package/dist/components/product/product-detail/product-detail.wxss +1 -0
  84. package/dist/components/product/product-item/product-item.js +56 -0
  85. package/dist/components/product/product-item/product-item.json +3 -0
  86. package/dist/components/product/product-item/product-item.wxml +35 -0
  87. package/dist/components/product/product-item/product-item.wxss +1 -0
  88. package/dist/components/product/product-list/product-list.js +67 -0
  89. package/dist/components/product/product-list/product-list.json +6 -0
  90. package/dist/components/product/product-list/product-list.wxml +16 -0
  91. package/dist/components/product/product-list/product-list.wxss +1 -0
  92. package/dist/components/product/product-order/product-order.js +394 -0
  93. package/dist/components/product/product-order/product-order.json +3 -0
  94. package/dist/components/product/product-order/product-order.wxml +75 -0
  95. package/dist/components/product/product-order/product-order.wxss +1 -0
  96. package/dist/pubComponents/popup/popup.wxss +1 -0
  97. package/dist/sdk/config/index.js +1 -0
  98. package/dist/sdk/plugins/InteractServer.js +1 -0
  99. package/dist/sdk/plugins/LotteryServer.js +1 -0
  100. package/dist/sdk/plugins/MallRewardServer.js +1 -0
  101. package/dist/sdk/plugins/ProductServer.js +1 -0
  102. package/lib/components/announcement/announ-banner/index.wxml +1 -1
  103. package/lib/components/chat-recommend/index.wxml +1 -1
  104. package/lib/components/player/components/controls/controls.wxml +6 -3
  105. package/lib/components/player/components/controls/controls.wxss +1 -1
  106. package/lib/components/player/player.wxml +26 -24
  107. package/lib/components/player/player.wxss +1 -1
  108. package/lib/sdk/main/index.js +2 -2
  109. package/lib/shared/mpUtils.js +1 -1
  110. package/package.json +1 -1
@@ -0,0 +1,61 @@
1
+ import { formatSeconds2Time } from '../../../shared/utils';
2
+ Component({
3
+ properties: {
4
+ info: {
5
+ type: Object,
6
+ value: {},
7
+ },
8
+ onlineDuration: {
9
+ type: Number,
10
+ value: 0,
11
+ },
12
+ tipMode: {
13
+ type: Number,
14
+ value: 1,
15
+ },
16
+ },
17
+ data: {
18
+ second: undefined,
19
+ _ttl: '--:--',
20
+ _title: '',
21
+ },
22
+
23
+ observers: {
24
+ info: function (info) {
25
+ this.setData({
26
+ _title: info?.tip_setting?.title || info?.title || '',
27
+ });
28
+ },
29
+ 'info, onlineDuration': function (info, onlineDuration) {
30
+ // console.log('info, onlineDuration', onlineDuration);
31
+ if (info?.viewing_minutes > 0 && !isNaN(onlineDuration)) {
32
+ this.setData({
33
+ second: Math.max(info.viewing_minutes * 60 - onlineDuration, 0),
34
+ });
35
+ }
36
+ },
37
+ second: function (ss) {
38
+ const text = this.calcTtl(ss);
39
+ this.setData({
40
+ _ttl: text,
41
+ });
42
+ },
43
+ },
44
+ methods: {
45
+ calcTtl(ss) {
46
+ // 无当前活动红包信息,但显示小图标,说明参与过有记录
47
+ if (!this.properties.info) return '已领取';
48
+
49
+ // 当前活动红包信息是无条件红包
50
+ if (this.properties.info.viewing_minutes == 0) return '领福利';
51
+
52
+ // 当前活动红包信息是时长红包
53
+ if (this.properties.info.viewing_minutes > 0 && !isNaN(ss)) {
54
+ if (ss <= 0) return '领福利';
55
+
56
+ return formatSeconds2Time(ss);
57
+ }
58
+ return '--:--';
59
+ },
60
+ },
61
+ });
@@ -0,0 +1,3 @@
1
+ {
2
+ "component": true
3
+ }
@@ -0,0 +1,9 @@
1
+ <view class="mall-reward-countdown mode-{{tipMode}}">
2
+ <!-- 自定义内容 -->
3
+ <view class="custom-content">
4
+ <view class="main-title">{{_title}}</view>
5
+ <!-- 倒计时 -->
6
+ <view class="countdown-box">{{_ttl}} 后可领取</view>
7
+ </view>
8
+ </view>
9
+
@@ -0,0 +1 @@
1
+ .mall-reward-countdown{background-color:initial;background-image:url(https://cnstatic01.e.vhall.com/common-static/images/mp/mr_bg_1.png);background-repeat:no-repeat;background-size:contain;height:750rpx;position:relative;width:750rpx}.mall-reward-countdown .custom-content{bottom:0;left:0;position:absolute;right:0;top:0;z-index:9}.mall-reward-countdown .main-title{align-items:center;color:#fff9e6;display:flex;font-size:1.93rem;font-weight:600;height:128rpx;justify-content:center;line-height:2.29rem;margin:0 160rpx;overflow:hidden;position:relative;text-align:center}.mall-reward-countdown .countdown-box{align-items:center;background:rgba(0,0,0,.25);border-radius:88rpx;color:rgba(255,249,230,.8);display:flex;justify-content:center;left:50%;overflow:hidden;padding:16rpx 44rpx;position:absolute;transform:translateX(-50%);z-index:10}.mall-reward-countdown.mode-1{background-image:url(https://cnstatic01.e.vhall.com/common-static/images/mp/mr_bg_1.png)}.mall-reward-countdown.mode-2{background-image:url(https://cnstatic01.e.vhall.com/common-static/images/mp/mr_bg_2.png)}.mall-reward-countdown.mode-3{background-image:url(https://cnstatic01.e.vhall.com/common-static/images/mp/mr_bg_3.png)}.mall-reward-countdown.mode-1 .main-title{top:380rpx}.mall-reward-countdown.mode-1 .countdown-box{top:560rpx}.mall-reward-countdown.mode-2 .main-title{top:380rpx}.mall-reward-countdown.mode-2 .countdown-box{top:550rpx}.mall-reward-countdown.mode-3 .main-title{color:#fb2626;top:270rpx}.mall-reward-countdown.mode-3 .countdown-box{top:560rpx}
@@ -0,0 +1,11 @@
1
+ Component({
2
+ methods: {
3
+ // 点击"我知道了"
4
+ handleClick() {
5
+ this.triggerEvent('close', this.properties.info, {
6
+ bubbles: true,
7
+ composed: true,
8
+ });
9
+ },
10
+ },
11
+ });
@@ -0,0 +1,3 @@
1
+ {
2
+ "component": true
3
+ }
@@ -0,0 +1,8 @@
1
+ <view class="mall-reward-empty">
2
+ <!-- 自定义内容 -->
3
+ <view class="custom-content">
4
+ <view class="main-title">很遗憾,您未领取到奖励</view>
5
+ <!-- 按钮 -->
6
+ <button class="weui-btn btn-main" bindtap="handleClick">知道了</button>
7
+ </view>
8
+ </view>
@@ -0,0 +1 @@
1
+ .mall-reward-empty{background-image:url(https://cnstatic01.e.vhall.com/common-static/images/mp/mr_empty_bg.png);background-repeat:no-repeat;background-size:contain;border-radius:20rpx;height:524rpx;position:relative;width:640rpx}.mall-reward-empty .custom-content{bottom:0;left:0;position:absolute;right:0;top:0;z-index:8}.mall-reward-empty .main-title{color:#262626;font-size:1.14rem;font-weight:600px;line-height:1.57rem;margin:0 55rpx;position:relative;text-align:center;top:80rpx}.mall-reward-empty .btn-main{background:linear-gradient(#fff7ec,#fdd8ac);border:3rpx solid #fdd8ac;border-radius:44px;color:#fb2626;font-size:1.14rem;height:80rpx;position:relative;top:340rpx;width:320rpx;z-index:10}
@@ -0,0 +1,84 @@
1
+ import { debounce } from '../../../shared/utils';
2
+
3
+ Component({
4
+ properties: {
5
+ onlineDuration: {
6
+ type: Number,
7
+ value: 0,
8
+ },
9
+ dataList: {
10
+ type: Array,
11
+ value: [],
12
+ },
13
+ },
14
+
15
+ data: {
16
+ _list: [],
17
+ },
18
+
19
+ observers: {
20
+ 'dataList, onlineDuration': function (dataList, onlineDuration) {
21
+ if (!dataList || !dataList.length) {
22
+ this.setData({ _list: [] });
23
+ return;
24
+ }
25
+ const list = dataList.map((item) => ({
26
+ ...item,
27
+ _desc: this.buildDesc(item, Number(onlineDuration) || 0),
28
+ }));
29
+ this.setData({ _list: list });
30
+ },
31
+ },
32
+
33
+ methods: {
34
+ formatTime(ms) {
35
+ if (typeof ms !== 'number' || isNaN(ms)) return '';
36
+ if (ms < 0) return '00:00';
37
+ const totalSeconds = Math.floor(ms / 1000);
38
+ const hours = Math.floor(totalSeconds / 3600);
39
+ const minutes = Math.floor((totalSeconds % 3600) / 60);
40
+ const seconds = totalSeconds % 60;
41
+ const pad = (n) => String(n).padStart(2, '0');
42
+ if (hours > 0) {
43
+ return `${pad(hours)}:${pad(minutes)}:${pad(seconds)}`;
44
+ }
45
+ return `${pad(minutes)}:${pad(seconds)}`;
46
+ },
47
+
48
+ buildDesc(item, onlineDuration) {
49
+ const viewingMinutes = Number(item.viewing_minutes) || 0;
50
+ if (viewingMinutes === 0) {
51
+ return `推送时间:${item.push_time || ''}`;
52
+ }
53
+ if (item.claim_status == 1 || (item.status !== 2 && onlineDuration >= viewingMinutes * 60)) {
54
+ return `已达标,您已观看${this.formatTime(viewingMinutes * 60 * 1000)}`;
55
+ } else if (item.status !== 2 && item.remaining_quota > 0) {
56
+ const remain = Math.max(0, viewingMinutes * 60 - onlineDuration);
57
+ return `继续观看 ${this.formatTime(remain * 1000)} 可领取`;
58
+ }
59
+ return '';
60
+ },
61
+
62
+ handleClaim: debounce(function (e) {
63
+ const item = this.data._list[e.currentTarget.dataset.index];
64
+ if (!item) return;
65
+ this.triggerEvent('claim', item, {
66
+ bubbles: true,
67
+ composed: true,
68
+ });
69
+ }, 300),
70
+
71
+ handleToWatch() {
72
+ this.triggerEvent('close', this.properties.info, {
73
+ bubbles: true,
74
+ composed: true,
75
+ });
76
+ },
77
+ onClose() {
78
+ this.triggerEvent('close', this.properties.info, {
79
+ bubbles: true,
80
+ composed: true,
81
+ });
82
+ },
83
+ },
84
+ });
@@ -0,0 +1,4 @@
1
+ {
2
+ "component": true,
3
+ "styleIsolation": "shared"
4
+ }
@@ -0,0 +1,38 @@
1
+ <!-- 半屏面板 -->
2
+ <view class="mall-reward-history">
3
+ <view class="mall-reward-history-head">
4
+ <text class="main-title">直播福利</text>
5
+ <view class="head-close" bindtap="onClose">✕</view>
6
+ </view>
7
+ <scroll-view class="mall-reward-history-body" scroll-y enhanced show-scrollbar="{{false}}">
8
+ <view class="data-list" wx:if="{{_list.length > 0}}">
9
+ <view wx:for="{{_list}}" wx:key="id" class="data-list-item">
10
+ <view class="data-list-item__bd">
11
+ <view class="item-title">{{ item.title }}</view>
12
+ <view class="item-description">{{item._desc}}</view>
13
+ </view>
14
+ <view class="data-list-item__ft">
15
+ <!-- 已领取 -->
16
+ <view wx:if="{{item.claim_status == 1}}" class="status-box status-box--claimed">已领取</view>
17
+ <view wx:elif="{{item.status == 2 && item.claim_status == 0}}" class="status-box">
18
+ 已结束
19
+ </view>
20
+ <view wx:elif="{{item.claim_status == 0 && item.remaining_quota === 0}}" class="status-box">
21
+ 已领光
22
+ </view>
23
+ <button wx:elif="{{item.claim_status == 0 && item.remaining_quota > 0 && ((item.viewing_minutes > 0 && onlineDuration >= item.viewing_minutes * 60) || item.viewing_minutes == 0)}}" class="weui-btn btn-reward" type="primary" size="mini" data-index="{{index}}" bindtap="handleClaim">
24
+ 我要领取
25
+ </button>
26
+ <button wx:elif="{{item.claim_status == 0 && item.remaining_quota > 0 && item.viewing_minutes > 0 && onlineDuration < item.viewing_minutes * 60}}" class="weui-btn btn-reward" type="primary" size="mini" bindtap="handleToWatch">
27
+ 去观看
28
+ </button>
29
+ </view>
30
+ </view>
31
+ </view>
32
+ <!-- 空态 -->
33
+ <view class="empty-data" wx:else>
34
+ <image class="empty-img" src="https://cnstatic01.e.vhall.com/common-static/images/mp/sofa.png" mode="aspectFit" />
35
+ <view class="empty-text">暂无福利记录</view>
36
+ </view>
37
+ </scroll-view>
38
+ </view>
@@ -0,0 +1 @@
1
+ .mall-reward-history{background:linear-gradient(#ffebd9,#fcf1e7);border-top-left-radius:24rpx;border-top-right-radius:24rpx;box-sizing:border-box;display:flex;flex-direction:column;height:736rpx}.mall-reward-history .mall-reward-history-head{box-sizing:border-box;padding:22rpx 0;position:relative;text-align:center}.mall-reward-history .mall-reward-history-head .main-title{font-size:1.14rem;font-weight:700}.mall-reward-history .mall-reward-history-head .head-close{align-items:center;border-radius:50%;color:#999;display:flex;font-size:1.14rem;height:48rpx;justify-content:center;position:absolute;right:32rpx;top:50%;transform:translateY(-50%);width:48rpx}.mall-reward-history .mall-reward-history-body{box-sizing:border-box;height:650rpx;padding:0 24rpx}.mall-reward-history .mall-reward-history-body .data-list{background-color:#fff;border-top-left-radius:24rpx;border-top-right-radius:24rpx;box-sizing:border-box;min-height:100%;width:100%}.mall-reward-history .mall-reward-history-body .data-list-item{align-items:center;border-bottom:1px solid #fcf1e7;box-sizing:border-box;display:flex;padding:24rpx 32rpx;width:100%}.mall-reward-history .mall-reward-history-body .data-list-item__bd{box-sizing:border-box;flex:1;overflow:hidden;text-align:left}.mall-reward-history .mall-reward-history-body .data-list-item__bd .item-title{color:#262626;font-size:1.07rem;font-weight:500;line-height:1.5rem;margin-bottom:4rpx;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:462rpx}.mall-reward-history .mall-reward-history-body .data-list-item__bd .item-description{color:#8c8c8c;font-size:.86rem;line-height:1.14rem}.mall-reward-history .mall-reward-history-body .data-list-item__ft{box-sizing:border-box}.mall-reward-history .mall-reward-history-body .data-list-item__ft .status-box{align-items:center;background-image:url(https://cnstatic01.e.vhall.com/common-static/images/mp/seal_bg.png);background-size:100% 100%;color:rgba(0,0,0,.25);display:flex;font-size:.71rem;height:100rpx;justify-content:center;margin-right:20rpx;transform:rotate(25deg);width:100rpx}.mall-reward-history .mall-reward-history-body .data-list-item__ft .status-box--claimed{background-image:url(https://cnstatic01.e.vhall.com/common-static/images/mp/received_icon.png);color:#55d483}.mall-reward-history .mall-reward-history-body .data-list-item__ft .btn-reward{font-size:1rem}
@@ -0,0 +1,36 @@
1
+ Component({
2
+ properties: {
3
+ info: { type: Object, value: null },
4
+ tipMode: { type: Number, value: 1 },
5
+ isBubble: { type: Boolean, value: false }, //气泡模式
6
+ },
7
+
8
+ data: {
9
+ _title: '',
10
+ _desc: '',
11
+ },
12
+
13
+ observers: {
14
+ info: function (info) {
15
+ this.setData({
16
+ _title: info?.tip_setting?.title || info?.title || '',
17
+ _desc: info?.tip_setting?.description || '',
18
+ });
19
+ },
20
+ },
21
+
22
+ methods: {
23
+ onClaimNow() {
24
+ this.triggerEvent('claim', this.properties.info, {
25
+ bubbles: true,
26
+ composed: true,
27
+ });
28
+ },
29
+ onClose() {
30
+ this.triggerEvent('close', this.properties.info, {
31
+ bubbles: true,
32
+ composed: true,
33
+ });
34
+ },
35
+ },
36
+ });
@@ -0,0 +1,3 @@
1
+ {
2
+ "component": true
3
+ }
@@ -0,0 +1,10 @@
1
+ <view class="mall-reward-open {{ isBubble?'is-bubble':'is-full' }} mode-{{tipMode}}">
2
+ <!-- 自定义内容 -->
3
+ <view class="custom-content">
4
+ <view class="main-title">{{_title}}</view>
5
+ <button class="weui-btn btn-main" bindtap="onClaimNow">立即领取</button>
6
+ <view class="tip-description" wx:if="{{!isBubble}}">{{_desc}}</view>
7
+ <!-- 气泡模式才有的关闭按钮 -->
8
+ <view wx:if="{{isBubble}}" class="close-btn-for-bubble" bindtap="onClose">✕</view>
9
+ </view>
10
+ </view>
@@ -0,0 +1 @@
1
+ .mall-reward-open{background-color:initial;background-image:url(https://cnstatic01.e.vhall.com/common-static/images/mp/mr_bg_1.png);background-repeat:no-repeat;background-size:contain;position:relative}.mall-reward-open .custom-content{bottom:0;left:0;position:absolute;right:0;top:0;z-index:9}.mall-reward-open .main-title{align-items:center;color:#fff9e6;display:flex;font-weight:600;justify-content:center;overflow:hidden;position:relative;text-align:center}.mall-reward-open.mode-1{background-image:url(https://cnstatic01.e.vhall.com/common-static/images/mp/mr_bg_1.png)}.mall-reward-open.mode-2{background-image:url(https://cnstatic01.e.vhall.com/common-static/images/mp/mr_bg_2.png)}.mall-reward-open.mode-3{background-image:url(https://cnstatic01.e.vhall.com/common-static/images/mp/mr_bg_3.png)}.mall-reward-open.is-full{height:750rpx;width:750rpx}.mall-reward-open.is-full .main-title{font-size:1.93rem;height:128rpx;line-height:2.29rem;margin:0 160rpx}.mall-reward-open.is-full .btn-main{background:linear-gradient(#fff7ec,#fdd8ac);border-radius:44px;color:#fb2626;height:80rpx;left:50%;position:absolute;transform:translateX(-50%);width:320rpx;z-index:10}.mall-reward-open.is-full .tip-description{align-items:center;color:rgba(255,249,230,.8);display:flex;font-size:.79rem;height:60rpx;justify-content:center;left:50%;line-height:1.07rem;overflow:hidden;position:absolute;transform:translateX(-50%);width:380rpx}.mall-reward-open.is-full.mode-1 .main-title{top:380rpx}.mall-reward-open.is-full.mode-1 .btn-main{top:550rpx}.mall-reward-open.is-full.mode-1 .tip-description{top:640rpx}.mall-reward-open.is-full.mode-2 .main-title{top:380rpx}.mall-reward-open.is-full.mode-2 .btn-main{top:540rpx}.mall-reward-open.is-full.mode-2 .tip-description{top:630rpx}.mall-reward-open.is-full.mode-3 .main-title{color:#fb2626;top:270rpx}.mall-reward-open.is-full.mode-3 .btn-main{top:540rpx}.mall-reward-open.is-full.mode-3 .tip-description{top:624rpx}.mall-reward-open.is-bubble{height:368rpx;margin-bottom:150rpx;width:368rpx}.mall-reward-open.is-bubble .close-btn-for-bubble{align-items:center;background-color:rgba(0,0,0,.25);border-radius:50%;box-shadow:0 2rpx 8rpx rgba(0,0,0,.15);color:#fff;display:flex;flex-direction:column;font-size:1.14rem;height:48rpx;justify-content:center;position:absolute;right:24rpx;top:12rpx;width:48rpx}.mall-reward-open.is-bubble .main-title{font-size:1.14rem;height:80rpx;line-height:1.43rem;margin:0 100rpx}.mall-reward-open.is-bubble .btn-main{background:linear-gradient(#fff7ec,#fdd8ac);border:1px solid #fdd8ac;border-radius:44px;color:#fb2626;font-size:14px;left:50%;padding:4rpx 22rpx;position:absolute;transform:translateX(-50%);width:auto;z-index:10}.mall-reward-open.is-bubble.mode-1 .main-title{top:180rpx}.mall-reward-open.is-bubble.mode-1 .btn-main{bottom:40rpx;top:auto}.mall-reward-open.is-bubble.mode-2 .main-title{top:180rpx}.mall-reward-open.is-bubble.mode-2 .btn-main{bottom:50rpx;top:auto}.mall-reward-open.is-bubble.mode-3 .main-title{color:#fb2626;top:120rpx}.mall-reward-open.is-bubble.mode-3 .btn-main{bottom:40rpx;top:auto}
@@ -0,0 +1,36 @@
1
+ Component({
2
+ properties: {
3
+ info: {
4
+ type: Object,
5
+ value: {},
6
+ },
7
+ tipMode: {
8
+ type: Number,
9
+ value: 1,
10
+ },
11
+ },
12
+
13
+ data: {
14
+ _title: '',
15
+ _desc: '',
16
+ },
17
+
18
+ observers: {
19
+ info: function (info) {
20
+ console.log('info123', info);
21
+ this.setData({
22
+ _title: info?.tip_setting?.title || info?.title || '',
23
+ _desc: info?.tip_setting?.description || '',
24
+ });
25
+ },
26
+ },
27
+
28
+ methods: {
29
+ onRecive() {
30
+ this.triggerEvent('close', this.properties.info, {
31
+ bubbles: true,
32
+ composed: true,
33
+ });
34
+ },
35
+ },
36
+ });
@@ -0,0 +1,3 @@
1
+ {
2
+ "component": true
3
+ }
@@ -0,0 +1,9 @@
1
+ <view class="mall-reward-receive mode-{{tipMode}}">
2
+ <view class="colorful-title"></view>
3
+ <!-- 自定义内容 -->
4
+ <view class="custom-content">
5
+ <view class="main-title">{{_title}}</view>
6
+ <button class="weui-btn btn-main" bindtap="onRecive">开心收下</button>
7
+ <view class="tip-description">{{_desc}}</view>
8
+ </view>
9
+ </view>
@@ -0,0 +1 @@
1
+ .mall-reward-receive{background-color:initial;background-image:url(https://cnstatic01.e.vhall.com/common-static/images/mp/mr_bg_1.png);background-repeat:no-repeat;background-size:contain;height:750rpx;position:relative;width:750rpx}.mall-reward-receive .colorful-title{background-color:initial;background-image:url(https://cnstatic01.e.vhall.com/common-static/images/mp/colorful_title.png);background-repeat:no-repeat;background-size:100% 100%;height:56rpx;left:50%;margin-left:-180rpx;position:absolute;top:24rpx;width:380rpx}.mall-reward-receive .custom-content{bottom:0;left:0;position:absolute;right:0;top:0;z-index:9}.mall-reward-receive .main-title{align-items:center;color:#fff9e6;display:flex;font-size:1.93rem;font-weight:600;height:128rpx;justify-content:center;line-height:2.29rem;margin:0 160rpx;overflow:hidden;position:relative;text-align:center}.mall-reward-receive .btn-main{background:linear-gradient(#fff7ec,#fdd8ac);border-radius:44px;color:#fb2626;height:80rpx;left:50%;position:absolute;transform:translateX(-50%);width:320rpx;z-index:10}.mall-reward-receive .tip-description{align-items:center;color:rgba(255,249,230,.8);display:flex;font-size:.79rem;height:60rpx;justify-content:center;left:50%;line-height:1.07rem;overflow:hidden;position:absolute;transform:translateX(-50%);width:380rpx}.mall-reward-receive.mode-1{background-image:url(https://cnstatic01.e.vhall.com/common-static/images/mp/mr_bg_1.png)}.mall-reward-receive.mode-2{background-image:url(https://cnstatic01.e.vhall.com/common-static/images/mp/mr_bg_2.png)}.mall-reward-receive.mode-3{background-image:url(https://cnstatic01.e.vhall.com/common-static/images/mp/mr_bg_3.png)}.mall-reward-receive.mode-1 .main-title{top:380rpx}.mall-reward-receive.mode-1 .btn-main{top:560rpx}.mall-reward-receive.mode-1 .tip-description{top:640rpx}.mall-reward-receive.mode-1 .colorful-title{top:24rpx}.mall-reward-receive.mode-2 .main-title{top:370rpx}.mall-reward-receive.mode-2 .btn-main{top:550rpx}.mall-reward-receive.mode-2 .tip-description{top:630rpx}.mall-reward-receive.mode-3 .colorful-title{top:0}.mall-reward-receive.mode-3 .main-title{color:#fb2626;top:260rpx}.mall-reward-receive.mode-3 .btn-main{top:550rpx}.mall-reward-receive.mode-3 .tip-description{top:630rpx}