From 18f835d43008233b139f1f766ec87c6ed0bb1fee Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期三, 25 六月 2025 10:47:18 +0800
Subject: [PATCH] update 解决图片显示问题
---
api/order.js | 12 ++++
pages/order/myOrder.vue | 4
pages/product/goods.vue | 20 +++---
components/m-buy/goods.vue | 2
pages/tabbar/cart/cartList.vue | 7 ++
pages/commodity-square/commoditySquare.vue | 79 +++++++++++++++++---------
pages/order/fillorder.vue | 5 +
7 files changed, 87 insertions(+), 42 deletions(-)
diff --git a/api/order.js b/api/order.js
index a718297..d1cc985 100644
--- a/api/order.js
+++ b/api/order.js
@@ -57,6 +57,18 @@
params,
});
}
+/**
+ * 鑾峰彇璁㈠崟鍒楄〃
+ * @param params
+ */
+export function getOrderXcxList(params) {
+ return http.request({
+ url: "/order/order/xcx",
+ method: Method.GET,
+ needToken: true,
+ params,
+ });
+}
/**
* 鑾峰彇璁㈠崟璇︽儏
diff --git a/components/m-buy/goods.vue b/components/m-buy/goods.vue
index 7217bbb..e3d7c8d 100644
--- a/components/m-buy/goods.vue
+++ b/components/m-buy/goods.vue
@@ -5,7 +5,7 @@
<view class="goods-box bottom">
<view class="goods-header">
<view class="goods-img">
- <u-image width="200rpx" border-radius="20" class="uimage" height="200rpx" :src="selectedSpecImg ? selectedSpecImg : goodsDetail.thumbnail"></u-image>
+ <!-- <u-image width="200rpx" border-radius="20" class="uimage" height="200rpx" :src="selectedSpecImg ? selectedSpecImg : goodsDetail.thumbnail"></u-image> -->
</view>
<view class="goods-skus">
<!-- 鏈夋椿鍔ㄥ晢鍝佷环鏍� -->
diff --git a/pages/commodity-square/commoditySquare.vue b/pages/commodity-square/commoditySquare.vue
index 6226f83..d7c7fad 100644
--- a/pages/commodity-square/commoditySquare.vue
+++ b/pages/commodity-square/commoditySquare.vue
@@ -8,17 +8,17 @@
<view class="left" style="width: 310rpx;">
<view class="commoditySquareItem" v-for="(item,index) in goodsList1"
@click="goToGoodsInfo('goodsList1',item.id)">
- <video :src="item.goodsVideo" v-if="item.goodsVideo " v-show="item.show" :initial-time="0"
+ <!-- <video :src="item.goodsVideo" v-if="item.goodsVideo " v-show="item.show" :initial-time="0"
:controls="false" object-fit="contain" :show-play-btn="false" :show-center-play-btn="false"
@loadedmetadata="getvideoInfo($event,'goodsList1',index)" :ref="'video'+item.id"
- :style="{width:item.width,height:item.height}"></video>
- <image :src="item.thumbnail" v-if="item.goodsVideo ==null || item.goodsVideo == ''"
+ :style="{width:item.width,height:item.height}"></video> -->
+ <image :src="item.thumbnail"
mode="aspectFill" class="goodsImg">
</image>
<view class="goodsInfo">
- <view class="">{{item.goodsName}}</view>
+ <view class="goodsName">{{item.goodsName}}</view>
<view class="priceInfo">
- <view class="">锟{item.price}}</view>
+ <view class="goodsPrice">锟{item.price}}</view>
<view class="">宸插敭: {{item.buyCount}}</view>
</view>
</view>
@@ -27,17 +27,17 @@
<view class="right" style="width: 310rpx;">
<view class="commoditySquareItem" v-for="(item,index) in goodsList2"
@click="goToGoodsInfo('goodsList2',item.id)">
- <video :src="item.goodsVideo" v-if="item.goodsVideo " v-show="item.show" :initial-time="0"
+<!-- <video :src="item.goodsVideo" v-if="item.goodsVideo " v-show="item.show" :initial-time="0"
:controls="false" object-fit="contain" :show-play-btn="false" :show-center-play-btn="false"
@loadedmetadata="getvideoInfo($event,'goodsList2',index)" :ref="'video'+item.id"
- :style="{width:item.width,height:item.height}"></video>
- <image :src="item.thumbnail" v-if="item.goodsVideo ==null || item.goodsVideo == ''"
+ :style="{width:item.width,height:item.height}"></video> -->
+ <image :src="item.thumbnail"
mode="aspectFill" class="goodsImg">
</image>
<view class="goodsInfo">
- <view class="">{{item.goodsName}}</view>
+ <view class="goodsName">{{item.goodsName}}</view>
<view class="priceInfo">
- <view class="">锟{item.price}}</view>
+ <view class="goodsPrice">锟{item.price}}</view>
<view class="">宸插敭: {{item.buyCount}}</view>
</view>
</view>
@@ -96,6 +96,7 @@
pageSize: 12,
pageNumber: 1,
categoryId: null,
+ canFilter:true
},
//鍟嗗搧鍙屽垪鏄剧ず
goodsList1: [],
@@ -165,19 +166,19 @@
},
async getgoodsData() {
const goodsList = await getGoodsList(this.getGoodsParam);
- const sts = await getSTSToken();
- const stsUrl = sts.data.data.endpoint
- // 澶勭悊鏁版嵁
- goodsList.data.result.records.forEach(item => {
- if (item.thumbnail !== '' && item.thumbnail !== null && item.thumbnail.indexOf('http') ===
- -1) {
- item.thumbnail = stsUrl + '/' + item.thumbnail
- }
- if (item.goodsVideo !== '' && item.goodsVideo !== null && item.goodsVideo.indexOf(
- 'http') === -1) {
- item.goodsVideo = stsUrl + '/' + item.goodsVideo
- }
- })
+ // const sts = await getSTSToken();
+ // const stsUrl = sts.data.data.endpoint
+ // // 澶勭悊鏁版嵁
+ // goodsList.data.result.records.forEach(item => {
+ // if (item.thumbnail !== '' && item.thumbnail !== null && item.thumbnail.indexOf('http') ===
+ // -1) {
+ // item.thumbnail = stsUrl + '/' + item.thumbnail
+ // }
+ // if (item.goodsVideo !== '' && item.goodsVideo !== null && item.goodsVideo.indexOf(
+ // 'http') === -1) {
+ // item.goodsVideo = stsUrl + '/' + item.goodsVideo
+ // }
+ // })
//璁$畻涓や釜鏁扮粍鐨勯暱搴� 鐢ㄤ簬瑙e喅鐎戝竷娴佷袱杈归珮搴︿笉涓�鑷撮棶棰�
//骞冲垎缁欎袱涓暟缁�
const goodsSize = goodsList.data.result.records.length;
@@ -317,11 +318,11 @@
flex: 1
}
- .priceInfo {
- margin-top: 10rpx;
- display: flex;
- justify-content: space-around;
- }
+ // .priceInfo {
+ // margin-top: 10rpx;
+ // display: flex;
+ // justify-content: space-around;
+ // }
// 澶勭悊鎶藉眽鍐呭婊氬姩
.scroll-view-box {
@@ -370,4 +371,26 @@
// width: 500rpx;
// z-index: 9999;
}
+ .goodsInfo{
+ margin-top: 10rpx;
+ box-sizing: border-box;
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ }
+ .goodsName{
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ .priceInfo{
+ margin-top: 10rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ }
+ .goodsPrice{
+ color: red;
+ font-weight: bold;
+ }
</style>
\ No newline at end of file
diff --git a/pages/order/fillorder.vue b/pages/order/fillorder.vue
index 251f7e7..7661f62 100644
--- a/pages/order/fillorder.vue
+++ b/pages/order/fillorder.vue
@@ -148,6 +148,11 @@
"
:span="3"
>
+<!-- <video v-if="val.goodsSku.goodsVideo" :src="val.goodsSku.goodsVideo"
+ style="width: 200rpx;height: 200rpx;border-radius: 10rpx;"
+ :initial-time="0"
+ :controls="false" object-fit="contain" :show-play-btn="false" :show-center-play-btn="false"
+ ></video> -->
<u-image
borderRadius="10rpx"
width="200rpx"
diff --git a/pages/order/myOrder.vue b/pages/order/myOrder.vue
index 91e50a5..865a80e 100644
--- a/pages/order/myOrder.vue
+++ b/pages/order/myOrder.vue
@@ -214,7 +214,7 @@
<script>
import '@/components/uview-components/uview-ui';
-import { getOrderList, cancelOrder, confirmReceipt } from "@/api/order.js";
+import { getOrderXcxList, cancelOrder, confirmReceipt } from "@/api/order.js";
import { getClearReason } from "@/api/after-sale.js";
import LiLiWXPay from "@/js_sdk/lili-pay/wx-pay.js";
export default {
@@ -436,7 +436,7 @@
loadData(index) {
this.params.pageNumber = this.navList[index].pageNumber;
// this.params.tag = this.orderStatus[index].orderStatus;
- getOrderList(this.params).then((res) => {
+ getOrderXcxList(this.params).then((res) => {
uni.stopPullDownRefresh();
if (!res.data.success) {
this.navList[index].loadStatus = "noMore";
diff --git a/pages/product/goods.vue b/pages/product/goods.vue
index fa701a1..10b03f2 100644
--- a/pages/product/goods.vue
+++ b/pages/product/goods.vue
@@ -344,21 +344,21 @@
// #endif
navbarListData: [
//瀵艰埅鏍忓垪琛ㄦ爮鏁版嵁
- {
- title: "棣栭〉",
- icon: "home-fill",
- ___type: "other",
- },
+ // {
+ // title: "棣栭〉",
+ // icon: "home-fill",
+ // ___type: "other",
+ // },
{
title: "璐墿杞�",
icon: "bag-fill",
___type: "other",
},
- {
- title: "鎼滅储",
- icon: "search",
- ___type: "category",
- },
+ // {
+ // title: "鎼滅储",
+ // icon: "search",
+ // ___type: "category",
+ // },
{
title: "涓汉涓績",
icon: "account-fill",
diff --git a/pages/tabbar/cart/cartList.vue b/pages/tabbar/cart/cartList.vue
index d15dfdc..c6e1e61 100644
--- a/pages/tabbar/cart/cartList.vue
+++ b/pages/tabbar/cart/cartList.vue
@@ -68,7 +68,12 @@
</u-checkbox-group>
<span class="invalid" v-else style="font-size: 24rpx">澶辨晥</span>
</view>
- <u-image border-radius="10" :fade="true" @click="navigateToGoods(skuItem)" width="160rpx" height="160rpx"
+<!-- <video border-radius="10" :fade="true" @click="navigateToGoods(skuItem)"
+ v-if="skuItem.goodsSku.goodsVideo" :src="skuItem.goodsSku.goodsVideo"
+ style="width: 160rpx;height: 160rpx;"
+ :initial-time="0"
+ :controls="false" object-fit="contain" :show-play-btn="false" :show-center-play-btn="false"/> -->
+ <u-image border-radius="10" :fade="true" @click="navigateToGoods(skuItem)" width="160rpx" height="160rpx"
:src="skuItem.goodsSku.thumbnail" />
</view>
<view class="goods-content">
--
Gitblit v1.8.0