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

@@ -31,12 +31,11 @@ export default {
};
},
async created() {
if (!this.approvalcode && this.$store.state.login.approval_code)
this.approvalcode = this.$store.state.login.approval_code;
if (!this.approvalcode && this.$store.login.approval_code) this.approvalcode = this.$store.login.approval_code;
if (!this.approvalcode) {
const user = await this.$getdata("user", {
first: true,
filter: { id: this.$store.state.login.id },
filter: { id: this.$store.login.id },
});
this.approvalcode = user.approval_code;
}
@@ -47,7 +46,7 @@ export default {
computed: {
approvalcode: {
get() {
return this.$store.state["approvalcode"];
return this.$store.approvalcode;
},
set(val) {
this.$store.commit("updateStore", { name: "approvalcode", data: val });