Commit 9c486bd3 authored by 潘永坪's avatar 潘永坪

优惠券开发

parent 39cad1bd
...@@ -58,9 +58,9 @@ ...@@ -58,9 +58,9 @@
<view class="right4"> <view class="right4">
<view class="right4-left"> <view class="right4-left">
已售10W+ <!-- <text>已售10W+</text> -->
{{item.couponName||'优惠'}}
</view> </view>
<view class="right4-right"> <view class="right4-right">
<text class="right4-price1">¥{{parseFloat(item.originalPrice)}}</text> <text class="right4-price1">¥{{parseFloat(item.originalPrice)}}</text>
<text class="right4-price2"> <text class="right4-price2">
...@@ -86,6 +86,46 @@ ...@@ -86,6 +86,46 @@
</swiper> </swiper>
</view> </view>
<merchantDetail :detailData='detailData' ref='merchantDetail'></merchantDetail> <merchantDetail :detailData='detailData' ref='merchantDetail'></merchantDetail>
<!-- 券1(抵用券) -->
<view class="coupon-wrap" v-if="showCoupon1" style="z-index: 101;">
<view @click="showCoupon1=false">
<view style="position: relative;">
<image src="@/static/img/coupon/coupon1.png" mode="widthFix"></image>
<view class="coupon1-content">
<image src="@/static/img/coupon/coupon-new.png" mode="widthFix" style="width: 356rpx;">
</image>
<view style="display: flex;justify-content: center;margin: 30rpx 0 70rpx 0;">
<view class="coupon1-price">
<view>
<text style="font-size: 52rpx;font-weight: bold;">{{couponPrice1}}</text>
<text style="margin-left: 20rpx;font-weight: bold;">购买自动抵</text>
</view>
<view style="margin-top: 10rpx;">
<text>使用景区:两江夜游、云端之眼</text>
</view>
</view>
</view>
<view class="coupon1-btn">
<text class="btn">开心收下</text>
</view>
</view>
</view>
<view style="text-align: center;">
<u-icon name='close-circle' size='48' color="#ffffff"></u-icon>
</view>
</view>
</view>
<!-- 券2(代金券) -->
<view class="coupon-wrap" v-if="showCoupon2">
<view @click="showCoupon2=false">
<view style="text-align: right;">
<u-icon name='close-circle' size='48' color="#ffffff"></u-icon>
</view>
<image src="@/static/img/coupon/coupon2.png" mode="widthFix"></image>
</view>
</view>
</view> </view>
</template> </template>
...@@ -97,6 +137,9 @@ export default { ...@@ -97,6 +137,9 @@ export default {
}, },
data() { data() {
return { return {
showCoupon1:false,//是否显示券1
couponPrice1:0,//券价格
showCoupon2:false,//是否显示券2
detailData:'',//详情数据 detailData:'',//详情数据
scenicList:[],//景区数据 scenicList:[],//景区数据
list: [ list: [
...@@ -201,19 +244,26 @@ export default { ...@@ -201,19 +244,26 @@ export default {
//---送券 //---送券
giveCoupon(){ giveCoupon(){
let data={ let data={
pageCode:'SD_GROUP', pageCode:'merchantListIndex',//常量,写死
marketingStatus:1, marketingStatus:1,
userId:uni.getStorageSync('userId')||'', userId:uni.getStorageSync('userId')||'',
openid:uni.getStorageSync('openid')||'' openid:uni.getStorageSync('openid')||''
} }
this.$request('scenic/market/findPageMarket',data).then((res)=>{ this.$request('scenic/market/findPageMarket',data).then((res)=>{
if(res.data.length>0){ if(res.data.length>0){
// this.firstCoupon=true let list=res.data||[]
// this.couponData=res.data.data[0] list.forEach(item=>{
// setTimeout(()=>{
// this.firstCoupon=false if(item.couponType==1){
// this.smallCoupon=true //抵用券
// },1500) this.showCoupon1=true
this.couponPrice1=item.couponPrice
}
if(item.couponType==3){
//代金券
this.showCoupon2=true
}
})
} }
}) })
}, },
...@@ -366,6 +416,9 @@ export default { ...@@ -366,6 +416,9 @@ export default {
.right4-left{ .right4-left{
color: $red; color: $red;
} }
.right4-right{
flex-shrink: 0;
}
.right4-price1{ .right4-price1{
color: #999; color: #999;
text-decoration:line-through; text-decoration:line-through;
...@@ -375,4 +428,45 @@ export default { ...@@ -375,4 +428,45 @@ export default {
color: $red; color: $red;
margin: 0 10rpx; margin: 0 10rpx;
} }
// 券
.coupon-wrap{
background: rgba(0, 0, 0, 0.5);
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 100;
display: flex;
justify-content:center;
align-items: center;
}
.coupon1-content{
position: absolute;
top: 16vh;
color: #ffffff;
left: 80rpx;
width: 100%;
left: 0;
text-align: center;
}
.coupon1-price{
width: 465rpx;
height:155rpx;
padding: 10rpx 20rpx;
background: url('/static/img/coupon/redEnvelope.png') no-repeat;
background-size: 100% 100%;
text-align: left;
}
.coupon1-btn{
width: 100%;
}
.btn{
padding: 16rpx 60rpx;
border-radius:30rpx;
background: linear-gradient(#F19D38,#EB4926);
font-weight: bold;
font-size: 30rpx;
}
</style> </style>
...@@ -24,10 +24,11 @@ ...@@ -24,10 +24,11 @@
<view class="bottom"> <view class="bottom">
<view class="bottom-left"> <view class="bottom-left">
合计:¥{{priceTotal}} 合计:¥
<text style="font-size: 36rpx;font-weight: bold;">{{priceTotal}}</text>
</view> </view>
<view class="bottom-right"> <view class="bottom-right">
<text class="btn"> <text class="btn" @click="goFillorder()">
去预订 去预订
</text> </text>
</view> </view>
...@@ -79,62 +80,68 @@ export default { ...@@ -79,62 +80,68 @@ export default {
}, },
}, },
methods: { methods: {
//---跳转填写订单页面
goFillorder(){
this.$parent.goFillorder()
}
} }
} }
</script> </script>
<style scoped="scoped"> <style scoped="scoped" lang="scss">
.son-wrap{ .son-wrap{
position: relative; position: relative;
} }
.title{ .title{
text-align: center; text-align: center;
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
padding: 30rpx 0; padding: 30rpx 0;
position:fixed; position:fixed;
top: 0; top: 0;
width: 100%; width: 100%;
background: #fff; background: #fff;
z-index: 1; z-index: 1;
} }
.middle { .middle {
padding: 100rpx 24rpx 0 24rpx; padding: 100rpx 24rpx 0 24rpx;
} }
.merchantlist{ .merchantlist{
border-bottom:2rpx solid #ececec; border-bottom:2rpx solid #ececec;
padding-bottom: 40rpx; padding-bottom: 40rpx;
margin-top: 24rpx; margin-top: 24rpx;
} }
.merchant-title{ .merchant-title{
font-size: 36rpx; font-size: 36rpx;
font-weight: bold; font-weight: bold;
color: #191919; color: #191919;
} }
.productlist{ .productlist{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
font-size: 32rpx; font-size: 32rpx;
margin-top: 20rpx; margin-top: 20rpx;
} }
.bottom { .bottom {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 0 24rpx; padding: 0 24rpx;
height: 100rpx; height: 100rpx;
align-items: center; align-items: center;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
z-index: 9; z-index: 9;
background: #FFFFFF; background: #FFFFFF;
box-sizing: border-box; box-sizing: border-box;
} }
.btn{ .bottom-left{
padding: 16rpx 48rpx; color:$red;
border-radius: 20rpx; }
font-size: 32rpx; .btn{
} padding: 16rpx 48rpx;
border-radius: 20rpx;
font-size: 32rpx;
}
</style> </style>
...@@ -17,10 +17,13 @@ ...@@ -17,10 +17,13 @@
<view class="merchant-title"> <view class="merchant-title">
<view class="title-left"> <view class="title-left">
<text >{{item.name}}</text> <text >{{item.name}}</text>
<image src="../../../static/img/scenic/coupon.png" ></image> <template v-if="item.couponVoList&&item.couponVoList.length>0">
<text class="title-coupon"> <image src="../../../static/img/scenic/coupon.png"></image>
劵惠 <text class="title-coupon">
</text> 劵惠
</text>
</template>
</view> </view>
<view v-if="showDistance" class="title-right"> <view v-if="showDistance" class="title-right">
...@@ -28,7 +31,7 @@ ...@@ -28,7 +31,7 @@
</view> </view>
</view> </view>
<label v-for="(items,a) in item.productListCopy" :key='a'> <label v-for="(items,a) in item.productListCopy" :key='a' :class="{'off':items.status==2}">
<view class="product" :class="{'on':items.ifChoose}"> <view class="product" :class="{'on':items.ifChoose}">
<view class="product-left"> <view class="product-left">
<checkbox class="blue" :disabled="items.status==2" :value="JSON.stringify(items)" :checked="items.ifChecked" /> <checkbox class="blue" :disabled="items.status==2" :value="JSON.stringify(items)" :checked="items.ifChecked" />
...@@ -340,6 +343,7 @@ export default { ...@@ -340,6 +343,7 @@ export default {
initList(latitude,longitude) { initList(latitude,longitude) {
let data = { let data = {
merchantId: this.merchantId, //商户id merchantId: this.merchantId, //商户id
openid:uni.getStorageSync('openid')||'',
latitude, latitude,
longitude longitude
} }
...@@ -473,6 +477,9 @@ export default { ...@@ -473,6 +477,9 @@ export default {
margin-top: 24rpx; margin-top: 24rpx;
padding: 24rpx; padding: 24rpx;
} }
.merchant label.off .product{
background: #F3F3F3;
}
.merchant-title{ .merchant-title{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -500,11 +507,12 @@ export default { ...@@ -500,11 +507,12 @@ export default {
font-size: 24rpx; font-size: 24rpx;
} }
.product{ .product{
padding: 16rpx; padding:10rpx 16rpx;
background: #ffffff; background: #ffffff;
border-radius: 8rpx; border-radius: 8rpx;
display: flex; display: flex;
align-items: center; align-items: center;
margin-top: 10rpx;
} }
.product.on{ .product.on{
background: #E2EEFF; background: #E2EEFF;
......
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