zhao_js
2023-11-15 b44e169dd8a6e0f15d3788970176922e96aec6e1
uniapp/components/sh_page/indexCont.vue
@@ -16,19 +16,20 @@
            </view>
            <view class="pageBody-container colCen borderBox">
               <view class="column-container">
                  <view class="bannerSwiper-container colCenCen borderBox" v-if="topBannerList.length>0">
                     <swiper class="swiper-box" :current="swpidx
                  " @change="changeColor" :autoplay="true" :interval="3000" :duration="500" :indicator-dots="true"
                        :indicator-active-color="'#fff'" circular>
                        <swiper-item v-for="(items,index) in topBannerList" :key='index'>
                           <view class="swiper-item defIcon" @click="goUrl(items)">
                              <image :src="items.image" mode="aspectFit"></image>
                           </view>
                        </swiper-item>
                     </swiper>
                  </view>
               <view class="bannerSwiper-container colCenCen borderBox" v-if="topBannerList.length>0">
                  <swiper class="swiper-box" :current="swpidx
               " @change="changeColor" :autoplay="true" :interval="3000" :duration="500" :indicator-dots="true"
                     :indicator-active-color="'#fff'" circular>
                     <swiper-item v-for="(items,index) in topBannerList" :key='index'>
                        <view class="swiper-item defIcon" @click="goUrl(items)">
                           <image :src="items.image" mode="aspectFit"></image>
                        </view>
                     </swiper-item>
                  </swiper>
               </view>
                  
                  <!-- 金刚区 -->
                  <view class="navslider-box" v-if="navbarShowList.length > 0">
@@ -58,11 +59,11 @@
                     </swiper>
                  </view> -->
                  <!--快捷入口图标-->
               <!--    <view class="c-loading-img rowCenCen">
                  <view class="c-loading-img rowCenCen">
                     <view class="imgbox defIcon" v-for="(eitem,index) in fastenter" :key="index" @click="goUrl(eitem)">
                        <image :src="eitem.image"></image>
                     </view>
                  </view> -->
                  </view>
                  <!--左轮播,右两行-->
                  <view class="centerflex f_contant">
                     <view class="f_centerSwiper-container swiper-box swiper-item f_left">
