From 949739f33f7cc0c0b277cbccfdd61ac311bb6928 Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期三, 05 七月 2023 10:00:08 +0800 Subject: [PATCH] no message --- public/html/freebuy.html | 132 +++++++++++++++++++++++++++---------------- 1 files changed, 83 insertions(+), 49 deletions(-) diff --git a/public/html/freebuy.html b/public/html/freebuy.html index 80ecf3d..b8e0c28 100644 --- a/public/html/freebuy.html +++ b/public/html/freebuy.html @@ -40,10 +40,7 @@ margin: auto; max-width: 800px; font-size: .28rem; overflow: hidden; position: relative; z-index: 1; overflow: hidden; } - #appMain:before { - content: "";display: block;position: absolute;top: 0;left: -20%;height: 3.88rem;width: 140%;background: linear-gradient(90deg,#fbe7e2,#fbe7e2) no-repeat;background-size: 100%; - border-radius: 0 0 50% 50%;z-index: -1; - } + .h3bt { width: 1.66rem; @@ -55,12 +52,14 @@ .act_header{ z-index: 200; width: 100%; background: no-repeat top; background-size: 100% auto; display: flex; align-items: center; justify-content: space-between; - position: fixed;background: linear-gradient(90deg, #fbe7e2 0%, #fbe7e2 100%) 0% 0% / 100%; + background: linear-gradient(90deg, #fbe7e2 0%, #fbe7e2 100%) 0% 0% / 100%; color: #fff; max-width: 800px; } .act_header .centent{ text-align: center; + background: #FF451F; + padding-top: 0.6rem; } .act_header .centent img{ width:100%; @@ -158,7 +157,7 @@ .list-section{ - display: -webkit-flex;display: flex;-webkit-flex-wrap: wrap;flex-wrap: wrap;-webkit-justify-content: space-between;justify-content: space-between;padding: 0 1.87%;margin-top: 0.6rem; + display: -webkit-flex;display: flex;-webkit-flex-wrap: wrap;flex-wrap: wrap;-webkit-justify-content: space-between;justify-content: space-between;padding: 0 1.87%;margin-top: 0.05rem; } .list-section .listTmp{ width: 49%;background: #fff;border-radius: .08rem;margin-bottom: .14rem;box-sizing: border-box; @@ -234,7 +233,6 @@ .sort { background-color: #ea2424; border-radius: .2rem .2rem 0 0; - margin-top: 0.8rem; } .sort-list { @@ -285,20 +283,33 @@ .sort-list>li span i.arrow-active { border-color: #f2f2f2 transparent transparent } +.appback +{ + width: 100%; + height: 0.5rem; + position: absolute; + top: 0.4rem; + left: 10px; +} +.appback-img +{ + height: 100%; +} </style> </head> -<body > - +<body style="background: #fbe7e2;"> + <div id="appMain" > + <div class="appback"> + <image v-on:click="topBack()" class="appback-img" src="https://yanfeiobpub.obs.cn-east-3.myhuaweicloud.com/dfg/h5return_backIcon.png"></image> + </div> <header class="act_header"> <div></div> <div class="centent"><img src="https://yanfeiobpub.obs.cn-east-3.myhuaweicloud.com/dfg/xinrengoubanner.png" alt=""></div> - <div class="share"> - <!-- <a href="">鍒嗕韩</a> --> - </div> + </header> - <div id="appMain" > - <div :style="{ height: (twoNav && twoNav.length > 0) ? '2.3rem' : '2.3rem'}"></div> + + <div class="sort"> <ul class="sort-list"> <li v-for="item in fristOrderSort" v-bind:class="{'sort-active': item.number == sortNumber}" @@ -377,7 +388,7 @@ goodsList:[], robbingNum:0, }, - sortNumber:0, + sortNumber:'tb', sortId:0, fristOrderSort: [ { @@ -385,21 +396,21 @@ bool: true, max: "", min: "", - number: 0 + number: 'tb' }, { name: "鎶栭煶", bool: true, max: "", min: "", - number: 1 + number: 'dy' }, { name: "浜笢", bool: true, max: "", min: "", - number: 3 + number: 'jd' } ], goodsItem: [], @@ -410,16 +421,43 @@ activeTwo:undefined, loading:true, isUniReady:false, - plat:'dy', - posturl:"http://dfg.shop.com" - //posturl:"http://appapitest.ushopvip.com" + plat:'tb', + //posturl:"http://dfg.shop.com" + posturl:"http://appapitest.ushopvip.com" //posturl:"http://dfgapp.ushopvip.com" }, methods: { + topBack:function() + { + uni.postMessage({ + data: { + action: 'back' + } + }); + }, + Infoformat: function(info){ + let formatObj = info.replace(/\%/g,"%25") + formatObj = info.replace(/\#/g,"%23") + formatObj = info.replace(/\&/g,"%26") + formatObj = info.replace(/\?/g,"%3F") + return formatObj; + }, targetItem:function(item){ - uni.navigateTo({ - url: '/pages/goods/goodsDetail?id=' + item.goodsId+'&frompage=freebuy' - }); + switch(this.plat) + { + case "tb": + uni.navigateTo({ + url: '/pages/goods/goodsDetail?id=' + item.goodsId+'&frompage=freebuy' + }); + break; + case "dy": + var itemsStr=this.Infoformat(JSON.stringify(item)); + uni.navigateTo({ + url: '/pages/goods/goodsDetail?sourcefrom=freebuy&info=' + itemsStr+'&frompage=freebuy' + }); + break; + } + /* if(this.isUniReady) { uni.postMessage({ @@ -431,21 +469,12 @@ } */ }, handleSort: function(item) { - if(this.sortNumber == item.number) { - if(item.min === item.max) { - return; - } - if(item.bool) { - this.sortId = item.min; - item.bool = false; - } else { - this.sortId = item.max; - item.bool = true; - } - } else { - item.bool = true; + if(this.sortNumber != item.number) { + this.loading=true; + this.lists=[]; + this.getgoodsSwitch(item.number); this.sortNumber = item.number; - this.sortId = item.max; + this.plat=item.number; } }, getUrlPar:function(name) @@ -470,7 +499,7 @@ pageSize:40, } }).done(function(res){ - _this.lists=[].concat(_this.lists,res.data.list); + _this.lists=[].concat([],res.data.list); _this.loading = false; }) }, @@ -490,10 +519,22 @@ pageSize:40, } }).done(function(res){ - _this.lists=[].concat(_this.lists,res.data.list); + _this.lists=[].concat([],res.data.list); _this.loading = false; }) }, + getgoodsSwitch:function(plat) + { + switch(plat) + { + case "tb": + this.getTbGoodsList(); + break; + case "dy": + this.getDyGoodsList(); + break; + } + }, //鏄惁棣栧崟 getIsSd:function(){ var _this = this; @@ -512,15 +553,7 @@ }).done(function(res){ if(res.msg.info==1) { - switch(_this.plat) - { - case "tb": - _this.getTbGoodsList(); - break; - case "dy": - _this.getDyGoodsList(); - break; - } + _this.getgoodsSwitch(_this.plat); } else{ alert("鎮ㄥ凡涓嬭繃棣栧崟锛屼笉鍙啀娆¤喘涔帮紝璇锋祻瑙堝叾浠栧晢鍝佸惂~"); @@ -539,6 +572,7 @@ }) }, }, + mounted: function () { this.getIsSd(); var that=this; -- Gitblit v1.9.3