leo 1 ano atrás
pai
commit
6dbf303e1a

+ 17 - 2
pages/claimCloudPhone/components/bargainingAssistance.vue

@@ -311,6 +311,14 @@
         为您带来更多精彩的活动和内容。<br />
       </div> -->
     </van-dialog>
+    <van-dialog style="background: #fff !important" v-model="copyVisble" showCancelButton :showConfirmButton="false">
+      <div class="copy-visble">请手动复制以下内容</div>
+      <van-field
+        v-model="copyValue"
+        rows="4"
+        type="textarea"
+      />
+    </van-dialog>
     <Verify
       @success="success"
       mode="pop"
@@ -395,6 +403,8 @@ export default {
       species,
       redPacket,
       glory,
+      copyVisble: false,
+      copyValue: ''
     };
   },
   components: {
@@ -753,8 +763,9 @@ export default {
                           this.$toast('链接复制成功');
                         });
                       },
-                      (copy) => {
-                        copy && copy()
+                      () => {
+                        this.copyValue = res.data.link
+                        this.copyVisble = true
                       },
                     );
                   }
@@ -1687,4 +1698,8 @@ export default {
 .mask {
   z-index: 4000;
 }
+
+.copy-visble {
+  padding: 16px;
+}
 </style>

+ 1 - 5
plugins/plugins.js

@@ -29,13 +29,9 @@ export function writeToClipboard(text, success = () => { }, error = () => { }) {
                 })
             }, 0);
         } catch (err) {
-            error(copy)
+            error()
         }
     } else {
-        copy()
-    }
-
-    function copy() {
         const textArea = document.createElement('textarea');
         textArea.value = text;
         document.body.appendChild(textArea);