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

Merge branch 'dev' of licailing/wenlvju into master

licailing 5 лет назад
Родитель
Сommit
9af7a3cd45
1 измененных файлов с 26 добавлено и 26 удалено
  1. 26 26
      src/main/h5/src/views/login.vue

+ 26 - 26
src/main/h5/src/views/login.vue

@@ -74,33 +74,33 @@ export default {
         message: "加载中...",
         forbidClick: true
       });
-        this.$http
-          .get("/sms/verify", {
-            phone: this.ruleForm.phone,
-            code: this.ruleForm.code
-          })
-          .then(() => {
-            return this.$http.post("/auth/phoneLogin", {
-              phone: this.ruleForm.phone
-            });
-          })
-          .catch(e => {
-            this.$toast(e.error || "登录失败");
-            return Promise.reject();
-          })
-          .then(res => {
-            localStorage.setItem("token", res);
-            return this.$store.dispatch("getUserInfo");
-          })
-          .then(() => {
-            this.$toast.clear();
-            this.$router.replace({ path: "/" });
-          })
-          .catch(e => {
-            if (e) {
-              this.$toast(e.error);
-            }
+      this.$http
+        .get("/sms/verify", {
+          phone: this.ruleForm.phone,
+          code: this.ruleForm.code
+        })
+        .then(() => {
+          return this.$http.post("/auth/phoneLogin", {
+            phone: this.ruleForm.phone
           });
+        })
+        .catch(e => {
+          this.$toast(e.error || "登录失败");
+          return Promise.reject();
+        })
+        .then(res => {
+          localStorage.setItem("token", res);
+          return this.$store.dispatch("getUserInfo");
+        })
+        .then(() => {
+          this.$toast.clear();
+          this.$router.replace({ path: "/" });
+        })
+        .catch(e => {
+          if (e) {
+            this.$toast(e.error);
+          }
+        });
       // this.$http
       //   .post("/auth/phoneLogin", {
       //     phone: this.ruleForm.phone