pref:虚拟商品提交订单

fix/goods-0525
ch 3 years ago
parent 9df955e8d6
commit efaa39c832

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-05-03 22:41:15
* @LastEditors: ch
* @LastEditTime: 2022-05-16 20:40:48
* @LastEditTime: 2022-05-25 17:57:25
* @Description: file content
-->
<template>
@ -232,16 +232,29 @@ export default {
* 点击去结算
*/
settlement(){
const ids = this.checkedIds;
//
const baseType = this.list.find(i => ids[0] === i.id).productType;
for(let id of ids){
const item = this.list.find(i => id === i.id);
if(item.productType != baseType){
this.$message.warning('虚拟商品需要单独结算,不可和其他实物订单合并结算哦~');
return false;
}
}
if (ids.length) {
this.$router.push({
path : '/order/submit',
query : {
mode: 'cart',
ids:this.checkedIds.join(',')
productType : baseType,
ids:ids.join(',')
}
})
}
}
}
}
</script>
<style lang="scss" scoped>
.main{

@ -493,9 +493,9 @@ export default {
mode: "buyNow",
skuId: this.curSku.skuId,
num: this.curBuyNum,
productType : this.detailData.productType,
activityType: 1,
};
console.log(query);
this.$router.push({
path: "/order/submit",
query,

@ -2,14 +2,16 @@
* @Author: ch
* @Date: 2022-05-04 17:30:58
* @LastEditors: ch
* @LastEditTime: 2022-05-17 16:44:30
* @LastEditTime: 2022-05-25 20:00:10
* @Description: file content
-->
<template>
<div class="main">
<template v-if="productType == 1">
<h3 class="title">收货地址</h3>
<BsAddress v-model="address"/>
</template>
<!-- <h3 class="title">支付方式</h3>
<div class="pay-type">
<el-radio label="微信支付" />
@ -45,7 +47,8 @@ export default {
payOrder : {},
payVisible : false,
payTimerTxt : '',
payTimerStop : null
payTimerStop : null,
productType : this.$Route.query.productType
}
},
mounted(){
@ -92,7 +95,7 @@ export default {
async submit(){
const {query} = this.$route;
if(!this.address.id){
if(!this.address.id && this.productType === 1){
this.$message.error('请选择收货地址');
return false;
}

Loading…
Cancel
Save