zhaojs
2023-04-27 582f536845628ffb8132aaed1885ee535fcf08ad
pages/index/index.vue
@@ -13,7 +13,7 @@
            </view>
         </view>
      </view>
      <view style='background: rgb(207, 2, 5);color: white;padding: 4px 0; text-align: center;font-size: 14px;'>
<!--       <view style='background: rgb(207, 2, 5);color: white;padding: 4px 0; text-align: center;font-size: 14px;'>
         <view class="">
            三步查券&nbsp;&nbsp;
            <text class="numCircle">1</text>&nbsp;
@@ -23,7 +23,8 @@
            <text class="numCircle">3</text>&nbsp;
            粘贴搜索
         </view>
      </view>
      </view> -->
      <!--头部导航-->
      <view style='background: rgb(207, 2, 5);'>
         <scroll-view id="tab-bar" class="navbarstyle" scroll-x="true" show-scrollbar="false" enable-flex='true'
            :scroll-into-view="'id'+scrollInto">
@@ -33,10 +34,10 @@
            </text>
         </scroll-view>
      </view>
      <swiper class="swiperall" :current="Cur" @change="switchTab">
         <swiper-item class="swiper-item" v-for="(item,index) in lists" :key="'key'+item.cid">
            <scroll-view class="scroll-v list" lower-threshold='100' enable-back-to-top="true" scroll-y='true'
            <scroll-view style="margin: 0px 8px 0px 8px; width: auto;" class="scroll-v list" lower-threshold='100' enable-back-to-top="true" scroll-y='true'
               @scrolltolower="loadMore()" enable-flex='true' @scroll="scroll" :scroll-top="scrollTop">
               <view class="speed" v-if="index==0">
                  <view v-for="(item2,index) in moduleList1" class="speendItem" style="margin-bottom: 14px;"
@@ -46,7 +47,7 @@
                  </view>
               </view>
               <view class="topCard" v-if="index==0" :key="'ss'+item.id">
                  <view class="topSignalCard" @click="gotogoodDetail(2,item.goodsId)">
                  <view style="margin-right: 6px;" class="topSignalCard" @click="gotogoodDetail(2,item.goodsId)">
                     <view class="firstLine">
                        <view>全网热销榜</view>
                        <view class="firstLine_img">
@@ -105,7 +106,7 @@
                  </view>
               </view>
               <view style="text-align: center;" v-if="index==0">
               <view style="text-align: center; margin: 8px;" v-if="index==0">
                  好货推荐
               </view>
@@ -123,16 +124,16 @@
                     <view class="cardImg">
                        <image style="width: 100%;height: 100%;" :src='item?.mainPic' alt="" />
                     </view>
                     <view style="display: flex;background-color: white;margin-left: 12px;">
                     <view style="display: flex;background-color: white;">
                        <view style="padding-top: 2px;margin-left: 6px;">
                           <img style="width:16px;height: 16px;"
                              :src="item.shopType==0?'https://img.alicdn.com/imgextra/i4/751308485/O1CN01ppfg8j2CYBRpPtb51_!!751308485.png':'https://img.alicdn.com/imgextra/i4/751308485/O1CN01mKVp3U2CYBRzeHVcG_!!751308485.png'"
                              alt="">
                        </view>
                        <view class="cardTitle">
                           {{item?.dtitle}}
                           {{item?.dtitle.length>24?item?.dtitle.slice(0,24)+'...':item?.dtitle}}
                        </view>
                     </view>
                     <text class="cardDetail">
                        <text v-if="item?.couponPrice" style="font-size:24rpx ;color: gray;">券后</text>
@@ -140,7 +141,7 @@
                        <text
                           style="text-decoration: line-through; color: gray;margin-left: 6rpx;font-size: 24rpx;">原价:{{mathf.add(Number(item?.actualPrice),Number(item?.couponPrice))}}</text>
                     </text>
                     <view style="background-color: white; margin-left: 12px;padding-left: 12rpx;">
                     <view style="background-color: white;padding-left: 12rpx;">
                        <view class="topcard_coupon">
                           <view>
                              <text
