Commit 24fd0823 authored by 黄奎's avatar 黄奎

111

parent da58f1d2
<template>
<view class="couponStyle" :style="{ height: contentHeight }" @click="lineShow=false">
<!-- <u-tabs :list="list" :is-scroll="false" :current="currentIndex" @change="change" :active-color="mainColor" :show-bar="showBar"
height="100"></u-tabs> -->
<view class="couponHeaderBox">
<view class="couponHeader">
<view class="couponHeadLeft">
......@@ -13,7 +11,8 @@
</view>
</view>
<view class="couponHeadRight">
<text v-for="(item,index) in list" :key="index" :class="[msg.CouponType==item.id?'active':'']" @click.stop="msg.CouponType=item.id,ResetQuery()">{{ item.name }}</text>
<text v-for="(item,index) in couponStateList" :key="index" :class="[msg.CouponType==item.id?'active':'']"
@click.stop="changeState()">{{ item.name }}</text>
</view>
</view>
<view class="couponLine" v-if="lineShow">
......@@ -54,21 +53,22 @@
<view class="coupond">
<view class="name" style="font-family:'microsoft yahei ui light';">
<view class="nameText">{{ x.couponName }}</view>
<view class="nameType">跟团游</view>
<view class="nameType">{{x.couponsUseScopeName}}</view>
</view>
<view class="coupondLineTb">
<view class="coupondLineTbt">
适用蓝梦系列适用蓝梦系列适用蓝梦系列适用蓝梦系列适用蓝梦系列
<template v-if="x.lineNameStr&&x.lineName!=''">适用线路:{{x.lineNameStr}}</template>
<template v-if="x.lineteamNameStr&&x.lineteamNameStr!=''">适用系列:{{x.lineteamNameStr}}</template>
<template v-if="x.remark&&x.remark!=''">{{x.remark}}</template>
</view>
<view class="coupondLineGo" @click.stop="godetails(x)">去使用</view>
</view>
<view class="date">{{ x.expirationDate }}</view>
<view class="date">{{x.effectDate}}至{{ x.expirationDate }}</view>
</view>
</view>
</view>
</view>
</view>
<u-loadmore :status="status" :load-text="loadText" :font-size="24" :margin-top="20" :margin-bottom="20" bg-color="#f3f4f6" />
</scroll-view>
</view>
......@@ -94,7 +94,7 @@
pageTitle: "我的优惠券",
showAuth: false,
U: {},
list: [{
couponStateList: [{
name: "全部",
id: 0,
},
......@@ -120,10 +120,10 @@
"userId": 0, //CustomerAccountId
"lineId": 0, //线路
"lineteamId": 0, //系列ID
"CustomerType": 1, //0-同行,1-直客
"CustomerType": 0, //0-同行,1-直客
"CouponStatus": 1, //优惠券状态 1未使用 2已使用 3已过期
"CouponsUseScope": 0, //优惠券使用范围 有枚举
"FromPlatform": 0, //来源平台 1app 2小程序
"FromPlatform": "2", //来源平台 1app 2小程序
"CouponType": 0, //优惠券类型 1:抵用券,2:折扣卷
},
page_count: 1,
......@@ -219,6 +219,19 @@
this.init()
},
methods: {
//状态切换
changeState(item) {
if (item.id <= 2) {
this.msg.CouponType = item.id,
this.msg.CouponStatus = 1;
} else if (item.id == 3) {
this.msg.CouponType = 0;
this.msg.CouponStatus = 3;
}
this.ResetQuery();
},
//重新查询
ResetQuery() {
this.couponDataList = []
this.msg.pageIndex = 1
......@@ -439,8 +452,8 @@
position: relative;
}
.couponHeader{
.couponHeader {
box-shadow: 0rpx 2rpx 18rpx 0rpx #B1B1B1;
display: flex;
justify-content: space-between;
......
......@@ -1486,10 +1486,12 @@
encodeURIComponent(JSON.stringify(ren)) +
"&tcid=" +
this.delMsg.tcid +
"&cityId= " +
"&cityId=" +
this.delMsg.cityId +
"&lineId=" +
this.dataList.lineId,
this.dataList.lineId +
"&teamType=" +
this.currentPrice.teamType,
});
},
// #ifdef MP-WEIXIN
......
......@@ -511,6 +511,7 @@
},
onLoad(option) {
this.customer = uni.getStorageSync("b2b_user");
console.log("option", option);
if (option.seat) {
this.currentPriceInfo = JSON.parse(
decodeURIComponent(option.currentPriceInfo)
......@@ -554,10 +555,20 @@
"lineId": this.lineId, //线路ID
"lineteamId": 0, //系列ID
"userId": 0, //AccountId
"CouponsUseScope": 2, //特定使用平台
"CouponsUseScope": 2, //特定使用平台(当地游=8 跟团游=2 小包团=10)
"isExpansion": 0, //是否启动膨胀金1-是
"CustomerType": 0, //客户类型 0-同行,1-直客
"TCID":this.currentPriceInfo.tcid,
"TCID": this.currentPriceInfo.tcid,
}
if (this.currentPriceInfo.teamType == "0") {
//跟团游
couponParams.CouponsUseScope = 2;
} else if (this.currentPriceInfo.teamType == "1") {
//小包团
couponParams.CouponsUseScope = 10;
} else if (this.currentPriceInfo.teamType == "2") {
//当地游
couponParams.CouponsUseScope = 8;
}
couponParams.userId = this.customer.accountId;
console.log("this.customer", this.customer);
......
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