This commit is contained in:
2024-04-14 01:43:37 +08:00
parent b676a1acd9
commit 16dac8d97f
17 changed files with 60 additions and 32 deletions

View File

@@ -1,7 +1,7 @@
<template>
<view class='card-view' @click.stop='goPath(`/pages/mine/subs/order/detail?orderId=${item?.id}`)'>
<view class='goods-info-view c-flex-row'>
<image class='goods-image' :src='item?.orderGoods[0].images' />
<image class='goods-image' :src='item?.orderGoods[0].images||defaultImage' />
<view class='c-flex-column' style='flex: 1;'>
<view class='c-flex-row'>
<text class='goods-name'>{{ item?.orderGoods[0].goodsName }}</text>
@@ -42,7 +42,7 @@
<script lang='ts' setup>
import { PropType } from 'vue';
import { assetsUrl } from '@/utils/assets';
import { assetsUrl, defaultImage } from '@/utils/assets';
import { goPath } from '@/utils';
import { isPending } from '@/utils/order';
import { OrderBean } from '@/api/order/types';

View File

@@ -15,7 +15,8 @@
</view>
</view>
</view>
<view class='address-view c-flex-column' v-if='orderBean?.order?.address'>
<view class='address-view c-flex-column'
v-if='orderBean?.order?.address'>
<view class='user-info c-flex-row'>
<text v-if='orderBean.order.address.defaultstatus==1'>默认</text>
<text>{{ orderBean?.order?.address.name }}</text>
@@ -34,7 +35,7 @@
<view class='goods-info-view c-flex-column'>
<view class='c-flex-row' style='margin-bottom: 20rpx' v-for='(item,index) in orderBean?.order.orderGoods'
:key='index'>
<image class='goods-image' :src='item.stockStock.images' />
<image class='goods-image' :src='item.stockStock.images||defaultImage' />
<view class='c-flex-column' style='flex: 1;'>
<view class='c-flex-row'>
<text class='goods-name'>{{ item.goodsName }}</text>
@@ -112,7 +113,7 @@
</template>
<script lang='ts' setup>
import { assetsUrl } from '@/utils/assets';
import { assetsUrl, defaultImage } from '@/utils/assets';
import { getOrderDetail } from '@/api/order';
import { OrderBean } from '@/api/order/types';
import { parseParameter, sortASCII } from '@/utils';
@@ -140,6 +141,9 @@ onLoad(async (e: any) => {
const fetchData = async (orderId: string) => {
await uni.showLoading();
orderBean.value = await getOrderDetail(orderId);
if(orderBean.value?.order.address) {
orderBean.value.order.address = JSON.parse(orderBean?.value.order?.address);
}
uni.hideLoading();
};