fly 5 năm trước cách đây
mục cha
commit
31ad644641
1 tập tin đã thay đổi với 16 bổ sung13 xóa
  1. 16 13
      resources/views/qapp/welcome.blade.php

+ 16 - 13
resources/views/qapp/welcome.blade.php

@@ -210,7 +210,7 @@
                         <button class="copy-text" type="button">
                         <button class="copy-text" type="button">
                             {{$gzh_code}}
                             {{$gzh_code}}
                         </button>
                         </button>
-                        <button type="button" class="copy-button" id="copy" data-clipboard-text="{{$gzh_code}}">
+                        <button type="button" class="copy-button" id="copy" data-clipboard-text="">
                             一键复制公众号
                             一键复制公众号
                         </button>
                         </button>
                         <img src="https://cdn-novel.iycdm.com/quickapp/static/1.gif" />
                         <img src="https://cdn-novel.iycdm.com/quickapp/static/1.gif" />
@@ -253,19 +253,22 @@
           $(".toast-wrap").hide();
           $(".toast-wrap").hide();
         }, 2000);
         }, 2000);
       },
       },
-      lisen: function () {
-        var _self = this;
-        $(".copy-button").on("click", function () {
-          var clip = new ClipboardJS("#copy");
-          clip.on("success", function (e) {
-            _self.showToast("复制成功");
-          });
+      lisen: function() {
+          var _self = this;
+          $(".copy-button").on("click", function() {
+            var clip = new ClipboardJS("#copy");
+            clip.on("success", function(e) {
+              _self.showToast("复制成功");
+            });
 
 
-          clip.on("error", function (e) {
-            _self.showToast("复制失败");
+            clip.on("error", function(e) {
+              _self.showToast("复制失败");
+            });
           });
           });
-        });
-      },
+          var code ='{{$gzh_code}}'+'/'+ranMath();
+          $('.copy-text').text(code);
+          $('.copy-button').attr('data-clipboard-text',code);
+        },
       init: function () {
       init: function () {
         this.lisen();
         this.lisen();
       }
       }
@@ -330,7 +333,7 @@
     function routerAHap(data) {
     function routerAHap(data) {
       var parmas = $.param(data);
       var parmas = $.param(data);
       var ohapa = document.createElement("a");
       var ohapa = document.createElement("a");
-      ohapa.href = "hap://app/" + QYY.pname + "/" + QYY.entry + "?" + parmas;
+      ohapa.href = "hap://app/" + QYY.pname + QYY.entry + "?" + parmas;
       ohapa.setAttribute(
       ohapa.setAttribute(
         "style",
         "style",
         "position: absolute;left: -1000rem;height: 1rem;width: 1rem;overflow: hidden"
         "position: absolute;left: -1000rem;height: 1rem;width: 1rem;overflow: hidden"