From 573ba973d908841a65c21cd2c96049d5c0472be6 Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期五, 09 六月 2023 11:24:19 +0800 Subject: [PATCH] no message --- public/html/freebuy.html | 62 +++++++++++++++++++++++------- 1 files changed, 47 insertions(+), 15 deletions(-) diff --git a/public/html/freebuy.html b/public/html/freebuy.html index f7aa092..9fb1065 100644 --- a/public/html/freebuy.html +++ b/public/html/freebuy.html @@ -22,7 +22,7 @@ <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> @@ -345,13 +345,28 @@ getGoodsList:function(){ var _this = this; this.loading=true; + //鍒ゆ柇鏄惁棣栧崟 $.ajax({ headers:{ "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:{ + } + }).done(function(res){ + if(res.data=='棣栧崟瀹㈡埛') + { + $.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:{ @@ -359,18 +374,35 @@ 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; + }).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' + } + }); + } + }, 3000 ) + } }) + + }, }, mounted: function () { -- Gitblit v1.9.3