@@ -326,7 +327,7 @@
            // debugger
            let me = this
            uni.request({
               url: 'https://h.ushopvip.com/api/TkProduct/GetExplosiveGoodsList',
               url: '/api/TkProduct/GetExplosiveGoodsList',
               method: 'POST',
               data: {
                  pageNo: 1,
@@ -348,7 +349,7 @@
            // debugger
            let me = this
            uni.request({
               url: 'https://h.ushopvip.com/api/TkProduct/GetRankingGoodsList',
               url: '/api/TkProduct/GetRankingGoodsList',
               method: 'POST',
               data: {
                  pageNo: 1,
@@ -375,7 +376,7 @@
            }
            me.currentGoodsPage = cur
            uni.request({
               url: 'https://h.ushopvip.com/api/TkProduct/GetCategoryProductList',
               url: '/api/TkProduct/GetCategoryProductList',
               method: 'POST',
               data: {
                  PageNo: cur,
@@ -412,7 +413,7 @@
            let me = this
            uni.request({
               // header:{'Access-Control-Allow-Originle':'*'},
               url: 'https://h.ushopvip.com/api/TkProduct/GetSuperCategory',
               url: '/api/TkProduct/GetSuperCategory',
               method: 'POST',
               // data: {},
               success(res) {
@@ -436,7 +437,7 @@
            me.currentGoodsPage = cur
            uni.request({
               // header:{'Access-Control-Allow-Originle':'*'},
               url: 'https://h.ushopvip.com/api/TkProduct/GetRecommendGoodsList',
               url: '/api/TkProduct/GetRecommendGoodsList',
               method: 'POST',
               data: {
                  pageNo: cur,
@@ -614,14 +615,14 @@
      /* flex-direction: row; */
      /* color: #4169e1; */
      font-size: 14px;
      background-color: rgb(247, 247, 247);
      border-radius: 20px 20px 0 0;
      color: #fff;
      width: 100%;
      height: 97rpx;
      /* flex-direction: row; */
      white-space: nowrap;
   }
   .textlight {
      /* color: palevioletred; */
      border-bottom: 2px solid palevioletred;
@@ -663,7 +664,7 @@
   .topCard {
      display: flex;
      justify-content: space-between;
      padding: 12px 0;
      padding-top: 8px;
   }
   .firstLine {
@@ -761,10 +762,11 @@
      /* flex-direction: row; */
      /* justify-content: space-between; */
      padding: 4px 6px 0 6px;
      margin: 0 0 0 12px;
      width: 100%;
      height: 280rpx;
      background-color: #FFF;
      border-radius: 6px;
   }
   .speendItem {
@@ -775,6 +777,7 @@
      display: flex;
      flex-direction: column;
      align-items: center;
   }
   .speed {
@@ -787,6 +790,8 @@
      flex-direction: row;
      flex-wrap: wrap;
      height: auto;
      background: #fff;
      border-radius: 6px;
   }
   .indexContent {
@@ -880,6 +885,8 @@
      flex-wrap: wrap;
      background-color: #f5f5f5;
      padding-bottom: 20px;
      -webkit-justify-content: space-between;
      justify-content: space-between;
      /*       column-count: 2;
      column-gap: 2px; */
   }
@@ -887,12 +894,14 @@
   .card {
      display: flex;
      flex-direction: column;
      width: 50%;
      width: 49%;
      margin-bottom: 8px;
      /* background-color: white; */
   }
   .cardImg {
      padding: 12px 0 0 12px;
      height: 196px;
   }
@@ -902,9 +911,10 @@
      font-size: 14px;
      overflow: hidden;
      padding-left: 4px;
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow: hidden;
      /* text-overflow: ellipsis; */
      /* white-space: nowrap; */
      /* overflow: hidden; */
      height: 38px;
      /* display: flex; */
   }
@@ -924,7 +934,6 @@
   .cardDetail {
      background-color: white;
      margin-left: 12px;
      font-size: 30rpx;
      color: #eb0000;
      padding-left: 12rpx;
@@ -933,7 +942,7 @@
   .cardCount {
      color: gray;
      background-color: white;
      margin-left: 12px;
      font-size: 24rpx;
      padding-left: 12rpx;
   }