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

优惠券开发

parent 39cad1bd
......@@ -58,9 +58,9 @@
<view class="right4">
<view class="right4-left">
已售10W+
<!-- <text>已售10W+</text> -->
{{item.couponName||'优惠'}}
</view>
<view class="right4-right">
<text class="right4-price1">¥{{parseFloat(item.originalPrice)}}</text>
<text class="right4-price2">
......@@ -86,6 +86,46 @@
</swiper>
</view>
<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>
</template>
......@@ -97,6 +137,9 @@ export default {
},
data() {
return {
showCoupon1:false,//是否显示券1
couponPrice1:0,//券价格
showCoupon2:false,//是否显示券2
detailData:'',//详情数据
scenicList:[],//景区数据
list: [
......@@ -201,19 +244,26 @@ export default {
//---送券
giveCoupon(){
let data={
pageCode:'SD_GROUP',
pageCode:'merchantListIndex',//常量,写死
marketingStatus:1,
userId:uni.getStorageSync('userId')||'',
openid:uni.getStorageSync('openid')||''
}
this.$request('scenic/market/findPageMarket',data).then((res)=>{
if(res.data.length>0){
// this.firstCoupon=true
// this.couponData=res.data.data[0]
// setTimeout(()=>{
// this.firstCoupon=false
// this.smallCoupon=true
// },1500)
let list=res.data||[]
list.forEach(item=>{
if(item.couponType==1){
//抵用券
this.showCoupon1=true
this.couponPrice1=item.couponPrice
}
if(item.couponType==3){
//代金券
this.showCoupon2=true
}
})
}
})
},
......@@ -366,6 +416,9 @@ export default {
.right4-left{
color: $red;
}
.right4-right{
flex-shrink: 0;
}
.right4-price1{
color: #999;
text-decoration:line-through;
......@@ -375,4 +428,45 @@ export default {
color: $red;
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>
......@@ -24,10 +24,11 @@
<view class="bottom">
<view class="bottom-left">
合计:¥{{priceTotal}}
合计:¥
<text style="font-size: 36rpx;font-weight: bold;">{{priceTotal}}</text>
</view>
<view class="bottom-right">
<text class="btn">
<text class="btn" @click="goFillorder()">
去预订
</text>
</view>
......@@ -79,16 +80,19 @@ export default {
},
},
methods: {
//---跳转填写订单页面
goFillorder(){
this.$parent.goFillorder()
}
}
}
</script>
<style scoped="scoped">
.son-wrap{
<style scoped="scoped" lang="scss">
.son-wrap{
position: relative;
}
.title{
}
.title{
text-align: center;
font-size: 32rpx;
font-weight: bold;
......@@ -99,27 +103,27 @@ export default {
width: 100%;
background: #fff;
z-index: 1;
}
.middle {
}
.middle {
padding: 100rpx 24rpx 0 24rpx;
}
.merchantlist{
}
.merchantlist{
border-bottom:2rpx solid #ececec;
padding-bottom: 40rpx;
margin-top: 24rpx;
}
.merchant-title{
}
.merchant-title{
font-size: 36rpx;
font-weight: bold;
color: #191919;
}
.productlist{
}
.productlist{
display: flex;
justify-content: space-between;
font-size: 32rpx;
margin-top: 20rpx;
}
.bottom {
}
.bottom {
display: flex;
justify-content: space-between;
padding: 0 24rpx;
......@@ -131,10 +135,13 @@ export default {
z-index: 9;
background: #FFFFFF;
box-sizing: border-box;
}
.btn{
}
.bottom-left{
color:$red;
}
.btn{
padding: 16rpx 48rpx;
border-radius: 20rpx;
font-size: 32rpx;
}
}
</style>
......@@ -17,10 +17,13 @@
<view class="merchant-title">
<view class="title-left">
<text >{{item.name}}</text>
<image src="../../../static/img/scenic/coupon.png" ></image>
<template v-if="item.couponVoList&&item.couponVoList.length>0">
<image src="../../../static/img/scenic/coupon.png"></image>
<text class="title-coupon">
劵惠
</text>
</template>
</view>
<view v-if="showDistance" class="title-right">
......@@ -28,7 +31,7 @@
</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-left">
<checkbox class="blue" :disabled="items.status==2" :value="JSON.stringify(items)" :checked="items.ifChecked" />
......@@ -340,6 +343,7 @@ export default {
initList(latitude,longitude) {
let data = {
merchantId: this.merchantId, //商户id
openid:uni.getStorageSync('openid')||'',
latitude,
longitude
}
......@@ -473,6 +477,9 @@ export default {
margin-top: 24rpx;
padding: 24rpx;
}
.merchant label.off .product{
background: #F3F3F3;
}
.merchant-title{
display: flex;
justify-content: space-between;
......@@ -500,11 +507,12 @@ export default {
font-size: 24rpx;
}
.product{
padding: 16rpx;
padding:10rpx 16rpx;
background: #ffffff;
border-radius: 8rpx;
display: flex;
align-items: center;
margin-top: 10rpx;
}
.product.on{
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