zhaojs
2023-06-09 3971d0dcb2b8a110147bc27d4263725a59dd8646
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>
        
@@ -41,7 +41,7 @@
            overflow: hidden;
        }
        #appMain:before {
            content: "";display: block;position: absolute;top: 0;left: -20%;height: 3.88rem;width: 140%;background: linear-gradient(90deg,#ffa033,#ff8030) no-repeat;background-size: 100%;
            content: "";display: block;position: absolute;top: 0;left: -20%;height: 3.88rem;width: 140%;background: linear-gradient(90deg,#fbe7e2,#fbe7e2) no-repeat;background-size: 100%;
            border-radius: 0 0 50% 50%;z-index: -1;
        }
       
@@ -55,16 +55,15 @@
        .act_header{
            z-index: 200; width: 100%; background: no-repeat top; background-size: 100% auto;
            display: flex; align-items: center; justify-content: space-between;
            position: fixed;background: linear-gradient(90deg, rgb(255, 160, 51) 0%, rgb(255, 128, 48) 100%) 0% 0% / 100%;
            height:.88rem ; color: #fff;
            position: fixed;background: linear-gradient(90deg, #fbe7e2 0%, #fbe7e2 100%) 0% 0% / 100%;
             color: #fff;
            max-width: 800px;
        }
        .act_header > div{ min-width: 4.5em;}
        .act_header .centent{
            text-align: center;
        }
        .act_header .centent img{
            width:1.3rem;
            width:100%;
        }
        .act_header .share a{
            text-decoration: none;
@@ -105,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;
@@ -175,10 +173,14 @@
        .list-section .listTmp .productInfo {padding: .18rem .2rem .2rem;position: relative
        }
        .list-section .listTmp .title {width: 100%;white-space: nowrap;margin-bottom: .16rem;height: .36rem;font-size: .26rem;color: #333;display: -webkit-flex;display: flex;-webkit-align-items: center;align-items: center;font-family: PingFangSC-Regular,PingFang SC;font-weight: 400
        .list-section .listTmp .title {width: 100%;margin-bottom: .16rem;height: .36rem;font-size: .26rem;color: #333;display: -webkit-flex;display: flex;-webkit-align-items: center;align-items: center;font-family: PingFangSC-Regular,PingFang SC;font-weight: 400
        }
        .list-section .listTmp .title span {margin-left: .05rem;overflow: hidden;text-overflow: ellipsis
        .list-section .listTmp .title span {    overflow: hidden;
     text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
        }
        .list-section .listTmp .price {font-size: .2rem;font-family: PingFangSC-Regular,PingFang SC;font-weight: 400;color: #666
@@ -235,15 +237,15 @@
    <div id="appMain" >
    <header class="act_header">
        <div></div>
        <div class="centent"><img src="https://sr.ffquan.cn/dtk_www/20210226/c0s9jnv6vrka51tkv8qg0.png" alt=""></div>
        <div class="centent"><img src="https://yanfeiobpub.obs.cn-east-3.myhuaweicloud.com/dfg/xinrengoubanner.png" alt=""></div>
        <div class="share">
            <!-- <a href="">分享</a> -->
        </div>
    </header>
   
    <div :style="{ height: (twoNav && twoNav.length > 0) ? '2.3rem' : '1.6rem'}"></div>
    <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)">
@@ -252,9 +254,7 @@
                                    </div>
                                    <div class="productInfo">
                                        <div class="title">
                                            <div class="shoplabel ">
                                                <img src="">
                                            </div>
                                            <span>{{data.dtitle}}</span>
                                        </div>
                                        
@@ -322,7 +322,10 @@
        methods: {
           
            targetItem:function(item){
                if(this.isUniReady)
                uni.navigateTo({
                  url: '/pages/goods/goodsDetail?id=' + items.goodsid+'&frompage=freebuy'
                });
                /* if(this.isUniReady)
                {
                    uni.postMessage({
                      data: {
@@ -330,7 +333,7 @@
                         data:item
                      }
                     });
                }
                } */
            },
            
            getUrlPar:function(name)
@@ -343,31 +346,65 @@
            getGoodsList:function(){
                var _this = this;
                this.loading=true;
                //判断是否首单
                $.ajax({
                    headers:{
                        "token":this.getUrlPar("token")
                        "token":_this.getUrlPar("token")
                    },
                   // 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:{
                                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 () {