| | |
| | | |
| | | <div :style="{ height: (twoNav && twoNav.length > 0) ? '2.3rem' : '2.3rem'}"></div> |
| | | |
| | | <div v-if="!loading" style="min-height: 100vh;" class=" swiper-container swiper-container-initialized swiper-container-horizontal swiper-container-free-mode swiper-container-ios"> |
| | | <div v-if="!loading" style="min-height: 100vh; background: #fbe7e2;" class=" swiper-container swiper-container-initialized swiper-container-horizontal swiper-container-free-mode swiper-container-ios"> |
| | | <div class="swiper-wrapper" style="transform: translate3d(0px, 0px, 0px);"> |
| | | <div class="swiper-slide list-section"> |
| | | <div class="listTmp " v-for="(data,key) in lists" :key="key" v-on:click="targetItem(data)"> |
| | |
| | | </div> |
| | | <div class="productInfo"> |
| | | <div class="title"> |
| | | <div class="shoplabel "> |
| | | <img src=""> |
| | | </div> |
| | | |
| | | <span>{{data.dtitle}}</span> |
| | | </div> |
| | | |
| | |
| | | methods: { |
| | | |
| | | targetItem:function(item){ |
| | | if(this.isUniReady) |
| | | uni.navigateTo({ |
| | | url: '/pages/goods/goodsDetail?id=' + items.goodsid+'&frompage=freebuy' |
| | | }); |
| | | /* if(this.isUniReady) |
| | | { |
| | | uni.postMessage({ |
| | | data: { |
| | |
| | | data:item |
| | | } |
| | | }); |
| | | } |
| | | } */ |
| | | }, |
| | | |
| | | getUrlPar:function(name) |
| | |
| | | //判断是否首单 |
| | | $.ajax({ |
| | | headers:{ |
| | | "token":this.getUrlPar("token") |
| | | "token":_this.getUrlPar("token") |
| | | }, |
| | | //url:'http://dfg.shop.com/index.php/api/user/check_isfirst_free', |
| | | //url:'http://dfgapp.ushopvip.com/api/user/check_isfirst_free', |
| | |
| | | data:{ |
| | | } |
| | | }).done(function(res){ |
| | | if(res.data=='首单客户') |
| | | if(res.msg.info==1) |
| | | { |
| | | $.ajax({ |
| | | headers:{ |
| | | "token":this.getUrlPar("token") |
| | | }, |
| | | //url:'http://dfg.shop.com/index.php/api/taoke/get_first_free_goods', |
| | | //url:'http://dfgapp.ushopvip.com/api/taoke/get_first_free_goods', |
| | | url:'http://appapitest.ushopvip.com/api/taoke/get_first_free_goods', |
| | | type:"post", |
| | | dataType:"json", |
| | | data:{ |
| | | nineCid:1, |
| | | page: 1, |
| | | pageSize:20, |
| | | } |
| | | }).done(function(res){ |
| | | var newlist=[]; |
| | | res.data.list.map(function(r,k){ |
| | | var buprice=r.actualPrice-r.topFanli; |
| | | if(buprice<=3) |
| | | { |
| | | newlist.push(r); |
| | | } |
| | | headers:{ |
| | | "token":_this.getUrlPar("token") |
| | | }, |
| | | //url:'http://dfg.shop.com/index.php/api/taoke/get_first_free_goods', |
| | | //url:'http://dfgapp.ushopvip.com/api/taoke/get_first_free_goods', |
| | | url:'http://appapitest.ushopvip.com/api/taoke/get_first_free_goods', |
| | | type:"post", |
| | | dataType:"json", |
| | | data:{ |
| | | nineCid:1, |
| | | page: 1, |
| | | pageSize:20, |
| | | } |
| | | }).done(function(res){ |
| | | var newlist=[]; |
| | | res.data.list.map(function(r,k){ |
| | | var buprice=r.actualPrice-r.topFanli; |
| | | if(buprice<=3) |
| | | { |
| | | newlist.push(r); |
| | | } |
| | | }) |
| | | _this.lists=[].concat(_this.lists,newlist); |
| | | _this.loading = false; |
| | |
| | | } |
| | | else{ |
| | | alert("您已下过首单,不可再次购买,请浏览其他商品吧~"); |
| | | |
| | | setTimeout(function(){ |
| | | if(this.isUniReady) |
| | | if(_this.isUniReady) |
| | | { |
| | | uni.postMessage({ |
| | | data: { |
| | |
| | | } |
| | | }); |
| | | } |
| | | }, 3000 ) |
| | | }, 1000 ) |
| | | } |
| | | }) |
| | | |