物流查询 动态产品提醒

main
lion 1 year ago
parent af52af22c8
commit ebdec37b81

@ -7,8 +7,9 @@
<view class="systemtop">
<view class="systemtitle">蟹太太提货系统</view>
<view class="systemtext" v-if="showHelp">
<text style="width: 70%;margin: 0 auto;margin-top: 20rpx;">该产品于<text class="colorOrange">{{openDate}}</text><text
class="colorOrange">{{endDate}}</text>可提货</text>
<text style="width: 70%;margin: 0 auto;margin-top: 20rpx;">该产品
<text v-if="openDate" class="colorOrange">{{openDate}}</text>
<text v-if="endDate" class="colorOrange">{{endDate}}</text></text>
</view>
</view>
<view class="formChange">
@ -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,

Loading…
Cancel
Save