Просмотр исходного кода

处理复制问题、刷新问题

leo 1 год назад
Родитель
Сommit
96ab7e3797

+ 12 - 3
pages/claimCloudPhone/components/bargainingAssistance.vue

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

+ 3 - 3
pages/claimCloudPhone/index.vue

@@ -48,8 +48,8 @@ export default {
         window.atob(operateActivityId),
       );
       this.$router.replace({
-        path: '/claimCloudPhone/0',
-        query: this.$route.query,
+        path: '/claimCloudPhone/type',
+        query: {...this.$route.query, type: 0},
       });
       return;
     }
@@ -98,7 +98,7 @@ export default {
                 break;
               default:
                 this.$router.replace(
-                  '/claimCloudPhone/' + res.data.bargainingStatus,
+                  '/claimCloudPhone/type?type=' + res.data.bargainingStatus,
                 );
                 break;
             }

+ 1 - 1
pages/claimCloudPhone/_type.vue

@@ -3,7 +3,7 @@
     <!-- type 1(砍一刀) 2(邀请好友) 3 (失败) 4 (成功)都是邀请人  0 是被邀请人 -->
     <bargainingAssistance
       ref="bargainingAssistance"
-      :type="$route.params.type"
+      :type="$route.query.type"
       :operateActivityId="operateActivityId"
       :getSystemTime="getSystemTime"
       :leaveFun="leaveFun"