Update index.vue
This commit is contained in:
+16
-4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user