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 |   74 +++++++++++++++++++++++++++----------
 1 files changed, 54 insertions(+), 20 deletions(-)

diff --git a/public/html/freebuy.html b/public/html/freebuy.html
index ab3ccf3..b8e0c28 100644
--- a/public/html/freebuy.html
+++ b/public/html/freebuy.html
@@ -58,6 +58,8 @@
         }
         .act_header .centent{
             text-align: center;
+            background: #FF451F;
+            padding-top: 0.6rem;
         }
         .act_header .centent img{
             width:100%;
@@ -281,17 +283,32 @@
 .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 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>
         
     </header>
-    <div id="appMain" >
+   
    
     <div class="sort">
         <ul class="sort-list">
@@ -410,10 +427,37 @@
             //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({
@@ -425,23 +469,13 @@
                 } */
             },
             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;
                 }
-                this.getgoodsSwitch(item.number);
             },
             getUrlPar:function(name)
             {

--
Gitblit v1.9.3