Commit adaa6715 authored by 潘永坪's avatar 潘永坪

组合票优惠券开发

parent bdbc609b
...@@ -110,7 +110,11 @@ ...@@ -110,7 +110,11 @@
<u-icon name="arrow-right" size='26' color='#B4B4B4'></u-icon> <u-icon name="arrow-right" size='26' color='#B4B4B4'></u-icon>
</view> </view>
<view class="product-sell"> <view class="product-sell">
<text style="font-size: 28rpx">¥</text>{{ items.sellingPrice }} <text style="font-size: 28rpx">¥</text>
<!-- 页面加载的时候,有券显示原价,没有券,或者券已领取显示售价 -->
<text v-if="showSmallCoupon">{{ items.originalPrice}}</text>
<!-- 显示售价 -->
<text v-else>{{ items.sellingPrice}}</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -202,6 +206,22 @@ ...@@ -202,6 +206,22 @@
</view> </view>
</view> </view>
<!-- #endif --> <!-- #endif -->
<!-- 券部分 -->
<view>
<!-- 小券 -->
<image v-if="showSmallCoupon" @click="showBigCoupon=true" src="/static/img/combination/smallCoupon.png" style="position: fixed;bottom: 200rpx;right:80rpx;width:120rpx;height: 122rpx;"></image>
<!-- 大券 -->
<view v-if="showBigCoupon" @click="showBigCoupon=false,showSmallCoupon=false" style="position: fixed;top: 0;right: 0;bottom: 0;left: 0;background:rgba(0, 0, 0, 0.5);z-index: 10;display: flex;align-items: center;">
<view style="width: 100%;">
<view style="display:flex;justify-content: center;">
<image src="/static/img/combination/bigCoupon.png" style="width: 85%;" mode="widthFix"></image>
</view>
<view style="display: flex;justify-content: center;">
<u-icon name="close-circle-fill" color="#333333" size="56"></u-icon>
</view>
</view>
</view>
</view>
</view> </view>
</template> </template>
...@@ -253,6 +273,8 @@ export default { ...@@ -253,6 +273,8 @@ export default {
topHeight:0,//上面状态栏+上面导航栏总高度 topHeight:0,//上面状态栏+上面导航栏总高度
tabbarOpacity:0,//导航栏透明度 tabbarOpacity:0,//导航栏透明度
tabbarHeight:'',//导航栏高度 tabbarHeight:'',//导航栏高度
showSmallCoupon:false,//显示小券
showBigCoupon:false,//显示大券
} }
}, },
watch: { watch: {
...@@ -340,7 +362,7 @@ export default { ...@@ -340,7 +362,7 @@ export default {
}else{ }else{
this.topHeight=statusBarHeight this.topHeight=statusBarHeight
} }
this.giveCoupon()
}, },
onShow() { onShow() {
//清空之前选中的数据以及状态 //清空之前选中的数据以及状态
...@@ -584,6 +606,22 @@ export default { ...@@ -584,6 +606,22 @@ export default {
uni.setStorageSync('newTimestamp', newTimestamp) uni.setStorageSync('newTimestamp', newTimestamp)
}) })
}, },
//---送券
giveCoupon() {
let data = {
pageCode:'SD_GROUP',//页面码
marketingStatus: 1,//状态
userId: uni.getStorageSync('userId')||'',
openid: uni.getStorageSync('openid')||'',
companyId:this.companyId,//公司Id
}
this.$request('scenic/market/findPageMarket', data).then((res) => {
if (res.data && res.data.length > 0) {
//有券时显示小券
this.showSmallCoupon=true
}
})
},
//---初始化详情 //---初始化详情
initDetail(merchantId){ initDetail(merchantId){
let data={ let data={
...@@ -752,6 +790,10 @@ export default { ...@@ -752,6 +790,10 @@ export default {
}, },
//---多选框变化 //---多选框变化
checkboxChange(e) { checkboxChange(e) {
//如果有券没有领取,直接显示券,并领取
if(this.showSmallCoupon){
this.showBigCoupon=true
}
let value = e.detail.value let value = e.detail.value
let arr = [] let arr = []
value.forEach(item => { value.forEach(item => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment