fix(custom): 修复商家订单详情数据不显示的bug
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -4,30 +4,43 @@
|
||||
<view>订单号:{{ info.oid }}</view>
|
||||
<view>{{ info.add_time }}</view>
|
||||
</view>
|
||||
<view class="good-info">
|
||||
<view class="top">
|
||||
<image :src="info.BindGoods?.cover" />
|
||||
<view class="title">{{ info.BindGoods?.name }}</view>
|
||||
<view class="card">
|
||||
<view class="center" v-for="(itm, idx) in info.OrderGoods" :key="idx">
|
||||
<view class="top">
|
||||
<image :src="itm.Goods.cover" />
|
||||
<view class="title">{{ itm.Goods.name }} </view>
|
||||
<view class="right">
|
||||
<view v-if="info.pay_type === 1">{{ itm.pay_price }}元</view>
|
||||
<view v-else>{{ itm.pay_integral }}积分</view>
|
||||
<view>x{{ itm.number }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="public-total">
|
||||
共{{ info.count }}件商品,已支付
|
||||
<text class="money">{{ info.number }}</text>
|
||||
<view class="line"></view>
|
||||
<view class="bom" style="text-align: right">
|
||||
共{{ info.count }}件商品,支付方式:{{
|
||||
info.pay_type === 1 ? "微信" : "积分"
|
||||
}},实付:
|
||||
<text style="color: red">{{
|
||||
info.pay_type === 1 ? `${info.price}元` : `${info.exchange}积分`
|
||||
}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<nut-cell-group>
|
||||
<nut-cell title="订单状态:" :desc="orderStatus"></nut-cell>
|
||||
<nut-cell title="下单用户:" :desc="info.BindUser?.nickName"></nut-cell>
|
||||
<nut-cell title="用户手机号:" :desc="info.BindUser?.phone"></nut-cell>
|
||||
<nut-cell title="下单用户:" :desc="info.User?.nickName"></nut-cell>
|
||||
<nut-cell title="用户手机号:" :desc="info.User?.phone"></nut-cell>
|
||||
<nut-cell title="核销时间:" :desc="info.User?.phone"></nut-cell>
|
||||
<nut-cell
|
||||
v-if="info.status === 2"
|
||||
title="核销人员:"
|
||||
:desc="info.BindCancelUser?.nickName"
|
||||
:desc="info.CancelUser?.nickName"
|
||||
></nut-cell>
|
||||
<nut-cell
|
||||
v-if="info.status === 2"
|
||||
title="核销人手机号:"
|
||||
:desc="info.BindCancelUser?.phone"
|
||||
:desc="info.CancelUser?.phone"
|
||||
></nut-cell>
|
||||
</nut-cell-group>
|
||||
</view>
|
||||
@@ -35,15 +48,16 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import Taro from "@tarojs/taro";
|
||||
import { ref } from "vue";
|
||||
import { computed, ref } from "vue";
|
||||
|
||||
const info = ref<any>({});
|
||||
|
||||
Taro.useLoad(() => {
|
||||
info.value = Taro.getStorageSync("ver_order_info");
|
||||
console.log(info.value);
|
||||
});
|
||||
|
||||
const orderStatus = () => {
|
||||
const orderStatus = computed(() => {
|
||||
switch (info.value.status) {
|
||||
case 1:
|
||||
return "待核销";
|
||||
@@ -52,7 +66,7 @@ const orderStatus = () => {
|
||||
case 3:
|
||||
return "已失效";
|
||||
}
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@@ -60,6 +74,13 @@ page {
|
||||
--nut-cell-desc-color: #000;
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background-color: #f5f5f5;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.header {
|
||||
background: linear-gradient(90deg, #2291f8 0, #1cd1dc);
|
||||
padding: 30px;
|
||||
@@ -86,6 +107,7 @@ page {
|
||||
image {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.title {
|
||||
@@ -113,4 +135,41 @@ page {
|
||||
color: #ff4c3c;
|
||||
}
|
||||
}
|
||||
|
||||
.card {
|
||||
box-sizing: border-box;
|
||||
margin: 15px auto;
|
||||
background-color: #fff;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.center {
|
||||
.top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
// align-items: flex-start;
|
||||
|
||||
image {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin-left: 10px;
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
text-overflow: ellipsis;
|
||||
width: 350px;
|
||||
}
|
||||
|
||||
.right {
|
||||
margin-left: 10px;
|
||||
font-size: 28px;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user