From cf1973556ff35a0798436aa63d90f2cc8a2f53ba Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期四, 06 七月 2023 15:25:15 +0800 Subject: [PATCH] no message --- uniapp/pages/goods/goodsDetail.vue | 7 +-- uniapp/pages/rankinglist/fengqiang.vue | 22 +++++++--- uniapp/App.vue | 5 +- uniapp/pages/active/specialOffer.vue | 57 ++++++++++++++++++++++++++-- uniapp/pages/rankinglist/common_act.vue | 1 5 files changed, 74 insertions(+), 18 deletions(-) diff --git a/uniapp/App.vue b/uniapp/App.vue index 0838844..50492ce 100644 --- a/uniapp/App.vue +++ b/uniapp/App.vue @@ -13,7 +13,8 @@ onLaunch: function() { // #ifdef APP-PLUS //鎺ㄩ�佸紑濮� - /* var info = plus.push.getClientInfo() + var info = plus.push.getClientInfo() + console.log(info); // 鑾峰彇褰撳墠璁惧鐨勫鎴风id,浼犵粰鍚庡彴,瀹炵幇鎸囧畾鐢ㄦ埛 info && uni.setStorageSync('clientInfo', info) // 浣跨敤5+App鐨勬柟寮忚繘琛岀洃鍚秷鎭帹閫� @@ -79,7 +80,7 @@ //娑堟伅鎺ㄩ�佺粨鏉� plus.push.addEventListener('click', res => { console.log(res); - }); */ + }); APPUpdate(); // #endif this.getAppInfo(); diff --git a/uniapp/pages/active/specialOffer.vue b/uniapp/pages/active/specialOffer.vue index 0774dc8..55eb7e7 100644 --- a/uniapp/pages/active/specialOffer.vue +++ b/uniapp/pages/active/specialOffer.vue @@ -27,8 +27,14 @@ </view> </view> </view> - - <view class="rangeList-container rowCen"> + <view style="width: 100%;z-index: 999;"> + <view class="platvie"> + <view @click="changePlat(items.id)" class="platvie-plat" :class="currentplat==items.id?'platvie-active':''" v-for="(items,index) in platList" :key="index"> + {{items.text}} + </view> + </view> + </view> + <view class="rangeList-container rowCen" v-if="currentplat=='tb'"> <block v-for="(items,index) in priceRangelist" :key="index"> <view class="rangeItem colCen" :class="nowCurrent==items.type?'rangeItem-active':''" @tap="changeRange(items.type)"> <view class="nameBox"> @@ -61,7 +67,18 @@ }, data() { return { + currentplat:'tb', nowCurrent: -1, + platList:[ + { + id:'tb', + text:'娣樺疂' + }, + { + id:'jd', + text:'浜笢' + } + ], priceRangelist: [{ txt: '鎺ㄨ崘', type: -1 @@ -91,10 +108,19 @@ }, onReachBottom() { if (this.canloadmore) { + this.getData() } }, methods: { + changePlat(plat) + { + this.currentplat=plat; + this.pageCurrent = 1 + this.goodsList = [] + this.canloadmore = false + this.getData(); + }, changeRange(type) { this.pageCurrent = 1 this.canloadmore = false @@ -106,8 +132,10 @@ this.$u.api.getPineGoods( { nineCid: this.nowCurrent, page: this.pageCurrent, + plat:this.currentplat, pageSize: 20 }).then(e => { + console.log(e); if(e.code == 1)return that.$alert(e.msg); var res = e.data.list; uni.stopPullDownRefresh(); @@ -128,7 +156,6 @@ }) }, goDetail(info) { - console.log(info); uni.navigateTo({ url: '../goods/goodsDetail?info=' + encodeURIComponent(JSON.stringify(info)) }) @@ -149,6 +176,28 @@ </script> <style lang="scss"> + .platvie + { + width: 55%; + height: 100rpx; + z-index: 999; + display: flex; + text-align: center; + justify-content: center; + align-items: center; + margin: 0 auto; + } + .platvie-plat + { + width:33%; + font-size: 17px; + color: #dbd5d5; + } + .platvie-active + { + font-size: 19px; + color:#fff; + } .specialOffer-wrapper { width: 100%; min-height: 380rpx; @@ -266,7 +315,7 @@ z-index: 1; width: 100%; padding: 0 32rpx; - margin-top: 210rpx; + margin-top: 310rpx; .goods-content { width: 100%; diff --git a/uniapp/pages/goods/goodsDetail.vue b/uniapp/pages/goods/goodsDetail.vue index 4d4953b..2d1c6e3 100644 --- a/uniapp/pages/goods/goodsDetail.vue +++ b/uniapp/pages/goods/goodsDetail.vue @@ -373,6 +373,7 @@ console.log(options); if(options.sourcefrom) { + console.log(decodeURIComponent(options.info)); this.optionsInfo = JSON.parse(decodeURIComponent(options.info)); this.pageInfo = JSON.parse(decodeURIComponent(options.info)); console.log(this.optionsInfo) @@ -441,15 +442,11 @@ 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() diff --git a/uniapp/pages/rankinglist/common_act.vue b/uniapp/pages/rankinglist/common_act.vue index 28a0cb3..00ea3b0 100644 --- a/uniapp/pages/rankinglist/common_act.vue +++ b/uniapp/pages/rankinglist/common_act.vue @@ -89,6 +89,7 @@ }, backLast() { + console.log("杩斿洖") uni.navigateBack({ delta: 1 }); diff --git a/uniapp/pages/rankinglist/fengqiang.vue b/uniapp/pages/rankinglist/fengqiang.vue index bfff77a..5a9ad31 100644 --- a/uniapp/pages/rankinglist/fengqiang.vue +++ b/uniapp/pages/rankinglist/fengqiang.vue @@ -48,6 +48,7 @@ else{ const value = uni.getStorageSync('userInfo'); console.log(value); + //this.webviewUrl = encodeURI('http://appapitest.ushopvip.com/html/fengqiangbang.html?token='+value.token); this.webviewUrl = encodeURI('http://dfgapp.ushopvip.com/html/fengqiangbang.html?token='+value.token); } @@ -57,15 +58,22 @@ }, methods: { received(e) { - console.log(e.detail.data[0].type) - if(e.detail.data[0].type=='getToken'){ - const token = uni.getStorageSync('userInfo').token; - var currentWebview = this.$scope.$getAppWebview() - var wv = currentWebview.children()[0] - wv.evalJS('localStorage.setItem("ZZTOKEN",' + JSON.stringify(token) + ')'); + var res=e.detail.data[0]; + console.log(res); + switch(res.action) + { + case "back"://杩斿洖 + this.backLast(); + break; } }, - + backLast() + { + console.log("杩斿洖") + uni.navigateBack({ + delta: 1 + }); + }, // 鍏抽棴mui杩斿洖 clearMuiBack() { // #ifdef APP-PLUS -- Gitblit v1.9.3