ZZJ
2022-04-02 45faaf27722588e92050e2e3eace9b3704377048
src/views/register/components/ResetPassword.vue
@@ -90,7 +90,7 @@
</template>
<script>
import { getVerifyCode } from "@/api/login";
import { getVerifyCode, forgetPwd } from "@/api/login";
import { isPhone, validPassword } from "@/scripts/validate"; // 正则文件
export default {
@@ -181,7 +181,17 @@
        }
      });
    },
    submit() {
    async submit() {
      const res = await forgetPwd({
        phoneNum: this.formData.phoneNum,
        newPwd: this.formData.password,
      });
      if (res && res.success) {
        this.$notify({
          type: "success",
          message: "重置成功",
        });
      }
      this.isReseted = true;
    },
  },