|
@@ -1,10 +1,23 @@
|
|
<template>
|
|
<template>
|
|
<view>
|
|
<view>
|
|
<u-navbar title="免费抽奖" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
|
|
<u-navbar title="免费抽奖" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
|
|
- <u-count-down :time="activityTime" format="DD:HH:mm:ss" autoStart millisecond @change="onChange">
|
|
|
|
|
|
+ <u-count-down v-if="info.status && JSON.parse(info.status).value == 3" :time="activityTime" format="DD:HH:mm:ss"
|
|
|
|
+ autoStart millisecond @change="onChange">
|
|
<view style="height: 98rpx;background-color: #fff;margin: 0 30rpx;line-height: 98rpx;overflow: hidden;">
|
|
<view style="height: 98rpx;background-color: #fff;margin: 0 30rpx;line-height: 98rpx;overflow: hidden;">
|
|
<view class="data-btn">距离开奖时间:
|
|
<view class="data-btn">距离开奖时间:
|
|
- <text v-if="timeData.days != 0" >{{timeData.days}} 天</text>
|
|
|
|
|
|
+ <text v-if="timeData.days != 0">{{timeData.days}} 天</text>
|
|
|
|
+ <text>{{ timeData.hours>10?timeData.hours:'0'+timeData.hours }} :</text>
|
|
|
|
+ <text>{{ timeData.minutes>10?timeData.minutes:'0'+timeData.minutes }} :</text>
|
|
|
|
+ <text>{{ timeData.seconds>10?timeData.seconds:'0'+timeData.seconds }}</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view style="float: right;"><span style="font-weight: 600;">{{info.fakeNum}}</span>人已参与</view>
|
|
|
|
+ </view>
|
|
|
|
+ </u-count-down>
|
|
|
|
+ <u-count-down v-if="info.status && JSON.parse(info.status).value == 2" :time="activityTimeTwo"
|
|
|
|
+ format="DD:HH:mm:ss" autoStart millisecond @change="onChange">
|
|
|
|
+ <view style="height: 98rpx;background-color: #fff;margin: 0 30rpx;line-height: 98rpx;overflow: hidden;">
|
|
|
|
+ <view class="data-btn">距离开始时间:
|
|
|
|
+ <text v-if="timeData.days != 0">{{timeData.days}} 天</text>
|
|
<text>{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}} :</text>
|
|
<text>{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}} :</text>
|
|
<text>{{timeData.minutes>10?timeData.minutes:'0'+timeData.minutes}} :</text>
|
|
<text>{{timeData.minutes>10?timeData.minutes:'0'+timeData.minutes}} :</text>
|
|
<text>{{timeData.seconds>10?timeData.seconds:'0'+timeData.seconds}}</text>
|
|
<text>{{timeData.seconds>10?timeData.seconds:'0'+timeData.seconds}}</text>
|
|
@@ -36,8 +49,9 @@
|
|
<view v-for="(item,index) in awardsList" :key="index">
|
|
<view v-for="(item,index) in awardsList" :key="index">
|
|
<view v-if="item.name != '一等奖'">
|
|
<view v-if="item.name != '一等奖'">
|
|
<view style="height: 60rpx;">
|
|
<view style="height: 60rpx;">
|
|
- <view style="float: left;">
|
|
|
|
- <text style="display: inline-block; background-color: #bbbbbb;width: 200rpx;height: 60rpx;line-height:60rpx;text-align: center;">{{item.name}}</text>
|
|
|
|
|
|
+ <view style="float: left;">
|
|
|
|
+ <text
|
|
|
|
+ style="display: inline-block; background-color: #bbbbbb;width: 200rpx;height: 60rpx;line-height:60rpx;text-align: center;">{{item.name}}</text>
|
|
</view>
|
|
</view>
|
|
<view style="float: right;line-height: 60rpx;">{{item.quantity}}个名额</view>
|
|
<view style="float: right;line-height: 60rpx;">{{item.quantity}}个名额</view>
|
|
</view>
|
|
</view>
|
|
@@ -81,9 +95,16 @@
|
|
<view style="height: 200rpx;"></view>
|
|
<view style="height: 200rpx;"></view>
|
|
<view class="footer-fixed">
|
|
<view class="footer-fixed">
|
|
<view class="flex btn">
|
|
<view class="flex btn">
|
|
- <button type="default" @click="exChange">获取抽奖码</button>
|
|
|
|
|
|
+ <button v-if="info.status && JSON.parse(info.status).value == 3" type="default" @click="exChange">获取抽奖码</button>
|
|
|
|
+ <u-count-down v-else :time="activityTimeTwo" format="DD:HH:mm:ss" autoStart millisecond @change="onChange">
|
|
|
|
+ <button style="background-color: #555;" type="default" @click="exChange">
|
|
|
|
+ 开启倒计时:{{timeData.days}} 天{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}} :{{timeData.minutes>10?timeData.minutes:'0'+timeData.minutes}} :{{timeData.seconds>10?timeData.seconds:'0'+timeData.seconds}}
|
|
|
|
+ </button>
|
|
|
|
+ </u-count-down>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+
|
|
|
|
+
|
|
<u-popup :show="popupShow" mode="bottom" @close="close" closeable>
|
|
<u-popup :show="popupShow" mode="bottom" @close="close" closeable>
|
|
<view
|
|
<view
|
|
style="height: 98rpx;width: 100%; border-bottom: 2rpx solid #bbbbbb;text-align: center;line-height: 98rpx;">
|
|
style="height: 98rpx;width: 100%; border-bottom: 2rpx solid #bbbbbb;text-align: center;line-height: 98rpx;">
|
|
@@ -93,7 +114,8 @@
|
|
<text style="color: #8c8c8c; font-size: 24rpx;">每邀请一位好友助力成功,即可获得1个抽奖码,没有上限</text>
|
|
<text style="color: #8c8c8c; font-size: 24rpx;">每邀请一位好友助力成功,即可获得1个抽奖码,没有上限</text>
|
|
</view>
|
|
</view>
|
|
<view style="padding: 0rpx 20rpx 50rpx ; ">
|
|
<view style="padding: 0rpx 20rpx 50rpx ; ">
|
|
- <button type="default" style="background-color: #f7682b; color: #fff;" open-type="share">立即邀请好友助力</button>
|
|
|
|
|
|
+ <button type="default" style="background-color: #f7682b; color: #fff;"
|
|
|
|
+ open-type="share">立即邀请好友助力</button>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
|
|
@@ -131,7 +153,6 @@
|
|
});
|
|
});
|
|
$http.post(`/api/v1/mp/user/marketing/detail/${this.id}`, {}).then(res => {
|
|
$http.post(`/api/v1/mp/user/marketing/detail/${this.id}`, {}).then(res => {
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
- console.log(res)
|
|
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
this.info = res.data
|
|
this.info = res.data
|
|
let awardsList = res.data.awardsList
|
|
let awardsList = res.data.awardsList
|
|
@@ -149,7 +170,7 @@
|
|
this.description = this.formatRichText(description);
|
|
this.description = this.formatRichText(description);
|
|
let timestamp = parseInt(new Date().getTime())
|
|
let timestamp = parseInt(new Date().getTime())
|
|
this.activityTime = this.info.endTime - timestamp
|
|
this.activityTime = this.info.endTime - timestamp
|
|
- console.log(this.activityTime);
|
|
|
|
|
|
+ this.activityTimeTwo = this.info.startTime - timestamp
|
|
}
|
|
}
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
@@ -161,16 +182,18 @@
|
|
exChange() {
|
|
exChange() {
|
|
//弹出层打开
|
|
//弹出层打开
|
|
this.popupShow = true
|
|
this.popupShow = true
|
|
- $http.post('/api/v1/mp/user/marketing/inviteCode', {}).then(res=>{
|
|
|
|
- if(res.code == 0){
|
|
|
|
|
|
+ $http.post('/api/v1/mp/user/marketing/inviteCode', {}).then(res => {
|
|
|
|
+ if (res.code == 0) {
|
|
this.inviteCode = res.data
|
|
this.inviteCode = res.data
|
|
- console.log(this.inviteCode);
|
|
|
|
}
|
|
}
|
|
})
|
|
})
|
|
uni.requestSubscribeMessage({
|
|
uni.requestSubscribeMessage({
|
|
- tmplIds:['3y_My-yRmqmGd3-f-vAwNaK4LQeehzXBSNDi_5wcnFI','FGcPOV1j9ApESr3VUlWjFr6E1vF4X_h0LLN82T2CLL0','92xxL8XTRPLROyNUtmN04OT0kyq4iwSCH3sz-j6zbZs'],
|
|
|
|
- success (res) {
|
|
|
|
- console.log(res);
|
|
|
|
|
|
+ tmplIds: ['3y_My-yRmqmGd3-f-vAwNaK4LQeehzXBSNDi_5wcnFI',
|
|
|
|
+ 'FGcPOV1j9ApESr3VUlWjFr6E1vF4X_h0LLN82T2CLL0',
|
|
|
|
+ '92xxL8XTRPLROyNUtmN04OT0kyq4iwSCH3sz-j6zbZs'
|
|
|
|
+ ],
|
|
|
|
+ success(res) {
|
|
|
|
+
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -210,7 +233,7 @@
|
|
onShareAppMessage(res) {
|
|
onShareAppMessage(res) {
|
|
return {
|
|
return {
|
|
title: '超值宝贝免费抽,参与活动仅需3秒',
|
|
title: '超值宝贝免费抽,参与活动仅需3秒',
|
|
- path: `/pages/index/index?marketingId=${ this.info.id }?inviteCode=${ this.inviteCode }`
|
|
|
|
|
|
+ path: `/pages/index/index?marketingId=${ this.info.id }&inviteCode=${ this.inviteCode }`
|
|
}
|
|
}
|
|
},
|
|
},
|
|
}
|
|
}
|
|
@@ -252,6 +275,7 @@
|
|
border-radius: 20rpx;
|
|
border-radius: 20rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
// 设置ios刘海屏底部横线安全区域
|
|
// 设置ios刘海屏底部横线安全区域
|
|
padding-bottom: constant(safe-area-inset-bottom);
|
|
padding-bottom: constant(safe-area-inset-bottom);
|
|
padding-bottom: env(safe-area-inset-bottom);
|
|
padding-bottom: env(safe-area-inset-bottom);
|