调整样式,前端拦截使用优惠券

main
yanzai 1 year ago
parent 2f2a1104f3
commit ff89991e08

@ -28,10 +28,16 @@ const GetPersonIntegralSaveMoneyCouponInfo = async () => {
}; };
const selectCoupon = (item) => { const selectCoupon = (item) => {
let buyinfo=$store.getBuyInfo()
if(buyinfo.item_ids.length==0)
{
uni.$lu.toast("无自选项目,无需使用代金券");
return false
}
yytjInfo.value.couponId = item.id; yytjInfo.value.couponId = item.id;
yytjInfo.value.couponPrice = item.price; yytjInfo.value.couponPrice = item.price;
yytjInfo.value.couponName = item.title;
$store.setYytjInfo(yytjInfo.value); $store.setYytjInfo(yytjInfo.value);
let buyinfo=$store.getBuyInfo()
buyinfo.coupon_id= item.id buyinfo.coupon_id= item.id
$store.setBuyInfo(buyinfo); $store.setBuyInfo(buyinfo);
uni.navigateBack({ delta: 1 }); uni.navigateBack({ delta: 1 });

@ -713,8 +713,8 @@ const toRouter = (url, status, index) => {
> >
</view> </view>
<view class="ml-auto mr-20rpx"> <view class="ml-auto mr-20rpx">
<text class="text-#FB4F1A" v-if="yytjInfo.couponPrice" <text class="text-#FB4F1A" v-if="yytjInfo.couponName"
>-¥{{ yytjInfo.couponPrice }}</text >{{ yytjInfo.couponName }}</text
> >
<text class="text-#070707" v-else></text> <text class="text-#070707" v-else></text>
</view> </view>

@ -127,8 +127,14 @@
}) })
} }
const changerl = (e) => { const changerl = (e) => {
console.log(e)
if(e.extraInfo.info!=undefined && e.extraInfo.info=='出诊'){
changeDate(e) changeDate(e)
}else{
uni.$lu.toast("当前日期不可预约");
}
}; };
@ -224,7 +230,7 @@
</view> </view>
<view class="w-100% h-1rpx bg-#E6E9E9 mt-15rpx" > </view> <view class="w-100% h-1rpx bg-#E6E9E9 mt-15rpx" > </view>
</view> </view>
<uni-calendar :selected="MonthList" :startDate="getToday()" :showMonth="false" :insert="true" :date="currentDate" <uni-calendar :selected="MonthList" :startDate="getToday()" :insert="true" :date="currentDate"
@change="changerl" @monthSwitch="monthSwitch" /> @change="changerl" @monthSwitch="monthSwitch" />
</view> </view>
<!-- <view style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)" <!-- <view style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)"

Loading…
Cancel
Save