@@ -12,6 +12,7 @@ Page({ | |||||
tuanzhang: imgurl.tuanzhang.url, | tuanzhang: imgurl.tuanzhang.url, | ||||
spellBg: imgurl.spellBg.url, | spellBg: imgurl.spellBg.url, | ||||
position: imgurl.position.url, | position: imgurl.position.url, | ||||
close03: imgurl.close03.url, | |||||
paramData:null, | paramData:null, | ||||
data:null, | data:null, | ||||
clock: "00", | clock: "00", | ||||
@@ -20,7 +21,8 @@ Page({ | |||||
min: "00", | min: "00", | ||||
sec: "00", | sec: "00", | ||||
spellStatusList: spellStatus, | spellStatusList: spellStatus, | ||||
isMyself:false | |||||
isMyself:false, | |||||
showAlert:false | |||||
}, | }, | ||||
gotoAgain(){ | gotoAgain(){ | ||||
let data = this.data.data; | let data = this.data.data; | ||||
@@ -133,6 +135,18 @@ Page({ | |||||
that.countdown(end_time); | that.countdown(end_time); | ||||
}, 1000) | }, 1000) | ||||
}, | }, | ||||
//关闭弹框 | |||||
gotoClose(){ | |||||
this.setData({ | |||||
showAlert:false | |||||
}) | |||||
}, | |||||
//跳转拼团列表 | |||||
gotoSpellList(){ | |||||
wx.navigateTo({ | |||||
url: '/pages/spellGroup/spellGroup', | |||||
}) | |||||
}, | |||||
getDetail(){ | getDetail(){ | ||||
let that = this; | let that = this; | ||||
Http.get({ | Http.get({ | ||||
@@ -154,6 +168,11 @@ Page({ | |||||
let a={}; | let a={}; | ||||
data.userList.push(a) | data.userList.push(a) | ||||
} | } | ||||
if (res.data.couponStatus!=0){ | |||||
that.setData({ | |||||
showAlert: true | |||||
}) | |||||
} | |||||
that.setData({ | that.setData({ | ||||
data:res.data | data:res.data | ||||
}) | }) | ||||
@@ -112,8 +112,18 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class='edit'> | <view class='edit'> | ||||
<button class='share user-motto' wx:if="{{data.status==10&&isMyself==true}}" id="shareBtn" open-type="share">邀请好友拼团</button> | |||||
<button class='share user-motto' wx:if="{{data.status==12||data.status==13}}" bindtap='gotoAgain'>重新拼团</button> | |||||
<button class='share user-motto' wx:if="{{data.status==11&&isMyself==true}}" bindtap='gotoUse'>去使用</button> | |||||
<button class='share user-motto' wx:if="{{data.status==10&&isMyself==true&&data.couponStatus==0}}" id="shareBtn" open-type="share">邀请好友拼团</button> | |||||
<button class='share user-motto' wx:if="{{data.status==12||data.status==13&&data.couponStatus==0}}" bindtap='gotoAgain'>重新拼团</button> | |||||
<button class='share user-motto' wx:if="{{data.status==11&&isMyself==true&&data.couponStatus==0}}" bindtap='gotoUse'>去使用</button> | |||||
</view> | |||||
<view class='alert-bg' wx:if='{{showAlert}}' bindtap='gotoClose'></view> | |||||
<view class='alert-box' wx:if='{{showAlert}}'> | |||||
<view class='alert-close' bindtap='gotoClose'> | |||||
<image src='{{close03}}'></image> | |||||
</view> | |||||
<view class='alert-title'>商品已下架</view> | |||||
<view class='alert-button'> | |||||
<button class='share user-motto' bindtap='gotoSpellList'>更多拼团商品</button> | |||||
</view> | |||||
</view> | </view> | ||||
</view> | </view> |
@@ -292,4 +292,52 @@ page { | |||||
border-radius:47rpx; | border-radius:47rpx; | ||||
color:#333333; | color:#333333; | ||||
margin-bottom: 50rpx; | margin-bottom: 50rpx; | ||||
} | |||||
.alert-bg{ | |||||
width: 100%; | |||||
height: 100vh; | |||||
position: fixed; | |||||
opacity: 0.7; | |||||
background: #000; | |||||
top: 0; | |||||
left: 0; | |||||
z-index: 200; | |||||
} | |||||
.alert-box{ | |||||
width: 600rpx; | |||||
height: 332rpx; | |||||
position: fixed; | |||||
z-index: 300; | |||||
background: #fff; | |||||
top: 50vh; | |||||
margin-top: -162rpx; | |||||
left: 85rpx; | |||||
border-radius:15rpx; | |||||
} | |||||
.alert-close{ | |||||
position: absolute; | |||||
width: 47rpx; | |||||
height: 98rpx; | |||||
top: -98rpx; | |||||
right: 0; | |||||
} | |||||
.alert-close image{ | |||||
width: 47rpx; | |||||
height: 98rpx; | |||||
} | |||||
.alert-title{ | |||||
text-align: center; | |||||
font-size:30rpx; | |||||
line-height: 30rpx; | |||||
margin-top: 79rpx; | |||||
font-family:PingFang-SC-Medium; | |||||
font-weight:500; | |||||
color:rgba(51,51,51,1); | |||||
} | |||||
.alert-button .share{ | |||||
width:500rpx; | |||||
height:95rpx; | |||||
background:linear-gradient(90deg,rgba(248,85,45,1) 0%,rgba(241,60,66,1) 0%,rgba(248,86,46,1) 100%); | |||||
border-radius:47rpx; | |||||
margin-top: 79rpx; | |||||
} | } |
@@ -376,4 +376,8 @@ module.exports = { | |||||
'url': baseUrl + 'position.png', | 'url': baseUrl + 'position.png', | ||||
'name': '地理位置图标' | 'name': '地理位置图标' | ||||
}, | }, | ||||
'close03': { | |||||
'url': baseUrl + 'close03.png', | |||||
'name': '拼团页面关闭图标' | |||||
}, | |||||
} | } |