Branch_ccc #10
@ -80,7 +80,8 @@
|
|||||||
await OrderApi.createOrderItemComment(comment);
|
await OrderApi.createOrderItemComment(comment);
|
||||||
}
|
}
|
||||||
// 都评论好,返回
|
// 都评论好,返回
|
||||||
sheep.$router.back();
|
// sheep.$router.back();
|
||||||
|
sheep.$router.redirect('/pages/order/list');
|
||||||
}
|
}
|
||||||
|
|
||||||
onLoad(async (options) => {
|
onLoad(async (options) => {
|
||||||
|
@ -150,7 +150,7 @@
|
|||||||
.side-menu-wrap {
|
.side-menu-wrap {
|
||||||
width: 200rpx;
|
width: 200rpx;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding-left: 12rpx;
|
// padding-left: 12rpx;
|
||||||
background-color: #f6f6f6;
|
background-color: #f6f6f6;
|
||||||
|
|
||||||
.menu-item {
|
.menu-item {
|
||||||
@ -161,7 +161,7 @@
|
|||||||
|
|
||||||
.menu-title {
|
.menu-title {
|
||||||
line-height: 32rpx;
|
line-height: 32rpx;
|
||||||
font-size: 30rpx;
|
font-size: 23rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #333;
|
color: #333;
|
||||||
margin-left: 28rpx;
|
margin-left: 28rpx;
|
||||||
@ -187,16 +187,16 @@
|
|||||||
|
|
||||||
&.menu-item-active {
|
&.menu-item-active {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 20rpx 0 0 20rpx;
|
// border-radius: 20rpx 0 0 20rpx;
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
left: 0;
|
||||||
bottom: -20rpx;
|
bottom: 0;
|
||||||
width: 20rpx;
|
width: 2px;
|
||||||
height: 20rpx;
|
height: 100%;
|
||||||
background: radial-gradient(circle at 0 100%, transparent 20rpx, #fff 0);
|
// background: radial-gradient(circle at 0 100%, transparent 20rpx, #fff 0);
|
||||||
|
background: rgba(236,72,29);
|
||||||
}
|
}
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
@ -211,10 +211,10 @@
|
|||||||
|
|
||||||
.menu-title {
|
.menu-title {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
color:rgba(236,72,29);
|
||||||
&::before {
|
// &::before {
|
||||||
left: 0;
|
// left: 0;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,57 +1,69 @@
|
|||||||
<!-- 订单详情 -->
|
<!-- 订单详情 -->
|
||||||
<template>
|
<template>
|
||||||
<s-layout title="订单详情" class="index-wrap" navbar="inner">
|
<s-layout title="订单详情" class="index-wrap" navbar="normal">
|
||||||
<!-- 订单状态 TODO -->
|
<!-- 订单状态 TODO -->
|
||||||
<view
|
<!-- <view class="state-box ss-col-center new-class" :style="[
|
||||||
class="state-box ss-flex-col ss-col-center ss-row-right"
|
|
||||||
:style="[
|
|
||||||
{
|
{
|
||||||
marginTop: '-' + Number(statusBarHeight + 88) + 'rpx',
|
marginTop: '-' + Number(statusBarHeight + 88) + 'rpx',
|
||||||
paddingTop: Number(statusBarHeight + 88) + 'rpx',
|
paddingTop: Number(statusBarHeight + 88) + 'rpx',
|
||||||
},
|
},
|
||||||
]"
|
]"> -->
|
||||||
>
|
<view class="state-box ss-col-center new-class">
|
||||||
<view class="ss-flex ss-m-t-32 ss-m-b-20 ">
|
<view class="ss-flex ss-m-t-32 ss-m-b-20 ">
|
||||||
<image
|
<!-- 待付款 -->
|
||||||
v-if="
|
<image v-if=" state.orderInfo.status === 0 " class="state-img"
|
||||||
|
src="https://zysc.fjptzykj.com:3000/shangcheng/8761518e0fa2e892fa65f9c3f79456a23a4dab1796b7069b8a5482ac79d00811.png">
|
||||||
|
</image>
|
||||||
|
|
||||||
|
<!-- 待收货 -->
|
||||||
|
<image v-if=" state.orderInfo.status === 20 " class="state-img"
|
||||||
|
src="https://zysc.fjptzykj.com:3000/shangcheng/5aa87fed5713160eb6e7f2cf8697d426d52abac9ede40a1011e8d3296266487e.png">
|
||||||
|
</image>
|
||||||
|
|
||||||
|
<!-- 待评价 -->
|
||||||
|
<image v-if=" state.orderInfo.status === 30 && state.orderInfo.buttons?.includes('comment')" class="state-img"
|
||||||
|
src="https://zysc.fjptzykj.com:3000/shangcheng/b729e67ba7b6039676a43b28ca855228ed82914f7669482b938e9696ed9cc798.png">
|
||||||
|
</image>
|
||||||
|
<!-- 已完成 -->
|
||||||
|
<image v-if=" state.orderInfo.status === 30 && !state.orderInfo.buttons?.includes('comment')" class="state-img"
|
||||||
|
src="https://zysc.fjptzykj.com:3000/shangcheng/7b1b2022173b3b6812ad256c836b4c5c67b6aa63a203c7d142ae90802a416e7b.png">
|
||||||
|
</image>
|
||||||
|
|
||||||
|
<image v-if="
|
||||||
state.orderInfo.status_code == 'unpaid' ||
|
state.orderInfo.status_code == 'unpaid' ||
|
||||||
state.orderInfo.status === 10 || // 待发货
|
state.orderInfo.status === 10 || // 待发货
|
||||||
state.orderInfo.status_code == 'nocomment'
|
state.orderInfo.status_code == 'nocomment'
|
||||||
"
|
" class="state-img"
|
||||||
class="state-img"
|
src="https://zysc.fjptzykj.com:3000/shangcheng/b78f86e49f0408b005c79246af63707c86a855b2dd39556f2fdce7653d95b227.png">
|
||||||
:src="sheep.$url.static('/static/img/shop/order/order_loading.png')"
|
|
||||||
>
|
|
||||||
</image>
|
</image>
|
||||||
<image
|
<image v-if="
|
||||||
v-if="
|
|
||||||
state.orderInfo.status_code == 'completed' ||
|
state.orderInfo.status_code == 'completed' ||
|
||||||
state.orderInfo.status_code == 'refund_agree'
|
state.orderInfo.status_code == 'refund_agree'
|
||||||
"
|
" class="state-img"
|
||||||
class="state-img"
|
src="https://zysc.fjptzykj.com:3000/shangcheng/b78f86e49f0408b005c79246af63707c86a855b2dd39556f2fdce7653d95b227.png">
|
||||||
:src="sheep.$url.static('/static/img/shop/order/order_success.png')"
|
|
||||||
>
|
|
||||||
</image>
|
</image>
|
||||||
<image
|
<image v-if="state.orderInfo.status_code == 'cancel' || state.orderInfo.status_code == 'closed'"
|
||||||
v-if="state.orderInfo.status_code == 'cancel' || state.orderInfo.status_code == 'closed'"
|
|
||||||
class="state-img"
|
class="state-img"
|
||||||
:src="sheep.$url.static('/static/img/shop/order/order_close.png')"
|
src="https://zysc.fjptzykj.com:3000/shangcheng/b78f86e49f0408b005c79246af63707c86a855b2dd39556f2fdce7653d95b227.png">
|
||||||
>
|
|
||||||
</image>
|
</image>
|
||||||
<image
|
<image v-if="state.orderInfo.status_code == 'noget'" class="state-img"
|
||||||
v-if="state.orderInfo.status_code == 'noget'"
|
src="https://zysc.fjptzykj.com:3000/shangcheng/b78f86e49f0408b005c79246af63707c86a855b2dd39556f2fdce7653d95b227.png">
|
||||||
class="state-img"
|
|
||||||
:src="sheep.$url.static('/static/img/shop/order/order_express.png')"
|
|
||||||
>
|
|
||||||
</image>
|
</image>
|
||||||
<view class="ss-font-30">{{ formatOrderStatus(state.orderInfo) }}</view>
|
<!-- <view class="ss-font-30">{{ formatOrderStatus(state.orderInfo) }}</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="ss-font-26 ss-m-x-20 ss-m-b-70">
|
<view class="ss-font-26 ss-m-x-20 ">
|
||||||
{{ formatOrderStatusDescription(state.orderInfo) }}
|
{{ formatOrderStatusDescription(state.orderInfo) }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 收货地址 -->
|
<!-- 收货地址 -->
|
||||||
<view class="order-address-box" v-if="state.orderInfo.receiverAreaId > 0">
|
<view class="order-address-box" v-if="state.orderInfo.receiverAreaId > 0">
|
||||||
|
|
||||||
|
<uni-section title="" type="line" padding>
|
||||||
|
<uni-steps :options="state.list1" :active="state.active" active-color="rgba(214,68,49)"/>
|
||||||
|
</uni-section>
|
||||||
|
|
||||||
|
<view class="new-address">
|
||||||
<view class="ss-flex ss-col-center">
|
<view class="ss-flex ss-col-center">
|
||||||
<text class="address-username">
|
<text class="address-username">
|
||||||
{{ state.orderInfo.receiverName }}
|
{{ state.orderInfo.receiverName }}
|
||||||
@ -62,56 +74,39 @@
|
|||||||
{{ state.orderInfo.receiverAreaName }} {{ state.orderInfo.receiverDetailAddress }}
|
{{ state.orderInfo.receiverAreaName }} {{ state.orderInfo.receiverDetailAddress }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view
|
<view class="detail-goods" :style="[{ marginTop: state.orderInfo.receiverAreaId > 0 ? '0' : '-40rpx' }]">
|
||||||
class="detail-goods"
|
|
||||||
:style="[{ marginTop: state.orderInfo.receiverAreaId > 0 ? '0' : '-40rpx' }]"
|
|
||||||
>
|
|
||||||
<!-- 订单信 -->
|
<!-- 订单信 -->
|
||||||
<view class="order-list" v-for="item in state.orderInfo.items" :key="item.goods_id">
|
<view class="order-list" v-for="item in state.orderInfo.items" :key="item.goods_id">
|
||||||
<view class="order-card">
|
<view class="order-card">
|
||||||
<s-goods-item
|
<s-goods-item @tap="onGoodsDetail(item.spuId)" :img="item.picUrl" :title="item.spuName"
|
||||||
@tap="onGoodsDetail(item.spuId)"
|
:skuText="item.properties.map((property) => property.valueName).join(' ')" :price="item.price"
|
||||||
:img="item.picUrl"
|
:num="item.count">
|
||||||
:title="item.spuName"
|
|
||||||
:skuText="item.properties.map((property) => property.valueName).join(' ')"
|
|
||||||
:price="item.price"
|
|
||||||
:num="item.count"
|
|
||||||
>
|
|
||||||
<template #tool>
|
<template #tool>
|
||||||
<view class="ss-flex">
|
<view class="ss-flex">
|
||||||
<button
|
<button class="ss-reset-button apply-btn"
|
||||||
class="ss-reset-button apply-btn"
|
|
||||||
v-if="[10, 20, 30].includes(state.orderInfo.status) && item.afterSaleStatus === 0"
|
v-if="[10, 20, 30].includes(state.orderInfo.status) && item.afterSaleStatus === 0"
|
||||||
@tap.stop="
|
@tap.stop="
|
||||||
sheep.$router.go('/pages/order/aftersale/apply', {
|
sheep.$router.go('/pages/order/aftersale/apply', {
|
||||||
orderId: state.orderInfo.id,
|
orderId: state.orderInfo.id,
|
||||||
itemId: item.id,
|
itemId: item.id,
|
||||||
})
|
})
|
||||||
"
|
">
|
||||||
>
|
|
||||||
申请售后
|
申请售后
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button class="ss-reset-button apply-btn" v-if="item.afterSaleStatus === 10" @tap.stop="
|
||||||
class="ss-reset-button apply-btn"
|
|
||||||
v-if="item.afterSaleStatus === 10"
|
|
||||||
@tap.stop="
|
|
||||||
sheep.$router.go('/pages/order/aftersale/detail', {
|
sheep.$router.go('/pages/order/aftersale/detail', {
|
||||||
id: item.afterSaleId,
|
id: item.afterSaleId,
|
||||||
})
|
})
|
||||||
"
|
">
|
||||||
>
|
|
||||||
退款中
|
退款中
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button class="ss-reset-button apply-btn" v-if="item.afterSaleStatus === 20" @tap.stop="
|
||||||
class="ss-reset-button apply-btn"
|
|
||||||
v-if="item.afterSaleStatus === 20"
|
|
||||||
@tap.stop="
|
|
||||||
sheep.$router.go('/pages/order/aftersale/detail', {
|
sheep.$router.go('/pages/order/aftersale/detail', {
|
||||||
id: item.afterSaleId,
|
id: item.afterSaleId,
|
||||||
})
|
})
|
||||||
"
|
">
|
||||||
>
|
|
||||||
退款成功
|
退款成功
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
@ -191,10 +186,7 @@
|
|||||||
<text class="title">{{ state.orderInfo.payStatus ? '已付款' : '需付款' }}</text>
|
<text class="title">{{ state.orderInfo.payStatus ? '已付款' : '需付款' }}</text>
|
||||||
<text class="detail all-price">¥{{ fen2yuan(state.orderInfo.payPrice) }}</text>
|
<text class="detail all-price">¥{{ fen2yuan(state.orderInfo.payPrice) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view class="notice-item all-rpice-item ss-flex ss-m-t-20" v-if="state.orderInfo.refundPrice > 0">
|
||||||
class="notice-item all-rpice-item ss-flex ss-m-t-20"
|
|
||||||
v-if="state.orderInfo.refundPrice > 0"
|
|
||||||
>
|
|
||||||
<text class="title">已退款</text>
|
<text class="title">已退款</text>
|
||||||
<text class="detail all-price">¥{{ fen2yuan(state.orderInfo.refundPrice) }}</text>
|
<text class="detail all-price">¥{{ fen2yuan(state.orderInfo.refundPrice) }}</text>
|
||||||
</view>
|
</view>
|
||||||
@ -204,50 +196,31 @@
|
|||||||
<!-- TODO: 查看物流、等待成团、评价完后返回页面没刷新页面 -->
|
<!-- TODO: 查看物流、等待成团、评价完后返回页面没刷新页面 -->
|
||||||
<su-fixed bottom placeholder bg="bg-white" v-if="state.orderInfo.buttons?.length">
|
<su-fixed bottom placeholder bg="bg-white" v-if="state.orderInfo.buttons?.length">
|
||||||
<view class="footer-box ss-flex ss-col-center ss-row-right">
|
<view class="footer-box ss-flex ss-col-center ss-row-right">
|
||||||
<button
|
<button class="ss-reset-button cancel-btn" v-if="state.orderInfo.buttons?.includes('cancel')"
|
||||||
class="ss-reset-button cancel-btn"
|
@tap="onCancel(state.orderInfo.id)">
|
||||||
v-if="state.orderInfo.buttons?.includes('cancel')"
|
|
||||||
@tap="onCancel(state.orderInfo.id)"
|
|
||||||
>
|
|
||||||
取消订单
|
取消订单
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button class="ss-reset-button pay-btn ui-BG-Main-Gradient"
|
||||||
class="ss-reset-button pay-btn ui-BG-Main-Gradient"
|
v-if="state.orderInfo.buttons?.includes('pay')" @tap="onPay(state.orderInfo.payOrderId)">
|
||||||
v-if="state.orderInfo.buttons?.includes('pay')"
|
|
||||||
@tap="onPay(state.orderInfo.payOrderId)"
|
|
||||||
>
|
|
||||||
继续支付
|
继续支付
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button class="ss-reset-button cancel-btn" v-if="state.orderInfo.buttons?.includes('combination')" @tap="
|
||||||
class="ss-reset-button cancel-btn"
|
|
||||||
v-if="state.orderInfo.buttons?.includes('combination')"
|
|
||||||
@tap="
|
|
||||||
sheep.$router.go('/pages/activity/groupon/detail', {
|
sheep.$router.go('/pages/activity/groupon/detail', {
|
||||||
id: state.orderInfo.combinationRecordId,
|
id: state.orderInfo.combinationRecordId,
|
||||||
})
|
})
|
||||||
"
|
">
|
||||||
>
|
|
||||||
拼团详情
|
拼团详情
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button class="ss-reset-button cancel-btn" v-if="state.orderInfo.buttons?.includes('express')"
|
||||||
class="ss-reset-button cancel-btn"
|
@tap="onExpress(state.orderInfo.id)">
|
||||||
v-if="state.orderInfo.buttons?.includes('express')"
|
|
||||||
@tap="onExpress(state.orderInfo.id)"
|
|
||||||
>
|
|
||||||
查看物流
|
查看物流
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button class="ss-reset-button cancel-btn" v-if="state.orderInfo.buttons?.includes('confirm')"
|
||||||
class="ss-reset-button cancel-btn"
|
@tap="onConfirm(state.orderInfo.id)">
|
||||||
v-if="state.orderInfo.buttons?.includes('confirm')"
|
|
||||||
@tap="onConfirm(state.orderInfo.id)"
|
|
||||||
>
|
|
||||||
确认收货
|
确认收货
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button class="ss-reset-button cancel-btn" v-if="state.orderInfo.buttons?.includes('comment')"
|
||||||
class="ss-reset-button cancel-btn"
|
@tap="onComment(state.orderInfo.id)">
|
||||||
v-if="state.orderInfo.buttons?.includes('comment')"
|
|
||||||
@tap="onComment(state.orderInfo.id)"
|
|
||||||
>
|
|
||||||
评价
|
评价
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
@ -257,9 +230,16 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import {
|
||||||
import { reactive, ref } from 'vue';
|
onLoad
|
||||||
import { isEmpty } from 'lodash-es';
|
} from '@dcloudio/uni-app';
|
||||||
|
import {
|
||||||
|
reactive,
|
||||||
|
ref
|
||||||
|
} from 'vue';
|
||||||
|
import {
|
||||||
|
isEmpty
|
||||||
|
} from 'lodash-es';
|
||||||
import {
|
import {
|
||||||
fen2yuan,
|
fen2yuan,
|
||||||
formatOrderStatus,
|
formatOrderStatus,
|
||||||
@ -277,6 +257,20 @@
|
|||||||
orderInfo: {},
|
orderInfo: {},
|
||||||
merchantTradeNo: '', // 商户订单号
|
merchantTradeNo: '', // 商户订单号
|
||||||
comeinType: '', // 进入订单详情的来源类型
|
comeinType: '', // 进入订单详情的来源类型
|
||||||
|
list1: [{
|
||||||
|
title: '待付款'
|
||||||
|
}, {
|
||||||
|
title: '待发货'
|
||||||
|
}, {
|
||||||
|
title: '待收货'
|
||||||
|
}
|
||||||
|
, {
|
||||||
|
title: '待评价'
|
||||||
|
}
|
||||||
|
, {
|
||||||
|
title: '已完成'
|
||||||
|
}], // 订单状态步骤条
|
||||||
|
active:0
|
||||||
});
|
});
|
||||||
|
|
||||||
// ========== 门店自提(核销) ==========
|
// ========== 门店自提(核销) ==========
|
||||||
@ -310,7 +304,9 @@
|
|||||||
if (!res.confirm) {
|
if (!res.confirm) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const { code } = await OrderApi.cancelOrder(orderId);
|
const {
|
||||||
|
code
|
||||||
|
} = await OrderApi.cancelOrder(orderId);
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
await getOrderDetail(orderId);
|
await getOrderDetail(orderId);
|
||||||
}
|
}
|
||||||
@ -343,7 +339,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 正常的确认收货流程
|
// 正常的确认收货流程
|
||||||
const { code } = await OrderApi.receiveOrder(orderId);
|
const {
|
||||||
|
code
|
||||||
|
} = await OrderApi.receiveOrder(orderId);
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
await getOrderDetail(orderId);
|
await getOrderDetail(orderId);
|
||||||
}
|
}
|
||||||
@ -403,15 +401,43 @@
|
|||||||
}
|
}
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
state.orderInfo = res.data;
|
state.orderInfo = res.data;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
handleOrderButtons(state.orderInfo);
|
handleOrderButtons(state.orderInfo);
|
||||||
// 配送方式:门店自提
|
// 配送方式:门店自提
|
||||||
if (res.data.pickUpStoreId) {
|
if (res.data.pickUpStoreId) {
|
||||||
const { data } = await DeliveryApi.getDeliveryPickUpStore(res.data.pickUpStoreId);
|
const {
|
||||||
|
data
|
||||||
|
} = await DeliveryApi.getDeliveryPickUpStore(res.data.pickUpStoreId);
|
||||||
systemStore.value = data || {};
|
systemStore.value = data || {};
|
||||||
}
|
}
|
||||||
if (state.orderInfo.deliveryType === 2 && state.orderInfo.payStatus) {
|
if (state.orderInfo.deliveryType === 2 && state.orderInfo.payStatus) {
|
||||||
pickUpVerifyRef.value && pickUpVerifyRef.value.markCode(res.data.pickUpVerifyCode);
|
pickUpVerifyRef.value && pickUpVerifyRef.value.markCode(res.data.pickUpVerifyCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log("打印微信----", state.orderInfo.buttons)
|
||||||
|
|
||||||
|
if(res.data.status == 30 && res.data.buttons?.includes('comment')){
|
||||||
|
state.active = 3;
|
||||||
|
}else{
|
||||||
|
switch (res.data.status) {
|
||||||
|
case 10:
|
||||||
|
state.active = 1;
|
||||||
|
break;
|
||||||
|
case 30:
|
||||||
|
if(!state.orderInfo.buttons?.includes('comment')){
|
||||||
|
state.active = 4;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 20:
|
||||||
|
state.active = 2;
|
||||||
|
break;
|
||||||
|
case 0:
|
||||||
|
state.active = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
sheep.$router.back();
|
sheep.$router.back();
|
||||||
}
|
}
|
||||||
@ -432,6 +458,16 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.new-class {
|
||||||
|
display: flex;
|
||||||
|
// justify-content: center;
|
||||||
|
padding: 11px 29px;
|
||||||
|
}
|
||||||
|
.new-address{
|
||||||
|
padding-top:30px;
|
||||||
|
padding-left:15px;
|
||||||
|
}
|
||||||
|
|
||||||
.score-img {
|
.score-img {
|
||||||
width: 36rpx;
|
width: 36rpx;
|
||||||
height: 36rpx;
|
height: 36rpx;
|
||||||
@ -451,8 +487,9 @@
|
|||||||
.state-box {
|
.state-box {
|
||||||
color: rgba(#fff, 0.9);
|
color: rgba(#fff, 0.9);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: v-bind(headerBg) no-repeat,
|
// background: v-bind(headerBg) no-repeat,
|
||||||
linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
|
// linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
|
||||||
|
background: rgba(214, 68, 49);
|
||||||
background-size: 750rpx 100%;
|
background-size: 750rpx 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
@ -466,8 +503,9 @@
|
|||||||
.order-address-box {
|
.order-address-box {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
margin: -50rpx 20rpx 16rpx 20rpx;
|
// margin: 15px 20rpx 16rpx 20rpx;
|
||||||
padding: 44rpx 34rpx 42rpx 20rpx;
|
margin-bottom:10px;
|
||||||
|
padding: 44rpx 0 42rpx 0;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
@ -487,7 +525,7 @@
|
|||||||
|
|
||||||
.detail-goods {
|
.detail-goods {
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
margin: 0 20rpx 20rpx 20rpx;
|
margin: 0 0 20rpx 0;
|
||||||
|
|
||||||
.order-list {
|
.order-list {
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
@ -526,7 +564,7 @@
|
|||||||
.notice-box {
|
.notice-box {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
margin: 0 20rpx 20rpx 20rpx;
|
margin: 0 0 20rpx 0;
|
||||||
|
|
||||||
.notice-box__head {
|
.notice-box__head {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
@ -588,7 +626,7 @@
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
margin: 0 20rpx 20rpx 20rpx;
|
margin: 0 0 20rpx 0;
|
||||||
|
|
||||||
.notice-item {
|
.notice-item {
|
||||||
line-height: 70rpx;
|
line-height: 70rpx;
|
||||||
|
@ -1,52 +1,60 @@
|
|||||||
<!-- 支付结果页面 -->
|
<!-- 支付结果页面 -->
|
||||||
<template>
|
<template>
|
||||||
<s-layout title="支付结果" :bgStyle="{ color: '#FFF' }">
|
<s-layout title="支付结果" :bgStyle="{ color: '#FFF' }">
|
||||||
<view class="pay-result-box ss-flex-col ss-row-center ss-col-center">
|
<view class="main">
|
||||||
<!-- 信息展示 -->
|
|
||||||
<view class="pay-waiting ss-m-b-30" v-if="payResult === 'waiting'" />
|
|
||||||
<image
|
<image
|
||||||
class="pay-img ss-m-b-30"
|
src="https://zysc.fjptzykj.com:3000/shangcheng/7bab925772a5b878b75dcc35e5ebd1d6e6c2e776752554526a71ecd1371c24db.png"
|
||||||
v-if="payResult === 'success'"
|
class="img" mode=""></image>
|
||||||
:src="sheep.$url.static('/static/img/shop/order/order_pay_success.gif')"
|
<view class="title" v-if="payResult === 'success'">订单支付成功</view>
|
||||||
/>
|
<view class="title" v-if="payResult === 'failed'">支付失败</view>
|
||||||
<image
|
<view class="title" v-if="payResult === 'closed'">该订单已关闭</view>
|
||||||
class="pay-img ss-m-b-30"
|
<view class="title" v-if="payResult === 'waiting'">检测支付结果...</view>
|
||||||
v-if="['failed', 'closed'].includes(payResult)"
|
<!-- <view class="title">订单支付成功</view> -->
|
||||||
:src="sheep.$url.static('/static/img/shop/order/order_paty_fail.gif')"
|
<view class="fgx"></view>
|
||||||
/>
|
<view class="ddxx">
|
||||||
<view class="tip-text ss-m-b-30" v-if="payResult === 'success'">支付成功</view>
|
<view class="l">
|
||||||
<view class="tip-text ss-m-b-30" v-if="payResult === 'failed'">支付失败</view>
|
订单号
|
||||||
<view class="tip-text ss-m-b-30" v-if="payResult === 'closed'">该订单已关闭</view>
|
|
||||||
<view class="tip-text ss-m-b-30" v-if="payResult === 'waiting'">检测支付结果...</view>
|
|
||||||
<view class="pay-total-num ss-flex" v-if="payResult === 'success'">
|
|
||||||
<view>¥{{ fen2yuan(state.orderInfo.price) }}</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
<view class="r">
|
||||||
<!-- 操作区 -->
|
{{ state.orderInfo.no }}
|
||||||
<view class="btn-box ss-flex ss-row-center ss-m-t-50">
|
</view>
|
||||||
<button class="back-btn ss-reset-button" @tap="sheep.$router.go('/pages/index/index')">
|
</view>
|
||||||
返回首页
|
<view class="ddxx">
|
||||||
</button>
|
<view class="l">
|
||||||
<button
|
下单时间
|
||||||
class="check-btn ss-reset-button"
|
</view>
|
||||||
v-if="payResult === 'failed'"
|
<view class="r">
|
||||||
@tap="
|
{{ sheep.$helper.timeFormat(state.orderInfo.createTime, 'yyyy-mm-dd hh:MM:ss') }}
|
||||||
sheep.$router.redirect('/pages/pay/index', { id: state.id, orderType: state.orderType })
|
</view>
|
||||||
"
|
</view>
|
||||||
>
|
<view class="ddxx">
|
||||||
|
<view class="l">
|
||||||
|
支付方式
|
||||||
|
</view>
|
||||||
|
<view class="r">
|
||||||
|
支付余额
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="ddxx">
|
||||||
|
<view class="l">
|
||||||
|
支付余额
|
||||||
|
</view>
|
||||||
|
<view class="r">
|
||||||
|
¥{{ fen2yuan(state.orderInfo.price) }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="fgx"></view>
|
||||||
|
<view class="ck-detail" v-if="payResult === 'failed'" @tap="sheep.$router.redirect('/pages/pay/index', { id: state.id, orderType: state.orderType })">
|
||||||
重新支付
|
重新支付
|
||||||
</button>
|
</view>
|
||||||
<button class="check-btn ss-reset-button" v-if="payResult === 'success'" @tap="onOrder">
|
<view class="ck-detail" v-if="payResult === 'success' && state.tradeOrder.type === 3" @tap="sheep.$router.redirect('/pages/activity/groupon/order')">
|
||||||
查看订单
|
|
||||||
</button>
|
|
||||||
<!-- TODO 芋艿:拼团接入 -->
|
|
||||||
<button
|
|
||||||
class="check-btn ss-reset-button"
|
|
||||||
v-if="payResult === 'success' && state.tradeOrder.type === 3"
|
|
||||||
@tap="sheep.$router.redirect('/pages/activity/groupon/order')"
|
|
||||||
>
|
|
||||||
我的拼团
|
我的拼团
|
||||||
</button>
|
</view>
|
||||||
|
<view class="ck-detail" v-if="payResult === 'success'" @tap="onOrder">
|
||||||
|
查看订单
|
||||||
|
</view>
|
||||||
|
<view class="bk-home" @click="sheep.$router.go('/pages/index/index');">
|
||||||
|
返回首页
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- TODO 芋艿:订阅 -->
|
<!-- TODO 芋艿:订阅 -->
|
||||||
@ -62,12 +70,23 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onLoad, onHide, onShow } from '@dcloudio/uni-app';
|
import {
|
||||||
import { reactive, computed } from 'vue';
|
onLoad,
|
||||||
import { isEmpty } from 'lodash';
|
onHide,
|
||||||
|
onShow
|
||||||
|
} from '@dcloudio/uni-app';
|
||||||
|
import {
|
||||||
|
reactive,
|
||||||
|
computed
|
||||||
|
} from 'vue';
|
||||||
|
import {
|
||||||
|
isEmpty
|
||||||
|
} from 'lodash';
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import PayOrderApi from '@/sheep/api/pay/order';
|
import PayOrderApi from '@/sheep/api/pay/order';
|
||||||
import { fen2yuan } from '../../sheep/hooks/useGoods';
|
import {
|
||||||
|
fen2yuan
|
||||||
|
} from '../../sheep/hooks/useGoods';
|
||||||
import OrderApi from '@/sheep/api/trade/order';
|
import OrderApi from '@/sheep/api/trade/order';
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
@ -99,7 +118,10 @@
|
|||||||
async function getOrderInfo(id) {
|
async function getOrderInfo(id) {
|
||||||
state.counter++;
|
state.counter++;
|
||||||
// 1. 加载订单信息
|
// 1. 加载订单信息
|
||||||
const { data, code } = await PayOrderApi.getOrder(id);
|
const {
|
||||||
|
data,
|
||||||
|
code
|
||||||
|
} = await PayOrderApi.getOrder(id);
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
state.orderInfo = data;
|
state.orderInfo = data;
|
||||||
if (!state.orderInfo || state.orderInfo.status === 30) {
|
if (!state.orderInfo || state.orderInfo.status === 30) {
|
||||||
@ -115,7 +137,10 @@
|
|||||||
// #endif
|
// #endif
|
||||||
// 特殊:获得商品订单信息
|
// 特殊:获得商品订单信息
|
||||||
if (state.orderType === 'goods') {
|
if (state.orderType === 'goods') {
|
||||||
const { data, code } = await OrderApi.getOrder(state.orderInfo.merchantOrderId);
|
const {
|
||||||
|
data,
|
||||||
|
code
|
||||||
|
} = await OrderApi.getOrder(state.orderInfo.merchantOrderId);
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
state.tradeOrder = data;
|
state.tradeOrder = data;
|
||||||
}
|
}
|
||||||
@ -187,101 +212,76 @@
|
|||||||
state.counter = 0;
|
state.counter = 0;
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss" scope>
|
||||||
|
.main {
|
||||||
|
background: white;
|
||||||
|
width: 85%;
|
||||||
|
padding: 15px;
|
||||||
|
position: fixed;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
border-radius: 12px;
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
.img {
|
||||||
@keyframes rotation {
|
width: 80px;
|
||||||
0% {
|
height: 80px;
|
||||||
transform: rotate(0deg);
|
display: block;
|
||||||
|
margin: 0 auto;
|
||||||
|
margin-top: -52px;
|
||||||
}
|
}
|
||||||
|
|
||||||
100% {
|
.title {
|
||||||
transform: rotate(360deg);
|
text-align: center;
|
||||||
}
|
font-size: 18px;
|
||||||
}
|
margin: 15px 0;
|
||||||
|
|
||||||
.score-img {
|
|
||||||
width: 36rpx;
|
|
||||||
height: 36rpx;
|
|
||||||
margin: 0 4rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pay-result-box {
|
|
||||||
padding: 60rpx 0;
|
|
||||||
|
|
||||||
.pay-waiting {
|
|
||||||
margin-top: 20rpx;
|
|
||||||
width: 60rpx;
|
|
||||||
height: 60rpx;
|
|
||||||
border: 10rpx solid rgb(233, 231, 231);
|
|
||||||
border-bottom-color: rgb(204, 204, 204);
|
|
||||||
border-radius: 50%;
|
|
||||||
display: inline-block;
|
|
||||||
// -webkit-animation: rotation 1s linear infinite;
|
|
||||||
animation: rotation 1s linear infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pay-img {
|
|
||||||
width: 130rpx;
|
|
||||||
height: 130rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tip-text {
|
|
||||||
font-size: 30rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pay-total-num {
|
|
||||||
font-size: 36rpx;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #333333;
|
|
||||||
font-family: OPPOSANS;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-box {
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
.back-btn {
|
|
||||||
width: 190rpx;
|
|
||||||
height: 70rpx;
|
|
||||||
font-size: 28rpx;
|
|
||||||
border: 2rpx solid #dfdfdf;
|
|
||||||
border-radius: 35rpx;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #595959;
|
|
||||||
}
|
|
||||||
|
|
||||||
.check-btn {
|
|
||||||
width: 190rpx;
|
|
||||||
height: 70rpx;
|
|
||||||
font-size: 28rpx;
|
|
||||||
border: 2rpx solid #dfdfdf;
|
|
||||||
border-radius: 35rpx;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #595959;
|
|
||||||
margin-left: 32rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.subscribe-box {
|
|
||||||
.subscribe-img {
|
|
||||||
width: 44rpx;
|
|
||||||
height: 44rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.subscribe-title {
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 32rpx;
|
|
||||||
line-height: 36rpx;
|
|
||||||
color: #434343;
|
|
||||||
}
|
|
||||||
|
|
||||||
.subscribe-start {
|
|
||||||
color: var(--ui-BG-Main);
|
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-size: 32rpx;
|
}
|
||||||
line-height: 36rpx;
|
|
||||||
|
.ddxx {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin: 10px 0;
|
||||||
|
|
||||||
|
.l {
|
||||||
|
font-size: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.r {
|
||||||
|
font-size: 16px;
|
||||||
|
color: rbga(102, 102, 102);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fgx {
|
||||||
|
margin: 20px 0;
|
||||||
|
height: 1px;
|
||||||
|
width: 100%;
|
||||||
|
background: rgba(239, 239, 239);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ck-detail {
|
||||||
|
// background: rgba(254,92,45);
|
||||||
|
background: rgba(230, 50, 34);
|
||||||
|
padding: 10px 0;
|
||||||
|
color: white;
|
||||||
|
font-size: 19px;
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
border-radius: 31px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bk-home {
|
||||||
|
border: 1px solid rgba(230, 50, 34);
|
||||||
|
padding: 10px 0;
|
||||||
|
color: rgba(230, 50, 34);
|
||||||
|
font-size: 19px;
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 31px;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -33,12 +33,12 @@
|
|||||||
|
|
||||||
<view class="new-point">
|
<view class="new-point">
|
||||||
<view class="l">
|
<view class="l">
|
||||||
<view class="b">1000</view>
|
<view class="b">{{state.pointData.addUp}}</view>
|
||||||
<view class="c">累计积分(带对接接口)</view>
|
<view class="c">累计积分</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="l">
|
<view class="l">
|
||||||
<view class="b">1000</view>
|
<view class="b">{{state.pointData.reduce}}</view>
|
||||||
<view class="c">累计消费(带对接接口)</view>
|
<view class="c">累计消费</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="l">
|
<view class="l">
|
||||||
<view class="b">0</view>
|
<view class="b">0</view>
|
||||||
@ -115,6 +115,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import request from '@/sheep/request';
|
||||||
|
import {
|
||||||
|
baseUrl,
|
||||||
|
apiPath
|
||||||
|
} from '@/sheep/config';
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad,
|
||||||
@ -146,7 +151,8 @@
|
|||||||
loadStatus: '',
|
loadStatus: '',
|
||||||
date: [],
|
date: [],
|
||||||
today: '',
|
today: '',
|
||||||
isShow: 1
|
isShow: 1,
|
||||||
|
pointData:[]
|
||||||
});
|
});
|
||||||
|
|
||||||
const tabMaps = [{
|
const tabMaps = [{
|
||||||
@ -171,6 +177,18 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//
|
||||||
|
//
|
||||||
|
function brandlists3() {
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}${apiPath}/member/point/record/getPointInfo`,
|
||||||
|
method: 'GET',
|
||||||
|
}).then((res) => {
|
||||||
|
console.log(res, "------brandList3---------");
|
||||||
|
state.pointData = res.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
async function getLogList() {
|
async function getLogList() {
|
||||||
state.loadStatus = 'loading';
|
state.loadStatus = 'loading';
|
||||||
let {
|
let {
|
||||||
@ -195,6 +213,7 @@
|
|||||||
state.today = dayjs().format('YYYY-MM-DD');
|
state.today = dayjs().format('YYYY-MM-DD');
|
||||||
state.date = [state.today, state.today];
|
state.date = [state.today, state.today];
|
||||||
getLogList();
|
getLogList();
|
||||||
|
brandlists3();
|
||||||
});
|
});
|
||||||
|
|
||||||
function onChange(e) {
|
function onChange(e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user