经营品牌: 强力巨彩 海佳彩亮 飞利浦 利亚德 创维 京东方 海康威视 仰邦 诺瓦 卡莱特 小鸟羽控
027-89992224
LED显示屏专业解决方案服务商
Professional solution service provider
首页 › 自言自语 › shopxo整体调整记录

shopxo整体调整记录

一、App.vue文件

// 用户中心菜单默认展示模式(0 九宫格, 1 列表)
user_center_nav_show_model_type: 1,

评论 (10 条)

王铭 2024-12-7

二、pages/goods-search/goods-search.vue

搜索页数据展示样式

// 数据展示样式(0图文、1九方格)
data_show_type_value: 0,

王铭 2024-12-7

三、components\goods-list\goods-list.vue

1、小程序列表显示多规格的价格

            // 展示价格字段
            propPriceField: {
                type: String,
                default: 'min_price',
            },

改为

            // 展示价格字段
            propPriceField: {
                type: String,
                default: 'price',
            },

2、搜索列表页显示样式,显示品牌修改

 <!-- 商品主体内容 -->
<view class="cp" :data-index="index" :data-value="item.goods_url" @tap="goods_event">
<image class="goods-img fl radius" :src="item.images" mode="aspectFit"></image>
<view class="base fr">
<view class="multi-text"><text v-if="(item.is_ziying || null) != null" class="ziying">{{$t('fengcheche.selfsale')}}</text>{{ item.title }}</view>

改为

<!-- 商品主体内容 -->
<view class="cp" :data-index="index" :data-value="item.goods_url" @tap="goods_event">
<image class="goods-img fl radius" :src="item.images" mode="aspectFit"></image>
<view class="base fr">
<view class="multi-text"><text style="font-weight: bold;">【{{ item.brand_name }}】</text>  <text style="margin-left:21rpx;">{{ item.model }}</text></view>

默认显示简介,如果显示规格

<view v-if="(item.simple_desc || null) != null" class="cr-grey single-text margin-top-sm text-size-sm">{{ item.simple_desc }}</view>

改为

<view v-if="(item.parameters || null) != null" class="cr-grey single-text margin-top-sm text-size-sm">
<block v-if="(item.parameters.base || null) != null">
<block v-if="item.parameters.base.length > 0">
<block v-for="(item2, index2) in item.parameters.base" :key="index2">
<text class="margin-right">{{item2.name}}:{{item2.value}}</text>
</block>
</block>
</block>
</view>

王铭 2024-12-7

四、后端文件app\plugins\label\service\LabelGoodsService.php

1、//获取数据,增加一行代码,调整好内容如下:

// 获取数据
$data = Db::name('PluginsLabelGoods')->alias('pg')->join('plugins_label pl', 'pg.label_id=pl.id')->join('goods g', 'g.id=pg.goods_id')->where($where)->field($field)->limit($m, $n)->order($order_by)->select()->toArray();
        $params['is_spec'] = 1;
        $params['is_cart'] = 1;
        $params['is_params'] = 1;

2、//参数判断,’field’修改

'field'     => 'g.id,g.title,g.simple_desc,g.images,g.price,g.min_price,g.max_price,g.sales_count,g.inventory,g.inventory_unit,g.is_exist_many_spec,g.brand_id,g.model',

王铭 2024-12-30

1、位置:\pages\plugins\label\detail\detail.vue

// 数据展示样式(0图文、1九方格)
                data_show_type_value: 0,

2、登际FTP后台,app\plugins\label\service\LabelGoodsService.php
将原代码

$params['is_cart'] = 1;

下加一行,即可显示商品点间距等参数。

$params['is_params'] = 1;

王铭 2025-11-13

text-decoration: underline; text-decoration-color: blue; text-underline-offset:4px;

text-decoration: underline – 添加下划线
text-decoration-color: blue – 下划线颜色为蓝色
text-underline-offset:4px – 下划线距离文本4像素

王铭 2025-11-13

修改方法:修改\pages\goods-search\goods-search.vue文件的271行的height的值为auto:

