Explorar o código

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

萤火科技 %!s(int64=5) %!d(string=hai) anos
pai
achega
96b7d46c7b
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  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)
       },