From d9c07383e7c05cb3aea6c77493db73c899ad29c5 Mon Sep 17 00:00:00 2001
From: zhaojs <349234519@qq.com>
Date: 星期五, 09 六月 2023 18:41:48 +0800
Subject: [PATCH] no message

---
 public/html/freebuy.html |   61 ++++++++++++++----------------
 1 files changed, 28 insertions(+), 33 deletions(-)

diff --git a/public/html/freebuy.html b/public/html/freebuy.html
index 9fb1065..5ff55b3 100644
--- a/public/html/freebuy.html
+++ b/public/html/freebuy.html
@@ -245,7 +245,7 @@
    
     <div :style="{ height: (twoNav && twoNav.length > 0) ? '2.3rem' : '2.3rem'}"></div>
     
-    <div v-if="!loading" style="min-height: 100vh;" class=" swiper-container swiper-container-initialized swiper-container-horizontal swiper-container-free-mode swiper-container-ios">
+    <div v-if="!loading" style="min-height: 100vh; background: #fbe7e2;" class=" swiper-container swiper-container-initialized swiper-container-horizontal swiper-container-free-mode swiper-container-ios">
             <div class="swiper-wrapper" style="transform: translate3d(0px, 0px, 0px);">
                 <div class="swiper-slide list-section">
                             <div class="listTmp " v-for="(data,key) in lists" :key="key" v-on:click="targetItem(data)">
@@ -254,9 +254,7 @@
                                     </div>
                                     <div class="productInfo">
                                         <div class="title">
-                                            <div class="shoplabel ">
-                                                <img src="">
-                                            </div>
+                                           
                                             <span>{{data.dtitle}}</span>
                                         </div>
                                         
@@ -324,7 +322,10 @@
         methods: {
            
             targetItem:function(item){
-                if(this.isUniReady)
+                uni.navigateTo({
+                  url: '/pages/goods/goodsDetail?id=' + item.goodsId+'&frompage=freebuy'
+                });
+                /* if(this.isUniReady)
                 {
                     uni.postMessage({
                       data: {
@@ -332,7 +333,7 @@
                          data:item
                       }
                      });
-                }
+                } */
             },
             
             getUrlPar:function(name)
@@ -348,7 +349,7 @@
                 //鍒ゆ柇鏄惁棣栧崟
                 $.ajax({
                     headers:{
-                        "token":this.getUrlPar("token")
+                        "token":_this.getUrlPar("token")
                     },
                     //url:'http://dfg.shop.com/index.php/api/user/check_isfirst_free', 
                    //url:'http://dfgapp.ushopvip.com/api/user/check_isfirst_free',
@@ -358,39 +359,33 @@
                     data:{
                     }
                 }).done(function(res){
-                    if(res.data=='棣栧崟瀹㈡埛')
+                    if(res.msg.info==1)
                     {
+                        alert(res.msg.info);
                         $.ajax({
-                    headers:{
-                        "token":this.getUrlPar("token")
-                    },
-                    //url:'http://dfg.shop.com/index.php/api/taoke/get_first_free_goods', 
-                   //url:'http://dfgapp.ushopvip.com/api/taoke/get_first_free_goods',
-                   url:'http://appapitest.ushopvip.com/api/taoke/get_first_free_goods', 
-                   type:"post",
-                    dataType:"json",
-                    data:{
-                        nineCid:1,
-                        page: 1,
-                        pageSize:20,
-                    }
-                      }).done(function(res){
-                            var newlist=[];
-                            res.data.list.map(function(r,k){
-                                var buprice=r.actualPrice-r.topFanli;
-                                if(buprice<=3)
-                                {
-                                    newlist.push(r);
-                                }
-                            })
-                            _this.lists=[].concat(_this.lists,newlist);
+                            headers:{
+                                "token":_this.getUrlPar("token")
+                            },
+                                //url:'http://dfg.shop.com/index.php/api/taoke/get_first_free_goods', 
+                            //url:'http://dfgapp.ushopvip.com/api/taoke/get_first_free_goods',
+                            url:'http://appapitest.ushopvip.com/api/taoke/get_first_free_goods', 
+                            type:"post",
+                                dataType:"json",
+                            data:{
+                                page: 1,
+                                pageSize:40,
+                            }
+                            }).done(function(res){
+                                alert(res.data.list.length);
+                            _this.lists=[].concat(_this.lists,res.data.list);
                             _this.loading = false;
                      })
                     }
                     else{
                         alert("鎮ㄥ凡涓嬭繃棣栧崟锛屼笉鍙啀娆¤喘涔帮紝璇锋祻瑙堝叾浠栧晢鍝佸惂~");
+                      
                         setTimeout(function(){
-                            if(this.isUniReady)
+                            if(_this.isUniReady)
                             {
                                 uni.postMessage({
                                 data: {
@@ -398,7 +393,7 @@
                                 }
                                 });
                            }
-                        }, 3000 )
+                        }, 1000 )
                     }
                 })
 

--
Gitblit v1.9.3