end
This commit is contained in:
@@ -158,12 +158,14 @@
|
||||
<span>اعلانات</span>
|
||||
</a>
|
||||
</nuxt-link>
|
||||
<!--
|
||||
<nuxt-link :to="{ name: 'account-survey' }" tag="li">
|
||||
<a>
|
||||
<i class="fas fa-chart-bar"></i>
|
||||
<span>نظر سنجی</span>
|
||||
</a>
|
||||
</nuxt-link>
|
||||
-->
|
||||
<nuxt-link :to="{ name: 'account-profile' }" tag="li">
|
||||
<a>
|
||||
<i class="fal fa-user-edit"></i>
|
||||
|
||||
+2
-1
@@ -77,7 +77,8 @@ export default {
|
||||
// https://go.nuxtjs.dev/axios
|
||||
'@nuxtjs/axios',
|
||||
'@nuxtjs/auth-next',
|
||||
'~/modules/WebSocketServer.js'
|
||||
'~/modules/WebSocketServer.js',
|
||||
'nuxt-leaflet'
|
||||
],
|
||||
pwa: {
|
||||
icon: {
|
||||
|
||||
Generated
+738
-47
File diff suppressed because it is too large
Load Diff
+3
-2
@@ -42,6 +42,7 @@
|
||||
"nodemailer": "^6.4.17",
|
||||
"nodemon": "^3.0.1",
|
||||
"nuxt": "^2.14.6",
|
||||
"nuxt-leaflet": "^0.0.27",
|
||||
"read-excel-file": "^5.2.2",
|
||||
"socket.io": "^4.4.1",
|
||||
"vue-persian-datetime-picker": "^2.10.3"
|
||||
@@ -50,13 +51,13 @@
|
||||
"@babel/eslint-parser": "^7.16.3",
|
||||
"@nuxtjs/eslint-config": "^8.0.0",
|
||||
"@nuxtjs/eslint-module": "^3.0.2",
|
||||
"@nuxtjs/pwa": "^3.3.5",
|
||||
"eslint": "^8.4.1",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-plugin-nuxt": "^3.1.0",
|
||||
"eslint-plugin-vue": "^8.2.0",
|
||||
"prettier": "^2.5.1",
|
||||
"@nuxtjs/pwa": "^3.3.5",
|
||||
"node-sass": "^5.0.0",
|
||||
"prettier": "^2.5.1",
|
||||
"sass-loader": "^10.1.0"
|
||||
}
|
||||
}
|
||||
|
||||
+94
-100
@@ -1,109 +1,103 @@
|
||||
<template>
|
||||
<div class="contact--page page">
|
||||
<section class="s1">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-6 message">
|
||||
<form class="form form_1" @submit.prevent="send">
|
||||
<div class="title">
|
||||
<p>برای ما پیام بگذارید:</p>
|
||||
</div>
|
||||
<div class="formRow" :class="validation.full_name ? 'err' : null">
|
||||
<input v-model="formData.full_name" type="text" placeholder="نام و نام خانوادگی" />
|
||||
<p v-if="validation.full_name">{{ validation.full_name.msg }}</p>
|
||||
</div>
|
||||
<div class="formRow" :class="validation.email ? 'err' : null">
|
||||
<input v-model="formData.email" type="text" class="email" placeholder="ایمیل" />
|
||||
<p v-if="validation.email">{{ validation.email.msg }}</p>
|
||||
</div>
|
||||
<div class="formRow" :class="validation.message ? 'err' : null">
|
||||
<textarea v-model="formData.message" rows="3" placeholder="پیام"></textarea>
|
||||
<p v-if="validation.message">{{ validation.message.msg }}</p>
|
||||
</div>
|
||||
<div class="btnRow">
|
||||
<button class="btn btn-primary" type="submit">ارسال پیام</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 mt-5 mt-md-0 contact">
|
||||
<div class="info">
|
||||
<ul>
|
||||
<li>
|
||||
<p>
|
||||
<i class="fal fa-map-marker-alt"></i>
|
||||
<span> {{ config.address }} </span>
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<a :href="`tel: ${config.contactTel}`">
|
||||
<i class="fal fa-phone"></i>
|
||||
<span>{{ config.contactTel }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a :href="`mailto: ${config.contactEmail}`">
|
||||
<i class="fal fa-envelope"></i>
|
||||
<span>{{ config.contactEmail }}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="contact--page page">
|
||||
<section class="s1">
|
||||
<div class="container">
|
||||
<div class="row" >
|
||||
<div class="col-12 col-md-6 message rounded">
|
||||
<l-map :zoom="15" :center="[35.71145647679602, 51.41578735415159]">
|
||||
<l-tile-layer url="http://{s}.tile.osm.org/{z}/{x}/{y}.png"></l-tile-layer>
|
||||
<l-marker :lat-lng="[35.71145647679602, 51.41578735415159]"></l-marker>
|
||||
</l-map>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 mt-5 mt-md-0 contact">
|
||||
<div class="info">
|
||||
<ul>
|
||||
<li>
|
||||
<p>
|
||||
<i class="fal fa-map-marker-alt"></i>
|
||||
<span> {{ config.address }} </span>
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<a :href="`tel: ${config.contactTel}`">
|
||||
<i class="fal fa-phone"></i>
|
||||
<span>{{ config.contactTel }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a :href="`mailto: ${config.contactEmail}`">
|
||||
<i class="fal fa-envelope"></i>
|
||||
<span>{{ config.contactEmail }}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ContactUsPage',
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
full_name: '',
|
||||
email: '',
|
||||
message: ''
|
||||
},
|
||||
validation: {}
|
||||
}
|
||||
},
|
||||
head() {
|
||||
return {
|
||||
title: 'آسان سرویس | ارتباط با ما'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
config() {
|
||||
return this.$config
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
send() {
|
||||
this.validation = {}
|
||||
this.$axios
|
||||
.post(`/api/public/contact`, this.formData)
|
||||
.then(res => {
|
||||
<script>
|
||||
export default {
|
||||
name: 'ContactUsPage',
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
full_name: '',
|
||||
email: '',
|
||||
message: ''
|
||||
},
|
||||
validation: {}
|
||||
}
|
||||
},
|
||||
head() {
|
||||
return {
|
||||
title: 'آسان سرویس | ارتباط با ما'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
config() {
|
||||
return this.$config
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
send() {
|
||||
this.validation = {}
|
||||
this.$axios
|
||||
.post(`/api/public/contact`, this.formData)
|
||||
.then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: 'پیام شما با موفقیت ارسال شد.'
|
||||
})
|
||||
this.formData = {
|
||||
full_name: '',
|
||||
email: '',
|
||||
message: ''
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
if (err.response.status === 422) this.validation = err.response.data.validation
|
||||
else {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: 'پیام شما با موفقیت ارسال شد.'
|
||||
type: 'error',
|
||||
message: err.response.data.message
|
||||
})
|
||||
this.formData = {
|
||||
full_name: '',
|
||||
email: '',
|
||||
message: ''
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
if (err.response.status === 422) this.validation = err.response.data.validation
|
||||
else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: err.response.data.message
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.leaflet-container{
|
||||
height: 20rem;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.rounded{
|
||||
height: 20rem;
|
||||
border-radius: 10px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user