Update index.vue

This commit is contained in:
Swift
2024-02-26 18:04:48 +03:30
parent 34fbdad4bc
commit de9a04cf9c
+16 -4
View File
@@ -281,10 +281,22 @@ export default {
if (this.disabledBtn) return
this.$axios.$post('/api/public/survey', { ...this.survey }).then(res => {
this.$message.success('با تشکر از زمانی که گذاشتید، نظر شما ثبت شد.')
if (this.code) {
return this.$router.push('/')
}
this.survey = this.initForm()
this.survey = {
purchasedProduct: 0,
guaranteeWorkFlow: 0,
employeeResponsibility: 0,
serviceQuality: 0,
serviceTime: 0,
repairQuality: 0,
coast: 0,
code: '',
fullName: '',
national: '',
phoneNumber: '',
email: '',
description: ''
}
}).catch((error)=>{
if (error.response.status === 422) {
this.validation = error.response.data.validation