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

---
 public/html/freebuy.html |   71 +++++++++++++++++++++++++----------
 1 files changed, 51 insertions(+), 20 deletions(-)

diff --git a/public/html/freebuy.html b/public/html/freebuy.html
index 5335ebe..7184b4c 100644
--- a/public/html/freebuy.html
+++ b/public/html/freebuy.html
@@ -254,9 +254,7 @@
                                     </div>
                                     <div class="productInfo">
                                         <div class="title">
-                                            <div class="shoplabel ">
-                                                <img src="">
-                                            </div>
+                                           
                                             <span>{{data.dtitle}}</span>
                                         </div>
                                         
@@ -345,32 +343,65 @@
             getGoodsList:function(){
                 var _this = this;
                 this.loading=true;
+                //鍒ゆ柇鏄惁棣栧崟
                 $.ajax({
                     headers:{
-                        "token":this.getUrlPar("token")
+                        "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', 
+                    //url:'http://dfg.shop.com/index.php/api/user/check_isfirst_free', 
+                   //url:'http://dfgapp.ushopvip.com/api/user/check_isfirst_free',
+                   url:'http://appapitest.ushopvip.com/api/user/check_isfirst_free', 
                    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);
-                    _this.loading = false;
+                    if(res.msg.info==1)
+                    {
+                        $.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);
+                            _this.loading = false;
+                     })
+                    }
+                    else{
+                        alert("鎮ㄥ凡涓嬭繃棣栧崟锛屼笉鍙啀娆¤喘涔帮紝璇锋祻瑙堝叾浠栧晢鍝佸惂~");
+                      
+                        setTimeout(function(){
+                            if(_this.isUniReady)
+                            {
+                                uni.postMessage({
+                                data: {
+                                    action: 'back'
+                                }
+                                });
+                           }
+                        }, 1000 )
+                    }
                 })
+
+                
             },
         },
         mounted: function () {

--
Gitblit v1.9.3