vhall-mini-sdk 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/player/components/online-hot/index.js +2 -2
- package/lib/sdk/main/index.js +1 -0
- package/package.json +2 -4
- package/postinstall.js +21 -51
- package/dist/components/chat/chat-edit/chat-edit.js +0 -127
- package/dist/components/chat/chat-edit/chat-edit.json +0 -4
- package/dist/components/chat/chat-edit/chat-edit.wxml +0 -7
- package/dist/components/chat/chat-edit/chat-edit.wxss +0 -1
- package/dist/components/chat/chat-item/chat-item.js +0 -253
- package/dist/components/chat/chat-item/chat-item.json +0 -3
- package/dist/components/chat/chat-item/chat-item.wxml +0 -96
- package/dist/components/chat/chat-item/chat-item.wxss +0 -1
- package/dist/components/chat/chat-list/chat-list.js +0 -216
- package/dist/components/chat/chat-list/chat-list.json +0 -6
- package/dist/components/chat/chat-list/chat-list.wxml +0 -9
- package/dist/components/chat/chat-list/chat-list.wxss +0 -1
- package/dist/components/chat/chat.js +0 -98
- package/dist/components/chat/chat.json +0 -7
- package/dist/components/chat/chat.wxml +0 -7
- package/dist/components/chat/chat.wxss +0 -1
- package/dist/components/gift/gift-display/gift-display.js +0 -118
- package/dist/components/gift/gift-display/gift-display.json +0 -3
- package/dist/components/gift/gift-display/gift-display.wxml +0 -16
- package/dist/components/gift/gift-display/gift-display.wxss +0 -1
- package/dist/components/gift/gift-sender/gift-sender.js +0 -63
- package/dist/components/gift/gift-sender/gift-sender.json +0 -6
- package/dist/components/gift/gift-sender/gift-sender.wxml +0 -19
- package/dist/components/gift/gift-sender/gift-sender.wxss +0 -1
- package/dist/components/introduction/introduction.js +0 -43
- package/dist/components/introduction/introduction.json +0 -3
- package/dist/components/introduction/introduction.wxml +0 -8
- package/dist/components/introduction/introduction.wxss +0 -1
- package/dist/components/invite-rank/img/bronze.png +0 -0
- package/dist/components/invite-rank/img/gold.png +0 -0
- package/dist/components/invite-rank/img/silver.png +0 -0
- package/dist/components/invite-rank/index.js +0 -135
- package/dist/components/invite-rank/index.json +0 -8
- package/dist/components/invite-rank/index.wxml +0 -42
- package/dist/components/invite-rank/index.wxss +0 -1
- package/dist/components/invite-rank/invite-rank-item.js +0 -12
- package/dist/components/invite-rank/invite-rank-item.json +0 -4
- package/dist/components/invite-rank/invite-rank-item.wxml +0 -21
- package/dist/components/invite-rank/invite-rank-item.wxss +0 -1
- package/dist/components/invite-rank/my-invite-detail.js +0 -82
- package/dist/components/invite-rank/my-invite-detail.json +0 -7
- package/dist/components/invite-rank/my-invite-detail.wxml +0 -27
- package/dist/components/invite-rank/my-invite-detail.wxss +0 -1
- package/dist/components/invite-rank/util.wxs +0 -21
- package/dist/components/live-landscape/live-landscape.js +0 -216
- package/dist/components/live-landscape/live-landscape.json +0 -39
- package/dist/components/live-landscape/live-landscape.wxml +0 -73
- package/dist/components/live-landscape/live-landscape.wxss +0 -1
- package/dist/components/live-portrait/live-portrait.js +0 -274
- package/dist/components/live-portrait/live-portrait.json +0 -38
- package/dist/components/live-portrait/live-portrait.wxml +0 -106
- package/dist/components/live-portrait/live-portrait.wxss +0 -1
- package/dist/components/lottery/lottery-accept/index.js +0 -249
- package/dist/components/lottery/lottery-accept/index.json +0 -4
- package/dist/components/lottery/lottery-accept/index.wxml +0 -49
- package/dist/components/lottery/lottery-accept/index.wxss +0 -1
- package/dist/components/lottery/lottery-history/index.js +0 -36
- package/dist/components/lottery/lottery-history/index.json +0 -3
- package/dist/components/lottery/lottery-history/index.wxml +0 -28
- package/dist/components/lottery/lottery-history/index.wxss +0 -1
- package/dist/components/lottery/lottery-shake/lottery-shake.js +0 -328
- package/dist/components/lottery/lottery-shake/lottery-shake.json +0 -1
- package/dist/components/lottery/lottery-shake/lottery-shake.wxml +0 -52
- package/dist/components/lottery/lottery-shake/lottery-shake.wxss +0 -1
- package/dist/components/lottery/lottery-slot/lottery-slot.js +0 -230
- package/dist/components/lottery/lottery-slot/lottery-slot.json +0 -1
- package/dist/components/lottery/lottery-slot/lottery-slot.wxml +0 -62
- package/dist/components/lottery/lottery-slot/lottery-slot.wxss +0 -1
- package/dist/components/lottery/lottery-wheel/lottery-wheel.js +0 -153
- package/dist/components/lottery/lottery-wheel/lottery-wheel.json +0 -4
- package/dist/components/lottery/lottery-wheel/lottery-wheel.wxml +0 -91
- package/dist/components/lottery/lottery-wheel/lottery-wheel.wxss +0 -1
- package/dist/components/lottery/lottery-winners/index.js +0 -101
- package/dist/components/lottery/lottery-winners/index.json +0 -4
- package/dist/components/lottery/lottery-winners/index.wxml +0 -39
- package/dist/components/lottery/lottery-winners/index.wxss +0 -1
- package/dist/components/lottery/lottery.js +0 -388
- package/dist/components/lottery/lottery.json +0 -11
- package/dist/components/lottery/lottery.wxml +0 -78
- package/dist/components/lottery/lottery.wxss +0 -1
- package/dist/components/lottery/wheel.json +0 -49
- package/dist/components/mall-reward/common/reward-card.wxss +0 -0
- package/dist/components/mall-reward/duration-icon/index.js +0 -101
- package/dist/components/mall-reward/duration-icon/index.json +0 -3
- package/dist/components/mall-reward/duration-icon/index.wxml +0 -7
- package/dist/components/mall-reward/duration-icon/index.wxss +0 -1
- package/dist/components/mall-reward/f-count-down/index.js +0 -61
- package/dist/components/mall-reward/f-count-down/index.json +0 -3
- package/dist/components/mall-reward/f-count-down/index.wxml +0 -9
- package/dist/components/mall-reward/f-count-down/index.wxss +0 -1
- package/dist/components/mall-reward/f-empty/index.js +0 -11
- package/dist/components/mall-reward/f-empty/index.json +0 -3
- package/dist/components/mall-reward/f-empty/index.wxml +0 -8
- package/dist/components/mall-reward/f-empty/index.wxss +0 -1
- package/dist/components/mall-reward/f-history/index.js +0 -84
- package/dist/components/mall-reward/f-history/index.json +0 -4
- package/dist/components/mall-reward/f-history/index.wxml +0 -38
- package/dist/components/mall-reward/f-history/index.wxss +0 -1
- package/dist/components/mall-reward/f-open/index.js +0 -36
- package/dist/components/mall-reward/f-open/index.json +0 -3
- package/dist/components/mall-reward/f-open/index.wxml +0 -10
- package/dist/components/mall-reward/f-open/index.wxss +0 -1
- package/dist/components/mall-reward/f-receive/index.js +0 -36
- package/dist/components/mall-reward/f-receive/index.json +0 -3
- package/dist/components/mall-reward/f-receive/index.wxml +0 -9
- package/dist/components/mall-reward/f-receive/index.wxss +0 -1
- package/dist/components/mall-reward/index.js +0 -374
- package/dist/components/mall-reward/index.json +0 -8
- package/dist/components/mall-reward/index.wxml +0 -4
- package/dist/components/mall-reward/index.wxss +0 -0
- package/dist/components/mall-reward/main-popup/index.js +0 -46
- package/dist/components/mall-reward/main-popup/index.json +0 -12
- package/dist/components/mall-reward/main-popup/index.wxml +0 -16
- package/dist/components/mall-reward/main-popup/index.wxss +0 -1
- package/dist/components/player/assets/image/arrow-left.png +0 -0
- package/dist/components/player/assets/image/arrow-right.png +0 -0
- package/dist/components/player/assets/image/enterFullScreen.png +0 -0
- package/dist/components/player/assets/image/exitFullScreen.png +0 -0
- package/dist/components/player/assets/image/fullscreen_1.png +0 -0
- package/dist/components/player/assets/image/fullscreen_2.png +0 -0
- package/dist/components/player/assets/image/pause.png +0 -0
- package/dist/components/player/assets/image/pause_1.png +0 -0
- package/dist/components/player/assets/image/play.png +0 -0
- package/dist/components/player/assets/image/play_1.png +0 -0
- package/dist/components/player/assets/image/refresh.png +0 -0
- package/dist/components/player/assets/image/refresh_1.png +0 -0
- package/dist/components/player/assets/image/subtitle_close.png +0 -0
- package/dist/components/player/assets/image/subtitle_default.png +0 -0
- package/dist/components/player/assets/image/volume-off.png +0 -0
- package/dist/components/player/assets/image/volume-on.png +0 -0
- package/dist/components/player/common/config.js +0 -7
- package/dist/components/player/common/veComponent.js +0 -4
- package/dist/components/player/components/barrage/barrage-canvas.js +0 -488
- package/dist/components/player/components/barrage/barrage-dom.js +0 -471
- package/dist/components/player/components/barrage/index.js +0 -62
- package/dist/components/player/components/barrage/index.json +0 -4
- package/dist/components/player/components/barrage/index.wxml +0 -39
- package/dist/components/player/components/barrage/index.wxss +0 -1
- package/dist/components/player/components/barrage/utils.js +0 -71
- package/dist/components/player/components/controls/controls.js +0 -93
- package/dist/components/player/components/controls/controls.json +0 -6
- package/dist/components/player/components/controls/controls.wxml +0 -60
- package/dist/components/player/components/controls/controls.wxss +0 -1
- package/dist/components/player/components/danmaku/danmaku.js +0 -23
- package/dist/components/player/components/danmaku/danmaku.json +0 -4
- package/dist/components/player/components/danmaku/danmaku.wxml +0 -1
- package/dist/components/player/components/danmaku/danmaku.wxss +0 -0
- package/dist/components/player/components/error/error.js +0 -15
- package/dist/components/player/components/error/error.json +0 -3
- package/dist/components/player/components/error/error.wxml +0 -6
- package/dist/components/player/components/error/error.wxss +0 -1
- package/dist/components/player/components/loading/loading.js +0 -9
- package/dist/components/player/components/loading/loading.json +0 -3
- package/dist/components/player/components/loading/loading.wxml +0 -4
- package/dist/components/player/components/loading/loading.wxss +0 -1
- package/dist/components/player/components/main/extensions/data.js +0 -8
- package/dist/components/player/components/main/extensions/export.js +0 -83
- package/dist/components/player/components/main/extensions/methods.js +0 -110
- package/dist/components/player/components/main/extensions/observers.js +0 -41
- package/dist/components/player/components/main/extensions/props.js +0 -177
- package/dist/components/player/components/main/index.js +0 -44
- package/dist/components/player/components/main/index.json +0 -4
- package/dist/components/player/components/main/index.wxml +0 -7
- package/dist/components/player/components/main/index.wxss +0 -1
- package/dist/components/player/components/marquee/marquee.js +0 -304
- package/dist/components/player/components/marquee/marquee.json +0 -4
- package/dist/components/player/components/marquee/marquee.wxml +0 -14
- package/dist/components/player/components/marquee/marquee.wxss +0 -1
- package/dist/components/player/components/online-hot/assets/line-hot.png +0 -0
- package/dist/components/player/components/online-hot/assets/line-user.png +0 -0
- package/dist/components/player/components/online-hot/index.js +0 -66
- package/dist/components/player/components/online-hot/index.json +0 -3
- package/dist/components/player/components/online-hot/index.wxml +0 -15
- package/dist/components/player/components/online-hot/index.wxss +0 -1
- package/dist/components/player/components/poster/poster.js +0 -12
- package/dist/components/player/components/poster/poster.json +0 -3
- package/dist/components/player/components/poster/poster.wxml +0 -5
- package/dist/components/player/components/poster/poster.wxss +0 -1
- package/dist/components/player/components/watermark/watermark.js +0 -52
- package/dist/components/player/components/watermark/watermark.json +0 -4
- package/dist/components/player/components/watermark/watermark.wxml +0 -8
- package/dist/components/player/components/watermark/watermark.wxss +0 -1
- package/dist/components/player/extensions/data.js +0 -63
- package/dist/components/player/extensions/export.js +0 -325
- package/dist/components/player/extensions/methods.js +0 -406
- package/dist/components/player/extensions/observers.js +0 -114
- package/dist/components/player/extensions/props.js +0 -162
- package/dist/components/player/player.js +0 -83
- package/dist/components/player/player.json +0 -33
- package/dist/components/player/player.wxml +0 -48
- package/dist/components/player/player.wxss +0 -1
- package/dist/components/praise/praise.js +0 -150
- package/dist/components/praise/praise.json +0 -5
- package/dist/components/praise/praise.wxml +0 -17
- package/dist/components/praise/praise.wxss +0 -1
- package/dist/components/product/product-card/product-card.js +0 -109
- package/dist/components/product/product-card/product-card.json +0 -3
- package/dist/components/product/product-card/product-card.wxml +0 -47
- package/dist/components/product/product-card/product-card.wxss +0 -1
- package/dist/components/product/product-detail/product-detail.js +0 -127
- package/dist/components/product/product-detail/product-detail.json +0 -3
- package/dist/components/product/product-detail/product-detail.wxml +0 -57
- package/dist/components/product/product-detail/product-detail.wxss +0 -1
- package/dist/components/product/product-item/product-item.js +0 -56
- package/dist/components/product/product-item/product-item.json +0 -3
- package/dist/components/product/product-item/product-item.wxml +0 -35
- package/dist/components/product/product-item/product-item.wxss +0 -1
- package/dist/components/product/product-list/product-list.js +0 -67
- package/dist/components/product/product-list/product-list.json +0 -6
- package/dist/components/product/product-list/product-list.wxml +0 -16
- package/dist/components/product/product-list/product-list.wxss +0 -1
- package/dist/components/product/product-order/product-order.js +0 -394
- package/dist/components/product/product-order/product-order.json +0 -3
- package/dist/components/product/product-order/product-order.wxml +0 -75
- package/dist/components/product/product-order/product-order.wxss +0 -1
- package/dist/components/signin/signin-dialog.js +0 -305
- package/dist/components/signin/signin-dialog.json +0 -7
- package/dist/components/signin/signin-dialog.wxml +0 -19
- package/dist/components/signin/signin-dialog.wxss +0 -1
- package/dist/components/top-notify/index.js +0 -14
- package/dist/components/top-notify/index.json +0 -3
- package/dist/components/top-notify/index.wxml +0 -2
- package/dist/components/top-notify/index.wxss +0 -1
- package/dist/pubComponents/countdown/countdown.js +0 -97
- package/dist/pubComponents/countdown/countdown.json +0 -5
- package/dist/pubComponents/countdown/countdown.wxml +0 -19
- package/dist/pubComponents/countdown/countdown.wxss +0 -1
- package/dist/pubComponents/error-page/index.js +0 -146
- package/dist/pubComponents/error-page/index.json +0 -5
- package/dist/pubComponents/error-page/index.wxml +0 -37
- package/dist/pubComponents/error-page/index.wxss +0 -1
- package/dist/pubComponents/popup/popup.js +0 -161
- package/dist/pubComponents/popup/popup.json +0 -5
- package/dist/pubComponents/popup/popup.wxml +0 -17
- package/dist/pubComponents/popup/popup.wxss +0 -1
- package/dist/pubComponents/tabs/index.js +0 -95
- package/dist/pubComponents/tabs/index.json +0 -4
- package/dist/pubComponents/tabs/index.wxml +0 -22
- package/dist/pubComponents/tabs/index.wxss +0 -1
- package/dist/sdk/config/index.js +0 -1
- package/dist/sdk/main/index.js +0 -1
- package/dist/sdk/player/index.js +0 -1
- package/dist/sdk/plugins/ChatServer.js +0 -1
- package/dist/sdk/plugins/CustomMenuServer.js +0 -1
- package/dist/sdk/plugins/InteractServer.js +0 -1
- package/dist/sdk/plugins/InviteCardServer.js +0 -1
- package/dist/sdk/plugins/LotteryServer.js +0 -1
- package/dist/sdk/plugins/MallRewardServer.js +0 -1
- package/dist/sdk/plugins/ProductServer.js +0 -1
- package/dist/shared/RequestUtil.js +0 -1
- package/dist/shared/SerializableMap.js +0 -1
- package/dist/shared/base.server.js +0 -1
- package/dist/shared/cacheUtil.js +0 -1
- package/dist/shared/dateUtil.js +0 -1
- package/dist/shared/logger.js +0 -1
- package/dist/shared/mpUtils.js +0 -1
- package/dist/shared/utils.js +0 -1
|
@@ -1,61 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
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}
|
|
@@ -1 +0,0 @@
|
|
|
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}
|
|
@@ -1,84 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,38 +0,0 @@
|
|
|
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>
|
|
@@ -1 +0,0 @@
|
|
|
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}
|
|
@@ -1,36 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
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>
|
|
@@ -1 +0,0 @@
|
|
|
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}
|
|
@@ -1,36 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
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>
|
|
@@ -1 +0,0 @@
|
|
|
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}
|