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 * @Author: ch
* @Date: 2022-05-26 11:49:16 * @Date: 2022-05-26 11:49:16
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-05-26 14:16:49 * @LastEditTime: 2022-05-26 17:00:06
* @Description: file content * @Description: file content
*/ */
@ -11,6 +11,13 @@ export const ORDER_STATUS = {
// 待支付 // 待支付
AWAIT_PAY: 1 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 * @Author: ch
* @Date: 2022-03-24 11:30:55 * @Date: 2022-03-24 11:30:55
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-05-25 15:55:43 * @LastEditTime: 2022-05-26 15:43:55
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -242,7 +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, productType : this.goodsInfo.productType,
activityType : 1 activityType : 1
} }
const {productActivityVO} = this.goodsInfo; const {productActivityVO} = this.goodsInfo;

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-31 14:26:09 * @Date: 2022-03-31 14:26:09
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-05-13 15:04:20 * @LastEditTime: 2022-05-26 17:13:33
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -14,7 +14,7 @@
<template slot="operation"> <template slot="operation">
<view class="goods-info-operation" v-if="item.afterSaleApplyFlag || [2,3,4].includes(item.detailStatus)"> <view class="goods-info-operation" v-if="item.afterSaleApplyFlag || [2,3,4].includes(item.detailStatus)">
<UiButton size="min" type="primaryLine" v-if="item.afterSaleApplyFlag" <UiButton size="min" type="primaryLine" v-if="item.afterSaleApplyFlag"
@click="$Router.push(`/saleAfterSelect?id=${item.orderProductId}`)">申请售后</UiButton> @click="handleSaleAfter(item)">申请售后</UiButton>
<template v-else> <template v-else>
<UiButton size="min" type="line" <UiButton size="min" type="line"
@click="$Router.push(`/saleAfterDetail?orderProductId=${item.orderProductId}`)"> @click="$Router.push(`/saleAfterDetail?orderProductId=${item.orderProductId}`)">
@ -29,7 +29,8 @@
</template> </template>
</UiGoodsInfo> </UiGoodsInfo>
</UiWhiteBox> </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" /> <OrderInfo :orderInfo="orderInfo" />
<Operation :orderInfo="orderInfo" v-if="orderInfo.orderStatus !== 3"></Operation> <Operation :orderInfo="orderInfo" v-if="orderInfo.orderStatus !== 3"></Operation>
</view> </view>
@ -43,10 +44,12 @@ import StatusTips from './components/StatusTips.vue';
import OrderInfo from './components/OrderInfo.vue'; import OrderInfo from './components/OrderInfo.vue';
import LogisitcsInfo from './components/LogisitcsInfo.vue'; import LogisitcsInfo from './components/LogisitcsInfo.vue';
import Operation from './components/Operation.vue'; import Operation from './components/Operation.vue';
import {ORDER_TYPE} from '@/common/dicts/order'
export default { export default {
components: { UiGoodsInfo, UiWhiteBox, UiButton, StatusTips, OrderInfo, LogisitcsInfo, Operation }, components: { UiGoodsInfo, UiWhiteBox, UiButton, StatusTips, OrderInfo, LogisitcsInfo, Operation },
data(){ data(){
return { return {
ORDER_TYPE,
orderInfo : { orderInfo : {
products:[], products:[],
logistics:{} logistics:{}
@ -74,6 +77,14 @@ export default {
timerCloseOrder(){ timerCloseOrder(){
this.orderInfo = {...this.orderInfo, orderStatus : 2, cancelReason:'超时未支付'}; this.orderInfo = {...this.orderInfo, orderStatus : 2, cancelReason:'超时未支付'};
this.getOrderInfo(); 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 * @Author: ch
* @Date: 2022-03-20 14:14:53 * @Date: 2022-03-20 14:14:53
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-05-26 14:31:36 * @LastEditTime: 2022-05-26 16:33:14
* @Description: file content * @Description: file content
--> -->
<template> <template>
<view> <view>
<UiWhiteBox v-if="productType == 1"> <UiWhiteBox v-if="productType == GOODS_TYPE.ENTITY">
<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 : '请选择收货地址'}}
@ -68,6 +68,7 @@
</template> </template>
<script> <script>
import {GOODS_TYPE} from '@/common/dicts/goods';
import UiCell from '@/components/UiCell'; import UiCell from '@/components/UiCell';
import {ApiPostSubmitOrder, ApiGetBeforeOrder, ApiGetBeforeCartOrder} from '@/common/api/order'; import {ApiPostSubmitOrder, ApiGetBeforeOrder, ApiGetBeforeCartOrder} from '@/common/api/order';
import {ApiGetAddress } from '@/common/api/base'; import {ApiGetAddress } from '@/common/api/base';
@ -79,6 +80,7 @@ export default {
components : {UiCell, UiButton, UiWhiteBox, UiGoodsInfo }, components : {UiCell, UiButton, UiWhiteBox, UiGoodsInfo },
data(){ data(){
return { return {
GOODS_TYPE,
address : {}, address : {},
userMessage : '', userMessage : '',
orderInfo : {}, orderInfo : {},
@ -94,7 +96,7 @@ export default {
}, },
onShow(){ onShow(){
// //
if(!this.address.id && this.productType == 1){ if(!this.address.id && this.productType == GOODS_TYPE.ENTITY){
this.getAddressList() this.getAddressList()
}else{ }else{
this.getBeforeOrder(); this.getBeforeOrder();
@ -123,7 +125,7 @@ export default {
if(query.mode === 'cart'){ if(query.mode === 'cart'){
res = await ApiGetBeforeCartOrder({ res = await ApiGetBeforeCartOrder({
cartIds: query.ids, cartIds: query.ids,
isVirtual :this.productType == 2 && true, isVirtual :this.productType == GOODS_TYPE.VIRTUAL && true,
recipientAddressId : this.address.id recipientAddressId : this.address.id
}) })
} }
@ -133,7 +135,7 @@ export default {
productSkuId : query.skuId, productSkuId : query.skuId,
quantity : query.num, quantity : query.num,
activityId : query.activityId, activityId : query.activityId,
isVirtual : this.productType == 2 && true, isVirtual : this.productType == GOODS_TYPE.VIRTUAL && true,
activityTimeId : query.activityTimeId, activityTimeId : query.activityTimeId,
// 1 2 // 1 2
activityType : query.activityType, activityType : query.activityType,
@ -158,7 +160,7 @@ export default {
*/ */
async submit(){ async submit(){
const {query} = this.$Route; const {query} = this.$Route;
if(!this.address.id && this.productType === 1){ if(!this.address.id && this.productType === GOODS_TYPE.ENTITY){
uni.$u.toast('请选择收货地址'); uni.$u.toast('请选择收货地址');
return false; return false;
} }
@ -171,7 +173,7 @@ export default {
orderSource : this.$store.state.openId ? 5 : 4, orderSource : this.$store.state.openId ? 5 : 4,
// #endif // #endif
recipientAddressId : this.address.id, recipientAddressId : this.address.id,
isVirtual :this.productType == 2 && true, isVirtual :this.productType == GOODS_TYPE.VIRTUAL && true,
shoppingCartIds : query.ids ? query.ids.split(',') : [], shoppingCartIds : query.ids ? query.ids.split(',') : [],
products : this.orderInfo.products.map(i => ({ products : this.orderInfo.products.map(i => ({
activityId : query.activityId, activityId : query.activityId,

Loading…
Cancel
Save