| | |
| | | |
| | | var _config = { |
| | | appKey: 'bkuibk',//此处替换成用户appKey |
| | | jumpGoodsUrl: function (items) { //默认直接转链 |
| | | jumpGoodsUrl: function (items,sourceType) { //默认直接转链 |
| | | var url=''; |
| | | if(sourceType=="jd"||sourceType=="pdd"||sourceType=="dy") |
| | | { |
| | | var itemsStr=Infoformat(JSON.stringify(items)); |
| | | url='/pages/goods/goodsDetail?sourcefrom=fqb&info=' + encodeURIComponent(itemsStr) |
| | | } |
| | | else{ |
| | | url='/pages/goods/goodsDetail?id=' + items.goodsid |
| | | } |
| | | uni.navigateTo({ |
| | | url: '/pages/goods/goodsDetail?id=' + items.goodsid |
| | | url: url |
| | | }); |
| | | // return '/pages/goods/goodsDetail?id=' + items.goodsid; //替换为详细页面的地址 |
| | | } |
| | | }; |
| | | function Infoformat(info){ |
| | | let formatObj = info.replace(/\%/g,"%25") |
| | | formatObj = info.replace(/\#/g,"%23") |
| | | formatObj = info.replace(/\&/g,"%26") |
| | | formatObj = info.replace(/\?/g,"%3F") |
| | | return formatObj; |
| | | } |
| | | </script> |
| | | <style> |
| | | body{ |
| | |
| | | a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:rgba(0,0,0,0);tap-highlight-color:transparent;box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}html{font-family:Arial,PingFang SC,-apple-system,BlinkMacSystemFont,Segoe UI,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none} |
| | | .list-container{ |
| | | position: relative; |
| | | padding-top: 10px; |
| | | padding-top: 30px; |
| | | } |
| | | .top-bg{ |
| | | width: 100%;position: absolute;top:0; |
| | |
| | | .list-container .tit-img{ |
| | | width: 1.84rem;height: 0.36rem;position: relative;margin:.1rem auto .3rem;display: block; |
| | | } |
| | | |
| | | .list-container .top-nav{ |
| | | position: relative; |
| | | margin-bottom: 20px; |
| | | } |
| | | .list-container .top-nav .swiper-slide{ |
| | | padding: 0 .2rem;font-weight: 500;font-size: .3rem;color: hsla(0,0%,100%,.6);position: relative;width: auto;padding-bottom: 8px; |
| | |
| | | .list-container .top-nav .swiper-slide.act::after{ |
| | | content: '';width: 50%;border-bottom: 2px solid #fff;position: absolute;bottom: 0px;left: 25%; |
| | | } |
| | | |
| | | .list-container .plat-nav{ |
| | | position: relative; |
| | | display:flex; |
| | | justify-content:center; |
| | | } |
| | | |
| | | .list-container .plat-nav .swiper-slide{ |
| | | padding: .2rem .2rem;font-weight: 500;font-size: .3rem;color: hsla(0,0%,100%,.6);position: relative;width: auto; |
| | | } |
| | | .list-container .plat-nav .swiper-slide.act{ |
| | | color:#fff;font-size: .35rem; |
| | | } |
| | | |
| | | |
| | | |
| | | .list-container .updateTime{ |
| | | height: .4rem;background: rgba(255,129,70,.9);border-radius: .2rem;display: table;margin: .3rem auto;padding: 0 .2rem;font-size: .22rem;color: #fff;line-height: .4rem; |
| | | } |
| | | .list-container .topThree{ |
| | | display: -webkit-flex;display: flex;-webkit-justify-content: center;justify-content: center; |
| | | display: -webkit-flex;display: flex;-webkit-justify-content: center;justify-content: center; margin-top: .3rem; |
| | | } |
| | | .list-container .topThree>div { |
| | | width: 2.2rem;height: 3.4rem;background: #fff;border-radius: .14rem;padding: .1rem;position: relative; |
| | |
| | | font-weight: 500;color: #fff;line-height: .65rem;text-align: center; |
| | | } |
| | | .list-container .card-block{ |
| | | padding-top: 15px; |
| | | |
| | | } |
| | | .sys{ |
| | | width: 100%; |
| | |
| | | center center no-repeat; |
| | | background-size: 2.4rem auto; |
| | | } |
| | | .plat-wrapper |
| | | { |
| | | display:flex; |
| | | justify-content:center; |
| | | margin-bottom: 20px; |
| | | width: 65%; |
| | | background: hsl(0deg 86.5% 45.77% / 60%); |
| | | border-radius:6px; |
| | | } |
| | | .loading { |
| | | display: flex; |
| | | position: fixed; |
| | | width: 100vw; |
| | | height: 100vh; |
| | | background: rgba(0, 0, 0, 0.2); |
| | | top: 0; |
| | | left: 0; |
| | | z-index: 10; |
| | | justify-content: center; |
| | | align-items: center; |
| | | font-size: .35rem; |
| | | color: #333; |
| | | } |
| | | .contscore |
| | | { |
| | | overflow:scroll; |
| | | height: 80vh; |
| | | } |
| | | .box |
| | | { |
| | | position:absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | background: url(https://yanfeiobpub.obs.cn-east-3.myhuaweicloud.com/dfg/h5loading.gif) no-repeat fixed top; |
| | | background-size: 70px 70px; |
| | | } |
| | | .list{ |
| | | position: relative; |
| | | top: 0; |
| | | width: 100%; |
| | | } |
| | | .reloadbg |
| | | { |
| | | display: flex; |
| | | justify-content: center; |
| | | height: 1.3rem; |
| | | } |
| | | </style> |
| | | </head> |
| | | |
| | | <body style="padding-top:30px"> |
| | | |
| | | <body> |
| | | <div class="box"> |
| | | <!-- <div class="reloadbg"> |
| | | <image class="reloadbgimg" src="https://yanfeiobpub.obs.cn-east-3.myhuaweicloud.com/dfg/h5loading.gif"></image> |
| | | </div> |
| | | --> |
| | | <div class="list"> |
| | | |
| | | <img src="https://jpdy.ffquan.cn/static/header_bg.12963398.png" class="top-bg" alt=""> |
| | | |
| | | <div class="list-container" id="fqList"> |
| | | <div v-if="loading" class="loading"> |
| | | <span>加载中...</span> |
| | | </div> |
| | | <div v-if="sys == null" class="sys"></div> |
| | | <img src="data:image/png;base64,iVBOR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6VqquJXZmEaLjRQq6aVuwI5BG1wsgWR0frAEzKskk/KJqpeDt7S40l8VsIU+N63IGIBbg04Ga8E6Evf/H2BfN1W4i3UgxbjctS7scZ9b8LnG+Y+MS5Jm9/3nrF5cEfc2Au4zs6A4H6XSqdzltdmAvhGTedNKGd5gTtCgrsibY8nnr/3ZPVZLd6w24BTcgG15SIbkTgNtFxe83OI+DvUylhnCNAnCbWZ5GW/I/HV1smZNrwK47FR2VR3M9j7D0usSYMI9D5STKLZQdgn8aBOI/UjlpvCRHTixdvixYbjOs/jOWvxdnk0a3CdNbjxKbjx3mEoRYOe6jdcnjFsDlcAPze8zcfKw5pJPkUOwFtflQV1KCS/HbcXiGzAf0HAU+h7UM9CLEf1wvcVbxSxbvsDv5d0gLK43imLXpMA96CXmGUjhH5+QGKP+tkWl/8BKQdFjmKkPTAAAAAASUVORK5CYII=" class="tit-img" alt=""> |
| | | <!--平台---> |
| | | <div class="swiper-container plat-nav"> |
| | | <div class="swiper-wrapper plat-wrapper"> |
| | | <div class="swiper-slide" :class="platid==item.id?'act':''" v-for="(item,index) in platlist" :key="index" @click="choosePlat(index,item.id)">{{item.title}}</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="swiper-container top-nav"> |
| | | <div class="swiper-wrapper"> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="updateTime"><i type="shizhong" class="DTKiconfont shizhong shizhong___3DUi1"></i>距离下次排名更新还有 {{mins}} 分 {{ss}} 秒</div> |
| | | <div style="display: none;" class="updateTime"><i type="shizhong" class="DTKiconfont shizhong shizhong___3DUi1"></i>距离下次排名更新还有 {{mins}} 分 {{ss}} 秒</div> |
| | | |
| | | |
| | | |
| | | <div class="swiper-container card-block"> |
| | | <div class="swiper-wrapper"> |
| | | <div class="swiper-slide swiper-no-swiping"> |
| | | <div class="swiper-slide swiper-no-swiping contscore"> |
| | | <div class="topThree"> |
| | | <div v-for="(item,index) in goodsList" :key = "index" v-if="index==1" @click="handleCdetailFavorite(item)"> |
| | | <a> |
| | |
| | | </div> |
| | | <div> |
| | | <div class="title"> |
| | | <div class="shoplabel" v-if="item.mallDesc!='淘宝'"> |
| | | <!-- <div class="shoplabel" v-if="item.mallDesc!='淘宝'"> |
| | | <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAaCAYAAADIUm6MAAAE60lEQVRYw9WYbVBUVRjHz+gH/OCHdCY/WE1OGTNWU40ibIqSE6IGZpoGgrGUyAjrYkrI2yqIKGjN+FLONOk4aI6azZqZmu+ama9oElmOGApqvrK6KjBp8uvDc5a7d3eBJZsp78xv9p7/eZ7/8+y95yxnUEopRZ4tFIfdicPuxjGFoCnQODqKXdOhHDcOu5M8W6hqaTonw0VOBo8ILvJsoYqsdCfTJ/NIkZXuVNjT3NgnEZg0H9qLm/Qv01r9NLdi8kRMzMyFBw/+OWfPGF6VJ6GpEepqwbkebGnmWtVnAKCsxKzv3in6mi/w60+jmPgeJvJyeKjrbLXhVVVlnvthv+hfroWfK+HuXdGrq2Xs4fp10S9elHHpXHz7VCRbwZpsJiUlMA6HGNbVtR5jTYHkZMFqhdRUKJsPDY3Q3AxTbHDgQMcexpIlkGz1IhlF4gRaGN8OM/LEqLaONvMSA3DqlOQWzobsXJhXBnUXRCtfJWMPRytE37ZdxpMz/HwV4xIJmiy9jM7XBp8TPwFWrITGRsktKjHmDh6CK1fhw1xzzrqvRF+8tFVfxVsJ+BOv8dGnZkvxc7UEzvMhv0i+pPflKG7dv736Xihix2HiSAVU/WrmF03171K8qSnwvIdl5eK1co3EX7gEly7LfV4RrHNCzbngKSiG2He8GIci5m1MuG/z0Nem78QrNgE+WQax8VBxUuayC2Hnvo75FX+Eb5+KIaMxYcuBzHxhqsYz3uFVsHSRofuSlG72HJ4A1TWSN20mbN8r95+VQ4pdOHRMtKUrDO3Icb2h5+PbpyJyFEExaBTUeK3Xz1d7zb/pg5deUAqXrxp59nzYtkdv1I+NWM9DmbXA0HbtF62gzFxn0CgUEXFgaYUIjSUO8krFpEH/OtTfhOh4HTvSB52zeoPRcHOzfKbnwtbdcj9zgeG/Tb+F/DIjf4duPHeeX1+Kfm/QLjFJcL1eP6WFcPiE3G/Z03ZeUibccEHxIjiq13jqDNi8S+5dt+CPq0JjU+ta9lw/b8VLw2mTV8dA1WkxOHgcXh4Bce/DnQbRPl3Zdn7YSPk8Vinx1izYtKtjm3P6HD9fRZ+h0CdGM9TM4Hij6TPnYMBYWuJthXD/L73e18LzAfI9vBIHt/Sv1ZBE2KgPUcVLICoBosbDTn0MKFyktQTYfVC0zNk+njEoer9OQJKy4Io+7FSfB8tY/5hpc+HefYnZexgiAsQ8Fw3rt0pMRZVoX++Q8QclRtw3+i1kFhvaZr2JbUV+voqnh2DixTgo3yBHVIDvj0Lf0fjFeUiYJusS4MZNmFoCvfTcC7HwrS5+pwFGpIq+aqNoC8sNH89byJgt42ejoVK/7Xez/eoqeg6GnlEGx/Vh6N59mL8cnnzNPN8zCsnxou8Y2HfM68/6Yolbu0XGN90wxg5PRAmj7fJgmpvly15zQdOfEuu+A9fq4bY+8l68Ar2H+dVX9IikhccjIXUW/PgTRE6QcSC841u0QWCbA7/VQO8RMm8ZDwdOQP94THV6RMKUEqi/1famrDwNUdaA9RXdBrjpNgAzA/HXvHhME2iu+0D/uNbiuw+EXsPgmeH+PBXdVg9uRVeLk64WhAiN5T8i6PpORUh4KF3CXYT0xyDch/7tEGxcsP5tzHcJdxESrv+3EhIeSucwJ53C3HTqx/+TMDedw5yepv8GV1+TBUuIRhcAAAAASUVORK5CYII="> |
| | | </div> |
| | | </div> --> |
| | | <span>{{item.dtitle}}</span> |
| | | </div> |
| | | <div class="lable" style="margin-bottom: 12px;"> |
| | | <div class="coupon" style="display: inline-flex;"> |
| | | <div v-if="item.quanJine>0" class="coupon" style="display: inline-flex;"> |
| | | <span>券</span>{{item.quanJine}}元 |
| | | </div> |
| | | <div style="margin-left:10px;background: linear-gradient(-90deg, #7619EC, #A429F3);" class="coupon" style="display: inline-flex;"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </body> |
| | | |
| | | <script> |
| | |
| | | new Vue({ |
| | | el: '#fqList', |
| | | data:{ |
| | | loading:false, |
| | | cateList:[], |
| | | goodsList:[], |
| | | localGoodsList:[], |
| | |
| | | mins:0, |
| | | ss:0, |
| | | cid:0, |
| | | type:1 |
| | | type:1, |
| | | //posturl:'http://dfg.shop.com', |
| | | // posturl:'http://dfgapp.ushopvip.com', |
| | | posturl:'http://appapitest.ushopvip.com', |
| | | platlist:[ |
| | | { |
| | | id:"tb", |
| | | title:"淘宝", |
| | | }, |
| | | { |
| | | id:"jd", |
| | | title:"京东", |
| | | }, |
| | | { |
| | | id:"dy", |
| | | title:"抖音", |
| | | }, |
| | | { |
| | | id:"pdd", |
| | | title:"拼多多", |
| | | } |
| | | ], |
| | | platid:'tb', |
| | | scrollTop: 0, |
| | | canScroll: false, |
| | | nowPage:1, |
| | | loadData:false |
| | | }, |
| | | onload(options){ |
| | | console.log(options); |
| | | }, |
| | | onReachBottom(){ |
| | | console.log("到底了111"); |
| | | }, |
| | | methods:{ |
| | | getItemDetail:function(items) |
| | | { |
| | | var _this = this; |
| | | $.ajax({ |
| | | headers:{ |
| | | "token":_this.getUrlPar("token") |
| | | }, |
| | | url:_this.posturl+'/api/Activity/fqb_goods_detail', |
| | | type:"post", |
| | | dataType:"json", |
| | | data:{ |
| | | plat:_this.platid, |
| | | goodsid:items.goodsid |
| | | } |
| | | }).done(function(res){ |
| | | _config.jumpGoodsUrl(res.data,_this.platid); |
| | | }) |
| | | }, |
| | | touch:function() |
| | | { |
| | | const box = document.querySelector('.box') |
| | | const list = document.querySelector('.list'); |
| | | // 按下屏幕的位置 |
| | | let touchStartPosition = 0 |
| | | |
| | | // touchstart事件 |
| | | box.addEventListener('touchstart', function (e) { |
| | | let touch = e.touches[0] |
| | | touchStartPosition = touch.pageY |
| | | }) |
| | | // touchmove事件 |
| | | box.addEventListener('touchmove', function (e) { |
| | | |
| | | let touch = e.touches[0] |
| | | // 列表的top值等于列表相对于box的偏移量+滑动的距离 |
| | | let pySize= list.offsetTop + touch.pageY - touchStartPosition; |
| | | if(pySize<0) |
| | | { |
| | | return; |
| | | } |
| | | var scroll = document.getElementsByClassName('contscore') |
| | | var srollPos = $('.contscore').scrollTop(); //滚动条距顶部距离(页面超出窗口的高度) |
| | | if(srollPos>0) |
| | | { |
| | | return; |
| | | } |
| | | list.style.top =pySize + 'px'; |
| | | // 实现平滑的滑动 |
| | | touchStartPosition = touch.pageY |
| | | }) |
| | | // touchend事件 |
| | | box.addEventListener('touchend', function (e) { |
| | | let top = list.offsetTop |
| | | if (top > 70) { |
| | | // 在此处调用刷新后的回调 |
| | | console.log('刷新'); |
| | | location.reload(); |
| | | } |
| | | if(top<0) |
| | | { |
| | | list.style.top=0; |
| | | } |
| | | if (top > 0) { |
| | | // 通过定时器平滑的将list的top = 0 |
| | | let timer = setInterval(() => { |
| | | top=top-5; |
| | | list.style.top = top + 'px' |
| | | if (top <= 0) { |
| | | list.style.top=0; |
| | | clearInterval(timer) |
| | | } |
| | | },1) |
| | | } |
| | | }) |
| | | }, |
| | | scrollLoad: function() { |
| | | // |
| | | var _this = this; |
| | | var range = 800; //距下边界长度/单位px |
| | | var totalheight = 0; |
| | | $('.contscore').scroll(function() { |
| | | var scroll = document.getElementsByClassName('contscore') |
| | | var srollPos = $('.contscore').scrollTop(); //滚动条距顶部距离(页面超出窗口的高度) |
| | | totalheight = parseFloat($('.contscore').height()) + parseFloat(srollPos); |
| | | _this.scrollTop = srollPos |
| | | var scrollH = scroll[0].scrollHeight |
| | | // debugger |
| | | // console.log('scrollH - range',scrollH - range,'srollPos',srollPos) |
| | | if (scrollH - range <= srollPos) { |
| | | if (_this.canScroll&&_this.platid!='tb') { |
| | | _this.canScroll = false; |
| | | _this.loadData = true; |
| | | _this.nowPage++; |
| | | _this.getGoodsList(_this.cid); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | handleCdetailFavorite: function (items) { |
| | | if(_config.jumpGoodsUrl){ |
| | | _config.jumpGoodsUrl(items); |
| | | switch(this.platid) |
| | | { |
| | | case "tb": |
| | | case "pdd": |
| | | case "dy": |
| | | _config.jumpGoodsUrl(items,this.platid); |
| | | break; |
| | | case "jd": |
| | | this.getItemDetail(items); |
| | | break; |
| | | } |
| | | } |
| | | return; |
| | | var params = { |
| | |
| | | }) |
| | | }, |
| | | chooseCate:function(index,cid,type){//选择分类 |
| | | mySwiper.slideTo(index-2, 1000, false) |
| | | mySwiper.slideTo(index-2, 1000, false); |
| | | this.nowPage=1; |
| | | this.goodsList=[]; |
| | | this.actIndex = index; |
| | | this.getGoodsList(cid,type) |
| | | this.cid = cid; |
| | | this.type = type; |
| | | }, |
| | | choosePlat:function(index,id) |
| | | {//选择平台 |
| | | this.platid = id; |
| | | this.goodsList=[]; |
| | | this.getCateList(); |
| | | }, |
| | | getCateList:function(){//获取分类列表 |
| | | var _this = this; |
| | | $.ajax({ |
| | | //_this.loading=true; |
| | | this.nowPage=1; |
| | | if(this.platid=='tb') |
| | | { |
| | | $.ajax({ |
| | | url:'https://dtkapi.ffquan.cn/dtk_go_app_api/v1/page-goods-ranking-cate', |
| | | type:"get", |
| | | }).done(function(res){ |
| | | if(res.code == 1){ |
| | | _this.cateList = res.data |
| | | } |
| | | setTimeout(function(){ |
| | | _this.cateRender(); |
| | | mySwiper.slideTo(0, 0, false) |
| | | },10) |
| | | }) |
| | | }).done(function(res){ |
| | | //_this.loading=false; |
| | | if(res.code == 1){ |
| | | _this.cateList = res.data; |
| | | _this.actIndex=res.data[0].id; |
| | | //获取商品列表 |
| | | _this.getGoodsList(res.data[0].id); |
| | | } |
| | | setTimeout(function(){ |
| | | _this.cateRender(); |
| | | mySwiper.slideTo(0, 0, false) |
| | | },10) |
| | | }) |
| | | } |
| | | else |
| | | {//京东、抖音、拼多多 |
| | | |
| | | $.ajax({ |
| | | headers:{ |
| | | "token":this.getUrlPar("token") |
| | | }, |
| | | url:this.posturl+'/api/Activity/fqb_plat_cate', |
| | | type:"post", |
| | | dataType:"json", |
| | | data:{ |
| | | plat:this.platid |
| | | } |
| | | }).done(function(res){ |
| | | // _this.loading=false; |
| | | _this.cateList = res.data; |
| | | res.data.forEach(obj=>{ |
| | | obj["id"]=obj["cid"]; |
| | | }) |
| | | _this.actIndex=res.data[0].cid; |
| | | setTimeout(function(){ |
| | | _this.cateRender(); |
| | | mySwiper.slideTo(0, 0, false) |
| | | },10); |
| | | //获取商品列表 |
| | | _this.getGoodsList(res.data[0].cid); |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | getNowTime:function(){//获取当前时间 |
| | | var _this = this; |
| | |
| | | cid = cid || 0; |
| | | type = type!=undefined?type:1; |
| | | var _this = this; |
| | | _this.loading=true; |
| | | $.ajax({ |
| | | headers:{ |
| | | "token":this.getUrlPar("token") |
| | | }, |
| | | url:'http://dfgapp.ushopvip.com/api/Activity/fqn_goods_list', |
| | | url:this.posturl+'/api/Activity/fqn_goods_list', |
| | | type:"post", |
| | | dataType:"json", |
| | | data:{ |
| | | plat:_this.platid, |
| | | cid:cid, |
| | | type:type, |
| | | app_key: _config.appKey, |
| | | mainid:_this.nowPage |
| | | } |
| | | }).done(function(res){ |
| | | _this.loading=false; |
| | | if(res.code == 0){ |
| | | _this.goodsList = res.data.data.data; |
| | | console.log(res.data.data.data); |
| | | _this.sys = (res.data.data && res.data.data.sys) ? res.data.data.sys : null; |
| | | var resdata=_this.platid=='tb'? res.data.data.data:res.data; |
| | | _this.goodsList=_this.goodsList.concat(resdata); |
| | | if(resdata&&resdata.length>0) |
| | | { |
| | | _this.canScroll=true; |
| | | } |
| | | else{ |
| | | _this.canScroll=false; |
| | | } |
| | | // _this.sys = (res.data.data && res.data.data.sys) ? res.data.data.sys : null; |
| | | } |
| | | else { |
| | | _this.sys = null; |
| | |
| | | }) |
| | | }, |
| | | imgFomate:function(img){ |
| | | if(this.platid!='tb') |
| | | { |
| | | return img; |
| | | } |
| | | if(img.indexOf('http')!='-1'){ |
| | | return img+'_310x310.jpg' |
| | | }else{ |
| | |
| | | mounted:function(){ |
| | | this.getCateList(); |
| | | this.cateRender(); |
| | | this.scrollLoad(); |
| | | this.touch(); |
| | | // this.getDateNow(); |
| | | this.getGoodsList(); |
| | | this.getNowTime(); |
| | | //this.getGoodsList(); |
| | | // this.getNowTime(); |
| | | } |
| | | }) |
| | | </script> |