Merge branch 'dev1.0.0' into develop

msb_beta
ch 3 years ago
commit a9fa902088

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-29 17:38:17
* @LastEditors: ch
* @LastEditTime: 2022-04-15 11:29:32
* @LastEditTime: 2022-04-19 11:10:55
* @Description: file content
*/
import {ToAsyncAwait, MsbRequestTk} from '@/common/utils';
@ -21,6 +21,7 @@ export const ApiGetOrderList = (params) =>
*/
export const ApiGetBeforeOrder = (data) =>
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/tradeOrder/buyAdvanceOrder`, data));
/**
* 获取购物车预订单
* @param {*} data
@ -41,6 +42,19 @@ export const ApiGetOrderDetail = (id) =>
*/
export const ApiGetOrderProductDetail = ({orderProductId}) =>
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/tradeOrder/product/${orderProductId}`));
/**
* 获取物流信息
* @param {*} orderId
*/
export const ApiGetOrderLogistics = ({orderId}) =>
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/tradeOrder/logistics/${orderId}`));
/**
* 确认收货
* @param {*} orderId
*/
export const ApiPutOrderReceive = (params) =>
ToAsyncAwait(MsbRequestTk.put(`${BASE_URL}/app/tradeOrder/receive`, params));
/**
* 提交订单
* @param {*} data
@ -60,7 +74,8 @@ export const ApiPutCancelOrder = (data) =>
* @param {*} data
*/
export const ApiPostWxPay = (data) =>
ToAsyncAwait(MsbRequestTk.post(`${BASE_URL}/pay/wxPay/app`, data));
// ToAsyncAwait(MsbRequestTk.post(`${BASE_URL}/pay/wxPay/app`, data));
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/pay/payTest`, data));
@ -98,7 +113,7 @@ export const ApiGetSaleAfterOrderList = (params) =>
* @param {*} data
*/
export const ApiGetSaleAfterOrderDetail = (params) =>
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/refundOrder/${params.refundId}`));
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/refundOrder/refundInfo`, params));
/**
* 售后物流公司
* @param {*} data

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-17 17:42:32
* @LastEditors: ch
* @LastEditTime: 2022-04-15 19:13:32
* @LastEditTime: 2022-04-18 10:04:10
* @Description: 项目接口请求统一处理器返回一个需要token和不需要token的请求封装方法
*/
@ -11,8 +11,8 @@ import $store from '@/common/store';
const ENV = 'test';
const BASE_URL = {
'test' : 'http://k8s-horse-gateway.mashibing.cn',
// 'test' : '',
// 'test' : 'http://k8s-horse-gateway.mashibing.cn',
'test' : '',
'release' : '',
'prod' : ''
};

