购物车地址 跳转陪护

master
lion 1 year ago
parent 4245b40401
commit 3023b2ec0b

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

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

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

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