| | |
| | | var route = routes[routes.length - 1].route |
| | | } |
| | | // #ifdef APP-PLUS |
| | | console.log(this.globalData.canlisten) |
| | | if (this.globalData.canlisten && route != 'pages/mine/tools/turnChain') { |
| | | getClipboard() |
| | | } |
| | |
| | | var that = this; |
| | | that.globalData.hasinit=true; |
| | | this.$u.api.comminInt({}).then(e => { |
| | | console.log(e) |
| | | if (e.code != 0) |
| | | { |
| | | that.globalData.hasinit=false; |
| | |
| | | props: { |
| | | items: Object |
| | | }, |
| | | created(){ |
| | | }, |
| | | data() { |
| | | return { |
| | | |
| | |
| | | <template> |
| | | <view class="items-container borderBox colCen"> |
| | | <swiper class="swiper-box" :autoplay="true" :interval="3000" :duration="300" :indicator-active-color="'#fff'" :indicator-dots="true" circular> |
| | | <swiper-item v-for="(items,index) in popBannerSList" :key='index'> |
| | | <view class="swiper-item defIcon" @click="goUrl(items)"> |
| | | <image :src="items.image" mode="aspectFit"></image> |
| | | </view> |
| | | </swiper-item> |
| | | </swiper> |
| | | </view> |
| | | <swiper style="height: 100%;" class="swiper-box" :autoplay="true" :interval="3000" :duration="300" :indicator-active-color="'#fff'" :indicator-dots="true" circular> |
| | | <swiper-item v-for="(items,index) in popBannerSList" :key='index'> |
| | | <view class="swiper-item defIcon" style="width: 100%;height: 100%;" @click="goUrl(items)"> |
| | | <image :src="items.image" mode="aspectFit"></image> |
| | | </view> |
| | | </swiper-item> |
| | | </swiper> |
| | | <!-- <view class="swiper-container swiper-box swiper-item"> |
| | | |
| | | </view> --> |
| | | </template> |
| | | |
| | | <script> |
| | | import utils from '@/utils/utils.js' |
| | | export default { |
| | | props: { |
| | | popBannerSList: Array |
| | |
| | | created() |
| | | { |
| | | console.log(this.popBannerSList); |
| | | }, |
| | | methods: |
| | | { |
| | | goUrl(info) |
| | | { |
| | | console.log(info); |
| | | utils.goUrl(info, this) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .items-container { |
| | | width: 346rpx; |
| | | height: 100%; |
| | | |
| | | .swiper-box { |
| | | width: 100%; |
| | | height: 100%; |
| | |
| | | height: 100%; |
| | | } |
| | | } |
| | | } |
| | | |
| | | </style> |
| | |
| | | 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; |
| | | if(res.topBannerList&&res.topBannerList.length>0) |
| | |
| | | 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) { |
| | |
| | | <view class="goodsList-container colCen borderBox"> |
| | | <view class="goods-content rowStaBet"> |
| | | <view class="goods-items borderBox colCen" v-for="(items,index) in goodsList" :key='index' @click="goDetail(items)"> |
| | | <colGoods :items="items"></colGoods> |
| | | <colGoodsImg v-if="index==0&&popBannerSList&&popBannerSList.length>0" :popBannerSList="popBannerSList"></colGoodsImg> |
| | | <colGoods v-else :items="items"></colGoods> |
| | | </view> |
| | | <aLoadMore :status="loadstatus" mode="loading3" :showTitle='true' color="#999999"></aLoadMore> |
| | | </view> |
| | |
| | | |
| | | <script> |
| | | import colGoods from '../../components/colGoods.vue' |
| | | import colGoodsImg from '../../components/colGoodsImg.vue' |
| | | export default { |
| | | components:{ |
| | | colGoods |
| | | colGoods, |
| | | colGoodsImg |
| | | }, |
| | | data() { |
| | | return { |
| | | popBannerSList:[], |
| | | pageTop: 0, |
| | | nowCurrent: 0, |
| | | scrollTop: 0, |
| | |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.getNav() |
| | | this.getNav(); |
| | | this.getPageImg(); |
| | | }, |
| | | onPageScroll(e) { |
| | | this.scrollTop = e.scrollTop |
| | |
| | | }).exec(); |
| | | }, |
| | | methods: { |
| | | getPageImg() |
| | | { |
| | | var that=this; |
| | | this.$u.api.getBanner({ |
| | | type: '11,18' |
| | | }).then(e => { |
| | | console.log(e) |
| | | if (e.code == 1) return that.$alert(e.msg); |
| | | var res = e.data.info; |
| | | this.popBannerSList=res.dyImg; |
| | | if(res.dyImg&&res.dyImg.length>0) |
| | | { |
| | | that.goodsList.unshift(res[0]); |
| | | } |
| | | }).catch(function(err) { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | getNav() { |
| | | var that = this; |
| | | this.$u.api.getHdkCategoryList({type:4}).then(e => { |
| | |
| | | }, |
| | | |
| | | goDetail(info) { |
| | | uni.navigateTo({ |
| | | url: '../goods/goodsDetail?info=' + encodeURIComponent(JSON.stringify(info)) |
| | | }) |
| | | if(info&&info!=undefined) |
| | | { |
| | | uni.navigateTo({ |
| | | url: '../goods/goodsDetail?info=' + encodeURIComponent(JSON.stringify(info)) |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | goback() { |
| | |
| | | <view class="goodsList-container colCen borderBox"> |
| | | <view class="goods-content rowStaBet"> |
| | | <view class="goods-items borderBox colCen" v-for="(items,index) in goodsList" :key='index' @click="goDetail(items)"> |
| | | <colGoods :items="items"></colGoods> |
| | | <colGoodsImg v-if="index==0&&popBannerSList&&popBannerSList.length>0" :popBannerSList="popBannerSList"></colGoodsImg> |
| | | <colGoods v-else :items="items"></colGoods> |
| | | </view> |
| | | <aLoadMore :status="loadstatus" mode="loading3" :showTitle='true' color="#999999"></aLoadMore> |
| | | </view> |
| | |
| | | |
| | | <script> |
| | | import colGoods from '../../components/colGoods.vue' |
| | | import colGoodsImg from '../../components/colGoodsImg.vue' |
| | | export default { |
| | | components:{ |
| | | colGoods |
| | | colGoods, |
| | | colGoodsImg |
| | | }, |
| | | data() { |
| | | return { |
| | | popBannerSList:[], |
| | | pageTop: 0, |
| | | nowCurrent: 0, |
| | | scrollTop: 0, |
| | |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.getNav() |
| | | this.getNav(); |
| | | this.getPageImg(); |
| | | }, |
| | | onPageScroll(e) { |
| | | this.scrollTop = e.scrollTop |
| | |
| | | }).exec(); |
| | | }, |
| | | methods: { |
| | | getPageImg() |
| | | { |
| | | var that=this; |
| | | this.$u.api.getBanner({ |
| | | type: '11,17' |
| | | }).then(e => { |
| | | console.log(e); |
| | | if (e.code == 1) return that.$alert(e.msg); |
| | | var res = e.data.info; |
| | | this.popBannerSList=res.jdImg; |
| | | if(res.jdImg&&res.jdImg.length>0) |
| | | { |
| | | that.goodsList.unshift(res[0]); |
| | | } |
| | | }).catch(function(err) { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | getNav() { |
| | | var that = this; |
| | | this.$u.api.getTopCalss({ctype:3}).then(e => { |
| | |
| | | }, |
| | | |
| | | goDetail(info) { |
| | | uni.navigateTo({ |
| | | url: '../goods/goodsDetail?info=' + encodeURIComponent(JSON.stringify(info)) |
| | | }) |
| | | if(info&&info!=undefined) |
| | | { |
| | | uni.navigateTo({ |
| | | url: '../goods/goodsDetail?info=' + encodeURIComponent(JSON.stringify(info)) |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | goback() { |
| | |
| | | <view class="goodsList-container colCen borderBox"> |
| | | <view class="goods-content rowStaBet"> |
| | | <view class="goods-items borderBox colCen" v-for="(items,index) in goodsList" :key='index' @click="goDetail(items)"> |
| | | <colGoods :items="items"></colGoods> |
| | | <colGoodsImg v-if="index==0&&popBannerSList&&popBannerSList.length>0" :popBannerSList="popBannerSList"></colGoodsImg> |
| | | <colGoods v-else :items="items"></colGoods> |
| | | </view> |
| | | <aLoadMore :status="loadstatus" mode="loading3" :showTitle='true' color="#999999"></aLoadMore> |
| | | </view> |
| | |
| | | |
| | | <script> |
| | | import colGoods from '../../components/colGoods.vue' |
| | | import colGoodsImg from '../../components/colGoodsImg.vue' |
| | | export default { |
| | | components:{ |
| | | colGoods |
| | | colGoods, |
| | | colGoodsImg |
| | | }, |
| | | data() { |
| | | return { |
| | | popBannerSList:[], |
| | | pageTop: 0, |
| | | nowCurrent: 0, |
| | | scrollTop:0, |
| | | navList: [], |
| | | |
| | | fiexdHeight:'', |
| | | fiexdtop:'', |
| | | goodsList: [], |
| | |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.getNav() |
| | | this.getNav(); |
| | | this.getPageImg(); |
| | | }, |
| | | onPageScroll(e) { |
| | | this.scrollTop = e.scrollTop |
| | |
| | | }).exec(); |
| | | }, |
| | | methods: { |
| | | getPageImg() |
| | | { |
| | | var that=this; |
| | | this.$u.api.getBanner({ |
| | | type: '11,19' |
| | | }).then(e => { |
| | | if (e.code == 1) return that.$alert(e.msg); |
| | | var res = e.data.info; |
| | | this.popBannerSList=res.pddImg; |
| | | if(res.pddImg&&res.pddImg.length>0) |
| | | { |
| | | that.goodsList.unshift(res[0]); |
| | | } |
| | | }).catch(function(err) { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | getNav() { |
| | | var that = this; |
| | | this.$u.api.getTopCalss({ctype:2}).then(e => { |
| | |
| | | }, |
| | | |
| | | goDetail(info) { |
| | | console.log(info); |
| | | uni.navigateTo({ |
| | | url: '../goods/goodsDetail?info=' + encodeURIComponent(JSON.stringify(info)) |
| | | }) |
| | | if(info&&info!=undefined) |
| | | { |
| | | uni.navigateTo({ |
| | | url: '../goods/goodsDetail?info=' + encodeURIComponent(JSON.stringify(info)) |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | goback() { |
| | |
| | | </block> |
| | | </scroll-view> |
| | | </view> |
| | | <colGoodsImg :popBannerSList="popBannerSList"></colGoodsImg> |
| | | |
| | | <view class="goodsList-container colCen borderBox"> |
| | | <view class="goods-content rowStaBet"> |
| | | <view class="goods-items borderBox colCen" v-for="(items,index) in goodsList" :key='index' @click="goDetail(items)"> |
| | | <view class="goods-items borderBox" v-for="(items,index) in goodsList" :key='index' @click="goDetail(items)"> |
| | | <!-- <colGoodsImg :popBannerSList="popBannerSList"></colGoodsImg> --> |
| | | <colGoodsImg v-if="index==0" :popBannerSList="popBannerSList"></colGoodsImg> |
| | | <colGoodsImg v-if="index==0&&popBannerSList&&popBannerSList.length>0" :popBannerSList="popBannerSList"></colGoodsImg> |
| | | <colGoods v-else :items="items"></colGoods> |
| | | </view> |
| | | <aLoadMore :status="loadstatus" mode="loading3" :showTitle='true' color="#999999"></aLoadMore> |
| | |
| | | }, |
| | | mounted() { |
| | | uni.createSelectorQuery().in(this).select('.fixed-container').boundingClientRect(data => { |
| | | console.log(data.top); |
| | | this.fiexdHeight = data.height |
| | | }).exec(); |
| | | uni.createSelectorQuery().in(this).select('.rangeList-container').boundingClientRect(data => { |
| | | console.log(data.top); |
| | | this.fiexdtop = data.top - this.fiexdHeight |
| | | }).exec(); |
| | | }, |
| | |
| | | getNav() { |
| | | var that = this; |
| | | this.$u.api.getTopCalss({ctype:1,parentId:0}).then(e => { |
| | | console.log(e); |
| | | if(e.code != 0)return that.$alert(e.msg) |
| | | e.data.list.unshift({cid:"-1",cname:"天猫超市",ctype:"1"}); |
| | | e.data.list.unshift({cid:"0",cname:"全部",ctype:"1"}); |
| | |
| | | tchaoshi:tchaoshi, |
| | | secrend_search:this.nowsec |
| | | }).then(e => { |
| | | console.log(e); |
| | | if (e.code != 0) return that.$alert(e.msg) |
| | | var res = e.data; |
| | | uni.stopPullDownRefresh(); |
| | |
| | | that.loadstatus = 'loading' |
| | | that.pageCurrent ++ |
| | | } |
| | | if(!that.isinsert&&res&&res.length>0) |
| | | /* if(!that.isinsert&&res&&res.length>0) |
| | | { |
| | | that.goodsList.unshift(res[0]); |
| | | that.isinsert=true; |
| | | } |
| | | } */ |
| | | that.goodsList = that.goodsList.concat(res) |
| | | console.log(that.goodsList); |
| | | }).catch(function(err) {}) |
| | | }, |
| | | getPageImg() |
| | | { |
| | | var that=this; |
| | | var that=this; |
| | | this.$u.api.getBanner({ |
| | | type: '11,12' |
| | | type: '11,16' |
| | | }).then(e => { |
| | | console.log(e) |
| | | if (e.code == 1) return that.$alert(e.msg); |
| | | var res = e.data.info; |
| | | this.popBannerSList=res.popBannerSList; |
| | | this.popBannerSList=res.tmImg; |
| | | if(res.tmImg&&res.tmImg.length>0) |
| | | { |
| | | that.goodsList.unshift(res[0]); |
| | | } |
| | | }).catch(function(err) { |
| | | console.log(err) |
| | | }) |
| | |
| | | }, |
| | | |
| | | goDetail(info) { |
| | | uni.navigateTo({ |
| | | url: '../goods/goodsDetail?info=' + encodeURIComponent(JSON.stringify(info)) |
| | | }) |
| | | if(info&&info!=undefined) |
| | | { |
| | | uni.navigateTo({ |
| | | url: '../goods/goodsDetail?info=' + encodeURIComponent(JSON.stringify(info)) |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | |
| | | goback() { |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="searchContent rowCenBet" @tap="gosearch()"> |
| | | <view class="leftcontent rowCen"> |
| | | <view class="search-icon iconfont"> |
| | |
| | | </view> |
| | | <view class="emptybar" :style="'width:100%;height:'+(scrollTop>fiexdtop?'90':'0')+'rpx;'"> |
| | | </view> |
| | | |
| | | <view class="rangeList-container rowCen" :class="scrollTop>fiexdtop?'tofixed':''" :style="'top:'+(scrollTop>fiexdtop?fiexdHeight:'0')+'px;'"> |
| | | <scroll-view class="scrollview-content" scroll-x scroll-with-animation="true"> |
| | | <block v-for="(items,index) in navList" :key="index"> |
| | |
| | | </block> |
| | | </scroll-view> |
| | | </view> |
| | | |
| | | |
| | | <view class="goodsList-container colCen borderBox"> |
| | | <view class="goods-content rowStaBet"> |
| | | <view class="goods-items borderBox colCen" v-for="(items,index) in goodsList" :key='index' @click="goDetail(items)"> |
| | | <colGoods :items="items"></colGoods> |
| | | <colGoodsImg v-if="index==0&&popBannerSList&&popBannerSList.length>0" :popBannerSList="popBannerSList"></colGoodsImg> |
| | | <colGoods v-else :items="items"></colGoods> |
| | | </view> |
| | | <aLoadMore :status="loadstatus" mode="loading3" :showTitle='true' color="#999999"></aLoadMore> |
| | | </view> |
| | |
| | | |
| | | <script> |
| | | import colGoods from '../../components/colGoods.vue' |
| | | import colGoodsImg from '../../components/colGoodsImg.vue' |
| | | export default { |
| | | components:{ |
| | | colGoods |
| | | colGoods, |
| | | colGoodsImg |
| | | }, |
| | | data() { |
| | | return { |
| | | popBannerSList:[], |
| | | pageTop: 0, |
| | | nowCurrent: 0, |
| | | scrollTop:0, |
| | |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.getNav() |
| | | this.getNav(); |
| | | this.getPageImg(); |
| | | }, |
| | | onPageScroll(e) { |
| | | this.scrollTop = e.scrollTop |
| | |
| | | }).exec(); |
| | | }, |
| | | methods: { |
| | | getPageImg() |
| | | { |
| | | var that=this; |
| | | this.$u.api.getBanner({ |
| | | type: '11,20' |
| | | }).then(e => { |
| | | if (e.code == 1) return that.$alert(e.msg); |
| | | var res = e.data.info; |
| | | that.popBannerSList=res.wphImg; |
| | | console.log(that.popBannerSList); |
| | | if(res.wphImg&&res.wphImg.length>0) |
| | | { |
| | | that.goodsList.unshift(res[0]); |
| | | } |
| | | }).catch(function(err) { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | getNav() { |
| | | var that = this; |
| | | this.$u.api.getTopCalss({ctype:9}).then(e => { |
| | |
| | | }, |
| | | getData() { |
| | | var that = this; |
| | | console.log(this.nowCurrent) |
| | | this.$u.api.wphGoodsList({ |
| | | cate: this.nowCurrent, |
| | | pageSize: 10, |
| | | page: this.pageCurrent, |
| | | }).then(e => { |
| | | console.log(e); |
| | | if(e.code != 0)return that.$alert(e.msg) |
| | | var res = e.data; |
| | | if(res.list==null) |
| | |
| | | that.pageCurrent ++ |
| | | } |
| | | that.goodsList = that.goodsList.concat(res.list) |
| | | console.log(that.goodsList) |
| | | }).catch(function (err) { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | |
| | |
| | | }, |
| | | |
| | | goDetail(info) { |
| | | uni.navigateTo({ |
| | | url: '../goods/goodsDetail?info=' + encodeURIComponent(JSON.stringify(info)) |
| | | }) |
| | | if(info&&info!=undefined) |
| | | { |
| | | uni.navigateTo({ |
| | | url: '../goods/goodsDetail?info=' + encodeURIComponent(JSON.stringify(info)) |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | goback() { |
| | |
| | | flex-wrap: wrap; |
| | | |
| | | .goods-items{ |
| | | width: 350rpx; |
| | | height: 546rpx; |
| | | margin-bottom: 20rpx; |
| | | } |
| | | } |
| | |
| | | }).then(e => { |
| | | if (e.code == 1) return that.$alert(e.msg); |
| | | var res = e.data.info; |
| | | console.log(res) |
| | | if(res.length > 0){ |
| | | this.showBulletFrame = true; |
| | | this.BulletFrameData = res[0] |
| | |
| | | getTopheight() { |
| | | // 获取顶部高度 |
| | | uni.createSelectorQuery().in(this).select('.fixed-container').boundingClientRect(data => { |
| | | console.log("得到布局位置信息" + JSON.stringify(data)); |
| | | this.Topheight = data.height |
| | | }).exec(); |
| | | }, |
| | |
| | | <template> |
| | | <view> |
| | | <web-view :webview-styles="webviewStyles" :src="webviewUrl" @message='received'></web-view> |
| | | |
| | | </view> |
| | | |
| | | </template> |
| | |
| | | url: '/pages/webView/webView?url=' + info.parameter_json.url |
| | | }) |
| | | } else if (info.url_type == 1) { |
| | | console.log("进来了1·11111111111") |
| | | let url = info.parameter_json.url == undefined ? '' : info.parameter_json.url; |
| | | console.log(url) |
| | | if(url == '') return false; |