zhaojs
2023-10-07 6c7bba2e05c011a3d640b6565a113204228e92e0
public/html/freebuy.html
@@ -285,7 +285,6 @@
}
.appback
{
    width: 100%;
    height: 0.5rem;
    position: absolute;
    top: 0.5rem;
@@ -436,7 +435,7 @@
            loading:true,
            isUniReady:false,
            plat:'tb',
            posturl:"http://dfg.shop.com"
            //posturl:"http://dfg.shop.com"
            //posturl:"http://appapitest.ushopvip.com"
            //posturl:"http://dfgapp.ushopvip.com"
        },
@@ -511,11 +510,11 @@
                })
            },
            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;
                info = info.replace(/\%/g,"%25")
            info = info.replace(/\#/g,"%23")
            info = info.replace(/\&/g,"%26")
            info = info.replace(/\?/g,"%3F")
            return info;
            },
            targetItem:function(item){
                switch(this.plat)
@@ -526,6 +525,7 @@
                        });
                        break;
                    case "dy":
                    case "jd":
                        var itemsStr=this.Infoformat(JSON.stringify(item));
                        uni.navigateTo({
                            url: '/pages/goods/goodsDetail?sourcefrom=freebuy&info=' + itemsStr+'&frompage=freebuy'
@@ -559,6 +559,23 @@
                if(r !=null)return unescape(r[2]);
                 return null;
            },
             //获取京东商品
             getJdGoodsList:function(){
                var _this=this;
                $.ajax({
                            headers:{
                                "token":_this.getUrlPar("token")
                            },
                            url:'/api/taoke/get_first_free_jd_goods',
                            type:"post",
                                dataType:"json",
                            data:{
                            }
                            }).done(function(res){
                            _this.lists=[].concat([],res.data.list);
                            _this.loading = false;
                     })
            },
            //获取抖音商品
            getDyGoodsList:function(){
                var _this=this;
@@ -566,12 +583,10 @@
                            headers:{
                                "token":_this.getUrlPar("token")
                            },
                            url:_this.posturl+'/api/taoke/get_first_free_dy_goods',
                            url:'/api/taoke/get_first_free_dy_goods',
                            type:"post",
                                dataType:"json",
                            data:{
                                page: 1,
                                pageSize:40,
                            }
                            }).done(function(res){
                            _this.lists=[].concat([],res.data.list);
@@ -586,7 +601,7 @@
                            headers:{
                                "token":_this.getUrlPar("token")
                            },
                            url:_this.posturl+'/api/taoke/get_first_free_goods',
                            url:'/api/taoke/get_first_free_goods',
                            type:"post",
                                dataType:"json",
                            data:{
@@ -602,11 +617,14 @@
                {
                    switch(plat)
                        {
                        case "tb":
                            case "tb":
                                this.getTbGoodsList();
                                break;
                            case "dy":
                                this.getDyGoodsList();
                                break;
                            case"jd":
                                this.getJdGoodsList();
                                break;
                        }
                },
@@ -619,7 +637,7 @@
                    headers:{
                        "token":_this.getUrlPar("token")
                    },
                   url:_this.posturl+'/api/user/check_isfirst_free',
                   url:'/api/user/check_isfirst_free',
                   type:"post",
                    dataType:"json",
                    data:{