licailing 5 anni fa
parent
commit
264a8a6f1f
1 ha cambiato i file con 7 aggiunte e 7 eliminazioni
  1. 7 7
      src/main/h5/src/views/login.vue

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

@@ -103,19 +103,19 @@ export default {
       //     });
       this.$http
         .post("/auth/phoneLogin", {
-        phone: this.ruleForm.phone
+          phone: this.ruleForm.phone
         })
         .then(res => {
-        localStorage.setItem("token", res);
-        return this.$store.dispatch("getUserInfo");
+          localStorage.setItem("token", res);
+          return this.$store.dispatch("getUserInfo");
         })
         .then(() => {
-        this.$toast.clear();
-        this.$router.replace({ path: "/" });
+          this.$toast.clear();
+          this.$router.replace({ path: "/" });
         })
         .catch(e => {
-        this.$toast.clear();
-        this.$toast(e.error || "登录失败");
+          this.$toast.clear();
+          this.$toast(e.error || "登录失败");
         });
     },
     sendSms() {