Commit bcfc1650 by songbingqi

修复部分bug

parent 447b16d9
...@@ -27,8 +27,8 @@ export default { ...@@ -27,8 +27,8 @@ export default {
}, },
watch:{ watch:{
newIndex(val){ newIndex(val){
this.flag = true
this.actionIndex = val this.actionIndex = val
this.flag = true
} }
}, },
data() { data() {
...@@ -39,8 +39,8 @@ export default { ...@@ -39,8 +39,8 @@ export default {
}, },
methods: { methods: {
changeValue(index){ changeValue(index){
this.flag = true
this.actionIndex = index this.actionIndex = index
this.flag = true
this.$emit('changeTab',index) this.$emit('changeTab',index)
} }
} }
......
<template> <template>
<view class="bigBox"> <view class="bigBox">
<Tabs :list='list1' @changeTab="changeTab" :newIndex="current" /> <Tabs :list='list' @changeTab="changeTab" :newIndex="current" />
<view> <view>
<swiper :current="current" class="swiper" @change="swiperChange"> <swiper :current="current" class="swiper" @change="swiperChange">
<swiper-item> <swiper-item>
...@@ -32,7 +32,7 @@ export default { ...@@ -32,7 +32,7 @@ export default {
components: {Ticket,Tabs}, components: {Ticket,Tabs},
data() { data() {
return { return {
list1: [ list: [
{ {
name: "HOOLOO券", name: "HOOLOO券",
}, },
...@@ -47,37 +47,9 @@ export default { ...@@ -47,37 +47,9 @@ export default {
cantuse:[] cantuse:[]
}; };
}, },
watch:{
current(val) {
console.log(val,'val')
if(val===1&&this.cantuse.length===0){
this.getTickList(false)
}
}
},
mounted(){ mounted(){
for(let i=0;i<2;i++){
this.nouserList.push({
status:2, // 0可使用 1不可使用/已过期/已失效
couponType:0, // 0满减 1折扣 2抵扣
typeDesc:'最大字数最大字', // 左上角文案描述
mjPrice:'30', // 满减金额
zkPrice:'7', // 折扣金额
dkPrice:'免单', // 抵扣金额
priceDesc:'满130可用', // 条件描述
categoryDesc:'最大免单', // 下拉行描述
checkStatus:false, // 优惠券选中状态
title:'最大字数最大字数最大', // 优惠券标题
time:['2022.07.24.17:20'], // 过期时间
shopList:['全门店可用'], // 可用门店
goodList:['全品类可用'], // 可用品类
useScence:['小程序下单可用'], // 使用场景
useDesc:['*不可与其他优惠券同时使用','*不可与门店优惠共享','*订单完成后选择退款,只退回实际支付金额,优惠券不予退回'], // 使用说明
zkRule:'整单最高抵扣50元', // 折扣规则
reson:'不可与已勾选券叠加使用' // 不可使用原因
})
}
this.getTickList(true) this.getTickList(true)
this.getTickList(false)
}, },
methods: { methods: {
async getTickList(val) { async getTickList(val) {
...@@ -87,17 +59,17 @@ export default { ...@@ -87,17 +59,17 @@ export default {
let timeStart = '' let timeStart = ''
let timeEnd = '' let timeEnd = ''
if(item.useStartTime){ if(item.useStartTime){
timeStart = item.useStartTime.slice(0,11).replace('-', '.') timeStart = item.useStartTime.slice(0,11).replace(new RegExp('-','g'), '.')
} }
if(item.useEndTime){ if(item.useEndTime){
timeEnd = item.useEndTime.slice(0,11).replace('-', '.') timeEnd = item.useEndTime.slice(0,11).replace(new RegExp('-','g'), '.')
} }
return { return {
id: item.id, id: item.id,
status: item.state===0?0:item.state===1?2:3, status: item.state===0?0:item.state===1?2:3,
couponType: item.type, couponType: item.type,
typeDesc: item.categoryName, typeDesc: item.categoryName,
price: item.priceDiscount, price: item.priceDiscount===0?'免单':item.priceDiscount,
priceDesc: item.ruleDesc, priceDesc: item.ruleDesc,
categoryDesc:item.categoryDesc, categoryDesc:item.categoryDesc,
checkStatus: false, checkStatus: false,
......
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