Merge branch 'feature/task1.0.0' into msb_test

* feature/task1.0.0:
  修改3级Bug
merge-requests/66/merge
ch 2 years ago
commit 468179c860

@ -2,14 +2,13 @@
* @Author: ch
* @Date: 2022-05-08 14:41:42
* @LastEditors: ch
* @LastEditTime: 2022-05-12 14:37:00
* @LastEditTime: 2022-05-16 16:13:11
* @Description: file content
-->
<template>
<div class="ui-goods-info" @click="$router.push(`/goods/detail/${goods.productId}`)">
<div class="ui-goods-info--img">
<img :src="goods.productImageUrl || goods.productMainPicture"/>
</div>
<div class="ui-goods-info--img"
:style="`background-image:url(${goods.productImageUrl || goods.productMainPicture})`"></div>
<p>
<b>{{goods.productName}}</b>
<span>{{goods.skuDescribe}}</span>
@ -34,6 +33,9 @@ export default {
width: 100px;
height: 100px;
border: 1px solid #eee;
background-size: contain;
background-repeat: no-repeat;
background-position: center;
}
p{
width: 270px;

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-05-09 14:41:37
* @LastEditors: ch
* @LastEditTime: 2022-05-16 11:46:05
* @LastEditTime: 2022-05-16 16:40:50
* @Description: file content
-->
<template>
@ -46,7 +46,7 @@ export default {
//
'3' : {name:'等待发货', tips:'您的包裹整装待发'},
//
'4' : {name:'已发货', tips:'您的包裹正向您飞来'},
'4' : {name:'待收货', tips:'您的包裹正向您飞来'},
//
'5' : {name:'已收货'},
//
@ -62,7 +62,7 @@ export default {
},
watch : {
orderInfo(nVal){
const {orderStatus} = this.orderInfo;
const {orderStatus, autoReceiveTime, serverTime} = this.orderInfo;
this.ctxCon = this.ctxData[orderStatus];
if(orderStatus === 1){
@ -73,14 +73,25 @@ export default {
this.calcTimerStartSecondNum();
this.timer();
}else if(orderStatus === 4){
const receiveTime = (new Date(autoReceiveTime.replace(/-/g,'/'))).getTime();
const curTime = (new Date(serverTime.replace(/-/g,'/'))).getTime();
const minute = parseInt((receiveTime - curTime) / 60000);
const day = parseInt(Math.floor(minute / 1440));
const hour = parseInt(Math.floor((minute - day * 1440) / 60));
const m = parseInt(Math.floor(minute - ((day * 24 + hour) * 60)));
let str = `${day ? `${day}${hour}${m}` : (hour ? `${hour}${m}` : ( m ? `${m}` : '1分'))}`;
this.ctxCon.tips = `${str}后,将自动确认收货`
}else if(orderStatus === 2){
this.ctxCon.tips = this.orderInfo.cancelReason;
}
}
},
methods:{
/**
* 计算倒计时开始秒数
* 计算待支付倒计时开始秒数
*/
calcTimerStartSecondNum(){
let expireTime = (new Date(this.orderInfo.expireTime.replace(/-/g,'/'))).getTime(),

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-05-04 20:47:29
* @LastEditors: ch
* @LastEditTime: 2022-05-16 14:14:18
* @LastEditTime: 2022-05-16 16:14:47
* @Description: file content
-->
<template>
@ -39,10 +39,14 @@
<td class="not-border">
<UIGoodsInfo :goods="i"/>
</td>
<td class="not-border" width="96">{{i.realAmount}}</td>
<td class="not-border" width="96">
<UiMoney :money="i.realAmount" />
</td>
<td class="not-border" width="96">{{i.quantity}}</td>
<template v-if="!idx">
<td width="120" :rowspan="item.products.length">{{item.payAmount}}</td>
<td width="120" :rowspan="item.products.length">
<UiMoney :money="item.payAmount" />
</td>
<td width="110" :rowspan="item.products.length">{{item.orderStatusDesc}}</td>
<td width="145" :rowspan="item.products.length">
<template v-if="item.orderStatus === 1">
@ -54,7 +58,6 @@
<UiButton type="yellow_gradual" @click="receive(item)"></UiButton>
<router-link class="link-btn" :to="`./detail?id=${item.orderId}`">查看物流</router-link>
</template>
</td>
</template>
</tr>
@ -81,8 +84,9 @@ import UIGoodsInfo from '@/components/UIGoodsInfo.vue';
import UiLineBox from '@/components/UiLineBox.vue';
import Tab from './module/Tab.vue';
import UiLoading from '../../../../../components/UiLoading.vue';
import UiMoney from '../../../../../components/UiMoney.vue';
export default {
components: { UiLineBox, UIGoodsInfo, Tab, UiButton, BsPay, UiEmpty, BsCancelOrder, UiLoading },
components: { UiLineBox, UIGoodsInfo, Tab, UiButton, BsPay, UiEmpty, BsCancelOrder, UiLoading, UiMoney },
data(){
return {
tabActive : this.$route.query.type || -1,

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-05-03 22:41:15
* @LastEditors: ch
* @LastEditTime: 2022-05-16 14:17:43
* @LastEditTime: 2022-05-16 16:50:09
* @Description: file content
-->
<template>
@ -59,7 +59,7 @@
<div class="operation">
<div>
<el-checkbox label="全选" @change="handleCheckAll" v-model="checkAll" :indeterminate="isIndeterminate" />
<a @click="handleDelete()" class="operation--del">批量删</a>
<a class="operation--del" href="javascript:void" @click="handleDelete()" v-if="checkedIds.length"></a>
</div>
<div class="operation--right">
<p>已选<span class="operation--count">{{checkedIds.length}}</span></p>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-05-04 17:30:58
* @LastEditors: ch
* @LastEditTime: 2022-05-16 13:53:56
* @LastEditTime: 2022-05-16 16:01:17
* @Description: file content
-->
@ -27,7 +27,7 @@
</div>
</template>
<script>
import {ApiPostSubmitOrder, ApiGetBeforeOrder, ApiGetBeforeCartOrder} from '@/plugins/api/order';
import {ApiPostSubmitOrder, ApiGetBeforeOrder, ApiGetBeforeCartOrder, ApiGetOrderPaySatus} from '@/plugins/api/order';
import BsPay from '../../../components/BsPay.vue';
import UIGoodsInfo from '../../../components/UIGoodsInfo.vue';
import OrderInfo from './module/OrderInfo.vue';
@ -116,9 +116,31 @@ export default {
}
this.payVisible = true;
this.payOrder = result;
setTimeout(()=>{
this.getOrderPayStatus();
}, 5000)
},
/**
* 查询订单支付状态提交订单成功后每隔5秒调一次跳到支付结果页
*/
async getOrderPayStatus(){
const {error, result} = await ApiGetOrderPaySatus({orderId : this.payOrder.orderId});
if(error){
this.$router.replace(`/account/order/detail?id=${this.payOrder.orderId}`);
return false
}
if(!result.isSuccess){
setTimeout(()=>{
this.getOrderPayStatus();
}, 5000)
return false;
}
this.$router.replace(`/order/payResult?id=${this.payOrder.orderId}`)
},
cancelPay(){
this.$router.replace(`/account/order/detail?id=${this.payOrder.orderId}`)
this.$router.replace(`/account/order/detail?id=${this.payOrder.orderId}`);
},
finishPay(){
this.$router.replace(`/order/payResult?id=${this.payOrder.orderId}`)

@ -2,21 +2,23 @@
* @Author: ch
* @Date: 2022-05-08 16:12:18
* @LastEditors: ch
* @LastEditTime: 2022-05-16 13:56:07
* @LastEditTime: 2022-05-16 15:41:08
* @Description: file content
-->
<template>
<div class="amount">
<div>
<span>应付款</span>
<b>{{amount}}</b>
<UiMoney class="money" size="20px" preSize="14px" sufSize="14px" :money="amount" float prefix suffix/>
</div>
<p>{{address.province + address.city + address.area + address.detailAddress}}</p>
<p>{{address.name}} {{address.phone}}</p>
</div>
</template>
<script>
import UiMoney from '../../../../components/UiMoney.vue'
export default {
components: { UiMoney },
props : {
amount : {
type : Number,
@ -37,8 +39,11 @@ export default {
text-align: right;
padding: 20px 40px;
margin-top: 10px;
b{
font-size: 20px;
.money{
font-size: 0;
color: #FF512B;
display: inline-block;
font-weight: bold;
}
p{
font-size: 12px;

Loading…
Cancel
Save