绿满眶商城微信小程序-uniapp
peng
2025-06-25 18f835d43008233b139f1f766ec87c6ed0bb1fee
update 解决图片显示问题
7个文件已修改
127 ■■■■■ 已修改文件
api/order.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/m-buy/goods.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/commodity-square/commoditySquare.vue 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/fillorder.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/myOrder.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/product/goods.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/tabbar/cart/cartList.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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,
  });
}
/**
 * 获取订单详情
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">
                        <!-- 有活动商品价格 -->
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
                //     }
                // })
                //计算两个数组的长度 用于解决瀑布流两边高度不一致问题
                //平分给两个数组
                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>
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"
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";
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",
pages/tabbar/cart/cartList.vue
@@ -68,6 +68,11 @@
                </u-checkbox-group>
                <span class="invalid" v-else style="font-size: 24rpx">失效</span>
              </view>
<!--               <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>