189 lines
5.4 KiB
JavaScript
189 lines
5.4 KiB
JavaScript
import webpack from 'webpack'
|
|
import {
|
|
DevServerPort,
|
|
WebSocketURL,
|
|
NuxtPort,
|
|
NuxtHost,
|
|
isProduction,
|
|
// arpa
|
|
VerityUserGroupId,
|
|
VerityBusinessCategoryId,
|
|
VerityStockAreaId,
|
|
PanatechUserGroupId,
|
|
PanatechBusinessCategoryId,
|
|
PanatechStockAreaId
|
|
} from './server/_env'
|
|
import { serverMiddleware } from './server/index'
|
|
|
|
const serverMiddlewareArray = []
|
|
if (isProduction) serverMiddlewareArray.push(serverMiddleware)
|
|
|
|
export default {
|
|
// Global page headers (https://go.nuxtjs.dev/config-head)
|
|
head: {
|
|
title: 'آسان سرویس',
|
|
htmlAttrs: {
|
|
lang: 'fa'
|
|
},
|
|
meta: [
|
|
{ charset: 'utf-8' },
|
|
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
|
{ name: 'theme-color', content: '#065495' },
|
|
{ name: 'apple-mobile-web-app-status-bar-style', content: 'black-translucent' },
|
|
{
|
|
hid: 'description',
|
|
name: 'description',
|
|
content:
|
|
'آسان سرویس یکی از بزرگترین و فعالترین ارائه دهنده خدمات پس از فروش محصولات الکترونیکی به مدد شبکه گسترده و منسجم خدمات پس از فروش خود توانسته پاسخگوی مشتریان فهیم و گرانقدر باشد.'
|
|
}
|
|
],
|
|
link: [
|
|
{ rel: 'icon', type: 'image/x-icon', href: '/assets/img/favicon.png' },
|
|
{ rel: 'stylesheet', type: 'text/css', href: '/assets/css/bootstrap-grid.css' },
|
|
{ rel: 'stylesheet', type: 'text/css', href: '/assets/css/reset-css.css' },
|
|
{ rel: 'stylesheet', type: 'text/css', href: '/assets/css/fontawesome/css/all.min.css' }
|
|
],
|
|
script: [{ src: '/CustomSW.js', deafer: true, body: true }]
|
|
},
|
|
loading: false,
|
|
pageTransition: 'page',
|
|
// Global CSS (https://go.nuxtjs.dev/config-css)
|
|
css: ['element-ui/lib/theme-chalk/index.css', '~/sass/main.scss'],
|
|
// Plugins to run before rendering page (https://go.nuxtjs.dev/config-plugins)
|
|
plugins: [
|
|
'@/plugins/element-ui',
|
|
'@/plugins/ckEditor.client',
|
|
'@/plugins/gsap.client',
|
|
'@/plugins/core-ui.client',
|
|
'@/plugins/datePicker.client',
|
|
'@/plugins/ATextSplitterVuePlugin.client',
|
|
'@/plugins/ArpaError.client',
|
|
'@/plugins/jDate'
|
|
],
|
|
|
|
// Auto import components (https://go.nuxtjs.dev/config-components)
|
|
components: true,
|
|
|
|
// Modules for dev and build (recommended) (https://go.nuxtjs.dev/config-modules)
|
|
buildModules: ['@nuxtjs/pwa'],
|
|
|
|
// Modules (https://go.nuxtjs.dev/config-modules)
|
|
modules: [
|
|
// https://go.nuxtjs.dev/axios
|
|
'@nuxtjs/axios',
|
|
'@nuxtjs/auth-next',
|
|
'~/modules/WebSocketServer.js'
|
|
],
|
|
pwa: {
|
|
icon: {
|
|
fileName: 'bigIcon.png'
|
|
},
|
|
manifest: {
|
|
name: 'خدمات گارانتی آسان سرویس',
|
|
short_name: 'AsanService App',
|
|
description: false,
|
|
lang: 'fa',
|
|
useWebmanifestExtension: false,
|
|
start_url: '/account'
|
|
},
|
|
meta: {
|
|
nativeUI: true,
|
|
mobileAppIOS: true,
|
|
name: 'اسان سرویس',
|
|
theme_color: '#065495'
|
|
},
|
|
workbox: {
|
|
cleanupOutdatedCaches: true
|
|
}
|
|
},
|
|
// Axios module configuration (https://go.nuxtjs.dev/config-axios)
|
|
axios: {
|
|
baseURL: `http://127.0.0.1:${NuxtPort}`,
|
|
proxy: true
|
|
},
|
|
proxy: {
|
|
'/api': { target: `http://127.0.0.1:${isProduction ? NuxtPort : DevServerPort}` }
|
|
},
|
|
// Build Configuration (https://go.nuxtjs.dev/config-build)
|
|
build: {
|
|
transpile: [/^element-ui/],
|
|
plugins: [
|
|
new webpack.ProvidePlugin({
|
|
$: 'jquery',
|
|
jQuery: 'jquery',
|
|
'window.jQuery': 'jquery'
|
|
})
|
|
],
|
|
splitChunks: {
|
|
layouts: true
|
|
}
|
|
},
|
|
watchers: {
|
|
chokidar: {
|
|
ignored: /(server)/
|
|
},
|
|
webpack: {
|
|
ignored: /(server)/
|
|
}
|
|
},
|
|
router: {
|
|
linkActiveClass: 'active'
|
|
},
|
|
server: {
|
|
host: NuxtHost,
|
|
port: NuxtPort
|
|
},
|
|
serverMiddleware: serverMiddlewareArray,
|
|
auth: {
|
|
strategies: {
|
|
local: {
|
|
token: {
|
|
property: 'token',
|
|
required: true,
|
|
type: ''
|
|
},
|
|
user: {
|
|
property: 'user',
|
|
autoFetch: true
|
|
},
|
|
endpoints: {
|
|
login: { url: '/api/auth/login', method: 'post' },
|
|
logout: { url: '/api/auth/logout', method: 'post' },
|
|
user: { url: '/api/auth/user', method: 'get' }
|
|
}
|
|
}
|
|
},
|
|
redirect: false
|
|
},
|
|
publicRuntimeConfig: {
|
|
WebSocketURL: WebSocketURL(),
|
|
// verity
|
|
VerityUserGroupId,
|
|
VerityBusinessCategoryId,
|
|
VerityStockAreaId,
|
|
// panatech
|
|
PanatechUserGroupId,
|
|
PanatechBusinessCategoryId,
|
|
PanatechStockAreaId,
|
|
// footer variables
|
|
copyrightName: 'Danak Corporation',
|
|
copyrightURL: 'https://danakcorp.com/fa',
|
|
whatsApp: '',
|
|
instagram: '',
|
|
aparat: '',
|
|
supportTel: '021-67341',
|
|
supportEmail: 'info@asan-service.com',
|
|
andoridAppURL: '',
|
|
// contact page variables
|
|
address: 'تهران، میدان ولیعصر، خیابان نجات اللهی، خیابان جعفر شهری (سپند)، پلاک ۳۶، طبقه ۵',
|
|
contactTel: '021-67341',
|
|
contactEmail: 'info@asan-service.com',
|
|
// post receipt info (for asan service only)
|
|
recieverName: 'شرکت آسان سرویس (تهران)',
|
|
recieverAddress: 'تهران، میدان ولیعصر، خیابان نجات اللهی، خیابان جعفر شهری (سپند)، پلاک ۳۶، طبقه ۵',
|
|
recieverPostalCode: '1598993733',
|
|
recieverPhone: '02167341'
|
|
},
|
|
privateRuntimeConfig: {}
|
|
}
|