From 8c00bd0245ca4756ca04483a4980ad202714e43e Mon Sep 17 00:00:00 2001
From: zhaojs <349234519@qq.com>
Date: 星期四, 20 七月 2023 09:40:44 +0800
Subject: [PATCH] Merge branch 'release/v1.1.4发布'

---
 public/html/signin.html |  242 ++++++++++++++++++++++++++++++++++++------------
 1 files changed, 181 insertions(+), 61 deletions(-)

diff --git a/public/html/signin.html b/public/html/signin.html
index c439f5b..5bb3b83 100644
--- a/public/html/signin.html
+++ b/public/html/signin.html
@@ -19,10 +19,27 @@
   <script>
   document.write("<link rel=\"stylesheet\" href=\"https://img.bc.haodanku.com/cms/signin.css?t=" + (Date.now() - Date.now() % (60 * 1000 * 30)) + "\"/>");
   </script>
+  <style>
+     .box
+        {
+            position:absolute;
+            width: 100%;
+            height: 100%;
+            background: url(https://yanfeiobpub.obs.cn-east-3.myhuaweicloud.com/dfg/h5loading.gif) no-repeat fixed top;
+            background-size: 70px 70px;
+        }
+        .list{
+            position: relative;
+            top: 0;
+            width: 100%;
+        }
+  </style>
 </head>
 
 <body>
-<div id="app" v-cloak>
+  <div class="box">
+    <div class="list">
+<div id="app" style="background-color:#F10F04;padding-top:0.5rem" v-cloak>
   <template v-if="isexplain && issource">
     <div class="main">
       <!--<div class="banenr" v-on:click="openDirect">
@@ -74,7 +91,7 @@
         </div>
       </div>
       
-      <ul class="shoplist" v-if="fristOrderItems.length>0">
+      <ul class="shoplist contscore" v-if="fristOrderItems.length>0">
         <li v-for="(item,index) in fristOrderItems">
           <img class="shop-img" v-lazy="item.itempic" v-if="item.itempic">
           <img class="shop-img" src="http://img.bc.haodanku.com/haodanku-activity/1596092443" v-else>
@@ -88,8 +105,13 @@
               <img src="http://img.bc.haodanku.com/cms/1627703910">
               <p>搴楅摵锛歿{item.shopname}}</p>
             </div>
-            <div class="ticket" v-if="item.couponurl"><span class="name">鍒�</span><span
-              class="value">锟{item.couponmoney}}</span></div>
+            <div>
+              <div class="ticket" v-if="item.couponurl"><span class="name" style="height: 0.3rem;">鍒�</span><span
+                class="value" style="height: 0.3rem;">锟{item.couponmoney}}</span></div>
+                <div class="ticket" v-if="item.couponurl"><span class="name" style="height: 0.3rem;background:linear-gradient(180deg,#b21db6,#ad25d1)">杩�</span><span
+                  class="value" style="border:1px solid #b817ce;color:#b817ce;height: 0.3rem;">锟{item.fanli}}</span></div>
+            </div>
+            
             <div class="shop-b">
               <div class="shop-b-l">
                 <p class="shop-b-m"><i>鍒稿悗浠�</i>锟{parseFloat(item.itemendprice)}}</p>
@@ -107,9 +129,9 @@
         <p class="realpic-loading" v-else>鏁版嵁宸插姞杞藉畬浜�</p>
       </div>
     </div>
-    <div class="free-share" v-bind:class="acFocus?'active':''">
+ <!--    <div class="free-share" v-bind:class="acFocus?'active':''">
       <img src="http://img.bc.haodanku.com/haodanku/1613981706" v-on:click="copyShare()" class="share-btn">
-    </div>
+    </div> -->
     <div>
       <div class="back_top" v-if="scrollShow" v-on:click="arrowTop()"></div>
       <div class="tokenbox tokenbox1">
@@ -169,7 +191,7 @@
       </div>
     </div>
   </transition>
-  <van-overlay :show="titleCopyTipsVisible" @click="titleCopyTipsVisible = false">
+  <van-overlay :show="titleCopyTipsVisible" @click="diaCloese()">
     <div
       class="wrapper"
       style="display:flex;align-items:center;justify-content:center;height: 100%;"
