From 955b7cb949e6d366e14fcdba7e7b1ddbb727d98c Mon Sep 17 00:00:00 2001
From: zhaojs <349234519@qq.com>
Date: 星期五, 09 六月 2023 19:25:08 +0800
Subject: [PATCH] no message

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

diff --git a/public/html/freebuy.html b/public/html/freebuy.html
index 2b7cd50..cde7d67 100644
--- a/public/html/freebuy.html
+++ b/public/html/freebuy.html
@@ -16,13 +16,13 @@
     <meta content="telephone=no,email=no" name="format-detection">
     <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover">
     <script type="text/javascript" src="https://public.ffquan.cn/lib/jquery-1.12.4.min.js"></script>
-    <script type="text/javascript" src="https://public.ffquan.cn/lib/vue/vue@2.6.11.min.js"></script>
+    <script type="text/javascript" src="https://cdn.staticfile.org/vue/2.6.11/vue.min.js"></script>
     <script type="text/javascript" src="https://public.ffquan.cn/lib/vue-lazyload.js"></script>
     <script type="text/javascript" src="https://public.ffquan.cn/lib/swiper/js/swiper.min.js"></script>
     <script type="text/javascript" src="https://public.ffquan.cn/lib/taobaoCode/taobaoCode.js?v=1.2.1"></script>
     <script type="text/javascript" src="https://public.ffquan.cn/lib/clipboard.min.js"></script>
 
-    <script type="text/javascript" src="https://js.cdn.aliyun.dcloud.net.cn/dev/uni-app/uni.webview.1.5.2.js"></script>
+    <script type="text/javascript" src="https://img.ushopvip.com/js/uni-webview-js.js"></script>
     <title>鏂颁汉涓撲韩</title>
     <script>
         
@@ -104,7 +104,6 @@
         }
 
         .hot_goods{
-
         }
         .goods_hot .bt{
             height: .42rem;font-size: .3rem;font-family: PingFangSC-Medium,PingFang SC;font-weight: 500;color: #fff;display: -webkit-flex;display: flex;-webkit-justify-content: space-between;justify-content: space-between;-webkit-align-items: center;align-items: center;padding: 0 .14rem 0 .16rem;
@@ -219,7 +218,7 @@
         }
 
         .loading{
-            line-height: 1rem; text-align: center; font-size: .3rem; color: #999;
+            line-height: 2rem; text-align: center; font-size: .3rem; color: #999;
         }
         .sys{
             width: 100%;
@@ -245,8 +244,9 @@
     </header>
    
     <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" v-else class="loading">鍔犺浇涓�...</div>
+
+    <div v-else 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,10 +254,9 @@
                                         <img :src="data.mainPic + '_310x310.jpg'" class="fadeIn " height="200" width="200">
                                     </div>
                                     <div class="productInfo">
-                                        <div class="title">
-                                            <div class="shoplabel ">
-                                                <img src="">
-                                            </div>
+                                        
+                                         <div class="title">
+                                           
                                             <span>{{data.dtitle}}</span>
                                         </div>
                                         
@@ -286,8 +285,7 @@
             <div class="swiper-pagination"></div>
             <span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span>
     </div>
-    <div v-else class="loading">鍔犺浇涓�...</div>
-
+   
 </div>
 </body>
 
@@ -296,13 +294,14 @@
 <script>
     (function(){
         var size = (document.body.clientWidth || document.documentElement.clientWidth);
+        size=size<=0?400:size;
         document.documentElement.style.fontSize = (size > 750 ? 750 : size) / 7.5 + 'px';
     })();
 
     Vue.use(VueLazyload, {
         preLoad: 1.3,//
         error: 'https://sr.ffquan.cn/cms_pic/20200622/bro7s7f6vrkd3jat4ujg0.png',
-        loading: 'https://sr.ffquan.cn/cms_pic/20200612/brhjkf76vrkcrfpi79eg0.png',
+      //  loading: 'https://sr.ffquan.cn/cms_pic/20200612/brhjkf76vrkcrfpi79eg0.png',
         attempt: 1
     })
     new Vue({
@@ -319,13 +318,16 @@
             active:0,
             twoNav:false,
             activeTwo:undefined,
-            loading:false,
+            loading:true,
             isUniReady:false
         },
         methods: {
            
             targetItem:function(item){
-                if(this.isUniReady)
+                uni.navigateTo({
+                  url: '/pages/goods/goodsDetail?id=' + item.goodsId+'&frompage=freebuy'
+                });
+                /* if(this.isUniReady)
                 {
                     uni.postMessage({
                       data: {
@@ -333,7 +335,7 @@
                          data:item
                       }
                      });
-                }
+                } */
             },
             
             getUrlPar:function(name)
@@ -346,32 +348,56 @@
             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_nine_goods', 
-                   // url:'http://dfgapp.ushopvip.com/api/taoke/get_nine_goods',
-                   //url:'http://appapitest.ushopvip.com/api/taoke/get_nine_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:{
+                                page: 1,
+                                pageSize:40,
+                            }
+                            }).done(function(res){
+                            _this.lists=[].concat(_this.lists,res.data.list);
+                            _this.loading = false;
+                     })
+                    }
+                    else{
+                        alert("鎮ㄥ凡涓嬭繃棣栧崟锛屼笉鍙啀娆¤喘涔帮紝璇锋祻瑙堝叾浠栧晢鍝佸惂~");
+                      
+                        setTimeout(function(){
+                            if(_this.isUniReady)
+                            {
+                                uni.postMessage({
+                                data: {
+                                    action: 'back'
+                                }
+                                });
+                           }
+                        }, 1000 )
+                    }
                 })
+
+                
             },
         },
         mounted: function () {

--
Gitblit v1.9.3