pref:提交订单时,虚拟商品不传地址Id

fix/0523-ch
ch 2 years ago
parent 1173416e6c
commit 2734b3c272

@ -307,7 +307,7 @@ export default {
for(let id of ids){
const item = this.list.find(i => id === i.id);
if(item.productType != baseType){
uni.$u.toast('虚拟商品跟实物商品不能同时结算哦~');
uni.$u.toast('虚拟商品需要单独结算,不可和其他实物订单合并结算哦~');
return false;
}
}
@ -316,6 +316,7 @@ export default {
path : '/orderSubmit',
query : {
mode: 'cart',
productType : baseType,
ids:ids.join(',')
}
})

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-24 11:30:55
* @LastEditors: ch
* @LastEditTime: 2022-05-17 22:21:10
* @LastEditTime: 2022-05-25 15:55:43
* @Description: file content
-->
<template>
@ -242,6 +242,7 @@ export default {
mode : 'buyNow',
skuId : this.curSku.skuId,
num : this.curBuyNum,
productType : this.goodsInfo.productType || 1,
activityType : 1
}
const {productActivityVO} = this.goodsInfo;

@ -2,13 +2,13 @@
* @Author: ch
* @Date: 2022-03-20 14:14:53
* @LastEditors: ch
* @LastEditTime: 2022-05-24 09:57:17
* @LastEditTime: 2022-05-25 16:04:45
* @Description: file content
-->
<template>
<view>
<UiWhiteBox>
<UiWhiteBox v-if="productType == 1">
<u-cell class="address" :border="false" isLink @click="selectAddress">
<view slot="title" class="address--title">
{{address.province ? address.province + address.city + address.area : '请选择收货地址'}}
@ -82,7 +82,8 @@ export default {
address : {},
userMessage : '',
orderInfo : {},
payType : 'wxpay'
payType : 'wxpay',
productType : this.$Route.query.productType,
}
},
onLoad(){
@ -93,10 +94,12 @@ export default {
},
onShow(){
//
if(!this.address.id){
if(!this.address.id && this.productType == 1){
this.getAddressList()
}else{
this.getBeforeOrder();
}
this.getBeforeOrder();
},
methods:{
@ -107,8 +110,8 @@ export default {
return false;
}
this.address = result.find(i => i.isDefault) || {};
console.log(this.address);
this.$store.commit('SET_ADDRESS', result);
this.getBeforeOrder();
},
/**
* 获取预订单信息将要提交的订单信息
@ -153,7 +156,7 @@ export default {
*/
async submit(){
const {query} = this.$Route;
if(!this.address.id){
if(!this.address.id && this.productType === 1){
uni.$u.toast('请选择收货地址');
return false;
}

Loading…
Cancel
Save