From 67c0dfea97eb7b0e216e54008beb98f746f5f012 Mon Sep 17 00:00:00 2001
From: zhaojs <349234519@qq.com>
Date: 星期二, 18 七月 2023 15:31:57 +0800
Subject: [PATCH] no message

---
 public/html/activity/invite2308.html |   65 ++++++++++++++++++++++++++++++--
 1 files changed, 60 insertions(+), 5 deletions(-)

diff --git a/public/html/activity/invite2308.html b/public/html/activity/invite2308.html
index ebc8618..44f42cf 100644
--- a/public/html/activity/invite2308.html
+++ b/public/html/activity/invite2308.html
@@ -7,6 +7,7 @@
     <meta content="yes" name="apple-mobile-web-app-capable"><meta content="yes" name="apple-touch-fullscreen">
     <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="../js/vue.js"></script>
     <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-lazyload.js"></script>
     <script type="text/javascript" src="https://public.ffquan.cn/lib/swiper/js/swiper.min.js"></script>
@@ -256,6 +257,7 @@
                 </p>
                 <p>2銆佹椿鍔ㄥ鍔变細鍦ㄧ粨绠楀悗鐩存帴鍙戞斁鍒扮敤鎴枫�愭垜鐨勩��-銆愪綑棰濄�戜腑</p>
                 <p>3銆佹湁鏁堢矇涓濆畾涔夛細鎸囨椿鍔ㄦ湡闂达紝鎶ュ悕璇ユ椿鍔ㄥ悗閭�璇锋敞鍐屽苟濉啓鎮ㄩ個璇风爜鐨勭敤鎴�</p>
+               <!--  <p class="share" v-on:click="copyBtn('.share')">閭�璇峰ソ鍙�</p> -->
             </div>
         </div>
 
@@ -295,7 +297,7 @@
 </body>
 
 </html>
-<script type="text/javascript" src="https://cdn.staticfile.org/vue/2.6.11/vue.min.js"></script>
+
 <script>
 
 (function () {
@@ -324,7 +326,8 @@
           showType:false,
           isShowcj:false,
           joinInfo:{},
-          ranklist:[]
+          ranklist:[],
+          inviteUrl:'',
         },
         methods:{
             topBack:function()
@@ -435,14 +438,35 @@
                         _this.loading=false;
                        if(res.code==0)
                        {
-                        alert("鍙傚姞鎴愬姛锛�");
+                        _this.msgFun("娲诲姩鍙傚姞鎴愬姛锛�");
                         _this.isShowcj=false;
                         _this.getActMember();
                        }
                        else
                        {
-                        alert("娲诲姩鍙傚姞澶辫触锛岃鑱旂郴瀹㈡湇");
+                        _this.msgFun("娲诲姩鍙傚姞澶辫触锛岃鑱旂郴瀹㈡湇");
                        }
+                    })
+            },
+            getInviteCode()
+            {//鑾峰彇閭�璇风爜
+                var _this = this;
+                $.ajax({
+                        headers:{
+                            "token":_this.getUrlPar("token")
+                        },
+                        url:_this.posturl+'/api/Activity/getInviteUrl',
+                        type:"post",
+                        dataType:"json",
+                        data:{
+                          
+                        }
+                    }).done(function(res){
+                       if(res.code==0)
+                       {
+                        _this.inviteUrl='http://dfgapp.ushopvip.com/index/user/register?code='+res.data;
+                       }
+                       
                     })
             },
             getPaiHang:function()
@@ -507,7 +531,7 @@
                     let top = list.offsetTop
                     if (top > 70) {
                         // 鍦ㄦ澶勮皟鐢ㄥ埛鏂板悗鐨勫洖璋�
-                        console.log('鍒锋柊');
+                       
                         location.reload();
                     }
                     if(top<0)
@@ -527,9 +551,40 @@
                     }
                 })
             },
+            copyBtn: function(dom) { //澶嶅埗鍏叡鏂规硶
+                var that = this;
+                var clipboard = new ClipboardJS(dom, {
+                    text: function(target) {
+                    return that.inviteUrl;
+                    }
+                });
+                clipboard.on("success", function(e) {
+                    layer.closeAll();
+                    that.msgFun("閭�璇烽摼鎺ュ凡澶嶅埗~蹇幓鍒嗕韩缁欏ソ鍙嬪惂锛�");
+                    e.clearSelection();
+                    clipboard.destroy();
+                });
+                clipboard.on("error", function(e) {
+                    layer.msg("閭�璇烽摼鎺ュ鍒跺け璐ワ紒璇峰埌APP涓� [鎴戠殑]-[瀹炵敤鍔熻兘]-[鍒嗕韩app] 澶嶅埗", {
+                    shade: 0.4,
+                    time: 1000,
+                    shadeClose: false
+                    }, function() {
+                    });
+
+                });
+            },
+            msgFun: function(val) {
+      layer.msg(val, {
+        time: 2000,
+        shade: 0.1,
+        shadeClose: true
+      });
+    },
         },
         mounted:function(){
            this.getActivity();
+           this.getInviteCode();
            this.touch();
         }
     })

--
Gitblit v1.9.3