From ebdec37b81154316687034d7539eb74bf416cd6b Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Wed, 31 Jul 2024 15:40:10 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=B5=81=E6=9F=A5=E8=AF=A2=20?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E4=BA=A7=E5=93=81=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/change/change.vue | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/packages/change/change.vue b/packages/change/change.vue index 5003ff7..87fc2a4 100644 --- a/packages/change/change.vue +++ b/packages/change/change.vue @@ -7,8 +7,9 @@ 蟹太太提货系统 - 该产品于{{openDate}}{{endDate}}可提货 + 该产品 + 于{{openDate}} + 至{{endDate}}可提货 @@ -75,21 +76,25 @@ } this.$u.api.getCard(this.form).then(res => { let open_date = res.card.sku.open?res.card.sku.open:false + let end_date = res.card.sku.end?res.card.sku.end:false let today = this.$moment().format('YYYY-MM-DD') console.log(today,open_date,this.$moment(today).isBefore(open_date)) - if(open_date){ - this.openDate = this.$moment(res.card.sku.open).format('YYYY年MM月DD日') - this.endDate = this.$moment(res.card.sku.end).format('YYYY年MM月DD日') - this.showHelp = true - if(this.$moment(today).isBefore(open_date)){ + // if(open_date){ + this.openDate = open_date?this.$moment(res.card.sku.open).format('YYYY年MM月DD日'):false + this.endDate = end_date?this.$moment(res.card.sku.end).format('YYYY年MM月DD日'):false + this.showHelp = this.openDate || this.endDate ? true : false + if(this.$moment(today).isBefore(open_date) || this.$moment(today).isAfter(end_date)){ if(!isNull(res.card.sku.help)){ toast(res.card.sku.help,4000) }else{ toast(this.dateFalse,4000) } return + }else{ + } - } + // } + if (res.card.status === 2) { uni.setStorageSync('vuex_card', { card_number: this.form.card_number,