@@ -107,266 +108,6 @@
                     </swiper-item>
                  </swiper>
               </view>
               <!--全网热销-->
               <!-- <view class="van-row">
                  <view class="van-col van-col--12" style="padding-right: 10rpx;">
                     <view class="home-row" @click="gorxb()">
                        <view class="title"><text class="name">全网热销榜</text>
                           <view class="tag">
                              <image
                                 src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAOCAYAAAAmL5yKAAAAAXNSR0IArs4c6QAAASJJREFUOE+V08suBFEQxvHfGZcFVgQrli6ReBEh8RJsWHgSCzY8hsSLSMRlZ6xIWBkLl2mpntPSaY1MJ93pc6rqX199JydpPAWdRL9gCyc5vJs4q2L1ktQExLpgDBdYyfFrrCfem/mpIKWypvxU3SfwiMlc0MN8olfPj1ipoGA8L97yug0wl3jN8bIuGoeCTRxiBHuJ84IpPCBA8UThbADqPpRqCrpYyIm3WDVQ9NQGaCoOQH8whQ5i1pkMe24AwoOXgg0c4xMHFaDyI6RO/wIIcHh0haWccx+A6B5vGPMXoALHaHE6obz0YFhANVp59MOM0BytFVA3sZIajdr2vwF3WMym3GAt/19i+Z/9boywjSOMYicuTT7rH5eptn+KD+x/Adlpb2CRJ4eqAAAAAElFTkSuQmCC">
                              </image>
                              <text>实时好货</text>
                           </view>
                        </view>
                        <view class="g-row">
                           <view v-for="(items,index) in rqList.fqbGoods" :key='index'>
                              <view class="pic"><text class="num">{{index+1}}</text>
                                 <view class="van-image">
                                    <image class="van-image__img" :src="items.mainPic">
                                    </image>
                                 </view>
                              </view>
                              <view class="time">2小时抢{{items.twoHoursSales}}</view>
                              <view class="my">¥{{items.actualPrice}}</view>
                           </view>
                        </view>
                     </view>
                  </view>
                  <view class="van-col van-col--12" style="padding-left: 6rpx;">
                     <view class="home-row two" @click="goddq()">
                        <view class="title"><text class="name">限时秒杀</text>
                           <view class="tagg" style="opacity: 1;">
                              <text class="ddq" style="white-space: nowrap;">{{rqList.ddqTime}} 点场 </text>
                              <view class="van-count-down">疯抢中</view>
                           </view>
                        </view>
                        <view class="g-row">
                           <view v-for="(items,index) in rqList.ddqGoods" :key='index'>
                              <view class="pic">
                                 <view class="van-image">
                                    <image :src="items.mainPic" alt="" class="van-image__img"></image>
                                 </view>
                              </view>
                              <view class="time" style="opacity: 1;">
                                 {{items.specialText[0] ? items.specialText[0]:'已抢'+items.monthSales+'件' }}
                              </view>
                              <view class="my">¥{{items.actualPrice}}</view>
                           </view>
                        </view>
                     </view>
                  </view>
               </view> -->
               <!-- 大家都在买 -->
               <!-- <view class="everysBuying-container colCen" v-if="zdmList.length>0">
                  <view class="box-bar-content rowCen">
                     <view class="title-text">
                        每日必买
                     </view>
                     <view class="tips-txt rowCenCen">
                        <view>精选爆款</view>
                     </view>
                  </view>
                  <view class="goodsScroll-container rowCen">
                     <scroll-view class="scrollgoods-box" scroll-x scroll-with-animation>
                        <view class="scrollList-content">
                           <view class="goods-items" v-for="(items,index) in zdmList" :key="index"
                              @tap="goDetails(items)">
                              <view class="items-container colCen">
                                 <view class="image-content defIcon">
                                    <image :src="items.mainPic" mode="aspectFill" :lazy-load="true"></image>
                                 </view>
                                 <view class="goodsinfo-content colCen borderBox">
                                    <view class="goodsName-box">
                                       {{items.dtitle}}
                                    </view>
                                    <view class="coupons-container rowCen">
                                       <view class="couponbac-content rowCen">
                                          <view class="textsTip">
                                             爆款
                                          </view>
                                          <view class="coupons-value">
                                             {{items.couponPrice}}元券
                                          </view>
                                       </view>
                                    </view>
                                    <view class="price-info-container rowEnd">
                                       <view class="nowPrice-content rowEnd">
                                          <view class="rmbicon">
                                             ¥
                                          </view>
                                          <view class="nowprice">
                                             {{items.actualPrice}}
                                          </view>
                                       </view>
                                       <view class="oldPrice-content rowEnd">
                                          <view class="oldprice">
                                             ¥{{items.originalPrice}}
                                          </view>
                                       </view>
                                    </view>
                                 </view>
                              </view>
                           </view>
                        </view>
                     </scroll-view>
                  </view>
               </view> -->
               <!-- <view class="goodsFalling-container colCen" v-if="fallingList.length>0">
                  <view class="box-bar-content rowCen">
                     <view class="title-text">
                        好货直降
                     </view>
                     <view class="tips-txt rowCenCen">
                        <view>低过聚划算.省过淘抢购</view>
                     </view>
                  </view>
                  <view class="goodsScroll-container rowCen">
                     <scroll-view class="scrollgoods-box" scroll-x scroll-with-animation>
                        <view class="scrollList-content">
                           <view class="goods-items" v-for="(items,index) in fallingList" :key="index"
                              @tap="goDetails(items,true)">
                              <view class="items-container colCen">
                                 <view class="image-content defIcon">
                                    <image style="border-radius: 8rpx;" :src="items.mainPic"
                                       mode="aspectFill" :lazy-load="true"></image>
                                    <view class="spec-box rowCenCen" v-if="items.specialText.length>0">
                                       <view>{{items.specialText[0]}}</view>
                                    </view>
                                 </view>
                                 <view class="goodsinfo-content colCen borderBox">
                                    <view class="goodsName-box">
                                       {{items.dtitle}}
                                    </view>
                                    <view class="price-info-container rowEnd">
                                       <view class="nowPrice-content rowEnd">
                                          <view class="rmbicon">
                                             ¥
                                          </view>
                                          <view class="nowprice">
                                             {{items.actualPrice}}
                                          </view>
                                       </view>
                                       <view class="oldPrice-content rowEnd">
                                          <view class="oldprice">
                                             ¥{{items.originalPrice}}
                                          </view>
                                       </view>
                                    </view>
                                    <view class="saleNum-container rowCen">
                                       <view class="content-box rowCen">
                                          <view class="txt-tips rowCenBet">
                                             爆款
                                          </view>
                                          <view class="salenum rowCenCen">
                                             <view>{{items.monthSales}}件</view>
                                          </view>
                                       </view>
                                    </view>
                                    <view class="likeNum-container rowCen">
                                       <view class="like-num">
                                          {{items.twoHoursSales}}
                                       </view>
                                       <view class="txt">
                                          人想买
                                       </view>
                                    </view>
                                 </view>
                              </view>
                           </view>
                        </view>
                     </scroll-view>
                  </view>
               </view> -->
               <!-- 福利抢购 -->
               <!-- <view class="welfare-container colCen">
                  <view class="titlebar-container rowCenBet">
                     <view class="left-content rowCen">
                        <view class="titletext">
                           福利抢购
                        </view>
                     </view>
                  </view>
                  <view class="goodsList-container colCen">
                     <block v-for="(items,index) in phbList.slice(0,4)" :key="index">
                        <view class="goods-items-container rowCen borderBox" @click="goDetails(items)">
                           <view class="left-imagecontent defIcon">
                              <image style="border-radius: 8rpx;" :src="items.mainPic" mode="aspectFill">
                              </image>
                           </view>
                           <view class="right-goodsinfo-container colCenBet borderBox">
                              <view class="top-content-box colCen">
                                 <view class="goodsnameinfo-content rowSta">
                                    <view class="typeIcon-content defIcon">
                                       <image :src="items.labelImg" mode="heightFix"></image>
                                    </view>
                                    <view class="tradename">
                                       {{items.dtitle}}
                                    </view>
                                 </view>
                                 <view class="desc-box">
                                    {{items.desc}}
                                 </view>
                              </view>
                              <view class="btm-content-box colCen">
                                 <view class="discounts-container rowCen borderBox">
                                    <view class="coupon-box rowCenCen">
                                       <view>
                                          {{items.couponPrice}}元券
                                       </view>
                                    </view>
                                    <view class="back-box rowCenCen">
                                       <view>
                                          返{{items.fanli}}元
                                       </view>
                                    </view>
                                 </view>
                                 <view class="price-saleNums-container rowEndBet">
                                    <view class="left-price-box rowEnd">
                                       <view class="nowpirce rowEnd">
                                          <view class="rmb">
                                             ¥
                                          </view>
                                          <view class="num">
                                             {{items.actualPrice}}
                                          </view>
                                       </view>
                                       <s class="original-price">
                                          ¥{{items.originalPrice}}
                                       </s>
                                    </view>
                                    <view class="saleNum-content">
                                       爆卖{{items.monthSales}}件
                                    </view>
                                 </view>
                              </view>
                           </view>
                        </view>
                     </block>
                  </view>
               </view> -->
               <!-- 实时疯抢榜 -->
               <!-- 抖好物 -->
            </view>
