jiangping
2023-09-21 df698fb979db6f1d571f548f40744a19e8c21ac2
h5/pages/index/index.vue
@@ -2,8 +2,8 @@
   <view class="box">
      <view class="box_bg" :style="{backgroundImage: 'url(' + Config.resourcePath + Config.bgImg + ')'}"></view>
      <view class="box_user">
         <text>欢迎{{User.username}}登录</text>
         <view class="box_user_btn" @click="loginOut">退出登录</view>
         <text>{{User.username}}</text>
         <image src="@/static/ic_logout@2x.png" mode="widthFix" @click="loginOut"></image>
      </view>
      <view class="box_content" :style="{maxWidth: Config.rangeSize + 'px', minWidth: Config.rangeSize + 'px'}">
         <!-- 广告图 -->
@@ -198,16 +198,19 @@
                  </view>
               </view>
               <view class="productPage_shop" v-if="status === 1 && !pkcontent">
                  <view class="productPage_shop_item" v-for="(item, index) in isSOU ? shopPageDataSou : shopPageData" :key="index" @click="clickshoppageItem(item)">
                     <view class="productPage_shop_item_img">
                        <image :src="item.imgurl ? item.prefixUrl + item.imgurl : ''" mode="widthFix"></image>
                  <noData v-if="shopPageData.length === 0 && shopPageDataSou.length === 0" />
                  <template v-else>
                     <view class="productPage_shop_item" v-for="(item, index) in isSOU ? shopPageDataSou : shopPageData" :key="index" @click="clickshoppageItem(item)">
                        <view class="productPage_shop_item_img">
                           <image :src="item.imgurl ? item.prefixUrl + item.imgurl : ''" mode="widthFix"></image>
                        </view>
                        <!-- stringOperations(item.name, 6) -->
                        <text>{{item.name}}</text>
                     </view>
                     <!-- stringOperations(item.name, 6) -->
                     <text>{{item.name}}</text>
                  </view>
                  <view class="productPage_shop_zw"></view>
                  <view class="productPage_shop_zw"></view>
                  <view class="productPage_shop_zw"></view>
                     <view class="productPage_shop_zw"></view>
                     <view class="productPage_shop_zw"></view>
                     <view class="productPage_shop_zw"></view>
                  </template>
               </view>
                <!-- v-if="status === 2" -->
               <view class="productPage_parameter" v-if="isPK && pkcontent">
@@ -231,7 +234,7 @@
                              <view class="label">{{child.name}}:</view>
                              <view class="value">{{child.val}}</view>
                           </view>
                           <view v-if="item.param2" class="paramline"></view>
                           <view v-if="item.param2.length>0" class="paramline"></view>
                           <view class="item" v-if="item.param2" v-for="(child, j) in item.param2" :key="child.index">
                              <view class="label">{{child.name}}:</view>
                              <view class="value">{{child.val}}</view>
@@ -242,12 +245,6 @@
               </view>
            </view>
         </template>
         <!-- 查看大图 -->
         <bigImg
            ref="bigImg"
            :imgList="imgList"/>
         <!-- 搜索 -->
         
         <!-- 搜索组件 -->
         <search
@@ -263,8 +260,8 @@
</template>
<script>
   import bigImg from '@/components/bigImg.vue'
   import search from '@/components/search.vue'
   import noData from '@/components/noData.vue'
   import { mapState } from 'vuex'
   import { categoryList, goodsList, brandList, h5Image, goodsPage, listForH5 } from '@/apis/index.js'
   export default {
@@ -343,7 +340,7 @@
            page: 1
         }
      },
      components: { bigImg, search },
      components: { search, noData },
      onLoad() {
         var that = this
         // 监听键盘组合键
@@ -699,7 +696,12 @@
                  })
               }
            })
            this.$refs.bigImg.open(0)
            // console.log(this.imgList)
            this.$viewerApi({
              images: this.imgList,
            })
            // this.$refs.bigImg.open(0)
            // this.$refs.bigImg1.open(0)
         },
         empty() {
            this.shopList = []
@@ -1096,7 +1098,7 @@
         background-size: 100% 100%;
      }
      .box_user {
         z-index: 99;
         z-index: 9;
         position: fixed;
         top: 30px;
         right: 40px;
@@ -1108,19 +1110,11 @@
            font-weight: 500;
            color: #FFFFFF;
         }
         .box_user_btn {
            width: 80px;
            height: 34px;
            line-height: 34px;
            text-align: center;
            border-radius: 8px;
            border: 2px solid #FFFFFF;
            font-size: 16px;
            font-family: PingFangSC-Regular, PingFang SC;
            font-weight: 400;
            color: #FFFFFF;
            margin-left: 22px;
         image {
            width: 18px;
            height: 18px;
            cursor: pointer;
            margin-left: 10px;
         }
      }
      .box_content {
@@ -1185,7 +1179,7 @@
            margin-top: 16px;
            .commodityFrom_head {
               width: 100%;
               height: 60px;
               height: 45px;
               padding: 10px 8px;
               box-sizing: border-box;
               background: rgba(0,224,255,0.24) linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(0,0,0,0.21) 100%);
@@ -1232,7 +1226,7 @@
                  flex-direction: column;
                  .commodityFrom_body_content_item {
                     width: 100%;
                     height: 56px;
                     height: 45px;
                     display: flex;
                     align-items: center;
                     margin-bottom: 6px;
@@ -1253,7 +1247,7 @@
                        opacity: 0;
                        transform: translate(0%, 0%);
                        z-index: -1;
                        height: 56px;
                        height: 45px;
                        display: flex;
                        align-items: center;
                        background: rgba(0,224,255,0.3);
@@ -1402,7 +1396,7 @@
               }
               .commodityFrom_body_total {
                  width: 100%;
                  height: 56px;
                  height: 45px;
                  display: flex;
                  align-items: center;
                  .commodityFrom_body_total_item {
@@ -1494,7 +1488,6 @@
               }
            }
         }
         .productPage {
            width: 100%;
            padding: 0 22px;
@@ -1502,7 +1495,7 @@
            margin-top: 16px;
            .productPage_head {
               width: 100%;
               height: 60px;
               height: 45px;
               display: flex;
               align-items: center;
               background: rgba(0,224,255,0.34) linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(0,0,0,0.21) 100%);