leo 1 rok temu
rodzic
commit
3a9fe992f7

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

@@ -753,19 +753,8 @@ export default {
                           this.$toast('链接复制成功');
                         });
                       },
-                      () => {
-                        this.$native.clipboard
-                          .writeText(res.data.link)
-                          .then(() => {
-                            setTimeout(() => {
-                              this.$toast('链接复制成功');
-                            });
-                          })
-                          .catch(() => {
-                            setTimeout(() => {
-                              this.$toast('链接复制失败');
-                            });
-                          });
+                      (copy) => {
+                        copy && copy()
                       },
                     );
                   }

+ 1 - 1
pages/claimCloudPhone/components/setMealItem.vue

@@ -94,7 +94,7 @@ export default {
           .then((res) => {
             if (res.success) {
               if (!res.data.bargainingStatus) {
-                let url = '/claimCloudPhone/1?menuRuleId=' + data.id;
+                let url = '/claimCloudPhone/type?type=1&menuRuleId=' + data.id;
                 if (this.$route.query.userCardId) {
                   url += `&userCardId=${this.$route.query.userCardId}`;
                 }

+ 5 - 2
plugins/plugins.js

@@ -25,14 +25,17 @@ export function writeToClipboard(text, success = () => { }, error = () => { }) {
                 navigator.clipboard.writeText(text).then(() => {
                     success()
                 }).catch((error) => {
-                    alert(error)
                     error()
                 })
             }, 0);
         } catch (err) {
-            error()
+            error(copy)
         }
     } else {
+        copy()
+    }
+
+    function copy() {
         const textArea = document.createElement('textarea');
         textArea.value = text;
         document.body.appendChild(textArea);