fix:字段显示问题

This commit is contained in:
ctw committed 2025-11-04 18:26:56 +08:00
1 parent 8dd3f58fa4
commit 67f58353a4
3 files changed
+22 -8

No files matched your search

+2 -2
View File
@@ -33,10 +33,10 @@
color="transparent"
/>
</tm-form-item>
<tm-form-item name="isOtherPeople" label="是否可随行人员" direction="horizontal" labelWidth="500">
<tm-form-item name="isOtherPeople" label="是否有随行人员" direction="horizontal" labelWidth="500">
<tm-switch v-model="form.isOtherPeople" />
</tm-form-item>
<tm-form-item name="isDrive" label="是否可驾驶车辆" direction="horizontal" labelWidth="500">
<tm-form-item name="isDrive" label="是否有驾驶车辆" direction="horizontal" labelWidth="500">
<tm-switch v-model="form.isDrive" />
</tm-form-item>
<tm-button class="mt-4" form-type="submit" block>提 交</tm-button>
@@ -35,7 +35,7 @@
:key="v.id"
@click="onSelectSku(v)"
>
{{ (v.skuName || "") + " / " + (v.skuWeight || "") + "克" }}
{{ v.skuName || "未知" }}
</view>
</view>
</view>
+19 -5
View File
@@ -1,6 +1,18 @@
<template>
<crud-layout mainIsScroll bg="/static/page/blue-bg.png">
<image :src="filePath(goodsDetail.coverImage)" class="w-full h-500rpx bg-#eeeeee" mode="aspectFill" />
<swiper
class="w-full h-500rpx"
circular
:indicator-dots="true"
indicator-active-color="#0779FD"
indicator-color="#ffffff"
:autoplay="true"
>
<swiper-item v-for="(v, i) in goodsDetail.carouselImages?.split(',')" :key="i">
<image class="w-full h-full" :src="filePath(v)" mode="aspectFill" />
</swiper-item>
</swiper>
<view v-if="goodsDetail.id" class="card p-20rpx mt-10rpx mx-20rpx bg-gradient-to-b from-#0094ff33 to-#fff">
<view v-if="goodsDetail.priceType == '2'" class="w-full flex justify-between items-center">
<view class="flex items-center">
@@ -42,16 +54,15 @@
<view class="bg-#1879ff09 rounded-1 my-2 p-3" v-for="(item, index) in goodsDetail.skuList" :key="index">
<view class="sub-text-30">{{ item.skuName }}</view>
<view class="second-text-28 mt-1 flex justify-between items-center">
<text>售价 {{ displayPrice(item.price) }}</text>
<text>重量 {{ item.weightG }}克</text>
<text>¥{{ displayPrice(item.price) }}</text>
<text>库存 {{ item.stock }}</text>
</view>
</view>
</view>
<view class="mt-20rpx card p-20rpx mx-20rpx">
<view class="prefix_title">商品描述</view>
<view class="mt-20rpx overflow-auto text-26rpx!" v-html="goodsDetail.description"></view>
<view class="prefix_title">详情</view>
<view class="w-full mt-20rpx overflow-hidden text-26rpx!" v-html="description"></view>
</view>
<view class="h-30rpx" />
@@ -86,6 +97,9 @@ const state = reactive<any>({
showCartDialog: false,
})
const goodsDetail = computed(() => state.goodsDetail)
const description = computed(() => {
return goodsDetail.value.description?.replaceAll(`<img`, `<img style="width: 100%;"`)
})
onLoad(async (option: any) => {
const { id, mchId } = option