Commit 55c384f8 authored by youjie's avatar youjie

no message

parent 839cd538
......@@ -49,6 +49,7 @@ export default {
.carrHeader-left{
position: absolute;
left: 32rpx;
z-index: 3;
}
.carrHeaderBox{
width: 100%;
......
<template>
<view class="couponStyle" :style="{ height: contentHeight }" @click="lineShow=false">
<view class="couponStyle" :style="{ height: contentHeight }" @click="CouponsUseScopeShow=false">
<view class="couponHeaderBox">
<view class="couponHeader">
<view class="couponHeadLeft">
<view class="couponHeadLText" @click.stop="lineShow=!lineShow">
<text class="couponHeadLTextL">{{ lineName }}</text>
<view class="couponHeadLText" @click.stop="CouponsUseScopeShow=!CouponsUseScopeShow">
<text class="couponHeadLTextL">{{ CouponsUseScopeName }}</text>
<view>
<u-icon :name="!lineShow?'arrow-down':'arrow-up'" size="24"></u-icon>
<u-icon :name="!CouponsUseScopeShow?'arrow-down':'arrow-up'" size="24"></u-icon>
</view>
</view>
</view>
<view class="couponHeadRight">
<text v-for="(item,index) in couponStateList" :key="index" :class="[msg.CouponType==item.id?'active':'']"
@click.stop="changeState()">{{ item.name }}</text>
<text v-for="(item,index) in couponStateList" :key="index" :class="[msg.CouponsType==item.id?'active':'']"
@click.stop="changeState(item)">{{ item.name }}</text>
</view>
</view>
<view class="couponLine" v-if="lineShow">
<view class="couponLineT" v-for="(item,index) in lineList">
<view class="couponLineAllName" :class="[msg.lineId==item.id?'active':'']" @click.stop="msg.lineId=item.id,lineName=item.text">
<text>{{ item.text }}</text>
<view class="couponLine" v-if="CouponsUseScopeShow">
<view class="couponLineT" v-for="(item,index) in ScopeOfUseList">
<view class="couponLineAllName" :class="[msg.CouponsUseScope==item.Id?'active':'']" @click.stop="getScopeOfUseId(item)">
<text>{{ item.Name }}</text>
</view>
</view>
</view>
......@@ -46,7 +46,7 @@
</Text>
<Text class="small" style="font-family: microsoft yahei ui light;margin-left: 5rpx;">{{ x.couponsType != 1? "折" : "" }}</Text>
</view>
<view class="tiaojian">抵扣券</view>
<view class="tiaojian">{{x.couponsType==1?'抵扣券':'折扣卷'}}</view>
</view>
</view>
<view class="detail">
......@@ -57,7 +57,7 @@
</view>
<view class="coupondLineTb">
<view class="coupondLineTbt">
<template v-if="x.lineNameStr&&x.lineName!=''">适用线路:{{x.lineNameStr}}</template>
<template v-if="x.CouponsUseScopeNameStr&&x.CouponsUseScopeName!=''">适用线路:{{x.CouponsUseScopeNameStr}}</template>
<template v-if="x.lineteamNameStr&&x.lineteamNameStr!=''">适用系列:{{x.lineteamNameStr}}</template>
<template v-if="x.remark&&x.remark!=''">{{x.remark}}</template>
</view>
......@@ -100,11 +100,11 @@
},
{
name: "折扣券",
id: 1,
id: 2,
},
{
name: "抵扣券",
id: 2,
id: 1,
},
{
name: "已过期",
......@@ -122,9 +122,9 @@
"lineteamId": 0, //系列ID
"CustomerType": 0, //0-同行,1-直客
"CouponStatus": 1, //优惠券状态 1未使用 2已使用 3已过期
"CouponsUseScope": 0, //优惠券使用范围 有枚举
"CouponsUseScope": -1, //优惠券使用范围 有枚举
"FromPlatform": "2", //来源平台 1app 2小程序
"CouponType": 0, //优惠券类型 1:抵用券,2:折扣卷
"CouponsType": 0, //优惠券类型 1:抵用券,2:折扣卷
},
page_count: 1,
couponDataList: [],
......@@ -136,7 +136,12 @@
nomore: "没有更多了",
},
showBar: true,
lineList: [{
lineList: [
{
text: '不限',
id: -1
},
{
text: '通用',
id: 0
},
......@@ -173,8 +178,8 @@
id: 8
},
],
lineName: '通用',
lineShow: false,
CouponsUseScopeName: '不限',
CouponsUseScopeShow: false,
lineImgs: [
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638726322574781584.png', //跟团游
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638726322566159036.png', //自由行
......@@ -187,6 +192,7 @@
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638726322569972025.png', //美食2
],
b2bUserInfo: {},
ScopeOfUseList: [],
};
},
created() {
......@@ -215,20 +221,44 @@
});
},
onLoad: function(option) {
this.getScopeOfUse()
this.loading = true
this.init()
},
methods: {
getScopeOfUseId(item){
this.CouponsUseScopeShow=false
this.msg.CouponsUseScope=item.Id
this.CouponsUseScopeName=item.Name
this.ResetQuery()
},
getScopeOfUse() {
this.apipost("coupon_post_GetCouponAllotOrderTypeEnumList", {}, (res) => {
if (res.resultCode == 1) {
this.ScopeOfUseList = res.data
this.ScopeOfUseList.unshift({
Id: -1,
Name: '不限'
})
}
}, (failed) => {
uni.showToast({
title: failed.message,
icon: "none",
});
}, (error) => {
})
},
//状态切换
changeState(item) {
if (item.id <= 2) {
this.msg.CouponType = item.id,
this.msg.CouponStatus = 1;
this.msg.CouponsType = item.id,
this.msg.CouponStatus = 1;
} else if (item.id == 3) {
this.msg.CouponType = 0;
this.msg.CouponsType = 0;
this.msg.CouponStatus = 3;
}
this.ResetQuery();
},
//重新查询
......@@ -261,6 +291,7 @@
x.backGroubd = this.lineImgs[0]
})
this.page_count = res.data.pageCount;
if(this.page_count==1) this.status = 'nomore'
console.log("this.couponDataList", this.couponDataList)
}
}, (failed) => {
......@@ -395,11 +426,15 @@
font-weight: bold;
size: 64px;
text-align: center;
display: flex;
flex-wrap: nowrap;
}
.couponStyle .item .miane .money .small {
font-size: 12px;
font-weight: 100;
position: relative;
top: 12rpx;
}
.couponStyle .item .miane .tiaojian {
......@@ -466,15 +501,16 @@
}
.couponHeadLText {
width: 210rpx;
display: flex;
align-items: center;
flex: 1;
justify-content: space-between;
padding-left: 43rpx;
border-right: 1rpx solid rgba(207, 207, 207, .4);
}
.couponHeadLTextL {
margin-right: 42rpx;
// margin-right: 42rpx;
font-size: 28rpx;
}
......
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