map_fields_list: {
brand_list: {
height: "auto",
default: "96rpx",
form_key: "brand_ids"
},

王铭 2025-11-13

\components\goods-list\goods-list.vue文件中,找到之前修改的显示品牌的地方,将
<text style="font-weight: bold;">
改为
<text style="font-weight:bold;"  :data-value="'/pages/goods-search/goods-search?brand=' + item.brand_id"  @tap="url_event">

第二步:找到以下代码

<view class="cp" :data-index="index" :data-value="item.goods_url" @tap="goods_event">

剪切掉

 :data-index="index" :data-value="item.goods_url" @tap="goods_event"

分别粘贴到以下四个地方(2026.04.08备注,只改图文部份,不要改九宫格的地方)

<image :data-index="index" :data-value="item.goods_url" @tap="goods_event" class="goods-img fl radius" :class="goods_cover_class" :src="item.images" mode="aspectFill"></image>

<text :data-index="index" :data-value="item.goods_url" @tap="goods_event" style="margin-left:19rpx;">{{ item.model }}</text>

<view :data-index="index" :data-value="item.goods_url" @tap="goods_event" v-if="(item.parameters || null) != null" class="cr-grey single-text margin-top-sm text-size-sm">

<view :data-index="index" :data-value="item.goods_url" @tap="goods_event"  v-if="(item.show_field_price_status || 0) == 1"class="flex-row jc-sb align-c margin-top-main pr">

王铭 2025-11-13

接楼上,整体修改后代码如下:

<!-- 商品主体内容 -->
                            <view class="cp">
                                <image :data-index="index" :data-value="item.goods_url" @tap="goods_event" class="goods-img fl radius" :class="goods_cover_class" :src="item.images" mode="aspectFill"></image>
                                <view class="base fr">
                                    <view class="multi-text"><text style="font-weight:bold;"  :data-value="'/pages/goods-search/goods-search?brand=' + item.brand_id"  @tap="url_event">【{{ item.brand_name }}】</text>  <text :data-index="index" :data-value="item.goods_url" @tap="goods_event" style="margin-left:19rpx;">{{ item.model }}</text></view>
                                    <view :data-index="index" :data-value="item.goods_url" @tap="goods_event" v-if="(item.parameters || null) != null" class="cr-grey single-text margin-top-sm text-size-sm">
                                    <block v-if="(item.parameters.base || null) != null">
                                    <block v-if="item.parameters.base.length > 0">
                                    <block v-for="(item2, index2) in item.parameters.base" :key="index2">
                                    <text class="margin-right">{{item2.name}}:{{item2.value}}</text>
                                    </block>
                                    </block>
                                    </block>
                                    </view>
                                    <view :data-index="index" :data-value="item.goods_url" @tap="goods_event"  v-if="(item.show_field_price_status || 0) == 1"class="flex-row jc-sb align-c margin-top-main pr">
                                        <block v-if="(propPriceField || null) != null && item[propPriceField] != undefined">
                                            <view class="base-bottom">
                                                <text v-if="propIsShowPriceIcon && (item.price_icon || null) != null" class="bg-red br-red cr-white text-size-xs padding-left-sm padding-right-sm round va-m margin-right-xs">{{ item.price_icon }}</text>
                                                <text class="sales-price va-m text-size-xs va-m">{{ item.show_price_symbol }}</text>
                                                <text class="sales-price va-m">{{ item[propPriceField] }}</text>
                                                <text class="cr-grey text-size-xs va-m">{{ item.show_price_unit }}</text>
                                            </view>
                                        </block>
                                        <block v-if="(item.is_error || 0) == 0 && is_show_cart">
                                            <view v-if="propOpenCart" class="bg-white right-cart-icon pr" :data-index="index" @tap.stop="goods_cart_event">
                                                <iconfont name="icon-add-solid" size="48rpx" :color="theme_color"></iconfont>
                                                <view class="cart-badge-icon pa">
                                                    <component-badge :propNumber="item.user_cart_count || 0"></component-badge>
                                                </view>
                                            </view>
                                        </block>
                                    </view>
                                </view>
                            </view>
                            <!-- 标签插件 -->

王铭 2025-11-13

修改\pages\goods-search\goods-search.vue文件

大约在77行,

<view v-if="(search_map_info.brand || null) != null && (params.brand || null) != null" class="map-content brand-info oh margin-top-lg">

删除brand-info

大约在82行,

 <view v-if="(search_map_info.brand.describe || null) != null" class="info-desc multi-text cr-grey">{{search_map_info.brand.describe}}</view>

删除multi-text

王铭 2025-11-14

修改\pages\goods-search\goods-search.vue文件
品牌显示,安卓系统,图标不居中

把class=”fl”改为class=”wh-auto”

把改为

附件:小调整文档v6.7.13.docx (270.5 KB)

网站首页
网站首页
案例展示
案例展示
在线客服
在线客服
一键拨号
一键拨号
返回顶部