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

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

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

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

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

Loading…
Cancel
Save