购物车地址 跳转陪护

master
lion 1 year ago
parent 4245b40401
commit 3023b2ec0b

@ -385,13 +385,13 @@ export default {
} catch (err) {}
},
pay() {
// if (this.pickCart.length <= 0) {
// this.$refs.uToast.show({
// title: "",
// type: "warning",
// });
// return
// }
if (this.carts.length <= 0) {
this.$refs.uToast.show({
title: "请选择下单商品",
type: "warning",
});
return
}
this.$u.route({
url: '/package_sub/pages/Shop/Pay',
params: {

@ -185,7 +185,7 @@
safe-area-inset-bottom
>
<view class="content">
<scroll-view scroll-y="true" style="height: 800rpx">
<scroll-view scroll-y="true" style="height: 750rpx;padding-bottom:40rpx">
<view
class="site"
v-for="item in sites"
@ -211,10 +211,19 @@
</view>
</view>
</scroll-view>
<u-button
v-if="!detail.id"
shape="circle"
ripple
:custom-style="btnStyle"
@click="goAddress"
>新建收货地址</u-button
>
</view>
</u-popup>
<tabbar class="tabbar"></tabbar>
<u-toast ref="uToast" />
</view>
</template>
@ -267,6 +276,13 @@ export default {
}
},
async submit() {
if(!this.site){
this.$refs.uToast.show({
title: "请选择收货地址",
type: "warning",
});
return
}
if (!this.site.id) {
this.$refs.uToast.show({
title: "请选择收货地址",
@ -347,6 +363,11 @@ export default {
console.error(err)
}
},
goAddress(){
uni.navigateTo({
url:'/package_sub/pages/UserAddress/AddUserAddress?type=car'
})
},
async refund() {
try {
uni.showModal({
@ -378,7 +399,10 @@ export default {
}
},
created() {
this.getSites();
// this.getSites();
},
onShow() {
this.getSites()
},
onLoad(option) {
if (option.order_id) {

@ -80,6 +80,7 @@ export default {
address: '',
is_default: 0
},
type:''
};
},
methods: {
@ -137,6 +138,7 @@ export default {
})
return
}
let that = this
try {
await this.$u.api.userAddressSave(this.form)
this.$refs.uToast.show({
@ -153,6 +155,7 @@ export default {
if(option.id) {
this.getDetail(option.id)
}
this.type = options.type?options.type:''
}
};
</script>

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save