Ver Fonte

优化:手机号登录报错时返回上级页面

萤火科技 há 5 anos atrás
pai
commit
96b7d46c7b
1 ficheiros alterados com 8 adições e 0 exclusões
  1. 8 0
      pages/login/components/main.vue

+ 8 - 0
pages/login/components/main.vue

@@ -222,6 +222,14 @@
               app.onNavigateBack(1)
             }, 2000)
           })
+          .catch(err => {
+            if (err.result.data.isBack) {
+              // 跳转回原页面
+              setTimeout(() => {
+                app.onNavigateBack(1)
+              }, 2000)
+            }
+          })
           .finally(() => app.isLoading = false)
       },