แก้คำผิด
All checks were successful
frontend-action / build-image (push) Successful in 1m25s

This commit is contained in:
2024-04-24 11:56:02 +07:00
parent e5683c7f2b
commit 8a80d1a00c
2 changed files with 9 additions and 11 deletions

View File

@@ -793,7 +793,8 @@ export default {
body: formData, body: formData,
}).then(() => { }).then(() => {
client.user.confirmChangeImage.mutate(); client.user.confirmChangeImage.mutate();
alert("บันทึกข้อมูลสำเร็จ"); alert("บันทึกข้อมูลสำเร็จ\n สามารถ login ด้วย username : เลขบัตรประชาชน / password : เบอร์โทรศัพท์");
}); });
console.log("done"); console.log("done");
}, },
@@ -809,7 +810,7 @@ export default {
if (filterOpt2.length) { if (filterOpt2.length) {
this.payload.opinions = filterOpt2; this.payload.opinions = filterOpt2;
} }
// console.log("opppp", filterOpt, filterOpt2);
// let payload = { // let payload = {
// firstName: "ธรรมนูญ2", // firstName: "ธรรมนูญ2",
@@ -840,21 +841,18 @@ export default {
// // ], // // ],
// }; // };
// console.log("this.payload", this.payload);
client.user.createUser client.user.createUser
.mutate(this.payload) .mutate(this.payload)
.then((data) => { .then((data) => {
console.log("data", data); // console.log("data", data);
localStorage.setItem("token", data.token); localStorage.setItem("token", data.token);
if (this.file) { if (this.file) {
this.uploadImage(); this.uploadImage();
} else { } else {
alert("บันทึกข้อมูลสำเร็จ"); alert("บันทึกข้อมูลสำเร็จ\n สามารถ login ด้วย username : เลขบัตรประชาชน / password : เบอร์โทรศัพท์");
} }
this.getUser(); this.getUser();
// this.$router.push("/upload");
// this.provinceItems = data;
}) })
.catch((error) => { .catch((error) => {
alert("ไม่สามารถบันทึกข้อมูลได้: " + error.message); alert("ไม่สามารถบันทึกข้อมูลได้: " + error.message);
@@ -865,7 +863,7 @@ export default {
client.user.login client.user.login
.mutate(payload) .mutate(payload)
.then((data) => { .then((data) => {
console.log("data", data); // console.log("data", data);
localStorage.setItem("token", data.token); localStorage.setItem("token", data.token);
this.$router.push("/"); this.$router.push("/");
@@ -885,7 +883,7 @@ export default {
// this.$store.dispatch('setLocalStorageValue',data.firstName) // this.$store.dispatch('setLocalStorageValue',data.firstName)
}) })
.catch((error) => { .catch((error) => {
alert("ไม่สามารถโหลดข้อมูลได้"); alert("ไม่สามารถโหลดข้อมูลได้"+ error.message);
console.error("เกิดข้อผิดพลาดในการโหลดข้อมูล:", error); console.error("เกิดข้อผิดพลาดในการโหลดข้อมูล:", error);
}); });
}, },
@@ -894,7 +892,7 @@ export default {
if (this.image && this.image !== null) { if (this.image && this.image !== null) {
const reader = new FileReader(); const reader = new FileReader();
reader.onload = (event) => { reader.onload = (event) => {
console.log(event.target.result); // console.log(event.target.result);
this.url = event.target.result; this.url = event.target.result;
}; };
reader.readAsDataURL(this.image); reader.readAsDataURL(this.image);

View File

@@ -2,7 +2,7 @@
<div class="bg-yellow-page mt-5"> <div class="bg-yellow-page mt-5">
<v-container> <v-container>
<div class="text-title text-center mt-10"> <div class="text-title text-center mt-10">
รจเชคคณสมบ-กษณะตองหาม ของผจะสมคร สว.<br /> ตรจเชคคณสมบ-กษณะตองหาม ของผจะสมคร สว.<br />
<!-- <v-icon icon="mdi-circle" color="white" class="mt-2"></v-icon> --> <!-- <v-icon icon="mdi-circle" color="white" class="mt-2"></v-icon> -->
</div> </div>
<div class="text-center mb-10"> <div class="text-center mb-10">