@ -77,19 +77,13 @@
"devServer" : {
"proxy" : {
"/uc/" : {
"target" : "http://192.168.10.52:8090/"
"target" : "http://192.168.10.109:8090/"
},
"/mall/trade/" : {
"target" : "http://192.168.10.52:8090/"
},
"/mall/base/" : {
"target" : "http://192.168.10.52:8090/"
"/mall/" : {
"target" : "http://192.168.10.109:8090/"
},
"/pay/" : {
"target" : "http://192.168.10.52:8090/"
},
"/mall/product/" : {
"target" : "http://192.168.10.52:8090/"
"target" : "http://192.168.10.109:8090/"
}
}
}

@ -154,6 +154,21 @@
"navigationBarBackgroundColor" : "#F8F8F8"
}
},
{
"path": "pages/order/logisitcsInfo",
"aliasPath" : "/logisitcsInfo",
"style": {
"navigationBarTitleText": "物流详情",
"navigationBarBackgroundColor" : "#F8F8F8"
}
},
{
"path": "pages/order/orderSuccess",
"aliasPath" : "/orderSuccess",
"style": {
"navigationBarTitleText": "交易成功"
}
},
{
"path": "pages/order/paySuccess",
"aliasPath" : "/paySuccess",
@ -251,6 +266,12 @@
}
]
},
"style": {
"app-plus": {
"animationType": "slide-in-right",
"animationDuration": 300
}
},
"globalStyle": {
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle" : "black",

@ -2,19 +2,17 @@
* @Author: ch
* @Date: 2022-03-22 13:54:15
* @LastEditors: ch
* @LastEditTime: 2022-04-09 15:03:39
* @LastEditTime: 2022-04-18 18:36:28
* @Description: file content
-->
<template>
<view class="container">
<view class="address">
<u-loadmore v-if="isLoading" status="loading" />
<BsEmpty tips="暂无收货地址呢~" v-if="!isLoading && !addresList.length"></BsEmpty>
<view class="addressItem" v-for="(item, index) in addresList" :key="item.id"
:class="{'addressItem__last' : index === addresList.length - 1,'addressItem__default':item.isDefault}">
<radio :checked="item.id === selectedId" @click="changeAds(item)"/>
<radio v-if="query.source" :checked="item.id === selectedId" @click="changeAds(item)"/>
<view>
<view class="addressItem--city">{{item.province}}{{item.city}}{{item.area}}</view>
<view class="addressItem--detail">{{item.detailAddress}}</view>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-22 15:09:06
* @LastEditors: ch
* @LastEditTime: 2022-04-09 15:03:40
* @LastEditTime: 2022-04-18 18:40:02
* @Description: file content
-->
<template>
@ -28,7 +28,7 @@ export default {
},
methods:{
logout(){
// this.$store.commit('SET_TOKEN');
this.$store.commit('SET_TOKEN');
this.$Router.replace('/login')
}
}

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-24 11:30:55
* @LastEditors: ch
* @LastEditTime: 2022-04-11 10:37:46
* @LastEditTime: 2022-04-19 10:51:46
* @Description: file content
-->
<template>
@ -76,6 +76,11 @@ export default {
skuInfo : {
type : Array,
default : []
},
//
activityStatus : {
type : String,
default : 'noActivity'
}
},
data() {
@ -201,13 +206,13 @@ export default {
* 立即购买
*/
buyNow(){
console.log(this.curSku)
this.$Router.push({
path : '/orderSubmit',
query: {
mode : 'buyNow',
skuId : this.curSku.skuId,
num : this.curBuyNum
num : this.curBuyNum,
activityType : this.activityStatus === 'startActivity' ? 2 : 1
}
})
},

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-23 17:27:21
* @LastEditors: ch
* @LastEditTime: 2022-04-13 11:33:46
* @LastEditTime: 2022-04-19 10:48:00
* @Description: file content
-->
<template>
@ -24,7 +24,7 @@
<Service></Service>
<u-cell label="选择" :value="curSku.name" :border="false" isLink @click="onShowSkuPopup(1)"></u-cell>
<SkuPopup v-model="curSku" :visible.sync="showSkuPopup" :mode="skuMode"
:goodsInfo="goods" :skuInfo="skuInfoData">
:goodsInfo="goods" :skuInfo="skuInfoData" :activityStatus="activityStatus">
</SkuPopup>
</view>
<view class="goods-desc">
@ -36,10 +36,9 @@
<view class="icon cart" @click="$Router.push('/cart')"></view>
</view>
<view class="footer--btns">
<UiButton class="btn" @click="onShowSkuPopup(2)"></UiButton>
<UiButton class="btn btn--buy" @click="onShowSkuPopup(3)">
{{(!productActivityVO.isStartActivity && productActivityVO.isActivity) ? '原价购买' : '立即购买'}}
</UiButton>
<UiButton class="btn" v-if="activityStatus !== 'startActivity' " @click="onShowSkuPopup(2)"></UiButton>
<UiButton class="btn btn--buy" v-if="activityStatus === 'noStartActivity'" @click="onShowSkuPopup(3)"></UiButton>
<UiButton class="btn btn--buy" v-else @click="onShowSkuPopup(3)"> </UiButton>
</view>
</view>
</view>
@ -72,6 +71,19 @@ export default {
productActivityVO : {}
}
},
computed:{
activityStatus(){
// noActivity noStartActivity startActivity
let status = 'noActivity';
if(this.productActivityVO.isActivity){
status = 'noStartActivity';
}
if(this.productActivityVO.isStartActivity){
status = 'startActivity';
}
return status;
}
},
onLoad(){
this.getGoodsDetail();
},

@ -2,14 +2,29 @@
* @Author: ch
* @Date: 2022-04-15 16:36:02
* @LastEditors: ch
* @LastEditTime: 2022-04-15 17:00:16
* @LastEditTime: 2022-04-18 18:38:25
* @Description: file content
-->
<template>
<UiWhiteBox>
<u-cell class="address" title="是的发生的" label="陈先生 190****2342"
:border="false" isLink @click="$Router.push('/addressList')">
<image class="address--icon" slot="icon" src="@/static/order/dw.png" />
<u-cell class="address" isLink v-if="lastLogisitcs"
@click="$Router.push(`/logisitcsInfo?orderId=${orderInfo.orderId}`)">
<view slot="title" class="address--title">{{lastLogisitcs.context}}</view>
<image class="address--icon" slot="icon" src="@/static/order/fj.png" />
<view slot="label" class="address--label">
<text>{{lastLogisitcs.time}}</text>
</view>
</u-cell>
<u-cell class="address" :border="false">
<view slot="title" :class="lastLogisitcs ? 'address--title__grey' :''">
{{logisitcsInfo.recipientAddress}}
</view>
<image class="address--icon" slot="icon" v-if="lastLogisitcs" src="@/static/order/dw2.png" />
<image class="address--icon" slot="icon" v-else src="@/static/order/dw.png" />
<view slot="label" class="address--label">
<text>{{logisitcsInfo.recipientName}}</text>
<text>{{logisitcsInfo.recipientPhone}}</text>
</view>
</u-cell>
</UiWhiteBox>
</template>
@ -22,15 +37,47 @@ export default {
type : Object,
defalut : () => ({})
}
},
computed : {
lastLogisitcs (){
const list = this.logisitcsInfo && this.logisitcsInfo.logisticsDataList
if(list && list.length > 0){
return list[0]
}else{
return null
}
}
}
}
</script>
<style lang="scss" scoped>
.address{
/deep/.u-cell__body__content{
padding: 10rpx 0;
.address--icon{
width: 28rpx;
height: 34rpx;
margin-right: 30rpx;
}
&--title{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 500rpx;
&__grey{
color: $color-grey4;
}
}
&--icon{
width: 28rpx;
height: 34rpx;
margin-right: 30rpx;
}
&--label{
margin-top: 26rpx;
text{
color: $color-grey4;
margin-right: 40rpx;
}
}
}
</style>

@ -2,15 +2,23 @@
* @Author: ch
* @Date: 2022-04-15 17:46:10
* @LastEditors: ch
* @LastEditTime: 2022-04-15 18:02:18
* @LastEditTime: 2022-04-18 17:41:55
* @Description: file content
-->
<template>
<view class="footer">
<UiButton>查看物流</UiButton>
<UiButton class="footer--btn" @click="cancelShow = true">取消订单</UiButton>
<UiButton class="footer--btn" type="gradual">去支付</UiButton>
<u-popup :show="cancelShow" @close="closeCancel" round="16rpx" closeable>
<!-- 支付过后都可查看物流 -->
<UiButton class="footer--btn" v-if="orderInfo.orderStatus >= 4" @click="$Router.push(`/logisitcsInfo?orderId=${orderInfo.orderId}`)"></UiButton>
<!-- 交易关闭可以联系客服 -->
<UiButton class="footer--btn" v-if="orderInfo.orderStatus === 2"></UiButton>
<!-- 已发货可以确认收货 -->
<UiButton class="footer--btn" v-if="orderInfo.orderStatus === 4" type="gradual" @click="receive"></UiButton>
<!-- 待支付可以取消支付订单 -->
<template v-if="orderInfo.orderStatus === 1">
<UiButton class="footer--btn" @click="cancelShow = true">取消订单</UiButton>
<UiButton class="footer--btn" type="gradual">去支付</UiButton>
</template>
<u-popup class="cancel" :show="cancelShow" @close="closeCancel" round="16rpx" closeable>
<view class="cancel--title">取消订单原因</view>
<radio-group class="cancel--cell" @change="cancelChange">
<UiCell title="我不想买了">
@ -34,14 +42,21 @@
<UiButton type="gradual" :disabed="cancelValue == 0">确认取消</UiButton>
</view>
</u-popup>
</view>
</template>
<script>
import UiButton from '@/components/UiButton.vue'
import UiCell from '@/components/UiCell.vue'
import {ApiPutCancelOrder} from '@/common/api/order'
import {ApiPutCancelOrder,ApiPutOrderReceive} from '@/common/api/order'
export default {
components: { UiButton, UiCell },
props : {
orderInfo : {
type : Object,
default : () => ({})
}
},
data(){
return {
//
@ -68,6 +83,19 @@ export default {
return false;
}
//
},
/**
* 确认收货
*/
async receive(){
const {error} = await ApiPutOrderReceive({
orderId : this.$Route.query.id
});
if(error){
uni.$toast(error.message);
return false;
}
this.$Router.push('/orderSuccess')
}
}
}
@ -86,11 +114,12 @@ export default {
justify-content: flex-end;
align-items: center;
&--btn{
display: block;
display: inline-block;
margin: 0 0 0 30rpx;
}
}
.cancel{
flex: 0;
&--title{
text-align: center;
font-size: 34rpx;
@ -109,4 +138,7 @@ export default {
}
}
.modal{
flex: 0;
}
</style>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-04-15 16:04:28
* @LastEditors: ch
* @LastEditTime: 2022-04-15 16:16:36
* @LastEditTime: 2022-04-18 14:48:59
* @Description: file content
-->
<template>
@ -29,12 +29,16 @@
<UiWhiteBox class="cell-box">
<view class="cell">
<text class="cell--title">商品总额:</text>
<text class="cell--value">{{orderInfo.totalAmount}}</text>
<text class="cell--value">{{orderInfo.totalAmount}}</text>
</view>
<view class="cell">
<text class="cell--title">运费:</text>
<text class="cell--value">{{orderInfo.shippingAmount}}</text>
</view>
<view class="amount-box">
<text class="amount-label">实付款</text>
<text class="amount">{{orderInfo.payAmount}}</text>
</view>
</UiWhiteBox>
</view>
@ -69,4 +73,16 @@ export default {
font-size: $font-size-sm;
}
}
.amount-box{
text-align: right;
margin-top: 30rpx;
}
.amount-label{
font-size: $font-size-sm;
}
.amount{
color: $color-yellow4;
font-size: $font-size-lg;
}
</style>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-31 14:26:09
* @LastEditors: ch
* @LastEditTime: 2022-04-15 18:42:30
* @LastEditTime: 2022-04-18 16:16:44
* @Description: file content
-->
<template>
@ -12,17 +12,22 @@
<UiGoodsInfo :class="index === orderInfo.products.length - 1 && 'goods-info__last'"
v-for="(item, index) in orderInfo.products" :data="item" :key="index">
<template slot="operation">
<view class="goods-info-operation">
<UiButton size="min" type="primaryLine"
v-if="item.afterSaleApplyFlag"
@click="$Router.push(`/saleAfterSelect?id=${item.orderProductId}`)">申请售后</UiButton>
<view class="goods-info-operation" v-if="item.afterSaleApplyFlag || [3,4].includes(item.detailStatus)">
<UiButton size="min" type="primaryLine" v-if="item.afterSaleApplyFlag"
@click="$Router.push(`/saleAfterSelect?id=${item.orderProductId}`)">申请售后</UiButton>
<template v-else>
<UiButton size="min" type="line" v-if="item.detailStatus === 3"
@click="$Router.push(`/saleAfterDetail?orderProductId=${item.orderProductId}`)">已退款</UiButton>
<UiButton size="min" type="line" v-if="item.detailStatus === 4"
@click="$Router.push(`/saleAfterDetail?orderProductId=${item.orderProductId}`)">退款关闭</UiButton>
</template>
</view>
</template>
</UiGoodsInfo>
</UiWhiteBox>
<LogisitcsInfo :logisitcsInfo="orderInfo.logistics" />
<OrderInfo :orderInfo="orderInfo" />
<Operation></Operation>
<Operation :orderInfo="orderInfo" v-if="orderInfo.orderStatus !== 3"></Operation>
</view>
</template>
<script>
@ -39,7 +44,8 @@ export default {
data(){
return {
orderInfo : {
products:[]
products:[],
logistics:{}
},
}
},

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-22 10:58:24
* @LastEditors: ch
* @LastEditTime: 2022-04-09 15:03:53
* @LastEditTime: 2022-04-18 16:33:42
* @Description: file content
-->
<template>
@ -21,7 +21,7 @@
<text class="orders--name">官方自营</text>
<text class="orders--status" :class="[1,3].includes(item.orderStatus) && 'orders--status__warn'">{{item.orderStatusDesc}}</text>
</view>
<view class="orders--item" v-for="i in item.products" :key="i.productId" @click="$Router.push(`/orderDetail?id=${item.orderId}`)">
<view class="orders--item" v-for="i in item.products" :key="i.orderProductId" @click="$Router.push(`/orderDetail?id=${item.orderId}`)">
<image class="orders--item-image" mode="widthFix" :src="i.productImageUrl" />
<view >
<view class="orders--item-con">
@ -42,8 +42,10 @@
</view>
<view class="orders--footer">
<button class="orders--footer-btn orders--footer-btn__red" v-if="item.orderStatus === 1"></button>
<button class="orders--footer-btn" v-if="item.orderStatus === 2"></button>
<button class="orders--footer-btn" v-if="[3,4,7].includes(item.orderStatus)"></button>
<button class="orders--footer-btn" v-if="item.orderStatus === 2"
@click="$Router.push(`/orderDetail?id=${item.orderId}`)">查看详情</button>
<button class="orders--footer-btn" v-if="item.orderStatus >= 4"
@click="$Router.push(`/logisitcsInfo?orderId=${item.orderId}`)">查看物流</button>
<button class="orders--footer-btn orders--footer-btn__red" v-if="item.orderStatus == 4"></button>
</view>
</view>

@ -0,0 +1,128 @@
<!--
* @Author: ch
* @Date: 2022-04-18 15:28:14
* @LastEditors: ch
* @LastEditTime: 2022-04-18 17:13:27
* @Description: file content
-->
<template>
<view>
<UiWhiteBox>
<UiGoodsInfo :class="idx === orderInfo.products.length-1 ? 'goods-info__last' : ''" :key="item.orderProductId"
v-for="(item, idx) in orderInfo.products" :data="item"></UiGoodsInfo>
</UiWhiteBox>
<UiWhiteBox class="company">
<text class="company--name">{{orderInfo.companyName}}</text>
<view class="company--no">{{orderInfo.trackingNo}}</view>
</UiWhiteBox>
<UiWhiteBox>
<view class="title">
<text>物流信息</text>
<text class="title--desc">本服务有快递100提供</text>
</view>
<view class="group">
<view class="item" :class="idx === orderInfo.logisticsDataList.length - 1 ? 'item__last' : ''"
v-for="(item, idx) in orderInfo.logisticsDataList" :key="idx">
<view class="item--time">{{item.time}}</view>
<view class="item--ctx">{{item.context}}</view>
</view>
</view>
</UiWhiteBox>
</view>
</template>
<script>
import UiGoodsInfo from '@/components/UiGoodsInfo.vue'
import UiWhiteBox from '@/components/UiWhiteBox.vue'
import {ApiGetOrderLogistics} from '@/common/api/order';
export default {
components: { UiWhiteBox, UiGoodsInfo },
data(){
return {
orderInfo : {}
}
},
mounted(){
this.getOrderProductInfo()
},
methods : {
async getOrderProductInfo(){
const {error, result} = await ApiGetOrderLogistics({
orderId : this.$Route.query.orderId
});
if(error){
uni.$u.toast(error.message);
return false;
}
this.orderInfo = result;
}
}
}
</script>
<style lang="scss" scoped>
page{
background: $color-grey1;
}
.company{
height: 100rpx;
padding: 0 30rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.title{
height: 98rpx;
line-height: 98rpx;
border-bottom: 2rpx solid $color-grey2;
padding: 0 30rpx;
color: $color-grey5;
display: flex;
justify-content: space-between;
&--desc{
color: $color-grey4
}
}
.group{
padding: 30rpx;
}
.item{
padding-bottom: 44rpx;
position: relative;
padding-left: 58rpx;
&::before{
display: block;
width: 10rpx;
height: 10rpx;
content: '';
border-radius: 50%;
border:6rpx solid $color-yellow3;
background: $color-grey0;
position: absolute;
left: 0;
}
&::after{
display: block;
content: '';
height: calc(100% - 38rpx);
width: 1px;
left: 10rpx;
top: 28rpx;
border-left: 1px dashed $color-grey4;
position: absolute;
}
&__last::after{
display: none;
}
&--time{
font-size: $font-size-sm;
color: $color-grey4;
}
&--ctx{
line-height: 42rpx;
color: $color-grey5;
margin-top: 20rpx;
}
}
.goods-info__last{
border: 0;
}
</style>

@ -0,0 +1,48 @@
<!--
* @Author: ch
* @Date: 2022-03-28 17:16:44
* @LastEditors: ch
* @LastEditTime: 2022-04-18 17:39:27
* @Description: file content
-->
<template>
<view>
<image class="icon" src="@/static/order/paySuccess.png"/>
<view class="title">交易成功</view>
<view class="btns">
<UiButton class="btn" type="primaryLine" @click="$Router.replaceAll('/')"></UiButton>
</view>
</view>
</template>
<script>
import UiButton from '@/components/UiButton.vue'
export default {
components: { UiButton },
}
</script>
<style lang="scss" scoped>
page{
text-align: center;
}
.icon{
width: 400rpx;
height: 256rpx;
margin: 169rpx auto 42rpx;
}
.title{
font-size: $font-size-lg;
line-height: 44rpx;
color: $color-grey6;
}
.desc{
font-size: $font-size-sm;
line-height: 34rpx;
color: $color-grey4;
}
.btns{
margin: 74rpx 105rpx 0;
display: flex;
justify-content: space-between;
}
</style>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-04-11 13:51:10
* @LastEditors: ch
* @LastEditTime: 2022-04-14 17:59:09
* @LastEditTime: 2022-04-18 17:55:17
* @Description: file content
-->
<template>
@ -15,7 +15,7 @@
<input class="input" slot="value" disabled placeholder="请选择" :value="refundSelected.label"/>
</UiCell>
<UiCell title="退款金额" :rightIcon="false">
<text class="price" slot="value">36.3</text>
<text class="price" slot="value">{{$Route.query.amount}}</text>
</UiCell>
<view class="title">
<view>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-04-14 14:19:41
* @LastEditors: ch
* @LastEditTime: 2022-04-15 11:17:27
* @LastEditTime: 2022-04-18 18:14:30
* @Description: file content
-->
<template>
@ -12,8 +12,8 @@
<view class="info--cell">
<text class="info--cell-label">收货信息</text>
<view class="info--cell-value">
<view>{{data.recipientName}} {{data.recipientPhone}}</view>
<view>{{data.recipientAddress}}</view>
<view class="recipient">{{data.recipientName}} {{data.recipientPhone}}</view>
<view class="recipient">{{data.recipientAddress}}</view>
</view>
</view>
<view class="info--cell">
@ -68,4 +68,9 @@ export default {
text-align: right;
}
}
.recipient{
color: $color-grey5;
font-size: $font-size-sm;
margin-bottom: 10rpx;
}
</style>

@ -2,16 +2,20 @@
* @Author: ch
* @Date: 2022-04-14 13:44:30
* @LastEditors: ch
* @LastEditTime: 2022-04-15 11:08:54
* @LastEditTime: 2022-04-18 18:08:29
* @Description: file content
-->
<template>
<view>
<UiWhiteBox>
<view class="title">商家已同意退货申请请尽早退货</view>
<u-cell class="address" :title="data.refundLogistics.recipientAddress" :label="`收货人:${data.refundLogistics.recipientName} ${data.refundLogistics.recipientPhone}`"
:border="false">
<u-cell class="address" :border="false">
<view slot="title" class="address--title">{{data.refundLogistics.recipientAddress}}</view>
<image class="address--icon" slot="icon" src="@/static/order/dw.png" />
<view slot="label" class="address--label">
<text>收货人{{data.refundLogistics.recipientName}}</text>
<text>{{data.refundLogistics.recipientPhone}}</text>
</view>
</u-cell>
</UiWhiteBox>
<UiWhiteBox>
@ -164,10 +168,33 @@ export default {
.box{
padding: 0 30rpx;
}
.address--icon{
width: 40rpx;
height: 48rpx;
margin-right: 10rpx;
.address{
/deep/.u-cell__body__content{
padding: 10rpx 0;
}
&--title{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 500rpx;
&__grey{
color: $color-grey4;
}
}
&--icon{
width: 28rpx;
height: 34rpx;
margin-right: 30rpx;
}
&--label{
margin-top: 26rpx;
text{
font-size: $font-size-sm;
color: $color-grey4;
margin-right: 40rpx;
}
}
}
.title{
height: 98rpx;

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-31 14:26:09
* @LastEditors: ch
* @LastEditTime: 2022-04-15 11:17:04
* @LastEditTime: 2022-04-18 11:01:25
* @Description: file content
-->
<template>
@ -54,7 +54,9 @@ export default {
* 获取订单最新信息
*/
async getOrderInfo(){
const {error, result} = await ApiGetSaleAfterOrderDetail({refundId:this.$Route.query.id});
const refundId = this.$Route.query.id;
const orderProductId = this.$Route.query.orderProductId;
const {error, result} = await ApiGetSaleAfterOrderDetail({refundId,orderProductId});
if(error){
uni.$u.toast(error.message);
return false;

@ -2,22 +2,21 @@
* @Author: ch
* @Date: 2022-04-14 16:50:37
* @LastEditors: ch
* @LastEditTime: 2022-04-15 11:33:42
* @LastEditTime: 2022-04-18 17:54:03
* @Description: file content
-->
<template>
<view>
<UiWhiteBox>
<!-- <ui-goods-info -->
<UiGoodsInfo class="goods-info" :data="orderInfo.orderProduct"></UiGoodsInfo>
</UiWhiteBox>
<UiWhiteBox>
<view class="title">选择售后类型</view>
<view class="item item__first" @click="$Router.push(`/saleAfterApply?type=1`)">
<view class="item item__first" @click="select(1)">
<view>申请退款</view>
<text>没有收到货或已协商同意不退货只退款</text>
</view>
<view class="item" @click="$Router.push(`/saleAfterApply?type=2&status=2`)">
<view class="item" @click="select(2,2)">
<view>申请退货退款</view>
<text>已收到货需要退还收到的货物</text>
</view>
@ -48,6 +47,18 @@ export default {
return false;
}
this.orderInfo = result;
},
select(type,status){
const {orderProductId,realAmount} = this.orderInfo.orderProduct;
this.$Router.push({
path:'/saleAfterApply',
query:{
status,
type,
id: orderProductId,
amount : realAmount,
}
});
}
}
}

@ -2,13 +2,13 @@
* @Author: ch
* @Date: 2022-03-20 14:14:53
* @LastEditors: ch
* @LastEditTime: 2022-04-11 18:08:06
* @LastEditTime: 2022-04-19 10:58:00
* @Description: file content
-->
<template>
<view>
<u-cell class="address" :title="address.province + address.city + address.area" :label="address.name + address.phone"
:border="false" isLink @click="$Router.push('/addressList')">
:border="false" isLink @click="$Router.push('/addressList?source=submitOrder')">
<image class="address--icon" slot="icon" src="@/static/order/dw.png" />
</u-cell>
@ -108,7 +108,9 @@ export default {
if(query.mode === 'buyNow'){
res = await ApiGetBeforeOrder({
productSkuId : query.skuId,
quantity : query.num
quantity : query.num,
// 1 2
activityType : query.activityType
});
}
if(res.error){
@ -123,13 +125,15 @@ export default {
* 提交订单
*/
async submit(){
const {query} = this.$Route;
const {error, result} = await ApiPostSubmitOrder({
orderSource : 2,
recipientAddressId : this.address.id,
products : this.orderInfo.products.map(i => ({
productId : i.productId,
productSkuId : i.productSkuId,
quantity : i.quantity
quantity : i.quantity,
activityType : query.activityType
})),
userMessage : this.userMessage
});
@ -140,11 +144,11 @@ export default {
this.wxpay(result.orderId);
},
async wxpay(orderId){
const {error, result} = await ApiPostWxPay({orderId});
const {error, result} = await ApiPostWxPay({orderId,payTypeEnum:'WXPAY'});
if(error){
this.$Router.push(`/payFail?ordId=${orderId}`)
this.$Router.replace(`/payFail?ordId=${orderId}`)
}else{
this.$Router.push(`/paySuccess?ordId=${orderId}`)
this.$Router.replace(`/paySuccess?ordId=${orderId}`)
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 761 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 759 B

Loading…
Cancel
Save