Merge branch 'fix/0523-ch' into msb_test

feature/md-0530-ch
ch 3 years ago
commit 99e2219f92

@ -0,0 +1,19 @@
/*
* @Author: ch
* @Date: 2022-05-26 15:39:52
* @LastEditors: ch
* @LastEditTime: 2022-05-26 15:47:28
* @Description: file content
*/
// 商品类型
const GOODS_TYPE = {
// 虚拟
VIRTUAL: 2,
// 实物
ENTITY : 1
}
export {
GOODS_TYPE
}

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-05-26 11:49:16
* @LastEditors: ch
* @LastEditTime: 2022-05-26 14:16:49
* @LastEditTime: 2022-05-26 17:00:06
* @Description: file content
*/
@ -11,6 +11,13 @@ export const ORDER_STATUS = {
// 待支付
AWAIT_PAY: 1
}
export const ORDER_SOURCE = {
export const ORDER_TYPE = {
//(1, "普通订单"),
NORMAL: 1,
//(2, "免费订单"),
FREE: 2,
//(3, "秒杀订单"),
SECKILL: 3,
//(4, "虚拟商品订单"),
VIRTUAL : 4
}

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

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-31 14:26:09
* @LastEditors: ch
* @LastEditTime: 2022-05-13 15:04:20
* @LastEditTime: 2022-05-26 17:13:33
* @Description: file content
-->
<template>
@ -14,7 +14,7 @@
<template slot="operation">
<view class="goods-info-operation" v-if="item.afterSaleApplyFlag || [2,3,4].includes(item.detailStatus)">
<UiButton size="min" type="primaryLine" v-if="item.afterSaleApplyFlag"
@click="$Router.push(`/saleAfterSelect?id=${item.orderProductId}`)">申请售后</UiButton>
@click="handleSaleAfter(item)">申请售后</UiButton>
<template v-else>
<UiButton size="min" type="line"
@click="$Router.push(`/saleAfterDetail?orderProductId=${item.orderProductId}`)">
@ -29,7 +29,8 @@
</template>
</UiGoodsInfo>
</UiWhiteBox>
<LogisitcsInfo :logisitcsInfo="orderInfo.logistics" :orderId="orderInfo.orderId"/>
<LogisitcsInfo v-if="orderInfo.orderType !== ORDER_TYPE.VIRTUAL"
:logisitcsInfo="orderInfo.logistics" :orderId="orderInfo.orderId"/>
<OrderInfo :orderInfo="orderInfo" />
<Operation :orderInfo="orderInfo" v-if="orderInfo.orderStatus !== 3"></Operation>
</view>
@ -43,10 +44,12 @@ import StatusTips from './components/StatusTips.vue';
import OrderInfo from './components/OrderInfo.vue';
import LogisitcsInfo from './components/LogisitcsInfo.vue';
import Operation from './components/Operation.vue';
import {ORDER_TYPE} from '@/common/dicts/order'
export default {
components: { UiGoodsInfo, UiWhiteBox, UiButton, StatusTips, OrderInfo, LogisitcsInfo, Operation },
data(){
return {
ORDER_TYPE,
orderInfo : {
products:[],
logistics:{}
@ -74,6 +77,14 @@ export default {
timerCloseOrder(){
this.orderInfo = {...this.orderInfo, orderStatus : 2, cancelReason:'超时未支付'};
this.getOrderInfo();
},
handleSaleAfter(item){
if(this.orderInfo.orderType === ORDER_TYPE.VIRTUAL){
uni.$u.toast('虚拟商品的订单不满足退款要求,不支持申请售后,如有问题请联系客服。');
}else{
this.$Router.push(`/saleAfterSelect?id=${item.orderProductId}`)
}
}
}

@ -2,13 +2,13 @@
* @Author: ch
* @Date: 2022-03-20 14:14:53
* @LastEditors: ch
* @LastEditTime: 2022-05-26 14:31:36
* @LastEditTime: 2022-05-26 16:33:14
* @Description: file content
-->
<template>
<view>
<UiWhiteBox v-if="productType == 1">
<UiWhiteBox v-if="productType == GOODS_TYPE.ENTITY">
<u-cell class="address" :border="false" isLink @click="selectAddress">
<view slot="title" class="address--title">
{{address.province ? address.province + address.city + address.area : '请选择收货地址'}}
@ -68,6 +68,7 @@
</template>
<script>
import {GOODS_TYPE} from '@/common/dicts/goods';
import UiCell from '@/components/UiCell';
import {ApiPostSubmitOrder, ApiGetBeforeOrder, ApiGetBeforeCartOrder} from '@/common/api/order';
import {ApiGetAddress } from '@/common/api/base';
@ -79,6 +80,7 @@ export default {
components : {UiCell, UiButton, UiWhiteBox, UiGoodsInfo },
data(){
return {
GOODS_TYPE,
address : {},
userMessage : '',
orderInfo : {},
@ -94,7 +96,7 @@ export default {
},
onShow(){
//
if(!this.address.id && this.productType == 1){
if(!this.address.id && this.productType == GOODS_TYPE.ENTITY){
this.getAddressList()
}else{
this.getBeforeOrder();
@ -123,7 +125,7 @@ export default {
if(query.mode === 'cart'){
res = await ApiGetBeforeCartOrder({
cartIds: query.ids,
isVirtual :this.productType == 2 && true,
isVirtual :this.productType == GOODS_TYPE.VIRTUAL && true,
recipientAddressId : this.address.id
})
}
@ -133,7 +135,7 @@ export default {
productSkuId : query.skuId,
quantity : query.num,
activityId : query.activityId,
isVirtual : this.productType == 2 && true,
isVirtual : this.productType == GOODS_TYPE.VIRTUAL && true,
activityTimeId : query.activityTimeId,
// 1 2
activityType : query.activityType,
@ -158,7 +160,7 @@ export default {
*/
async submit(){
const {query} = this.$Route;
if(!this.address.id && this.productType === 1){
if(!this.address.id && this.productType === GOODS_TYPE.ENTITY){
uni.$u.toast('请选择收货地址');
return false;
}
@ -171,7 +173,7 @@ export default {
orderSource : this.$store.state.openId ? 5 : 4,
// #endif
recipientAddressId : this.address.id,
isVirtual :this.productType == 2 && true,
isVirtual :this.productType == GOODS_TYPE.VIRTUAL && true,
shoppingCartIds : query.ids ? query.ids.split(',') : [],
products : this.orderInfo.products.map(i => ({
activityId : query.activityId,

Loading…
Cancel
Save