@@ -377,11 +118,11 @@
                        <view class="type-items-container colCenCen" @click="switchtype(items,index)"
                           :class="bottomCurrent==index?'type-container-active':''">
                           <view class="mainTitle">
                              好物推荐
                              {{items.mainTitle}}
                           </view>
                           <!-- <view class="subtitle rowCenCen">
                           <view class="subtitle rowCenCen">
                              <view>{{items.subTitle}}</view>
                           </view> -->
                           </view>
                        </view>
                     </block>
                  </view>
@@ -404,7 +145,6 @@
      <slideTop v-if="scrollTop>1000" @toTop='scrolltoTops'></slideTop>
   </view>
</template>
<script>
   import utils from '@/utils/utils.js'
   import slideTop from '@/components/slideTop.vue'
@@ -452,7 +192,7 @@
            dyList: [],
            rqList: [],
            typedataList: [
               /* {
               {
                  mainTitle: '京东',
                  subTitle: '官方保障',
                  type: 2
@@ -471,7 +211,7 @@
                  mainTitle: '唯品会',
                  subTitle: '大牌精选',
                  type: 4
               } */
               }
            ],
            bottomType: 1,
            bottomCurrent: 0,
@@ -594,7 +334,6 @@
         },
         onRestore() {
            this.swpidx = 0
            console.log('下拉被终止');
         },
         pagescroll(e) {
            this.$emit('scrollNum', e.detail.scrollTop)
@@ -625,19 +364,18 @@
            this.$u.api.getBanner({
               type: '1,3,4,5,11,12,13,14'
            }).then(e => {
               console.log(e)
               if (e.code == 1) return that.$alert(e.msg);
               var res = e.data.info;
               console.log(res);
               if(res.topBannerList&&res.topBannerList.length>0)
               {
                  that.topBannerList = res.topBannerList;
                  that.headerColor = that.topBannerList[0].colour;
                  //that.headerColor = that.topBannerList[0].colour;
               }
               that.singleLineList = res.singleLineList;
               that.doubleLineList = res.doubleLineList;
               that.bottomBannerList = res.bottomBannerList;
               that.fastenter=res.indexbanner;
               console.log(that.fastenter);
               that.popBannerSList=res.popBannerSList;
               that.enterTop=res.enterTop;
               that.enterDown=res.enterDown;
@@ -670,12 +408,16 @@
         getHomeMenuList() {
            var that = this;
            this.$u.api.getHomeMenu({
               type: 1
            }).then(e => {
               if (e.code != 0) return that.$alert(e.msg)
               that.navbarList = e.data.list;
            }).catch(function(err) {})
            var datalist=[{"id":51,"mname":"淘宝返利","group":"1","type":"1","image":"https://yanfeiobpub.obs.cn-east-3.myhuaweicloud.com/dfg/%E5%85%A8.png","parameter_json":{"appId":"","route":"","url":"/pages/active/tmsearch","cmark":"","activityId":"","goodsId":"","goods_platform":"","template_id":"","jtk_act_id":""},"url_type":"1","is_top":"0"},{"id":3,"mname":"京东返利","group":"1","type":"1","image":"https://yanfeiobpub.obs.cn-east-3.myhuaweicloud.com/dfg/%E7%BD%91.png","parameter_json":{"appId":"","route":"","url":"../active/jdSearch","cmark":"","activityId":"","goodsId":"","goods_platform":"","template_id":"","jtk_act_id":""},"url_type":"1","is_top":"0"},{"id":49,"mname":"抖音返利","group":"1","type":"1","image":"https://yanfeiobpub.obs.cn-east-3.myhuaweicloud.com/dfg/%E4%BC%98.png","parameter_json":{"appId":"","route":"","url":"/pages/active/dysearch","cmark":"","activityId":"","goodsId":"","goods_platform":"","template_id":"","jtk_act_id":""},"url_type":"1","is_top":"0"},{"id":5,"mname":"拼多多返利","group":"1","type":"1","image":"https://yanfeiobpub.obs.cn-east-3.myhuaweicloud.com/dfg/%E6%83%A0.png","parameter_json":{"appId":"","route":"","url":"../active/pddsearch","cmark":"","activityId":"","goodsId":"","goods_platform":"","template_id":"","jtk_act_id":""},"url_type":"1","is_top":"0"},{"id":7,"mname":"唯品会返利","group":"1","type":"1","image":"https://yanfeiobpub.obs.cn-east-3.myhuaweicloud.com/dfg/%E5%88%B8.png","parameter_json":{"appId":"","route":"","url":"/pages/active/vipsearch","cmark":"","activityId":"","goodsId":"","goods_platform":"","template_id":"","jtk_act_id":""},"url_type":"1","is_top":"0"},{"id":10,"mname":"美团红包","group":"1","type":"1","image":"https://yanfeiobpub.obs.cn-east-3.myhuaweicloud.com/dfg/%E8%B4%AD.png","parameter_json":{"appId":"","route":"","url":"/pages/mine/mt","cmark":"","activityId":"","goodsId":"","goods_platform":"","template_id":"","jtk_act_id":""},"url_type":"1","is_top":"0"},{"id":11,"mname":"饿了么红包","group":"1","type":"1","image":"https://yanfeiobpub.obs.cn-east-3.myhuaweicloud.com/dfg/%E7%89%A9.png","parameter_json":{"appId":"","route":"","url":"/pages/mine/elm","cmark":"","activityId":"","goodsId":"","goods_platform":"","template_id":"","jtk_act_id":""},"url_type":"1","is_top":"0"},{"id":8,"mname":"电影7折","group":"1","type":"1","image":"https://yanfeiobpub.obs.cn-east-3.myhuaweicloud.com/dfg/%E6%8B%BF.png","parameter_json":{"appId":"","route":"","url":"","cmark":"","activityId":"","goodsId":"","goods_platform":"","template_id":"","jtk_act_id":"17"},"url_type":"11","is_top":"0"},{"id":2,"mname":"9.9包邮","group":"1","type":"1","image":"https://yanfeiobpub.obs.cn-east-3.myhuaweicloud.com/dfg/%E8%BF%94.png","parameter_json":{"appId":"","route":"","url":"../active/specialOffer","cmark":"","activityId":"","goodsId":"","goods_platform":"","template_id":"","jtk_act_id":""},"url_type":"1","is_top":"0"},{"id":6,"mname":"大牌优选","group":"1","type":"1","image":"https://yanfeiobpub.obs.cn-east-3.myhuaweicloud.com/dfg/%E5%88%A9.png","parameter_json":{"appId":"","route":"","url":"../active/brandSale","cmark":"","activityId":"","goodsId":"","goods_platform":"","template_id":"","jtk_act_id":""},"url_type":"1","is_top":"0"}];
            that.navbarList = datalist;
            // this.$u.api.getHomeMenu({
            //    type: 1
            // }).then(e => {
            //    console.log(e);
            //    if (e.code != 0) return that.$alert(e.msg)
            //    that.navbarList = e.data.list;
            // }).catch(function(err) {})
         },
@@ -699,7 +441,6 @@
               pageSize: 10,
               type: type
            }).then(e => {
                console.log(e)
               if (e.code != 0) return that.$alert(e.msg)
               var res = e.data.list;
               if (res.length < 10) {
@@ -2060,11 +1801,11 @@
      
               .type-container-active {
                  .mainTitle {
                     color: #FE3738;
                     color: #0f0f0f;
                  }
      
                  .subtitle {
                     background: #FE3738;
                     background: #0f0f0f;
                     color: #FFFFFF;
                  }
               }