深度合作品牌: 强力巨彩 海佳彩亮 仰邦 利亚德 创维 京东方 海康威视
400-027-0096
LED显示屏专业解决方案服务商
Professional solution service provider

shopxo整体调整记录

 火... [复制链接]
王铭 发表于 2024-12-7 15:09:44 | 显示全部楼层 |阅读模式
一、App.vue文件
  1. // 用户中心菜单默认展示模式(0 九宫格, 1 列表)
  2. user_center_nav_show_model_type: 1,
复制代码



相关帖子

 楼主| 王铭 发表于 2024-12-7 15:13:47 | 显示全部楼层
二、pages/goods-search/goods-search.vue

搜索页数据展示样式

  1. // 数据展示样式(0图文、1九方格)
  2. data_show_type_value: 0,
复制代码


 楼主| 王铭 发表于 2024-12-7 15:34:20 | 显示全部楼层
三、components\goods-list\goods-list.vue

1、小程序列表显示多规格的价格
  1.             // 展示价格字段
  2.             propPriceField: {
  3.                 type: String,
  4.                 default: 'min_price',
  5.             },
复制代码
改为
  1.             // 展示价格字段
  2.             propPriceField: {
  3.                 type: String,
  4.                 default: 'price',
  5.             },
复制代码

2、搜索列表页显示样式,显示品牌修改
  1. <!-- 商品主体内容 -->
  2. <view class="cp" :data-index="index" :data-value="item.goods_url" @tap="goods_event">
  3. <image class="goods-img fl radius" :src="item.images" mode="aspectFit"></image>
  4. <view class="base fr">
  5. <view class="multi-text"><text v-if="(item.is_ziying || null) != null" class="ziying">{{$t('fengcheche.selfsale')}}</text>{{ item.title }}</view>
复制代码
改为
  1. <!-- 商品主体内容 -->
  2. <view class="cp" :data-index="index" :data-value="item.goods_url" @tap="goods_event">
  3. <image class="goods-img fl radius" :src="item.images" mode="aspectFit"></image>
  4. <view class="base fr">
  5. <view class="multi-text"><text style="font-weight: bold;">【{{ item.brand_name }}】</text>  <text style="margin-left:21rpx;">{{ item.model }}</text></view>
复制代码

默认显示简介,如果显示规格
  1. <view v-if="(item.simple_desc || null) != null" class="cr-grey single-text margin-top-sm text-size-sm">{{ item.simple_desc }}</view>
复制代码
改为
  1. <view v-if="(item.parameters || null) != null" class="cr-grey single-text margin-top-sm text-size-sm">
  2. <block v-if="(item.parameters.base || null) != null">
  3. <block v-if="item.parameters.base.length > 0">
  4. <block v-for="(item2, index2) in item.parameters.base" :key="index2">
  5. <text class="margin-right">{{item2.name}}:{{item2.value}}</text>
  6. </block>
  7. </block>
  8. </block>
  9. </view>
复制代码



 楼主| 王铭 发表于 2024-12-7 15:50:30 | 显示全部楼层

标签插件改调用品牌+型号+参数

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

1、//获取数据,增加一行代码,调整好内容如下:
  1. // 获取数据
  2. $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();
  3.         $params['is_spec'] = 1;
  4.         $params['is_cart'] = 1;
  5.         $params['is_params'] = 1;
复制代码

2、//参数判断,'field'修改
  1. '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 12:37:20 | 显示全部楼层

五、标签插件列表,默认图文显示修改

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

  1. // 数据展示样式(0图文、1九方格)
  2.                 data_show_type_value: 0,
复制代码


2、登际FTP后台,app\plugins\label\service\LabelGoodsService.php
将原代码
  1. $params['is_params'] = 1;
复制代码
改为
  1. return [
  2.             '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',
  3.             'where'     => $where,
  4.             'order_by'  => $order_by,
复制代码


 楼主| 王铭 发表于 2025-11-13 09:54:43 | 显示全部楼层

给文字加下划线

  1. 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 10:05:20 | 显示全部楼层

品牌默认全部展示

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

  1. map_fields_list: {
  2. brand_list: {
  3. height: "auto",
  4. default: "96rpx",
  5. form_key: "brand_ids"
  6. },
复制代码




 楼主| 王铭 发表于 2025-11-13 12:23:25 | 显示全部楼层

点击商品列表中的品牌名字,可以跳转到对应的品牌商品列表去

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

第二步:找到以下代码
  1. <view class="cp" :data-index="index" :data-value="item.goods_url" @tap="goods_event">
复制代码
剪切掉
  1. :data-index="index" :data-value="item.goods_url" @tap="goods_event"
复制代码

分别粘贴到以下四个地方
  1. <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>
复制代码


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

  1. <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">
复制代码

  1. <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 12:30:56 | 显示全部楼层
接楼上,整体修改后代码如下:

  1. <!-- 商品主体内容 -->
  2.                             <view class="cp">
  3.                                 <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>
  4.                                 <view class="base fr">
  5.                                     <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>
  6.                                     <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">
  7.                                     <block v-if="(item.parameters.base || null) != null">
  8.                                     <block v-if="item.parameters.base.length > 0">
  9.                                     <block v-for="(item2, index2) in item.parameters.base" :key="index2">
  10.                                     <text class="margin-right">{{item2.name}}:{{item2.value}}</text>
  11.                                     </block>
  12.                                     </block>
  13.                                     </block>
  14.                                     </view>
  15.                                     <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">
  16.                                         <block v-if="(propPriceField || null) != null && item[propPriceField] != undefined">
  17.                                             <view class="base-bottom">
  18.                                                 <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>
  19.                                                 <text class="sales-price va-m text-size-xs va-m">{{ item.show_price_symbol }}</text>
  20.                                                 <text class="sales-price va-m">{{ item[propPriceField] }}</text>
  21.                                                 <text class="cr-grey text-size-xs va-m">{{ item.show_price_unit }}</text>
  22.                                             </view>
  23.                                         </block>
  24.                                         <block v-if="(item.is_error || 0) == 0 && is_show_cart">
  25.                                             <view v-if="propOpenCart" class="bg-white right-cart-icon pr" :data-index="index" @tap.stop="goods_cart_event">
  26.                                                 <iconfont name="icon-add-solid" size="48rpx" :color="theme_color"></iconfont>
  27.                                                 <view class="cart-badge-icon pa">
  28.                                                     <component-badge :propNumber="item.user_cart_count || 0"></component-badge>
  29.                                                 </view>
  30.                                             </view>
  31.                                         </block>
  32.                                     </view>
  33.                                 </view>
  34.                             </view>
  35.                             <!-- 标签插件 -->
复制代码


 楼主| 王铭 发表于 2025-11-13 17:07:07 | 显示全部楼层

左侧品牌展示时,文字可以全部展示


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

大约在77行,
  1. <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行,
  1. <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
您需要登录后才可以回帖 登录 | 注册 手机动态码快速登录

本版积分规则

返回顶部