This commit is contained in:
Viet An
2026-07-03 09:24:05 +07:00
parent f519573c19
commit 4404c4654b
22 changed files with 59 additions and 39 deletions

View File

@@ -48,7 +48,7 @@ async function changePassword() {
let rs0 = await proxy.$insertapi("gethash", { data: { text: password.value }, notify: false });
user.password = rs0.rows[0];
let rs = await proxy.$patchapi("user", user, undefined, false);
let rs = await proxy.$patchapi("user", { data: user, notify: false });
if (rs !== "error") {
currpass.value = undefined;

View File

@@ -51,9 +51,9 @@ export default {
methods: {
async confirm() {
if (this.checkError()) return this.$snackbar("Mã phê duyệt gồm 4 số từ 0-9");
let user = await this.$getdata("user", { first: true, filter: { id: this.$store.state.login.id } });
let user = await this.$getdata("user", { first: true, filter: { id: this.$store.login.id } });
user.approval_code = this.code;
await this.$patchapi("user", user);
await this.$patchapi("user", { data: user });
},
checkError() {
if (Object.keys(this.data).length < 4) return true;

View File

@@ -110,7 +110,7 @@ export default {
});
let rs = await this.$insertapi("gethash", { data: { text: this.password } });
user.password = rs.rows[0];
let rs1 = await this.$patchapi("user", user);
let rs1 = await this.$patchapi("user", { data: user });
if (rs1 !== "error") this.$emit("close");
else {
this.$snackbar("Có lỗi xảy ra. Hãy thử lại một lần nữa", "Error");