|
|
@ -183,11 +183,21 @@ |
|
|
|
<view class="row col"> |
|
|
|
<view class="row col"> |
|
|
|
<view class="foot-menu-main-title row"> |
|
|
|
<view class="foot-menu-main-title row"> |
|
|
|
<view class="main-title">费用共计</view> |
|
|
|
<view class="main-title">费用共计</view> |
|
|
|
<view class="main-price">¥58.8</view> |
|
|
|
<view class="main-price">¥{{price.all_price}}</view> |
|
|
|
<view class="main-title">元</view> |
|
|
|
<view class="main-title">元</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="foot-menu-checkbox-group row col"> |
|
|
|
<view class="foot-menu-checkbox-group row col"> |
|
|
|
<view class="foot-menu-checkbox"></view> |
|
|
|
<view class="foot-menu-checkbox"> |
|
|
|
|
|
|
|
<u-checkbox |
|
|
|
|
|
|
|
shape="circle" |
|
|
|
|
|
|
|
size="26" |
|
|
|
|
|
|
|
custom-style="margin-top:0;margin-bottom:0;" |
|
|
|
|
|
|
|
icon-size="24" |
|
|
|
|
|
|
|
active-color="#4DC3B8" |
|
|
|
|
|
|
|
:checked="readInfo" |
|
|
|
|
|
|
|
@change="readInfo = !readInfo" |
|
|
|
|
|
|
|
></u-checkbox> |
|
|
|
|
|
|
|
</view> |
|
|
|
<view class="foot-menu-title"> |
|
|
|
<view class="foot-menu-title"> |
|
|
|
<text>阅读并同意</text><text class="foot-menu-url" @click="showAgreement">《上门喂养协议》</text> |
|
|
|
<text>阅读并同意</text><text class="foot-menu-url" @click="showAgreement">《上门喂养协议》</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -199,6 +209,7 @@ |
|
|
|
button-color="#4DC3B8" |
|
|
|
button-color="#4DC3B8" |
|
|
|
font-color="#FFFFFF" |
|
|
|
font-color="#FFFFFF" |
|
|
|
button-width="200rpx" |
|
|
|
button-width="200rpx" |
|
|
|
|
|
|
|
@click="readInfo ? orderPay() :$u.toast('请先同意协议')" |
|
|
|
> |
|
|
|
> |
|
|
|
</MzButton> |
|
|
|
</MzButton> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -340,9 +351,14 @@ |
|
|
|
import {cardDetail} from "@/api/card"; |
|
|
|
import {cardDetail} from "@/api/card"; |
|
|
|
import {getAddressList} from "@/api/address"; |
|
|
|
import {getAddressList} from "@/api/address"; |
|
|
|
import image from "@/config/image"; |
|
|
|
import image from "@/config/image"; |
|
|
|
import {getStoreService} from "@/api/order"; |
|
|
|
import {createOrderPrice, getOrderPrice, getStoreService} from "@/api/order"; |
|
|
|
import pet from "@/pages/Pet/index.vue"; |
|
|
|
import pet from "@/pages/Pet/index.vue"; |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
|
|
|
|
computed: { |
|
|
|
|
|
|
|
api() { |
|
|
|
|
|
|
|
return api |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
components: { |
|
|
|
components: { |
|
|
|
HeaderNav, |
|
|
|
HeaderNav, |
|
|
|
FooterNav, |
|
|
|
FooterNav, |
|
|
@ -352,6 +368,12 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
|
|
|
|
readInfo:false, |
|
|
|
|
|
|
|
price:{ |
|
|
|
|
|
|
|
all_price:0, |
|
|
|
|
|
|
|
price:0, |
|
|
|
|
|
|
|
quan_reduce:0, |
|
|
|
|
|
|
|
}, |
|
|
|
radioValue1:[], |
|
|
|
radioValue1:[], |
|
|
|
list: ['未付款', '待评价', '已付款'], |
|
|
|
list: ['未付款', '待评价', '已付款'], |
|
|
|
curNow: 0, |
|
|
|
curNow: 0, |
|
|
@ -415,13 +437,36 @@ |
|
|
|
this.id = options.id; |
|
|
|
this.id = options.id; |
|
|
|
}, |
|
|
|
}, |
|
|
|
updated() { |
|
|
|
updated() { |
|
|
|
this.checkOrderData(); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
onShow(){ |
|
|
|
onShow(){ |
|
|
|
this.getDefaultAddress(); |
|
|
|
this.getDefaultAddress(); |
|
|
|
this.getUserCoupons(); |
|
|
|
this.getUserCoupons(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
orderPay(){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( |
|
|
|
|
|
|
|
this.address |
|
|
|
|
|
|
|
&&this.timeList.length>0 |
|
|
|
|
|
|
|
&&this.petChecked.length>0 |
|
|
|
|
|
|
|
&&this.basicServiceChecked!=='' |
|
|
|
|
|
|
|
){ |
|
|
|
|
|
|
|
console.log(this.basicServiceChecked) |
|
|
|
|
|
|
|
createOrderPrice({ |
|
|
|
|
|
|
|
address_id: this.address.id, |
|
|
|
|
|
|
|
do_date: this.timeList.map(res => [res.date,res.time]), |
|
|
|
|
|
|
|
services: this.addServiceList.map(res => res.id).join(','), |
|
|
|
|
|
|
|
basic_service:this.basicServiceChecked, |
|
|
|
|
|
|
|
pet_ids: this.petChecked.map(res => res.id).join(','), |
|
|
|
|
|
|
|
store_id:this.addServiceList[0].store_id, |
|
|
|
|
|
|
|
user_coupon_id:this.coupons.id || 0 |
|
|
|
|
|
|
|
}).then(res => { |
|
|
|
|
|
|
|
console.log(res) |
|
|
|
|
|
|
|
this.price = res.data; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
checkOrderData(){ |
|
|
|
checkOrderData(){ |
|
|
|
if( |
|
|
|
if( |
|
|
|
this.address |
|
|
|
this.address |
|
|
@ -429,14 +474,28 @@ |
|
|
|
&&this.petChecked.length>0 |
|
|
|
&&this.petChecked.length>0 |
|
|
|
&&this.basicServiceChecked!=='' |
|
|
|
&&this.basicServiceChecked!=='' |
|
|
|
){ |
|
|
|
){ |
|
|
|
console.log('formDone') |
|
|
|
console.log(this.basicServiceChecked) |
|
|
|
|
|
|
|
getOrderPrice({ |
|
|
|
|
|
|
|
address_id: this.address.id, |
|
|
|
|
|
|
|
do_date: this.timeList.map(res => [res.date,res.time]), |
|
|
|
|
|
|
|
services: this.addServiceList.map(res => res.id).join(','), |
|
|
|
|
|
|
|
basic_service:this.basicServiceChecked, |
|
|
|
|
|
|
|
pet_ids: this.petChecked.map(res => res.id).join(','), |
|
|
|
|
|
|
|
store_id:this.addServiceList[0].store_id, |
|
|
|
|
|
|
|
user_coupon_id:this.coupons.id || 0 |
|
|
|
|
|
|
|
}).then(res => { |
|
|
|
|
|
|
|
console.log(res) |
|
|
|
|
|
|
|
this.price = res.data; |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
selectPet(petList){ |
|
|
|
selectPet(petList){ |
|
|
|
this.petChecked = petList; |
|
|
|
this.petChecked = petList; |
|
|
|
|
|
|
|
this.checkOrderData(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
delPet(index){ |
|
|
|
delPet(index){ |
|
|
|
this.petChecked.splice(index,1); |
|
|
|
this.petChecked.splice(index,1); |
|
|
|
|
|
|
|
this.checkOrderData(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
doDatePopupConfirm(){ |
|
|
|
doDatePopupConfirm(){ |
|
|
|
this.timeListTemp.forEach(item => { |
|
|
|
this.timeListTemp.forEach(item => { |
|
|
@ -451,6 +510,7 @@ |
|
|
|
doTimeSelect(value){ |
|
|
|
doTimeSelect(value){ |
|
|
|
this.timeListTemp[this.vTabCurrent].time = value |
|
|
|
this.timeListTemp[this.vTabCurrent].time = value |
|
|
|
console.log(this.timeListTemp) |
|
|
|
console.log(this.timeListTemp) |
|
|
|
|
|
|
|
this.checkOrderData(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
changeVTab(index){ |
|
|
|
changeVTab(index){ |
|
|
|
console.log(index) |
|
|
|
console.log(index) |
|
|
@ -539,6 +599,7 @@ |
|
|
|
radioChange(n) { |
|
|
|
radioChange(n) { |
|
|
|
this.basicServiceChecked = n.id |
|
|
|
this.basicServiceChecked = n.id |
|
|
|
console.log('radioChange', n); |
|
|
|
console.log('radioChange', n); |
|
|
|
|
|
|
|
this.checkOrderData(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
groupChange(n) { |
|
|
|
groupChange(n) { |
|
|
|
console.log('radioChange', n); |
|
|
|
console.log('radioChange', n); |
|
|
|