|
|
@ -25,9 +25,9 @@ |
|
|
|
|
|
|
|
|
|
|
|
<view class="width100 backcorfff"> |
|
|
|
<view class="width100 backcorfff"> |
|
|
|
<view class="username"> |
|
|
|
<view class="username"> |
|
|
|
<view class="namecont">优惠金额</view> |
|
|
|
<view class="namecont" >优惠金额</view> |
|
|
|
<input v-if="type !=3" placeholder="请输入优惠金额" v-model="price" type="text" |
|
|
|
<input v-if="type !=3" :placeholder="placeholderTip" v-model="price" type="text" |
|
|
|
placeholder-style="color: #bfbfbf;" /> |
|
|
|
placeholder-style="color: #bfbfbf;" style="width: 72%;" /> |
|
|
|
<view v-if="type ==3">{{price}}</view> |
|
|
|
<view v-if="type ==3">{{price}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -126,6 +126,12 @@ |
|
|
|
//结束时间转化 |
|
|
|
//结束时间转化 |
|
|
|
endDate() { |
|
|
|
endDate() { |
|
|
|
return this.getDate('end'); |
|
|
|
return this.getDate('end'); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
placeholderTip(){ |
|
|
|
|
|
|
|
if(this.preferentialType==3){ |
|
|
|
|
|
|
|
return "折扣比例(10~99),例98折:98" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return '请输入优惠金额' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
@ -224,7 +230,7 @@ |
|
|
|
}); |
|
|
|
}); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (!this.price) { |
|
|
|
if (!this.price){ |
|
|
|
uni.showToast({ |
|
|
|
uni.showToast({ |
|
|
|
title: '请输入优惠金额', |
|
|
|
title: '请输入优惠金额', |
|
|
|
icon: "none", |
|
|
|
icon: "none", |
|
|
@ -232,6 +238,18 @@ |
|
|
|
}); |
|
|
|
}); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(this.preferentialType==3){ |
|
|
|
|
|
|
|
let reg =/^[1-9][0-9]$/; //10-99最低打一折 |
|
|
|
|
|
|
|
if(!reg.test(this.price)){ |
|
|
|
|
|
|
|
this.price=""; |
|
|
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
|
|
title: '请输入正确的折扣比例,例如99折输入:99,打七折输入:70', |
|
|
|
|
|
|
|
icon: "none", |
|
|
|
|
|
|
|
duration: 2000 |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
if (!this.end_date) { |
|
|
|
if (!this.end_date) { |
|
|
|
uni.showToast({ |
|
|
|
uni.showToast({ |
|
|
|
title: '请选择结束时间', |
|
|
|
title: '请选择结束时间', |
|
|
|