Merge branch 'feature/1.1.3版本开发' into develop
# Conflicts:
# uniapp/App.vue
# uniapp/components/indexPage.vue
# uniapp/pages/index/index.vue
# uniapp/pages/login/wxlogin.vue
# uniapp/uniCloud-aliyun/cloudfunctions/getPhoneNumber/index.js
| | |
| | | uni.getSystemInfo({ |
| | | success: e => { |
| | | // #ifdef APP-PLUS |
| | | console.log(e) |
| | | if (e.platform == 'android') { |
| | | this.globalData.platform = 'android' |
| | | this.globalData.systemLevel = e.system |
| | |
| | | ifwt: 0, |
| | | hasinit:false, |
| | | hasbcinit:false, |
| | | isLaunch:false |
| | | |
| | | }, |
| | | onShow: function() { |
| | |
| | | content: 'æ£æµå°ç½ç»æéå¯è½è®¾ç½®ä¸ºå
³éï¼æ¨å¯ä»¥å¨â设置â䏿£æ¥æ çº¿æ°æ®åèçªç§»å¨ç½ç»' |
| | | }) |
| | | }else{ |
| | | console.log("æ¯å¦è¯·æ±è¿ï¼"+that.globalData.hasinit) |
| | | if(!that.globalData.hasinit) |
| | | { |
| | | that.getAppInfo(); |
| | | } |
| | | if(!that.globalData.hasbcinit) |
| | | { |
| | | console.log("åå§åç¾å·æä»¶") |
| | | that.bcInit(); |
| | | } |
| | | /* let appInfo = utils.getCacheSync('appInfo') |
| | |
| | | if (uni.getSystemInfoSync().platform == 'ios') |
| | | { |
| | | const plug = uni.requireNativePlugin('xiguazhu-baichuan'); |
| | | console.log(plug) |
| | | plug.init({}, result => { |
| | | //console.log('1111111111111111111'); |
| | | console.log(result); // codeçäº0å°±æ¯åå§åæå |
| | |
| | | } |
| | | }); |
| | | } |
| | | else{ |
| | | that.globalData.hasbcinit=true; |
| | | } |
| | | }, |
| | | getAppInfo: function() { |
| | | var that = this; |
| | | that.globalData.hasinit=true; |
| | | this.$u.api.comminInt({}).then(e => { |
| | | if (e.code != 0) return that.$alert(e.msg) |
| | | that.globalData.hasinit=true; |
| | | if (e.code != 0) |
| | | { |
| | | that.globalData.hasinit=false; |
| | | return that.$alert(e.msg) |
| | | } |
| | | that.globalData.appinfo = e.data.basic |
| | | utils.setCache('appInfo', e.data.basic) |
| | | utils.setCache('baseUrl', this.$u.http.config.baseUrl) |
| | |
| | | that.globalData.ifwt = 0 |
| | | } |
| | | } |
| | | console.log(that.globalData.ifwt); |
| | | } else { |
| | | if (plus.runtime.isApplicationExist({pname:'com.tencent.mm', |
| | | action: 'weixin://' |
| | |
| | | } |
| | | } |
| | | // #endif |
| | | |
| | | }).catch(function(err) {}) |
| | | }).catch(function(err) {that.globalData.hasinit=false;}) |
| | | |
| | | }, |
| | | |
| | |
| | | props: { |
| | | items: Object |
| | | }, |
| | | created(){ |
| | | }, |
| | | data() { |
| | | return { |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <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 |
| | | }, |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | created() |
| | | { |
| | | console.log(this.popBannerSList); |
| | | }, |
| | | methods: |
| | | { |
| | | goUrl(info) |
| | | { |
| | | console.log(info); |
| | | utils.goUrl(info, this) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | .swiper-box { |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | .swiper-item { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | |
| | | </style> |
| | |
| | | }, |
| | | onRestore() { |
| | | this.swpidx = 0 |
| | | //console.log('ä¸æè¢«ç»æ¢'); |
| | | console.log('ä¸æè¢«ç»æ¢'); |
| | | }, |
| | | pagescroll(e) { |
| | | this.$emit('scrollNum', e.detail.scrollTop) |
| | |
| | | var res = e.data.info; |
| | | if(res.topBannerList&&res.topBannerList.length>0) |
| | | { |
| | | that.topBannerList = res.topBannerList; |
| | | that.headerColor = that.topBannerList[0].colour; |
| | | this.topBannerList = res.topBannerList; |
| | | this.headerColor = this.topBannerList[0].colour; |
| | | } |
| | | that.singleLineList = res.singleLineList; |
| | | that.doubleLineList = res.doubleLineList; |
| | | that.bottomBannerList = res.bottomBannerList; |
| | | that.fastenter=res.indexbanner; |
| | | that.popBannerSList=res.popBannerSList; |
| | | that.enterTop=res.enterTop; |
| | | that.enterDown=res.enterDown; |
| | | |
| | | this.singleLineList = res.singleLineList; |
| | | this.doubleLineList = res.doubleLineList; |
| | | this.bottomBannerList = res.bottomBannerList; |
| | | this.fastenter=res.indexbanner; |
| | | this.popBannerSList=res.popBannerSList; |
| | | this.enterTop=res.enterTop; |
| | | this.enterDown=res.enterDown; |
| | | setTimeout(() => { |
| | | that.triggeredstate = false; |
| | | that._freshing = false; |
| | | this.triggeredstate = false; |
| | | this._freshing = false; |
| | | }, 300) |
| | | }).catch(function(err) { |
| | | console.log(err) |
| | |
| | | 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) { |
| | |
| | | "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue" |
| | | }, |
| | | "pages": [ |
| | | { |
| | | "path": "pages/index/launchPage" |
| | | }, |
| | | //é¦é¡µ |
| | | { |
| | | "path": "pages/index/index", |
| | |
| | | <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() { |
| | |
| | | <template> |
| | | <view class="pddsearch-wrapper wrapperLayer borderBox"> |
| | | <view class="pddsearch-wrapper wrapperLayer borderBox" style="background: #fff;"> |
| | | <view class="topbarbox"></view> |
| | | <view class="fixed-container colCen"> |
| | | <view class="topbarbox"></view> |
| | |
| | | </block> |
| | | </scroll-view> |
| | | </view> |
| | | |
| | | <!--äºçº§æç´¢--> |
| | | <view class="scrangeList-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 secrendSearch" :key="index"> |
| | | <view class="rangeItem" :class="nowsec==items.id?'rangeItem-active':''" @tap="changeSeRange(items.id)"> |
| | | <view class="boxcontent colCenCen"> |
| | | <view class="nameBox"> |
| | | {{items.name}} |
| | | </view> |
| | | <view class="border"></view> |
| | | </view> |
| | | </view> |
| | | </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> |
| | | <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.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: [], |
| | | pageCurrent: 1, |
| | | canloadmore: false, |
| | | loadstatus: 'loading' |
| | | loadstatus: 'loading', |
| | | nowsec:0, |
| | | isinsert:false, |
| | | secrendSearch:[ |
| | | { |
| | | id:0, |
| | | name:'综å' |
| | | }, |
| | | { |
| | | id:1, |
| | | name:'60天æä½ä»·' |
| | | }, |
| | | { |
| | | id:2, |
| | | name:'èåç®' |
| | | }, |
| | | { |
| | | id:3, |
| | | name:'æ·æ¢è´' |
| | | }, |
| | | { |
| | | id:4, |
| | | name:'å¤ä¹°å¤é' |
| | | }, |
| | | { |
| | | id:5, |
| | | name:'é鿢è´' |
| | | }, |
| | | { |
| | | id:6, |
| | | name:'é¢å¤æ»¡å' |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.getNav() |
| | | this.getNav(); |
| | | this.getPageImg(); |
| | | |
| | | }, |
| | | onPageScroll(e) { |
| | | this.scrollTop = e.scrollTop |
| | |
| | | }, |
| | | 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"}); |
| | |
| | | cateId: cateid, |
| | | page: this.pageCurrent, |
| | | pageSize: 10, |
| | | tchaoshi:tchaoshi |
| | | 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) |
| | | { |
| | | that.goodsList.unshift(res[0]); |
| | | that.isinsert=true; |
| | | } */ |
| | | that.goodsList = that.goodsList.concat(res) |
| | | }).catch(function(err) {}) |
| | | }, |
| | | getPageImg() |
| | | { |
| | | var that=this; |
| | | this.$u.api.getBanner({ |
| | | type: '11,16' |
| | | }).then(e => { |
| | | if (e.code == 1) return that.$alert(e.msg); |
| | | var res = e.data.info; |
| | | this.popBannerSList=res.tmImg; |
| | | if(res.tmImg&&res.tmImg.length>0) |
| | | { |
| | | that.goodsList.unshift(res[0]); |
| | | } |
| | | }).catch(function(err) { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | changeRange(id) { |
| | | this.pageCurrent = 1 |
| | |
| | | this.goodsList = [] |
| | | this.getData() |
| | | }, |
| | | changeSeRange(id) { |
| | | this.pageCurrent = 1 |
| | | this.canloadmore = false |
| | | this.nowsec = id |
| | | this.loadstatus = 'loading' |
| | | this.goodsList = [] |
| | | this.getData() |
| | | }, |
| | | |
| | | 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() { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .scrangeList-container { |
| | | width: 100%; |
| | | height: 80rpx; |
| | | padding-left: 32rpx; |
| | | z-index: 101; |
| | | |
| | | .scrollview-content { |
| | | width: 100%; |
| | | height: 100%; |
| | | white-space: nowrap; |
| | | |
| | | .rangeItem { |
| | | display: inline-flex; |
| | | margin-right: 45rpx; |
| | | height: 100%; |
| | | |
| | | .boxcontent { |
| | | height: 100%; |
| | | |
| | | .nameBox { |
| | | |
| | | } |
| | | |
| | | .border { |
| | | width: 60%; |
| | | height: 2rpx; |
| | | background: transparent; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .rangeItem-active { |
| | | .boxcontent { |
| | | .nameBox { |
| | | font-size: 32rpx; |
| | | color:#F97B24; |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .rangeList-container { |
| | | width: 100%; |
| | |
| | | </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, |
| | |
| | | }).then(e => { |
| | | if(e.code != 0)return that.$alert(e.msg) |
| | | var res = e.data; |
| | | if(res.list==null) |
| | | { |
| | | that.pageCurrent++ |
| | | that.canloadmore = false |
| | | that.loadstatus = 'nomarl' |
| | | return; |
| | | } |
| | | if (res.list < 10) { |
| | | that.pageCurrent++ |
| | | that.canloadmore = false |
| | |
| | | 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; |
| | | } |
| | | } |
| | |
| | | <view class="pagetopBar-container colCen"> |
| | | <view class="topbarbox"></view> |
| | | </view> |
| | | <view class="currentbox rowCenCen" v-if="optionsInfo.imageList || pageInfo.showImgs"> |
| | | <view>{{currentIndex+1}}/{{pageType=='jd'?optionsInfo.imgs.length:pageInfo.showImgs.length}}</view> |
| | | <view class="currentbox rowCenCen" v-if="pageInfo.imgs&&pageInfo.imgs.length>0"> |
| | | <view>{{currentIndex+1}}/{{pageInfo.imgs.length}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | |
| | | if(!getApp().globalData.hasinit) |
| | | { |
| | | console.log("åå§å") |
| | | getApp().getAppInfo(); |
| | | } |
| | | //console.log("2222222222222222-"+getApp().globalData.hasbcinit); |
| | | if(!getApp().globalData.hasbcinit) |
| | | { |
| | | getApp().bcInit(); |
| | |
| | | this.pageType = this.optionsInfo.sourceType ? this.optionsInfo.sourceType : 'tb'; |
| | | this.faction = this.optionsInfo.faction ? this.optionsInfo.faction : 't'; |
| | | } else { |
| | | this.optionsInfo = JSON.parse(options.info); |
| | | this.pageInfo = JSON.parse(options.info); |
| | | console.log(options); |
| | | if(options.sourcefrom) |
| | | { |
| | | this.optionsInfo = JSON.parse(decodeURIComponent(options.info)); |
| | | this.pageInfo = JSON.parse(decodeURIComponent(options.info)); |
| | | console.log(this.optionsInfo) |
| | | } |
| | | else |
| | | { |
| | | this.optionsInfo = JSON.parse(options.info); |
| | | this.pageInfo = JSON.parse(options.info); |
| | | } |
| | | |
| | | this.pageType = this.optionsInfo.sourceType; |
| | | if (!this.optionsInfo.faction) { |
| | | if (this.pageType == 'tb' || this.pageType == 'tm' || this.pageType == 'tmshop') this.faction = 't'; |
| | |
| | | } else if (this.pageType == 'wph') { |
| | | |
| | | } |
| | | else if(this.pageType=='dy') |
| | | { |
| | | //this.optionsInfo.imgs=[] |
| | | } |
| | | }, |
| | | methods: { |
| | | closeMdl() { |
| | |
| | | getPageInfo(e) { |
| | | var that = this; |
| | | if (this.faction == 'j') { |
| | | var loinf={ |
| | | goodsId: this.optionsInfo.goodsId, |
| | | goods: JSON.stringify(this.optionsInfo) |
| | | } |
| | | console.log(loinf) |
| | | this.$u.api.getJdsDetail({ |
| | | goodsId: this.optionsInfo.goodsId, |
| | | goods: JSON.stringify(this.optionsInfo) |
| | | }).then(e => { |
| | | console.log(e); |
| | | var res = e.data.detailPics; |
| | | this.JdDetails = that.JdDetails.concat(res) |
| | | that.$forceUpdate() |
| | |
| | | this.$u.api.getGoodsDetail({ |
| | | goodsId: this.optionsInfo.goodsId |
| | | }).then(e => { |
| | | console.log(e) |
| | | if (e.code != 0) return that.$alert(e.msg) |
| | | var res = e.data.info; |
| | | this.pageInfo = res |
| | | this.pageInfo.showImgs = [] |
| | | console.log(this.pageInfo) |
| | | this.pageInfo.imgs.map(items => { |
| | | var a = {} |
| | | a.url = items |
| | | this.pageInfo.showImgs.push(a) |
| | | }) |
| | | this.optionsInfo = res |
| | | console.log(this.pageInfo); |
| | | }).catch(function(err) {}) |
| | | } else if (this.faction == 'p') { |
| | | var that = this; |
| | |
| | | a.url = items |
| | | this.pageInfo.showImgs.push(a) |
| | | }) |
| | | console.log(this.pageInfo); |
| | | }) |
| | | }else if(this.faction == 'd'){ |
| | | console.log(this.optionsInfo.goodsId); |
| | | var that = this; |
| | | this.$u.api.getDyGoodsDetail({ |
| | | goodsId: this.optionsInfo.goodsId |
| | | }).then(e => { |
| | | console.log(e); |
| | | var res = e.data.info; |
| | | this.pageInfo = res |
| | | that.optionsInfo.imgs = that.pageInfo.imgs; |
| | |
| | | }, |
| | | |
| | | updataUser() { |
| | | console.log('æ´æ°') |
| | | var that = this; |
| | | this.$u.api.getUserInfo({}).then(e => { |
| | | utils.setCache('userInfo', e.data.userinfo) |
| | | that.user = e.data.userinfo; |
| | | console.log(that.user) |
| | | }).catch(function(err) {}) |
| | | }, |
| | | |
| | |
| | | goodsId: this.optionsInfo.goodsId, |
| | | type: 0 |
| | | }).then(e => { |
| | | console.log(e) |
| | | if (e.code != 0) return that.$alert(e.msg) |
| | | if(that.frompage=='freebuy') |
| | | {//0å
è´çè®°å½ååid |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view v-if="list&&list.length>0"> |
| | | <m-start-ad :list="list" v-on:pgoUrl="goUrl" :time="time" url="/pages/index/index" /> |
| | | </view> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import utils from "../../utils/utils.js" |
| | | export default { |
| | | data() { |
| | | return { |
| | | list:[], |
| | | time:5 |
| | | }; |
| | | }, |
| | | |
| | | onShow: function () { |
| | | |
| | | var first = getApp().globalData.isLaunch; |
| | | if(first){ |
| | | uni.reLaunch({ |
| | | url: "/pages/index/index" |
| | | }); |
| | | } else { |
| | | |
| | | getApp().globalData.isLaunch=true; |
| | | var that = this; |
| | | this.$u.api.getBanner({ |
| | | type: '1,15' |
| | | }).then(e => { |
| | | |
| | | console.log(e) |
| | | if (e.code == 1) |
| | | {//è¿å失败ï¼ç´æ¥è·³é¦é¡µ |
| | | this.t_index(); |
| | | return; |
| | | } |
| | | var res = e.data.info; |
| | | if(res&&res.launchpic&&res.launchpic.length>0) |
| | | { |
| | | that.list=res.launchpic; |
| | | } |
| | | else{ |
| | | console.log("跳转") |
| | | this.t_index(); |
| | | } |
| | | }).catch(function(err) { |
| | | console.log(err); |
| | | this.t_index(); |
| | | }) |
| | | } |
| | | }, |
| | | methods: { |
| | | goUrl(info) { |
| | | if (info.url_type == 1&&info.parameter_json.url=="/pages/index/index") |
| | | { |
| | | uni.reLaunch({ |
| | | url: './index' |
| | | }) |
| | | } |
| | | else{ |
| | | utils.goUrl(info, this) |
| | | } |
| | | }, |
| | | t_index() |
| | | { |
| | | |
| | | setTimeout(()=>{ |
| | | uni.reLaunch({ |
| | | url: "/pages/index/index" |
| | | }); |
| | | }, 500); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | url: './setInviteCode' |
| | | }) |
| | | } |
| | | else if (e.data.userinfo.isPwd == 'N') { |
| | | /* else if (e.data.userinfo.isPwd == 'N') { |
| | | uni.redirectTo({ |
| | | url: './setPass' |
| | | }) |
| | | } else { |
| | | } */else { |
| | | uni.switchTab({ |
| | | url: '../index/index' |
| | | }) |
| | |
| | | url: './setInviteCode' |
| | | }) |
| | | } |
| | | else if (e.data.userinfo.isPwd == 'N') { |
| | | /* else if (e.data.userinfo.isPwd == 'N') { |
| | | uni.redirectTo({ |
| | | url: './setPass' |
| | | }) |
| | | } else { |
| | | } */else { |
| | | uni.switchTab({ |
| | | url: '../index/index' |
| | | }) |
| | |
| | | this.$u.api.getUserInfo({}).then(e => { |
| | | console.log(e) |
| | | util.setCache('userInfo', e.data.userinfo); |
| | | if (e.data.userinfo.isPwd == 'N') { |
| | | uni.switchTab({ |
| | | url: '../index/index' |
| | | }) |
| | | /* if (e.data.userinfo.isPwd == 'N') { |
| | | uni.redirectTo({ |
| | | url: './setPass' |
| | | }) |
| | |
| | | uni.switchTab({ |
| | | url: '../index/index' |
| | | }) |
| | | } |
| | | */} |
| | | }).catch(function (err) { |
| | | console.log(err) |
| | | }) |
| | |
| | | <template> |
| | | <view> |
| | | <web-view :webview-styles="webviewStyles" :src="webviewUrl" @message='received'></web-view> |
| | | |
| | | </view> |
| | | |
| | | </template> |
| | |
| | | else{ |
| | | const value = uni.getStorageSync('userInfo'); |
| | | console.log(value); |
| | | this.webviewUrl = encodeURI('http://dfgapp.ushopvip.com/html/fengqiangbang.html?token='+value.token); |
| | | this.webviewUrl = encodeURI('http://appapitest.ushopvip.com/html/fengqiangbang.html?token='+value.token); |
| | | } |
| | | |
| | | }, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | ## 1.0.1ï¼2022-11-11ï¼ |
| | | ä¿®æ¹ææ¡£æè¿° |
| | | ## 1.0.0ï¼2022-11-11ï¼ |
| | | 忬¡çæ¬åå¸ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="start" v-if="show"> |
| | | <view class="skip" :style="skipPositionStyle" @click="onSkip">è·³è¿ {{time2}}</view> |
| | | <swiper class="swiper" :interval="interval" @change="onChangeSwiper"> |
| | | <swiper-item v-for="(item, index) in list" :key="index"> |
| | | <view class="swiper-item" :style="'background:'+ item.colour +';'" @click="goUrl(item)"> |
| | | <image class="image" :src="item.image" mode="widthFix"></image> |
| | | <view class="after" :style="afterStyle"></view> |
| | | </view> |
| | | </swiper-item> |
| | | <!-- autoplay --> |
| | | </swiper> |
| | | <view class="swiper-dot" v-if="list.length>1"> |
| | | <view class="view" :style="index === current ? currentStyle : ''" :class="{'active': index === current}" |
| | | v-for="(item, index) in list" :key="index" /> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | list: { |
| | | type: Array, |
| | | default () { |
| | | return [] |
| | | }, |
| | | required: true |
| | | }, |
| | | hasTabbar: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | hasNavbar: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | interval: { |
| | | type: Number, |
| | | default: 3000 |
| | | }, |
| | | time: { |
| | | type: Number, |
| | | default: 3 |
| | | }, |
| | | url: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | bgColor: { |
| | | type: String, |
| | | default: '#BB1219' |
| | | }, |
| | | afterColor: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | currentColor: { |
| | | type: String, |
| | | default: '#BB1219' |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | current: 0, |
| | | show: true, |
| | | timer: null, |
| | | time2: this.time |
| | | } |
| | | }, |
| | | watch: { |
| | | time2(val) { |
| | | if (val <= 0) { |
| | | this.onSkip() |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | bgStyle() { |
| | | return this.obj2strStyle({ |
| | | 'background-color': this.bgColor |
| | | }) |
| | | }, |
| | | afterStyle() { |
| | | return this.obj2strStyle({ |
| | | 'background-color': this.afterColor |
| | | }) |
| | | }, |
| | | currentStyle() { |
| | | return this.obj2strStyle({ |
| | | 'background-color': this.currentColor |
| | | }) |
| | | }, |
| | | skipPositionStyle() { |
| | | const { |
| | | statusBarHeight |
| | | } = uni.getSystemInfoSync() |
| | | if (!this.hasNavbar) { |
| | | return this.obj2strStyle({ |
| | | 'top': `${statusBarHeight*2 + 88 + 30}rpx` |
| | | }) |
| | | } |
| | | return this.obj2strStyle({ |
| | | 'top': '30rpx' |
| | | }) |
| | | } |
| | | }, |
| | | mounted() { |
| | | if (this.hasTabbar) { |
| | | uni.hideTabBar() |
| | | } |
| | | this.timer = setInterval(() => { |
| | | this.time2-- |
| | | }, 1000) |
| | | }, |
| | | methods: { |
| | | obj2strStyle(obj) { |
| | | let style = '' |
| | | for (let key in obj) { |
| | | style += `${key}:${obj[key]};` |
| | | } |
| | | return style |
| | | }, |
| | | goUrl(item) |
| | | { |
| | | this.$emit("pgoUrl",item); |
| | | }, |
| | | onSkip() { |
| | | const { |
| | | url, |
| | | hasTabbar, |
| | | timer |
| | | } = this |
| | | clearTimeout(timer) |
| | | this.show = false |
| | | if (hasTabbar) { |
| | | uni.showTabBar() |
| | | } |
| | | if (url) { |
| | | uni.reLaunch({ |
| | | url: url, |
| | | }) |
| | | } |
| | | }, |
| | | onChangeSwiper(e) { |
| | | this.current = e.detail.current |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | /* $nav-height: 44px; */ |
| | | .start { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | z-index: 9999; |
| | | } |
| | | |
| | | .skip { |
| | | position: absolute; |
| | | z-index: 2; |
| | | background-color: rgba(0, 0, 0, 0.1); |
| | | color: #fff; |
| | | right: 30rpx; |
| | | font-size: 28rpx; |
| | | width: 133rpx; |
| | | height: 60rpx; |
| | | border-radius: 44rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .swiper { |
| | | height: 100vh; |
| | | width: 100vw; |
| | | } |
| | | |
| | | .swiper-item { |
| | | height: 100vh; |
| | | width: 100vw; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | overflow: hidden; |
| | | background-color: transparent; |
| | | } |
| | | |
| | | .swiper-item .after { |
| | | width: 100vw; |
| | | height: 500rpx; |
| | | position: absolute; |
| | | left: 0; |
| | | bottom: 0; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .swiper-item .image { |
| | | height: 100vh; |
| | | width: 100vw; |
| | | display: block; |
| | | position: relative; |
| | | z-index: 2; |
| | | } |
| | | |
| | | .swiper-dot { |
| | | position: absolute; |
| | | width: 100vw; |
| | | left: 0; |
| | | bottom: 100rpx; |
| | | z-index: 3; |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .swiper-dot .view { |
| | | width: 16rpx; |
| | | height: 16rpx; |
| | | border-radius: 100%; |
| | | background-color: rgba(0, 0, 0, 0.2); |
| | | margin: 0 12rpx; |
| | | } |
| | | |
| | | .swiper-dot .view.active { |
| | | width: 30rpx; |
| | | border-radius: 24rpx; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "id": "m-start-ad", |
| | | "displayName": "start-adå¼å±å¹¿å", |
| | | "version": "1.0.1", |
| | | "description": "èªå®ä¹å¼å±å¹¿å", |
| | | "keywords": [ |
| | | "startãå¼å±ãå¼å±å¹¿å" |
| | | ], |
| | | "repository": "", |
| | | "engines": { |
| | | "HBuilderX": "^3.2.12" |
| | | }, |
| | | "dcloudext": { |
| | | "type": "component-vue", |
| | | "sale": { |
| | | "regular": { |
| | | "price": "0.00" |
| | | }, |
| | | "sourcecode": { |
| | | "price": "0.00" |
| | | } |
| | | }, |
| | | "contact": { |
| | | "qq": "" |
| | | }, |
| | | "declaration": { |
| | | "ads": "æ ", |
| | | "data": "æ ", |
| | | "permissions": "æ " |
| | | }, |
| | | "npmurl": "" |
| | | }, |
| | | "uni_modules": { |
| | | "dependencies": [], |
| | | "encrypt": [], |
| | | "platforms": { |
| | | "cloud": { |
| | | "tcb": "y", |
| | | "aliyun": "y" |
| | | }, |
| | | "client": { |
| | | "Vue": { |
| | | "vue2": "y", |
| | | "vue3": "y" |
| | | }, |
| | | "App": { |
| | | "app-vue": "y", |
| | | "app-nvue": "y" |
| | | }, |
| | | "H5-mobile": { |
| | | "Safari": "y", |
| | | "Android Browser": "y", |
| | | "微信æµè§å¨(Android)": "y", |
| | | "QQæµè§å¨(Android)": "y" |
| | | }, |
| | | "H5-pc": { |
| | | "Chrome": "y", |
| | | "IE": "y", |
| | | "Edge": "y", |
| | | "Firefox": "y", |
| | | "Safari": "y" |
| | | }, |
| | | "å°ç¨åº": { |
| | | "微信": "y", |
| | | "é¿é": "y", |
| | | "ç¾åº¦": "y", |
| | | "åèè·³å¨": "y", |
| | | "QQ": "y", |
| | | "éé": "y", |
| | | "å¿«æ": "y", |
| | | "é£ä¹¦": "y", |
| | | "京ä¸": "y" |
| | | }, |
| | | "å¿«åºç¨": { |
| | | "å为": "y", |
| | | "èç": "y" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | # m-start-ad |
| | | |
| | | å¿«éå¶ä½ä¸ä¸ªèªå®ä¹å¼å±å¹¿åï¼æ¯æè½®æ |
| | | |
| | | ### 屿§è¯´æ |
| | | |
| | | | 屿§å | ç±»å | é»è®¤å¼ | å¿
å¡« | 说æ | |
| | | | ------- | ------- | ------- | ------- | ------- | |
| | | | list | Array | [] | true | å¼å±å¾çå表 | |
| | | | hasTabbar | Boolean | false | false | 页é¢åå¨åçtabbarï¼ç»ä»¶ä¼èªå¨å¤æéètabbar | |
| | | | hasNavbar | Boolean | false | false | 页颿¯å¦å
å«navbar | |
| | | | interval | Number | 3000 | false | è½®æèªå¨ææ¾æ¶é´ï¼å¤å¾æ¶å¯ç¨ï¼ | |
| | | | time | Number | 3 | false | å计æ¶è·³è¿ | |
| | | | url | String | '' | false | æ¶é´å计æ¶ç»æå跳转å°å,妿æ¯tabbar页é¢ï¼å¯ä¸ºç©º | |
| | | | bgColor | String | '#BB1219' | false | 页é¢çèæ¯é¢è², å¼å±å¾ç为èªå¨åç´å±
ä¸ï¼å¨å¤§å±å¹ææºä¸ï¼æäºæ¶åé«åº¦ä¸å¤çæ
åµä¸ï¼ä¼é æä¸ä¸çç½ï¼ä½¿ç¨æ¤å±æ§å¯ä»¥å¡«å
èæ¯è² | |
| | | | afterColor | String | '' | false | 页é¢åºé¨èæ¯è²å¡«å
ï¼æäºæ¶å设置ä¼è®¾è®¡æ¸åè²å¾çï¼å¦æåªä½¿ç¨bgcoloræ æ³è§£å³éæ±ï¼æ¤æ¶å®ä¹æ¤å±æ§ï¼å¯å¨æä¸é¢å¡«å
é¢è²ï¼ä»¥è¾¾å°é¢è²è¿åº¦ææ | |
| | | | currentColor | String | '#BB1219' | false | å®ä¹dotå½åç¶æé¢è², listé¿åº¦å¤§äº1å¯è§ | |
| | | |
| | | |
| | | ### å¦ä½åèªå®ä¹å¼å±çé¢ |
| | | |
| | | #### æ¹å¼ä¸ |
| | | 1ãæ°å»ºä¸ä¸ªæ°é¡µé¢ pages/start |
| | | 2ãä¿®æ¹pages.jsé
ç½®æä»¶ï¼æstartå°åæ¾å¨æå |
| | | ``` |
| | | { |
| | | "pages": [ |
| | | { |
| | | "path" : "pages/start", //page第ä¸é¡µå°±æ¯å¼å±ç¬¬ä¸ä¸ªé¡µé¢ |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText": "", |
| | | "navigationStyle": "custom" //åæ¶é»è®¤å¯¼èªåå°æ»¡å±ææ |
| | | } |
| | | |
| | | } |
| | | ] |
| | | } |
| | | ``` |
| | | 3ã页é¢å¼å
¥ç»ä»¶ï¼ä¼ å
¥list, url |
| | | |
| | | ### ä½¿ç¨æ¹å¼ |
| | | ``` |
| | | <template> |
| | | <m-start-ad :list="list" url="pages/index/index" /> |
| | | </template> |
| | | |
| | | ``` |
| | | |
| | | #### æ¹å¼äº |
| | | 1ã页é¢å
³éåçå¯¼èª |
| | | ``` |
| | | { |
| | | "pages": [ |
| | | { |
| | | "path" : "pages/index/index", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText": "", |
| | | "navigationStyle": "custom" //åæ¶é»è®¤å¯¼èªåå°æ»¡å±ææ |
| | | } |
| | | |
| | | } |
| | | ] |
| | | } |
| | | ``` |
| | | 1ã页é¢ç´æ¥ä½¿ç¨ |
| | | ``` |
| | | <m-start-ad :list="list" /> |
| | | ``` |
| | | 2ãå计æ¶ç»æåï¼èªå¨éèç»ä»¶ï¼æ éæä½ï¼ |
| | | |
| | | |
| | | ### æ¹å¼å¯¹æ¯ |
| | | |å¯¹æ¯ | ä¼ç¹ | ç¼ºç¹ | |
| | | | ------- | ------- |------- | |
| | | | æ¹å¼ä¸ | ææé¡µé¢é½å¯ä»¥å
¬ç¨ | 妿å
页éè¦tabbar,éè¦èªå®ä¹ | |
| | | | æ¹å¼äº | æéé
ç½® | æ æ³æ§å¶navbarï¼éè¦èªå®ä¹ | |
| | |
| | | //const httpUrl = ""; // æ¥å£åå |
| | | //const httpUrl = "http://appapitest.ushopvip.com"; // æµè¯ç¯å¢æ¥å£åå |
| | | const httpUrl = "http://dfgapp.ushopvip.com"; // ç产ç¯å¢æ¥å£åå |
| | | const httpUrl = "http://appapitest.ushopvip.com"; // æµè¯ç¯å¢æ¥å£åå |
| | | //const httpUrl = "http://dfgapp.ushopvip.com"; // ç产ç¯å¢æ¥å£åå |
| | | const salt = ""; |
| | | export default { |
| | | httpUrl:httpUrl, |
| | |
| | | |
| | | |
| | | function getclick(callback) { |
| | | uni.getClipboardData({ |
| | | |
| | | uni.getClipboardData({ |
| | | success: res => { |
| | | console.log(res, '======================================================'); |
| | | var nowClipData = res.data |
| | |
| | | callback(res) |
| | | }).catch(function (err) { |
| | | }) |
| | | // request.post("tb/parseContent", { |
| | | // content: nowClipData |
| | | // }, 'application/json').then(res => { |
| | | // callback(res) |
| | | // }); |
| | | }else{ |
| | | getApp().globalData.hasMode = false |
| | | console.log('å
é¨å¤å¶'); |
| | |
| | | }, |
| | | position: { |
| | | top: uni.upx2px(580) + "px", |
| | | left: uni.upx2px(115) + "px", |
| | | left: uni.upx2px(85) + "px", |
| | | width: uni.upx2px(74) + "px", |
| | | height: uni.upx2px(24) + "px", |
| | | } |
| | | }, |
| | | { |
| | | tag: 'font', |
| | | id: 'dytxt', |
| | | text: 'æé³', |
| | | textStyles: { |
| | | size: uni.upx2px(24) + "px", |
| | | color: "#333333", |
| | | align: "center", |
| | | weight: "normal", |
| | | whiteSpace: "nowrap", |
| | | overflow: 'ellipsis', |
| | | verticalAlign: 'middle' |
| | | }, |
| | | position: { |
| | | top: uni.upx2px(580) + "px", |
| | | left: uni.upx2px(185) + "px", |
| | | width: uni.upx2px(74) + "px", |
| | | height: uni.upx2px(24) + "px", |
| | | } |
| | | }, |
| | | { |
| | | tag: 'font', |
| | | id: 'pddtxt', |
| | |
| | | }, |
| | | position: { |
| | | top: uni.upx2px(580) + "px", |
| | | left: uni.upx2px(225) + "px", |
| | | left: uni.upx2px(285) + "px", |
| | | width: uni.upx2px(74) + "px", |
| | | height: uni.upx2px(24) + "px", |
| | | } |
| | |
| | | }, |
| | | position: { |
| | | top: uni.upx2px(580) + "px", |
| | | left: uni.upx2px(335) + "px", |
| | | left: uni.upx2px(385) + "px", |
| | | width: uni.upx2px(74) + "px", |
| | | height: uni.upx2px(24) + "px", |
| | | } |
| | | }, |
| | | |
| | | { |
| | | src: './static/images/app/jd.png', |
| | | src: 'https://yanfeiobpub.obs.cn-east-3.myhuaweicloud.com/dfg/index_icon/%E4%BA%AC%E4%B8%9C.png', |
| | | tag: 'img', |
| | | id: 'jd', |
| | | position: { |
| | | top: uni.upx2px(490) + "px", |
| | | left: uni.upx2px(115) + "px", |
| | | left: uni.upx2px(85) + "px", |
| | | width: uni.upx2px(74) + "px", |
| | | height: uni.upx2px(74) + "px", |
| | | } |
| | | }, |
| | | { |
| | | src: 'https://yanfeiobpub.obs.cn-east-3.myhuaweicloud.com/dfg/index_icon/%E6%8A%96.png', |
| | | tag: 'img', |
| | | id: 'dy', |
| | | position: { |
| | | top: uni.upx2px(490) + "px", |
| | | left: uni.upx2px(185) + "px", |
| | | width: uni.upx2px(74) + "px", |
| | | height: uni.upx2px(74) + "px", |
| | | } |
| | | }, |
| | | { |
| | | src: './static/images/app/pdd.png', |
| | | src: 'https://yanfeiobpub.obs.cn-east-3.myhuaweicloud.com/dfg/index_icon/%E6%8B%BC.png', |
| | | tag: 'img', |
| | | id: 'pdd', |
| | | position: { |
| | | top: uni.upx2px(490) + "px", |
| | | left: uni.upx2px(225) + "px", |
| | | left: uni.upx2px(285) + "px", |
| | | width: uni.upx2px(74) + "px", |
| | | height: uni.upx2px(74) + "px", |
| | | } |
| | | }, |
| | | { |
| | | src: './static/images/app/vph.png', |
| | | src: 'https://yanfeiobpub.obs.cn-east-3.myhuaweicloud.com/dfg/index_icon/%E5%94%AF.png', |
| | | tag: 'img', |
| | | id: 'vph', |
| | | position: { |
| | | top: uni.upx2px(490) + "px", |
| | | left: uni.upx2px(335) + "px", |
| | | left: uni.upx2px(385) + "px", |
| | | width: uni.upx2px(74) + "px", |
| | | height: uni.upx2px(74) + "px", |
| | | } |
| | | }, |
| | | |
| | | ]; |
| | | |
| | | nogoodsIdwrap.drawRect({ |
| | |
| | | |
| | | let icontop = uni.upx2px(490) |
| | | let iconbtm = uni.upx2px(600) |
| | | let jdleft = uni.upx2px(115) |
| | | let jdrgt = uni.upx2px(190) |
| | | let pddleft = uni.upx2px(225) |
| | | let pddrgt = uni.upx2px(300) |
| | | let vphleft = uni.upx2px(335) |
| | | let vphrgt = uni.upx2px(410) |
| | | |
| | | let jdleft = uni.upx2px(85) |
| | | let jdrgt = uni.upx2px(160) |
| | | let pddleft = uni.upx2px(285) |
| | | let pddrgt = uni.upx2px(360) |
| | | let vphleft = uni.upx2px(385) |
| | | let vphrgt = uni.upx2px(460) |
| | | let dyleft= uni.upx2px(185) |
| | | let dyrgt= uni.upx2px(260) |
| | | if (e.clientY > icontop && e.clientY < iconbtm) { |
| | | if (e.clientX < jdrgt && e.clientX > jdleft) { |
| | | console.log('å»jd'); |
| | |
| | | uni.setStorageSync('clipboard',dataInfo.goods_url) |
| | | getApp().globalData.hasMode = false |
| | | } |
| | | |
| | | if(e.clientX < dyrgt && e.clientX > dyleft) { |
| | | console.log('å»dy'); |
| | | maskLayers.hide(); |
| | | nogoodsIdwrap.hide(); |
| | | uni.navigateTo({ |
| | | url: '/pages/search/searchResult?storetype=4&searchText=' + dataInfo.goods_url |
| | | }) |
| | | uni.setStorageSync('clipboard',dataInfo.goods_url) |
| | | getApp().globalData.hasMode = false |
| | | } |
| | | if (e.clientX < pddrgt && e.clientX > pddleft) { |
| | | console.log('å»pdd'); |
| | | const value = uni.getStorageSync('userInfo'); |
| | |
| | | }) |
| | | } else if (info.url_type == 1) { |
| | | let url = info.parameter_json.url == undefined ? '' : info.parameter_json.url; |
| | | console.log(url) |
| | | if(url == '') return false; |
| | | uni.navigateTo({ |
| | | url: url |