|
@@ -9,6 +9,27 @@
|
|
|
<view class="name2">{{info.startTime.slice(0,10)}}~{{info.endTime.slice(0,10)}}</view>
|
|
|
<view class="name3">{{info.activityContent}}</view>
|
|
|
</view>
|
|
|
+ <!-- 拼团 -->
|
|
|
+ <view class="ptBox" v-if="info.groupList.length>0">
|
|
|
+ <view class="ptBoxtop">
|
|
|
+ <view class="ptNum">{{info.groupList.length}}人正在拼团,可直接参与</view>
|
|
|
+ <view class="ptMore">
|
|
|
+ <sapn>查看更多</sapn>
|
|
|
+ <img src="../../static/timg/jt2.png" alt="" class="shopjt">
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="ptLine" v-for="(item,index) in info.groupList" v-if="index<3">
|
|
|
+ <view class="FirstMobilePhone">{{item.FirstMobilePhone?item.FirstMobilePhone:'***'}}</view>
|
|
|
+ <view class="ptlineRight">
|
|
|
+ <view class="ptlinexx">
|
|
|
+ <view class="DiffBNumber">还差 <span>{{item.DiffBNumber}}人</span>拼成 </view>
|
|
|
+ <view class="ptdjs">剩余{{item.EndTime | limitTimeFilter}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="ptBtn" @click="join(item)">{{item.IfMyself?'邀请好友':'去拼团'}} </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
<view class="shopBox">
|
|
|
<view class="shopBoxTop">
|
|
|
<view class="shopMs">活动门店</view>
|
|
@@ -97,17 +118,27 @@
|
|
|
<view class="shareTxt">分享</view>
|
|
|
</button> -->
|
|
|
<!-- 状态1未开始 2进行中3已结束 -->
|
|
|
- <view class="bottomBtn" v-if="info.state==2" @click="signUp" :style="{background:'#'+themeColor}">
|
|
|
+ <view class="bottomBtn" v-if="info.state==2&&info.groupType!=1" @click="signUp" :style="{background:'#'+themeColor}">
|
|
|
<span v-if="info.payType==1">¥{{info.money}} 立即抢购</span>
|
|
|
<span v-else>立即报名</span>
|
|
|
</view>
|
|
|
+ <view class="bottomPtBox" v-if="info.state==2&&info.groupType==1" >
|
|
|
+ <view class="separate" @click="signUp">
|
|
|
+ <view class="separateTop">¥{{info.money}}</view>
|
|
|
+ <view class="separateTxt">单独购买</view>
|
|
|
+ </view>
|
|
|
+ <view class="groupBtn" @click="groupFn">
|
|
|
+ <view class="separateTop">¥{{info.groupMoney}}</view>
|
|
|
+ <view class="separateTxt">发起拼团</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<view class="bottomBtn2" v-if="info.state==1">报名未开始</view>
|
|
|
<view class="bottomBtn2" v-if="info.state==3">报名已结束</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 报名弹框 -->
|
|
|
<view class="baomingBox" v-if="bmShow" @click="nobmshow">
|
|
|
- <view class="baomingCont" @click.stop="" :style="{bottom: jpHeight}">
|
|
|
+ <view class="baomingCont applicationTk" @click.stop="" :style="{bottom: jpHeight}">
|
|
|
<view class="bmTop">
|
|
|
<view class="bmTitle">登记信息</view>
|
|
|
<img src="../../static/timg/chahao.png" alt="" class="bmChimg" @click="nobmshow">
|
|
@@ -135,7 +166,8 @@
|
|
|
<view class="bmTtnBox">
|
|
|
<view style="height: 1rpx;"></view>
|
|
|
<view class="bmBtn" @click="submitOrder" :style="{background:'#'+themeColor}">
|
|
|
- <span v-if="info.payType==1">¥{{info.money}} 立即抢购</span>
|
|
|
+ <span v-if="info.payType==1&&info.groupType!=1">¥{{info.money}} 立即抢购</span>
|
|
|
+ <span v-if="info.payType==1&&info.groupType==1">¥{{info.groupMoney}} 立即拼团</span>
|
|
|
<span v-else>立即报名</span>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -289,6 +321,8 @@
|
|
|
wxOpenData:'',
|
|
|
ext:'',
|
|
|
iStatusBarHeight:'',
|
|
|
+ groupOwner:'',
|
|
|
+ groupID:'',
|
|
|
}
|
|
|
},
|
|
|
onLoad(opt) {
|
|
@@ -510,6 +544,17 @@
|
|
|
payType:this.info.payType,
|
|
|
shareId:this.shareId,
|
|
|
}
|
|
|
+ if(this.groupOwner==1){
|
|
|
+ params.groupOwner=1;
|
|
|
+ params.groupType=1;
|
|
|
+ params.totalMoney=this.info.groupMoney
|
|
|
+ }
|
|
|
+ if(this.groupOwner==2){
|
|
|
+ params.groupOwner=2;
|
|
|
+ params.groupType=1;
|
|
|
+ params.groupID=this.groupID;
|
|
|
+ params.totalMoney=this.info.groupMoney
|
|
|
+ }
|
|
|
uni.showLoading({
|
|
|
title: '加载中'
|
|
|
})
|
|
@@ -600,13 +645,14 @@
|
|
|
});
|
|
|
},
|
|
|
signUp(){
|
|
|
+ this.groupOwner=0;
|
|
|
if(this.userInfo){
|
|
|
- this.info.shopList.forEach(item=>{
|
|
|
+ /* this.info.shopList.forEach(item=>{
|
|
|
if(item.id == this.shopInfo.id){
|
|
|
this.ckshopdata=item;
|
|
|
this.shopName=item.shopName;
|
|
|
}
|
|
|
- })
|
|
|
+ }) */
|
|
|
|
|
|
|
|
|
this.bmShow=true;
|
|
@@ -615,6 +661,24 @@
|
|
|
}
|
|
|
|
|
|
},
|
|
|
+ groupFn(){
|
|
|
+ this.groupOwner=1;
|
|
|
+ if(this.userInfo){
|
|
|
+ this.bmShow=true;
|
|
|
+ }else{
|
|
|
+ this.authorizShow=true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ join(e){
|
|
|
+
|
|
|
+ this.groupOwner=2;
|
|
|
+ this.groupID=e.ID
|
|
|
+ if(this.userInfo){
|
|
|
+ this.bmShow=true;
|
|
|
+ }else{
|
|
|
+ this.authorizShow=true
|
|
|
+ }
|
|
|
+ },
|
|
|
nobmshow(){
|
|
|
this.bmShow=false;
|
|
|
},
|
|
@@ -848,6 +912,27 @@
|
|
|
})
|
|
|
},
|
|
|
},
|
|
|
+ filters: {
|
|
|
+ // 拼团有效期的filter
|
|
|
+ limitTimeFilter (val) {
|
|
|
+ console.log('limitTimeFilter')
|
|
|
+ //https://blog.csdn.net/qq_39905409/article/details/104478623
|
|
|
+ if (val) {
|
|
|
+ console.log(val)
|
|
|
+ let formateLimitTimes = this.$common.formateTimeStamp(val);
|
|
|
+ let txt = `${formateLimitTimes.hour} 时 ${formateLimitTimes.min} 分 ${formateLimitTimes.seconds} 秒`;
|
|
|
+ if (formateLimitTimes.day != '00') {
|
|
|
+ txt = `${Number(formateLimitTimes.day)*24} 时 ${formateLimitTimes.min} 分 ${formateLimitTimes.seconds} 秒`;
|
|
|
+ }
|
|
|
+ return txt;
|
|
|
+ } else {
|
|
|
+ const twtxt = `0 时 0 分 0 秒`
|
|
|
+ return twtxt;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
onShareAppMessage(res) {
|
|
|
console.log(this.userInfo)
|
|
|
var img='';
|
|
@@ -876,6 +961,74 @@
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
+.ptLine{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 26rpx 24rpx;border-top: 1px solid #EEEEEE;
|
|
|
+}
|
|
|
+.FirstMobilePhone{
|
|
|
+ font-weight: 400;
|
|
|
+ color: #222222;font-size: 28rpx;line-height: 60rpx;
|
|
|
+}
|
|
|
+.DiffBNumber{
|
|
|
+ font-weight: 400;
|
|
|
+ color: #222222;font-size: 26rpx;
|
|
|
+}
|
|
|
+.ptlineRight{
|
|
|
+ display: flex;
|
|
|
+}
|
|
|
+.ptlinexx{
|
|
|
+ padding-right: 12rpx;
|
|
|
+}
|
|
|
+.ptBtn{
|
|
|
+ width: 137rpx;font-weight: 400;
|
|
|
+color: #FFFFFF;font-size: 28rpx;
|
|
|
+ height: 60rpx;text-align: center;
|
|
|
+ background: #E02E24;line-height: 60rpx;
|
|
|
+ border-radius: 6rpx;
|
|
|
+}
|
|
|
+.ptdjs{
|
|
|
+ font-weight: 400;
|
|
|
+ color: #666666;font-size: 24rpx;
|
|
|
+}
|
|
|
+.ptBox{
|
|
|
+ background: #ffffff;margin-top: 20rpx;
|
|
|
+}
|
|
|
+.bottomPtBox{
|
|
|
+ display: flex;padding-top: 24rpx;
|
|
|
+}
|
|
|
+.ptNum{
|
|
|
+ font-weight: 400;
|
|
|
+ color: #222222;font-size: 28rpx;
|
|
|
+}
|
|
|
+.ptBoxtop{
|
|
|
+ display: flex;justify-content: space-between;
|
|
|
+ padding: 20rpx 24rpx;
|
|
|
+}
|
|
|
+.ptMore{
|
|
|
+ font-weight: 400;
|
|
|
+ color: #666666;font-size: 24rpx;
|
|
|
+}
|
|
|
+.separate{
|
|
|
+ width: 284rpx;margin-left: 30rpx;
|
|
|
+ height: 74rpx;
|
|
|
+ background: #F19D01;
|
|
|
+ border-radius: 37rpx;
|
|
|
+ text-align: center;color: #ffffff;
|
|
|
+}
|
|
|
+.groupBtn{
|
|
|
+ width: 284rpx;text-align: center;color: #ffffff;
|
|
|
+ height: 74rpx;margin-left: 30rpx;
|
|
|
+ background: #D53533;
|
|
|
+ border-radius: 37rpx;
|
|
|
+}
|
|
|
+.separateTop{
|
|
|
+ font-weight: 500;font-size: 28rpx;
|
|
|
+ color: #FFFFFF;
|
|
|
+}
|
|
|
+.separateTxt{
|
|
|
+ color: #FFFFFF;font-size: 26rpx;
|
|
|
+}
|
|
|
.companyName{
|
|
|
font-size: 24rpx;
|
|
|
font-family: PingFangSC-Medium, PingFang SC;
|
|
@@ -952,11 +1105,11 @@
|
|
|
height: 120rpx;
|
|
|
background: #FFFFFF;
|
|
|
box-shadow: 0px -2px 10rpx 0px rgba(153,153,153,0.2000);
|
|
|
- /* position: absolute;
|
|
|
+ position: absolute;
|
|
|
left: 0;
|
|
|
- bottom: 0; */
|
|
|
- /* padding-bottom: constant(safe-area-inset-bottom);
|
|
|
- padding-bottom: env(safe-area-inset-bottom); */
|
|
|
+ bottom: 0;
|
|
|
+ padding-bottom: constant(safe-area-inset-bottom);
|
|
|
+ padding-bottom: env(safe-area-inset-bottom);
|
|
|
}
|
|
|
.bmBtn{
|
|
|
width: 690rpx;
|
|
@@ -1191,6 +1344,7 @@
|
|
|
.shopName{
|
|
|
color: #3C3C3C;
|
|
|
font-size: 28rpx;
|
|
|
+ width: 500rpx;
|
|
|
}
|
|
|
.shopaddress{
|
|
|
font-weight: 400;
|
|
@@ -1477,4 +1631,7 @@
|
|
|
margin-top: 62rpx;
|
|
|
margin-left:71rpx;
|
|
|
}
|
|
|
+ .applicationTk{
|
|
|
+ height: 60vh;
|
|
|
+ }
|
|
|
</style>
|