@@ -177,6 +199,8 @@
       <img style="width: 6rem;" src="http://img-haodanku-com.cdn.fudaiapp.com/FhYQl6NqvQIycYZS1DM9DLBELA72" alt="">
     </div>
   </van-overlay>
+</div>
+</div>
 </div>
 <script src="https://cdn.staticfile.org/jquery/2.2.4/jquery.min.js"></script>
 <script src="https://cdn.staticfile.org/vue/2.6.10/vue.min.js"></script>
@@ -230,6 +254,9 @@
   el: "#app",
   data: function() {
     return {
+      //posturl:"http://dfg.shop.com",
+      //posturl:"http://appapitest.ushopvip.com",
+      posturl:"http://dfgapp.ushopvip.com",
       showDirect: false,
       codeId: vmRequest("code"),
 
@@ -311,14 +338,101 @@
   mounted: function() {
     this.outerHeight = $(".banenr").outerHeight(true) + $(".secret-wrapper").outerHeight(true) + $(".list-wrapper>h6").outerHeight(true) + 2;
     this.taobaoscroll();
+    this.touch();
   },
   methods: {
+    diaCloese:function()
+    {
+       this.titleCopyTipsVisible=false;
+       uni.postMessage({
+                data: {
+                  action: 'totb',
+                  tburl:this.sign_info.url
+                }
+        })
+    },
+    touch:function()
+            {
+                const box = document.querySelector('.box')
+                const list = document.querySelector('.list');
+                // 鎸変笅灞忓箷鐨勪綅缃�
+                let touchStartPosition = 0
+            
+                // touchstart浜嬩欢
+                box.addEventListener('touchstart', function (e) {
+                    let touch = e.touches[0]
+                    touchStartPosition = touch.pageY
+                })
+                // touchmove浜嬩欢
+                box.addEventListener('touchmove', function (e) {
+                   
+                    let touch = e.touches[0]
+                    // 鍒楄〃鐨則op鍊肩瓑浜庡垪琛ㄧ浉瀵逛簬box鐨勫亸绉婚噺+婊戝姩鐨勮窛绂�
+                    let pySize= list.offsetTop + touch.pageY - touchStartPosition;
+                    if(pySize>=110)
+                    {
+                      return;
+                    }
+                    if(pySize<0)
+                    {
+                        return;
+                    }
+                    var scroll = document.getElementsByClassName('contscore')
+                        var srollPos = $('.contscore').scrollTop(); //婊氬姩鏉¤窛椤堕儴璺濈(椤甸潰瓒呭嚭绐楀彛鐨勯珮搴�)
+                    if(srollPos>0)
+                    {
+                        return;
+                    }
+                    list.style.top =pySize + 'px';
+                    // 瀹炵幇骞虫粦鐨勬粦鍔�
+                    touchStartPosition = touch.pageY
+                })
+                // touchend浜嬩欢
+                box.addEventListener('touchend', function (e) {
+                    let top = list.offsetTop
+                  
+                    if (top > 70) {
+                        // 鍦ㄦ澶勮皟鐢ㄥ埛鏂板悗鐨勫洖璋�
+                        console.log('鍒锋柊');
+                        location.reload();
+                    }
+                    
+                    if(top<0)
+                    {
+                        list.style.top=0;
+                    }
+                    if (top > 0) {
+                        // 閫氳繃瀹氭椂鍣ㄥ钩婊戠殑灏唋ist鐨則op = 0
+                        let timer = setInterval(() => {
+                            top=top-5;
+                        list.style.top = top + 'px'
+                        if (top <= 0) {
+                            list.style.top=0;
+                            clearInterval(timer)
+                        }
+                        },1)
+                    }
+                })
+            },
     toSignIn: function() {
-      if(!this.sign_info.tpwd) {
+      if(!this.sign_info.url) {
         return;
       }
-      SpaUtils.copy(this.sign_info.tpwd, "澶嶅埗鍙d护鎴愬姛锛岃鎵撳紑娣樺疂娴忚棰嗗彇绛惧埌绾㈠寘");
+      uni.postMessage({
+                data: {
+                  action: 'totb',
+                  tburl:this.sign_info.url
+                }
+        })
+      //SpaUtils.copy(this.sign_info.tpwd, "澶嶅埗鍙d护鎴愬姛锛岃鎵撳紑娣樺疂娴忚棰嗗彇绛惧埌绾㈠寘");
     },
+    getUrlPar:function(name)
+            {
+                var reg=new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
+                 var r=window.location.search.substr(1).match(reg);
+                if(r !=null)return unescape(r[2]);
+                 return null;
+            },
     arrowBtn: function(val) {
       this[val] = !this[val];
       this.arrowTop();
@@ -354,60 +468,58 @@
         document.body.scrollTop = that.outerHeight;
       }
       $.ajax({
-        type: "Get",
-        url: that.vmHttp + "://v2.api.haodanku.com/sign_red_pack_goods",
-        data: {
-          apikey: '', //蹇呭~
-          min_size: 20,
-          sort: that.sortId,
-          min_id: that.page,
-          keyword: that.keyword,
-          pure_tpwd: vmRequest("pure_tpwd") ? 1 : undefined
-        },
-        dataType: "json",
-        timeout: 5000,
-        success: function(data) {
-          if(data.code == "200") {
-            that.help_info = data.help_info || [];
-            that.sign_info = data.sign_info || {};
-            if(that.sigclick) {
-              that.fristOrderItems = data.data;
-            } else {
-              that.fristOrderItems = that.fristOrderItems.concat(data.data);
-            }
-            that.topArr = data.top_data;
-            if(that.page != data.min_id) {
-              that.loadmsg = true;
-              that.loadshow = true;
-              that.page = data.min_id;
-            } else {
-              that.loadmsg = false;
-              that.loadshow = false;
-            }
-            that.$nextTick(function() {
-              that.sigclick = false;
-              if(cb) {
-                $(".newtop").scrollToFixed();
+              headers:{
+              "token":that.getUrlPar("token")
+              },
+              url:that.posturl+'/api/activity/signRed',
+              type:"post",
+              dataType:"json",
+              data:{
+                apikey: '0F92EBA7AADA', //蹇呭~
+                min_size: 20,
+                sort: that.sortId,
+                min_id: that.page,
+                keyword: that.keyword,
+                pure_tpwd: vmRequest("pure_tpwd") ? 1 : undefined
               }
+              }).done(function(res){
+                var data=res.data;
+                if(res.code == 0) {
+                  that.help_info = data.help_info || [];
+                  that.sign_info = data.sign_info || {};
+                  if(that.sigclick) {
+                    that.fristOrderItems = data.data;
+                  } else {
+                    that.fristOrderItems = that.fristOrderItems.concat(data.data);
+                  }
+                  that.topArr = data.top_data;
+                  if(that.page != data.min_id) {
+                    that.loadmsg = true;
+                    that.loadshow = true;
+                    that.page = data.min_id;
+                  } else {
+                    that.loadmsg = false;
+                    that.loadshow = false;
+                  }
+                  that.$nextTick(function() {
+                    that.sigclick = false;
+                    if(cb) {
+                      $(".newtop").scrollToFixed();
+                    }
 
-            });
-          } else {
-            that.loadmsg = false;
-            that.loadshow = false;
-            that.sigclick = false;
-            layer.msg(data.msg, {
-              time: 2000,
-              shade: 0.1,
-              shadeClose: true
-            });
-          }
-
-        },
-        error: function() {
-          that.msgFun("缃戠粶閿欒锛岃妫�鏌ョ綉缁滈噸璇�");
-        }
-      });
-    },
+                  });
+                } else {
+                  that.loadmsg = false;
+                  that.loadshow = false;
+                  that.sigclick = false;
+                  layer.msg(data.msg, {
+                    time: 2000,
+                    shade: 0.1,
+                    shadeClose: true
+                  });
+                }
+             })
+         },
     handleSort: function(item) {
       if(this.sortNumber == item.number) {
         if(item.min === item.max) {
@@ -472,9 +584,17 @@
         success: function(data) {
           layer.close(load);
           if(data.code == "1") {
+            if(!isCoupon) {
+            }
             that.taoToken = data.data.taoword;
             if(isCoupon) {
               that.popupFun(".tokenbox1");
+             /*  uni.postMessage({
+                data: {
+                  action: 'totb',
+                  tburl:data.data.link
+                }
+               }) */
             } else {
               that.openSnappedUpDialog();
             }

--
Gitblit v1.9.3