From ba3d748f9eb65a66fca9bd74fc7796b90a0a70ae Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期五, 30 六月 2023 09:06:15 +0800 Subject: [PATCH] Merge branch 'release/v1.1.3发布' --- uniapp/pages/search/searchResult.vue | 26 uniapp/pages/index/launchPage.vue | 77 +++ uniapp/pages/login/login.vue | 4 uniapp/pages/active/jdSearch.vue | 38 + uniapp/components/colGoods.vue | 2 uniapp/components/indexPage.vue | 26 uniapp/uni_modules/m-start-ad/package.json | 81 +++ uniapp/uni_modules/m-start-ad/readme.md | 78 +++ uniapp/uni_modules/m-start-ad/components/m-start-ad/m-start-ad.vue | 232 +++++++++++ uniapp/pages/active/pddsearch.vue | 39 + uniapp/pages/login/bindingPhone.vue | 4 uniapp/App.vue | 20 uniapp/utils/utils.js | 1 uniapp/components/colGoodsImg.vue | 52 ++ uniapp/pages.json | 3 uniapp/utils/getClipboard.js | 85 ++- uniapp/pages/search/search.vue | 24 uniapp/manifest.json | 4 uniapp/pages/goods/goodsDetail.vue | 40 + uniapp/pages/active/dysearch.vue | 38 + uniapp/uni_modules/m-start-ad/changelog.md | 4 uniapp/pages/active/vipsearch.vue | 54 ++ uniapp/pages/login/wxlogin.vue | 4 uniapp/pages/active/tmsearch.vue | 158 ++++++ uniapp/pages/index/index.vue | 60 +- uniapp/pages/login/setInviteCode.vue | 7 uniapp/pages/rankinglist/common_act.vue | 39 + uniapp/components/rowGoods.vue | 2 28 files changed, 1,029 insertions(+), 173 deletions(-) diff --git a/uniapp/App.vue b/uniapp/App.vue index a85e536..0838844 100644 --- a/uniapp/App.vue +++ b/uniapp/App.vue @@ -91,6 +91,7 @@ uni.getSystemInfo({ success: e => { // #ifdef APP-PLUS + console.log(e) if (e.platform == 'android') { this.globalData.platform = 'android' this.globalData.systemLevel = e.system @@ -138,6 +139,7 @@ ifwt: 0, hasinit:false, hasbcinit:false, + isLaunch:false }, onShow: function() { @@ -150,12 +152,14 @@ 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') @@ -187,6 +191,7 @@ 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灏辨槸鍒濆鍖栨垚鍔� @@ -196,12 +201,19 @@ } }); } + 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) @@ -220,7 +232,6 @@ that.globalData.ifwt = 0 } } - console.log(that.globalData.ifwt); } else { if (plus.runtime.isApplicationExist({pname:'com.tencent.mm', action: 'weixin://' @@ -233,8 +244,7 @@ } } // #endif - - }).catch(function(err) {}) + }).catch(function(err) {that.globalData.hasinit=false;}) }, diff --git a/uniapp/components/colGoods.vue b/uniapp/components/colGoods.vue index cc6d194..a441e2a 100644 --- a/uniapp/components/colGoods.vue +++ b/uniapp/components/colGoods.vue @@ -55,6 +55,8 @@ props: { items: Object }, + created(){ + }, data() { return { diff --git a/uniapp/components/colGoodsImg.vue b/uniapp/components/colGoodsImg.vue new file mode 100644 index 0000000..185742f --- /dev/null +++ b/uniapp/components/colGoodsImg.vue @@ -0,0 +1,52 @@ +<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> \ No newline at end of file diff --git a/uniapp/components/indexPage.vue b/uniapp/components/indexPage.vue index 92cca2e..02c7e68 100644 --- a/uniapp/components/indexPage.vue +++ b/uniapp/components/indexPage.vue @@ -595,7 +595,7 @@ }, onRestore() { this.swpidx = 0 - //console.log('涓嬫媺琚粓姝�'); + console.log('涓嬫媺琚粓姝�'); }, pagescroll(e) { this.$emit('scrollNum', e.detail.scrollTop) @@ -630,19 +630,20 @@ 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) @@ -698,7 +699,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) { diff --git a/uniapp/components/rowGoods.vue b/uniapp/components/rowGoods.vue index 2741ca8..d2dde21 100644 --- a/uniapp/components/rowGoods.vue +++ b/uniapp/components/rowGoods.vue @@ -17,7 +17,7 @@ <view class="cardbottom-container colCenEnd"> <view class="discounts-container rowCen borderBox"> - <view class="coupon-box rowCenCen" style="border: 1px solid #f50d49; color: #f50d49; background: none;" v-if="items.couponPrice>0 || items.sourceType=='wph'"> + <view class="coupon-box rowCenCen" style="border: 1px solid #f50d49;width:auto;color: #f50d49; background: none;" v-if="items.couponPrice>0 || items.sourceType=='wph'"> <view> {{items.sourceType=='wph'?items.discount+'鎶�':items.couponPrice+'鍏冨埜'}} </view> diff --git a/uniapp/manifest.json b/uniapp/manifest.json index 0e3a85b..d97a230 100644 --- a/uniapp/manifest.json +++ b/uniapp/manifest.json @@ -2,8 +2,8 @@ "name" : "澶ц繑瀹�", "appid" : "__UNI__FC8858A", "description" : "澶ц繑瀹榓pp", - "versionName" : "1.2.3", - "versionCode" : 123, + "versionName" : "1.1.3", + "versionCode" : 113, "transformPx" : false, /* 5+App鐗规湁鐩稿叧 */ "app-plus" : { diff --git a/uniapp/pages.json b/uniapp/pages.json index c928bfb..9fa9c12 100644 --- a/uniapp/pages.json +++ b/uniapp/pages.json @@ -4,6 +4,9 @@ "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue" }, "pages": [ + { + "path": "pages/index/launchPage" + }, //棣栭〉 { "path": "pages/index/index", diff --git a/uniapp/pages/active/dysearch.vue b/uniapp/pages/active/dysearch.vue index c8195f5..f924ddf 100644 --- a/uniapp/pages/active/dysearch.vue +++ b/uniapp/pages/active/dysearch.vue @@ -65,7 +65,8 @@ <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> @@ -76,12 +77,15 @@ <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, @@ -96,7 +100,8 @@ } }, onLoad() { - this.getNav() + this.getNav(); + this.getPageImg(); }, onPageScroll(e) { this.scrollTop = e.scrollTop @@ -117,6 +122,24 @@ }).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 => { @@ -193,9 +216,12 @@ }, 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() { diff --git a/uniapp/pages/active/jdSearch.vue b/uniapp/pages/active/jdSearch.vue index 8a6cde4..adc70f4 100644 --- a/uniapp/pages/active/jdSearch.vue +++ b/uniapp/pages/active/jdSearch.vue @@ -65,7 +65,8 @@ <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> @@ -77,12 +78,15 @@ <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, @@ -97,7 +101,8 @@ } }, onLoad() { - this.getNav() + this.getNav(); + this.getPageImg(); }, onPageScroll(e) { this.scrollTop = e.scrollTop @@ -118,6 +123,24 @@ }).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 => { @@ -164,9 +187,12 @@ }, 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() { diff --git a/uniapp/pages/active/pddsearch.vue b/uniapp/pages/active/pddsearch.vue index 1183f26..4bfc7e2 100644 --- a/uniapp/pages/active/pddsearch.vue +++ b/uniapp/pages/active/pddsearch.vue @@ -65,7 +65,8 @@ <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> @@ -76,17 +77,19 @@ <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: [], @@ -96,7 +99,8 @@ } }, onLoad() { - this.getNav() + this.getNav(); + this.getPageImg(); }, onPageScroll(e) { this.scrollTop = e.scrollTop @@ -117,6 +121,23 @@ }).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 => { @@ -180,10 +201,12 @@ }, 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() { diff --git a/uniapp/pages/active/tmsearch.vue b/uniapp/pages/active/tmsearch.vue index ab12727..5dc18e4 100644 --- a/uniapp/pages/active/tmsearch.vue +++ b/uniapp/pages/active/tmsearch.vue @@ -61,11 +61,28 @@ </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" style="font-size: 13px;margin-right: 30rpx; color: #8b8686;" :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> @@ -76,27 +93,63 @@ <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 @@ -108,11 +161,9 @@ }, 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(); }, @@ -120,7 +171,6 @@ 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"}); @@ -139,9 +189,9 @@ 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(); @@ -156,8 +206,30 @@ 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 @@ -167,11 +239,23 @@ 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() { @@ -303,6 +387,50 @@ } } } + + .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%; diff --git a/uniapp/pages/active/vipsearch.vue b/uniapp/pages/active/vipsearch.vue index 27a6a64..d9188f0 100644 --- a/uniapp/pages/active/vipsearch.vue +++ b/uniapp/pages/active/vipsearch.vue @@ -29,7 +29,6 @@ </view> </view> </view> - <view class="searchContent rowCenBet" @tap="gosearch()"> <view class="leftcontent rowCen"> <view class="search-icon iconfont"> @@ -46,7 +45,6 @@ </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"> @@ -61,11 +59,12 @@ </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> @@ -76,12 +75,15 @@ <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, @@ -96,7 +98,8 @@ } }, onLoad() { - this.getNav() + this.getNav(); + this.getPageImg(); }, onPageScroll(e) { this.scrollTop = e.scrollTop @@ -115,6 +118,24 @@ }).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 => { @@ -127,6 +148,7 @@ }, getData() { var that = this; + console.log(this.nowCurrent) this.$u.api.wphGoodsList({ cate: this.nowCurrent, pageSize: 10, @@ -134,6 +156,13 @@ }).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 @@ -144,7 +173,9 @@ that.pageCurrent ++ } that.goodsList = that.goodsList.concat(res.list) + console.log(that.goodsList) }).catch(function (err) { + console.log(err) }) }, @@ -158,9 +189,12 @@ }, 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() { @@ -358,6 +392,8 @@ flex-wrap: wrap; .goods-items{ + width: 350rpx; + height: 546rpx; margin-bottom: 20rpx; } } diff --git a/uniapp/pages/goods/goodsDetail.vue b/uniapp/pages/goods/goodsDetail.vue index f635732..90c03aa 100644 --- a/uniapp/pages/goods/goodsDetail.vue +++ b/uniapp/pages/goods/goodsDetail.vue @@ -28,8 +28,8 @@ <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> @@ -333,10 +333,8 @@ if(!getApp().globalData.hasinit) { - console.log("鍒濆鍖�") getApp().getAppInfo(); } - //console.log("2222222222222222-"+getApp().globalData.hasbcinit); if(!getApp().globalData.hasbcinit) { getApp().bcInit(); @@ -357,8 +355,19 @@ 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'; @@ -397,6 +406,10 @@ } else if (this.pageType == 'wph') { } + else if(this.pageType=='dy') + { + //this.optionsInfo.imgs=[] + } }, methods: { closeMdl() { @@ -406,11 +419,15 @@ 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() @@ -420,19 +437,16 @@ 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; @@ -456,13 +470,14 @@ 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; @@ -579,12 +594,10 @@ }, 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) {}) }, @@ -594,7 +607,6 @@ 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鍏冭喘鐨勮褰曞晢鍝乮d diff --git a/uniapp/pages/index/index.vue b/uniapp/pages/index/index.vue index a0b0e24..8b90c02 100644 --- a/uniapp/pages/index/index.vue +++ b/uniapp/pages/index/index.vue @@ -137,32 +137,10 @@ this.getPopBannerInfo(); }, onShow() { - /* if(!this.hasLogin){ - setTimeout(function(){ - - uni.reLaunch({ - url:"/pages/login/wxlogin" - }) - },1000); - return; - } */ if(!this.hasshow) { this.shShow(); - } - - /* var user= uni.getStorageSync('userInfo'); - console.log(user); */ - // if(!user.invitation_code) - // { - // setTimeout(function(){ - - // uni.reLaunch({ - // url:"/pages/login/wxlogin" - // }) - // },1000); - // return; - // } + } if(this.categoryList){ this.getCategoryList(); } @@ -180,34 +158,38 @@ shShow() { var that=this; + var istoLogin=true; this.$u.api.comminInt({}).then(e => { that.hasshow=true; // #ifdef APP-PLUS if (plus.os.name == 'iOS') { if (e.data.basic.iosExamine && plus.runtime.version == e.data.basic.IosExamineV) { that.isshowtype=true; + istoLogin=false; } else { that.isshowtype=false; - console.log("璺宠浆"); - if(!that.hasLogin){ + } + } + if(istoLogin) + { + if(!that.hasLogin){ + uni.reLaunch({ + url:"/pages/login/wxlogin" + }) + } + /* var user= uni.getStorageSync('userInfo'); + if(!user.invitation_code) + { + setTimeout(function(){ + uni.reLaunch({ url:"/pages/login/wxlogin" }) - } - var user= uni.getStorageSync('userInfo'); - if(!user.invitation_code) - { - setTimeout(function(){ - - uni.reLaunch({ - url:"/pages/login/wxlogin" - }) - },1000); - return; - } - } - console.log(that.isshowtype); + },1000); + return; + } */ } + // #endif }).catch(function(err) { console.log(err); diff --git a/uniapp/pages/index/launchPage.vue b/uniapp/pages/index/launchPage.vue new file mode 100644 index 0000000..546a7e6 --- /dev/null +++ b/uniapp/pages/index/launchPage.vue @@ -0,0 +1,77 @@ +<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> diff --git a/uniapp/pages/login/bindingPhone.vue b/uniapp/pages/login/bindingPhone.vue index a4d1ba6..481813d 100644 --- a/uniapp/pages/login/bindingPhone.vue +++ b/uniapp/pages/login/bindingPhone.vue @@ -201,11 +201,11 @@ 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' }) diff --git a/uniapp/pages/login/login.vue b/uniapp/pages/login/login.vue index 09cb9e6..081fffd 100644 --- a/uniapp/pages/login/login.vue +++ b/uniapp/pages/login/login.vue @@ -211,11 +211,11 @@ 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' }) diff --git a/uniapp/pages/login/setInviteCode.vue b/uniapp/pages/login/setInviteCode.vue index 59e2ca3..66e25db 100644 --- a/uniapp/pages/login/setInviteCode.vue +++ b/uniapp/pages/login/setInviteCode.vue @@ -150,7 +150,10 @@ 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' }) @@ -158,7 +161,7 @@ uni.switchTab({ url: '../index/index' }) - } + }*/ }).catch(function (err) { console.log(err) }) diff --git a/uniapp/pages/login/wxlogin.vue b/uniapp/pages/login/wxlogin.vue index 511649a..5a53652 100644 --- a/uniapp/pages/login/wxlogin.vue +++ b/uniapp/pages/login/wxlogin.vue @@ -202,11 +202,11 @@ 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' }) diff --git a/uniapp/pages/rankinglist/common_act.vue b/uniapp/pages/rankinglist/common_act.vue index 379ddf4..e8f2b52 100644 --- a/uniapp/pages/rankinglist/common_act.vue +++ b/uniapp/pages/rankinglist/common_act.vue @@ -1,16 +1,24 @@ <template> <view> - <web-view :webview-styles="webviewStyles" :src="webviewUrl" @message='received'></web-view> - + <web-view v-if="webshow" :webview-styles="webviewStyles" :src="webviewUrl" @message='received'></web-view> + <!-- taobao --> + <u-popup v-model="empowerModel" mode="center" border-radius="12"> + <empowerModel @closemodel='closeMdl' @updataInfo='updataUser'></empowerModel> + </u-popup> </view> </template> <script> + import empowerModel from '../../components/empowerModel.vue' var wv; export default { + components: { + empowerModel + }, data() { return { + webshow:true, empowerModel: false, webviewUrl: '', user:'', @@ -32,7 +40,6 @@ this.user = value; if(options.t_url) { - console.log(encodeURI(decodeURIComponent(options.t_url)+"?token="+value.token+"&userid="+value.id)); this.webviewUrl = encodeURI(decodeURIComponent(options.t_url)+"?token="+value.token+"&userid="+value.id); } } @@ -46,9 +53,15 @@ received(e) { var res=e.detail.data[0]; - if(res.action=='back') + console.log(res); + switch(res.action) { - this.backLast(); + case "back": + this.backLast(); + break; + case "tbauth": + this.openTbMd(); + break; } }, backLast() @@ -57,6 +70,22 @@ delta: 1 }); }, + closeMdl() { + this.empowerModel = false; + this.webshow=true; + }, + openTbMd() + { + this.webshow=false; + this.empowerModel = true + }, + updataUser() { + var that = this; + this.$u.api.getUserInfo({}).then(e => { + utils.setCache('userInfo', e.data.userinfo) + that.user = e.data.userinfo; + }).catch(function(err) {}) + }, // 鍏抽棴mui杩斿洖 clearMuiBack() { // #ifdef APP-PLUS diff --git a/uniapp/pages/search/search.vue b/uniapp/pages/search/search.vue index 6e51803..990c7ef 100644 --- a/uniapp/pages/search/search.vue +++ b/uniapp/pages/search/search.vue @@ -27,7 +27,7 @@ <view class="onlineStore-container rowCen" v-if="searchText==''"> <view class="onlineStoreList rowSta"> <block v-for="(items,index) in onlineStoreList" :key="index"> - <view class="store-items colCen" :class="storeCurrent==index?'store-items-active':''" @click="checkstore(index)"> + <view class="store-items colCen" :class="storeCurrent==items.inde?'store-items-active':''" @click="checkstore(items.inde)"> <view class="store-name"> {{items.name}} </view> @@ -166,24 +166,30 @@ return { onlineStoreList: [{ name: '娣樺疂', - type: 'tb' + type: 'tb', + inde:0 }, { name: '浜笢', - type: 'jd' + type: 'jd', + inde:1 }, { name: '鎷煎澶�', - type: 'pdd' - }, - { - name: '鍞搧浼�', - type: 'vph' + type: 'pdd', + inde:2 }, { name: '鎶栭煶', - type: 'dy' + type: 'dy', + inde:4 + }, + { + name: '鍞搧浼�', + type: 'vph', + inde:3 } + ], searchText: '', storeCurrent: 0, diff --git a/uniapp/pages/search/searchResult.vue b/uniapp/pages/search/searchResult.vue index 650f64e..b9ad46e 100644 --- a/uniapp/pages/search/searchResult.vue +++ b/uniapp/pages/search/searchResult.vue @@ -23,8 +23,8 @@ <view class="onlineStore-container rowCen"> <view class="onlineStoreList rowSta" v-if="!showtar || platform!='iOS'"> <block v-for="(items,index) in onlineStoreList" :key="index"> - <view class="store-items colCen" :class="storeCurrent==index?'store-items-active':''" - @click="checkstore(index)"> + <view class="store-items colCen" :class="storeCurrent==items.inde?'store-items-active':''" + @click="checkstore(items.inde)"> <view class="store-name"> {{items.name}} </view> @@ -151,24 +151,30 @@ advertPic: '', onlineStoreList: [{ name: '娣樺疂', - type: 'tb' + type: 'tb', + inde:0 }, { name: '浜笢', - type: 'jd' + type: 'jd', + inde:1 }, { name: '鎷煎澶�', - type: 'pdd' - }, - { - name: '鍞搧浼�', - type: 'wph' + type: 'pdd', + inde:2 }, { name: '鎶栭煶', - type: 'dy' + type: 'dy', + inde:4 + }, + { + name: '鍞搧浼�', + type: 'wph', + inde:3 } + ], sortList: [{ diff --git a/uniapp/uni_modules/m-start-ad/changelog.md b/uniapp/uni_modules/m-start-ad/changelog.md new file mode 100644 index 0000000..0c306cc --- /dev/null +++ b/uniapp/uni_modules/m-start-ad/changelog.md @@ -0,0 +1,4 @@ +## 1.0.1锛�2022-11-11锛� +淇敼鏂囨。鎻忚堪 +## 1.0.0锛�2022-11-11锛� +鍒濇鐗堟湰鍙戝竷 diff --git a/uniapp/uni_modules/m-start-ad/components/m-start-ad/m-start-ad.vue b/uniapp/uni_modules/m-start-ad/components/m-start-ad/m-start-ad.vue new file mode 100644 index 0000000..2062a6d --- /dev/null +++ b/uniapp/uni_modules/m-start-ad/components/m-start-ad/m-start-ad.vue @@ -0,0 +1,232 @@ +<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> diff --git a/uniapp/uni_modules/m-start-ad/package.json b/uniapp/uni_modules/m-start-ad/package.json new file mode 100644 index 0000000..2871587 --- /dev/null +++ b/uniapp/uni_modules/m-start-ad/package.json @@ -0,0 +1,81 @@ +{ + "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" + } + } + } + } +} \ No newline at end of file diff --git a/uniapp/uni_modules/m-start-ad/readme.md b/uniapp/uni_modules/m-start-ad/readme.md new file mode 100644 index 0000000..5c6546c --- /dev/null +++ b/uniapp/uni_modules/m-start-ad/readme.md @@ -0,0 +1,78 @@ +# 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 | 鏃堕棿鍊掕鏃剁粨鏉熷悗璺宠浆鍦板潃,濡傛灉鏄痶abbar椤甸潰锛屽彲涓虹┖ | +| bgColor | String | '#BB1219' | false | 椤甸潰鐨勮儗鏅鑹�, 寮�灞忓浘鐗囦负鑷姩鍨傜洿灞呬腑锛屽湪澶у睆骞曟墜鏈轰笅锛屾湁浜涙椂鍊欓珮搴︿笉澶熺殑鎯呭喌涓嬶紝浼氶�犳垚涓婁笅鐣欑櫧锛屼娇鐢ㄦ灞炴�у彲浠ュ~鍏呰儗鏅壊 | +| afterColor | String | '' | false | 椤甸潰搴曢儴鑳屾櫙鑹插~鍏咃紝鏈変簺鏃跺�欒缃細璁捐娓愬彉鑹插浘鐗囷紝濡傛灉鍙娇鐢╞gcolor鏃犳硶瑙e喅闇�姹傦紝姝ゆ椂瀹氫箟姝ゅ睘鎬э紝鍙湪鏈�涓嬮潰濉厖棰滆壊锛屼互杈惧埌棰滆壊杩囧害鏁堟灉 | +| currentColor | String | '#BB1219' | false | 瀹氫箟dot褰撳墠鐘舵�侀鑹�, list闀垮害澶т簬1鍙 | + + +### 濡備綍鍋氳嚜瀹氫箟寮�灞忕晫闈� + +#### 鏂瑰紡涓� +1銆佹柊寤轰竴涓柊椤甸潰 pages/start +2銆佷慨鏀筽ages.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銆佸�掕鏃剁粨鏉熷悗锛岃嚜鍔ㄩ殣钘忕粍浠讹紙鏃犻渶鎿嶄綔锛� + + +### 鏂瑰紡瀵规瘮 + |瀵规瘮 | 浼樼偣 | 缂虹偣 | + | ------- | ------- |------- | + | 鏂瑰紡涓� | 鎵�鏈夐〉闈㈤兘鍙互鍏敤 | 濡傛灉鍐呴〉闇�瑕乼abbar,闇�瑕佽嚜瀹氫箟 | + | 鏂瑰紡浜� | 鎸夐渶閰嶇疆 | 鏃犳硶鎺у埗navbar锛岄渶瑕佽嚜瀹氫箟 | \ No newline at end of file diff --git a/uniapp/utils/getClipboard.js b/uniapp/utils/getClipboard.js index ec4c169..3c3a248 100644 --- a/uniapp/utils/getClipboard.js +++ b/uniapp/utils/getClipboard.js @@ -5,7 +5,8 @@ function getclick(callback) { - uni.getClipboardData({ + + uni.getClipboardData({ success: res => { console.log(res, '======================================================'); var nowClipData = res.data @@ -18,11 +19,6 @@ callback(res) }).catch(function (err) { }) - // request.post("tb/parseContent", { - // content: nowClipData - // }, 'application/json').then(res => { - // callback(res) - // }); }else{ getApp().globalData.hasMode = false console.log('鍐呴儴澶嶅埗'); @@ -417,11 +413,31 @@ }, 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', @@ -437,7 +453,7 @@ }, 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", } @@ -457,44 +473,57 @@ }, 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({ @@ -570,13 +599,14 @@ 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('鍘籮d'); @@ -588,7 +618,16 @@ uni.setStorageSync('clipboard',dataInfo.goods_url) getApp().globalData.hasMode = false } - + if(e.clientX < dyrgt && e.clientX > dyleft) { + console.log('鍘籨y'); + 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('鍘籶dd'); const value = uni.getStorageSync('userInfo'); diff --git a/uniapp/utils/utils.js b/uniapp/utils/utils.js index ac70b56..3839885 100644 --- a/uniapp/utils/utils.js +++ b/uniapp/utils/utils.js @@ -57,6 +57,7 @@ }) } 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 -- Gitblit v1.9.3