Commit bf73644d by 陆志强

Merge branch 'test' of gitlab.aodianyun.com:activities/web-questionnaire into dev

parents 93036569 d083659b
module.exports = {
root: true,
env: {
browser: true,
node: true
},
env: {},
extends: [
'alloy',
'alloy/vue',
],
parserOptions: {
parser: '@babel/eslint-parser',
requireConfigFile: false
},
extends: [
'@nuxtjs',
'plugin:nuxt/recommended',
'prettier'
],
plugins: [
],
// add your custom rules here
rules: {}
}
ignorePatterns: ["**/WSTimer/timer.js", "public/**"],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
"vue/component-tags-order": ["error", {
"order": ["template", "script", "style"]
}],
"vue/multi-word-component-names":"off",
'vue/no-reserved-component-names': 'off',
'new-cap': 'off',
'vue/no-duplicate-attributes': 'off',
"max-lines-per-function": 'off',
"complexity": 'off',
"max-params": 'off',
"max-depth": ["error", 6],
"no-param-reassign": [
"error",
{
"props": true,
"ignorePropertyModificationsFor": [
"e", // for e.returnvalue
"ctx", // for Koa routing
"req", // for Express requests
"request", // for Express requests
"res", // for Express responses
"response", // for Express responses
"state", // for vuex state
"item",
"files"
]
}
]
},
};
FROM registry.cn-hangzhou.aliyuncs.com/cduan/customer-resource-base:zabbix
ADD ./ /var/www/web_questionnaire
ENV HOST 0.0.0.0
ENV TZ Asia/Shanghai
WORKDIR /var/www/web_questionnaire
RUN yarn install --registry=https://registry.yarnpkg.com --network-timeout=60000
RUN yarn build:prod
RUN rm -rf assets components layouts middleware pages plugins store .eslintrc.js .gitignore build.yml pDockerfile README.md pStart.sh
EXPOSE 4001
RUN chmod +x start.sh
ENTRYPOINT ["./start.sh"]
FROM registry.cn-hangzhou.aliyuncs.com/cduan/customer-resource-base:nginx
RUN mkdir -p /usr/share/nginx/www/questionnaire
COPY ./dist /usr/share/nginx/www/questionnaire
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
FROM alpine AS builder
WORKDIR /home/app
RUN apk add --no-cache --update nodejs yarn
COPY package.json yarn.lock ./
RUN yarn install --registry=https://registry.yarnpkg.com
FROM registry.cn-hangzhou.aliyuncs.com/open_images/node12.13.1-pm2
ADD ./ /var/www/web_questionnaire
ENV HOST 0.0.0.0
ENV TZ Asia/Shanghai
WORKDIR /var/www/web_questionnaire
COPY --from=builder /home/app/package.json ./package.json
COPY --from=builder /home/app/node_modules ./node_modules
RUN yarn build:cbn
RUN rm -rf assets components layouts middleware pages plugins store .eslintrc.js .gitignore build.yml Dockerfile README.md start.sh
EXPOSE 4001
RUN chmod +x cbnStart.sh
ENTRYPOINT ["./cbnStart.sh"]
#!/bin/sh
yarn run pm2:cbn
while true
do
sleep 5;
done
FROM alpine AS builder
WORKDIR /home/app
RUN apk add --no-cache --update nodejs yarn
COPY package.json yarn.lock ./
RUN yarn install --registry=https://registry.yarnpkg.com
FROM registry.cn-hangzhou.aliyuncs.com/open_images/node12.13.1-pm2
ADD ./ /var/www/web_questionnaire
ENV HOST 0.0.0.0
ENV TZ Asia/Shanghai
WORKDIR /var/www/web_questionnaire
COPY --from=builder /home/app/package.json ./package.json
COPY --from=builder /home/app/node_modules ./node_modules
RUN yarn build:cbnclouds
RUN rm -rf assets components layouts middleware pages plugins store .eslintrc.js .gitignore build.yml Dockerfile README.md start.sh
EXPOSE 4001
RUN chmod +x cbncloudsStart.sh
ENTRYPOINT ["./cbncloudsStart.sh"]
#!/bin/sh
yarn run pm2:cbnclouds
while true
do
sleep 5;
done
FROM alpine AS builder
WORKDIR /home/app
RUN apk add --no-cache --update nodejs yarn
COPY package.json yarn.lock ./
RUN yarn install --registry=https://registry.yarnpkg.com
FROM registry.cn-hangzhou.aliyuncs.com/open_images/node12.13.1-pm2
ADD ./ /var/www/web_questionnaire
ENV HOST 0.0.0.0
ENV TZ Asia/Shanghai
WORKDIR /var/www/web_questionnaire
COPY --from=builder /home/app/package.json ./package.json
COPY --from=builder /home/app/node_modules ./node_modules
RUN yarn build:cm
RUN rm -rf assets components layouts middleware pages plugins store .eslintrc.js .gitignore build.yml Dockerfile README.md start.sh
EXPOSE 4001
RUN chmod +x cmStart.sh
ENTRYPOINT ["./cmStart.sh"]
#!/bin/sh
yarn run pm2:cm
while true
do
sleep 5;
done
export default {
goDomain: `//${process.env.GO_API_DOMAIN}/v1`,
activityDomain: `//${process.env.ACTIVITY_API_DOMAIN}/v1`,
privateDomain: `//${process.env.PRIVATE_API_DOMAIN}/v1`,
consolesDomian: `//${process.env.CONSOLES_API_DOMAIN}/v1`,
defShareImg: `https://${process.env.CUSTOMER_API_DOMAIN}/common/img/questionnaire_share.png`,
ossImageServe: process.env.IS_PRIVATE
? ''
: '?x-oss-process=style/mobilebackground',
}
FROM registry.cn-hangzhou.aliyuncs.com/cduan/customer-resource-base:zabbix
ADD ./ /var/www/web_questionnaire
ENV HOST 0.0.0.0
ENV TZ Asia/Shanghai
WORKDIR /var/www/web_questionnaire
RUN yarn install
RUN yarn build:cuc
RUN rm -rf assets components layouts middleware pages plugins store .eslintrc.js .gitignore build.yml Dockerfile README.md start.sh
EXPOSE 4001
RUN chmod +x cucStart.sh
ENTRYPOINT ["./cucStart.sh"]
#!/bin/sh
yarn run pm2:cuc
while true
do
sleep 5;
done
\ No newline at end of file
FROM alpine AS builder
WORKDIR /home/app
RUN apk add --no-cache --update nodejs yarn
COPY package.json yarn.lock ./
RUN yarn install --registry=https://registry.yarnpkg.com
FROM registry.cn-hangzhou.aliyuncs.com/open_images/node12.13.1-pm2
ADD ./ /var/www/web_questionnaire
ENV HOST 0.0.0.0
ENV TZ Asia/Shanghai
WORKDIR /var/www/web_questionnaire
COPY --from=builder /home/app/package.json ./package.json
COPY --from=builder /home/app/node_modules ./node_modules
RUN yarn build:huawei
RUN rm -rf assets components layouts middleware pages plugins store .eslintrc.js .gitignore build.yml Dockerfile README.md start.sh
EXPOSE 34001
RUN chmod +x huaweiStart.sh
ENTRYPOINT ["./huaweiStart.sh"]
#!/bin/sh
yarn run pm2:huawei
while true
do
sleep 5;
done
/* eslint-disable nuxt/no-cjs-in-config */
const path = require('path')
const WebpackAliOSSPlugin = require('@gdyfe/webpack-alioss-plugin')
const { getEnvConfig } = require('@gdyfe/config')
const { version, name } = require('./package.json')
const env = getEnvConfig({
server: process.env.mode,
ic: 'ZmUtZ5WNp%XBzDw=',
})
const { X_CA_STAGE, RUN_SERVER, STATIC_SOURCE_DOMAIN, STATIC_OSS_ACCESS, OSS_DOMAIN } = env;
const { SERVE_PORT, BASE_URL, PROJECT_NAME, GTAG_ID, SENTRY_DSN } = env.questionnaire;
const sentryOptions = {
dsn: SENTRY_DSN,
version,
env: RUN_SERVER,
name,
};
const IS_USE_OSS = process.env.NODE_ENV === 'production'
const plugins = IS_USE_OSS
? [
// 优化打包速度
new WebpackAliOSSPlugin({
accessKeyId: STATIC_OSS_ACCESS.accessKeyId,
accessKeySecret: STATIC_OSS_ACCESS.accessKeySecret,
region: STATIC_OSS_ACCESS.region,
bucket: STATIC_OSS_ACCESS.bucket,
prefix: PROJECT_NAME,
limit: 10, // 备份最近 3 个版本的 oss 文件
format: version,
exclude: [/.*\.html$/], // 或者 /.*\.html$/,排除.html文件的上传
deleteAll: false, // 优先匹配 format 配置项
output: path.resolve(__dirname, './nuxt-dist/dist/client'),
local: true, // 上传打包输出目录里的文件
}),
]
: []
export default {
buildDir: 'nuxt-dist',
env:{
GTAG_ID,
sentryOptions,
...env,
UPLOADER_ACCESS: '',
STATIC_OSS_ACCESS: '',
},
router: {
base: BASE_URL,
middleware: ['device'],
extendRoutes(routes, resolve) {
routes.push({
path: '/index/:id',
components: {
default: resolve(__dirname, 'pages/index'), // or routes[index].component
},
})
},
},
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
title: '',
meta: [
{ charset: 'utf-8' },
{
name: 'viewport',
content: 'width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover',
},
{ hid: 'description', name: 'description', content: '' },
{ name: 'format-detection', content: 'telephone=no' },
{
hid: 'description',
name: 'description',
content: '问卷报表',
},
],
link: [
{
rel: 'stylesheet',
href: `//${OSS_DOMAIN}/common/icon/iconfont.css`,
ssr: false,
},
{ rel: 'icon', href: `//${OSS_DOMAIN}/common/img/gdy_favicon.png` },
{ rel: 'stylesheet', href: `//${STATIC_SOURCE_DOMAIN}/web-component/complaintsDeal/complaintsDeal.min.css` },
{
href: '//apiliveroom.dev.guangdianyun.tv/v1',
rel: 'dns-prefetch',
},
{
href: '//activity.guangdianyun.tv',
rel: 'dns-prefetch',
},
{
href: '//static-pro.guangdianyun.tv',
rel: 'dns-prefetch',
},
{
href: '//res.wx.qq.com',
rel: 'dns-prefetch',
},
{
href: '//www.googletagmanager.com',
rel: 'dns-prefetch',
},
{
rel: 'stylesheet',
href: `//${STATIC_SOURCE_DOMAIN}/custom-plugins-library/login-center/style.css`,
},
],
script: [
{ src: `//${STATIC_SOURCE_DOMAIN}/web-component/complaintsDeal/complaintsDeal.min.js`, defer: true },
// {
// type: 'text/javascript',
// src: '//res.wx.qq.com/open/js/jweixin-1.4.0.js',
// defer: true,
// body: true,
// },
{
src: `//${STATIC_SOURCE_DOMAIN}/custom-plugins-library/login-center/login-center.min.js`
},
],
},
// Global CSS: https://go.nuxtjs.dev/config-css
css: ['@/assets/styles/main.less'],
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: [
{ src: '@/plugins/vant' },
{ src: '@/plugins/gtag' },
{ src: '@/plugins/DeviceId', ssr: false },
{ src: '@/filters' },
],
// Auto import components: https://go.nuxtjs.dev/config-components
components: true,
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: [
// https://go.nuxtjs.dev/eslint
'@nuxtjs/eslint-module',
'@nuxtjs/style-resources',
],
/* less全局变量 */
styleResources: {
less: './assets/styles/variable.less',
},
// Modules: https://go.nuxtjs.dev/config-modules
modules: ['@nuxtjs/axios'],
/*
** Axios module configuration
** See https://axios.nuxtjs.org/options
*/
axios: {},
server: {
port: SERVE_PORT, // default: 3000
host: '0.0.0.0', // default: localhost
},
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
publicPath: IS_USE_OSS
? `//${STATIC_SOURCE_DOMAIN}/${PROJECT_NAME}/${version}`
: `/${X_CA_STAGE.toLowerCase() || 'prod'}/`,
transpile: [/vant.*?less/],
babel: {
plugins: [
[
'import',
{
libraryName: 'vant',
style: (name) => {
return `${name}/style/less.js`
},
},
'vant',
],
],
},
postcss: {
plugins: {
'postcss-pxtorem': {
rootValue: 75,
selectorBlackList: [/^html$/, /^body$/], // 忽略转换正则匹配项
propList: ['*'],
},
},
},
plugins,
},
}
......@@ -7,24 +7,12 @@
"release": "standard-version",
"release:minor": "standard-version -r minor",
"release:patch": "standard-version -r patch",
"serve:dev": "cross-env mode=test nuxt",
"serve:pre": "cross-env mode=preview nuxt",
"serve:prod": "cross-env mode=production nuxt",
"serve:cm": "cross-env mode=cm nuxt",
"serve:vvku": "cross-env mode=vvku nuxt",
"serve:cbn": "cross-env mode=cbn nuxt",
"serve:huawei": "cross-env mode=huawei nuxt",
"serve:cbnclouds": "cross-env mode=cbnclouds nuxt",
"serve:cuc": "cross-env mode=cuc nuxt",
"build:dev": "cross-env mode=test nuxt build",
"build:pre": "cross-env mode=preview nuxt build",
"build:prod": "cross-env mode=production nuxt build",
"build:cm": "cross-env mode=cm nuxt build",
"build:vvku": "cross-env mode=vvku nuxt build",
"build:cbn": "cross-env mode=cbn nuxt build",
"build:huawei": "cross-env mode=huawei nuxt build",
"build:cbnclouds": "cross-env mode=cbnclouds nuxt build",
"build:cuc": "cross-env mode=cuc nuxt build",
"serve:dev": "cross-env mode=test vue-cli-service serve",
"serve:pre": "cross-env mode=preview vue-cli-service serve",
"serve:prod": "cross-env mode=production vue-cli-service serve",
"build:dev": "cross-env mode=test vue-cli-service build",
"build:pre": "cross-env mode=preview vue-cli-service build",
"build:prod": "cross-env mode=production vue-cli-service build",
"start:dev": "cross-env mode=test nuxt start",
"start:pre": "cross-env mode=preview nuxt start",
"start:prod": "cross-env mode=production nuxt start",
......@@ -49,32 +37,41 @@
"lint": "yarn lint:js && yarn lint:style"
},
"dependencies": {
"@gdyfe/config": "^1.2.8",
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
"@easy-messenger/client-connection": "^1.0.3",
"@gdyfe/config": "^2.1.5",
"axios": "^1.6.2",
"alife-logger": "^1.8.6",
"core-js": "^3.15.1",
"core-js": "^3.37.1",
"dayjs": "^1.10.6",
"js-cookie": "2.2.0",
"normalize.css": "^8.0.1",
"nuxt": "^2.15.7",
"vant": "^2.12.22",
"vue": "^2.6.10",
"vue-cookie": "^1.1.4",
"vue-gtag": "^1.16.1",
"vue-router": "^3.1.3",
"vuescroll": "^4.17.3",
"vuex": "^3.0.1",
"webpack": "^4.46.0",
"weixin-js-sdk": "^1.6.0"
},
"devDependencies": {
"@babel/eslint-parser": "^7.14.7",
"@gdyfe/webpack-alioss-plugin": "^0.1.6",
"@nuxtjs/axios": "^5.13.6",
"@nuxtjs/eslint-config": "^6.0.1",
"@nuxtjs/eslint-module": "^3.0.2",
"@nuxtjs/style-resources": "^1.2.0",
"@vant/touch-emulator": "^1.3.2",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-plugin-router": "~5.0.0",
"@vue/cli-plugin-vuex": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"@vue/eslint-config-airbnb": "^4.0.0",
"@vue/eslint-config-prettier": "^6.0.0",
"babel-plugin-import": "^1.13.3",
"cross-env": "^7.0.3",
"eslint": "^7.29.0",
"eslint-config-alloy": "^3.0.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-nuxt": "^2.0.0",
"eslint-plugin-vue": "^7.12.1",
"gdy-quill-editor": "^0.1.6",
"less": "^3.11.1",
......
{
"apps": [
{
"name": "questionnaire-test",
"script": "npm",
"args": "run start:dev",
"instances": "max",
"exec_mode": "cluster",
"autorestart": true,
"max_memory_restart": "4G",
"env": {
"port": 4001,
"mode": "test",
"NODE_ENV": "production"
},
"error_file": "./logs/app-err.log",
"out_file": "./logs/app-out.log"
},
{
"name": "questionnaire-pre",
"script": "npm",
"args": "run start:pre",
"instances": "max",
"exec_mode": "cluster",
"autorestart": true,
"max_memory_restart": "4G",
"env": {
"port": 4001,
"mode": "preview",
"NODE_ENV": "production"
},
"error_file": "./logs/app-err.log",
"out_file": "./logs/app-out.log"
},
{
"name": "questionnaire-prod",
"script": "npm",
"args": "run start:prod",
"instances": "max",
"exec_mode": "cluster",
"autorestart": true,
"max_memory_restart": "8G",
"env": {
"port": 4001,
"mode": "production",
"NODE_ENV": "production"
},
"error_file": "./logs/app-err.log",
"out_file": "./logs/app-out.log"
},
{
"name": "questionnaire-cm",
"script": "npm",
"args": "run start:cm",
"instances": "max",
"exec_mode": "cluster",
"autorestart": true,
"max_memory_restart": "8G",
"env": {
"port": 4001,
"mode": "cm",
"NODE_ENV": "production"
},
"error_file": "./logs/app-err.log",
"out_file": "./logs/app-out.log"
},
{
"name": "questionnaire-vvku",
"script": "npm",
"args": "run start:vvku",
"instances": "max",
"exec_mode": "cluster",
"autorestart": true,
"max_memory_restart": "8G",
"env": {
"port": 4001,
"mode": "vvku",
"NODE_ENV": "production"
},
"error_file": "./logs/app-err.log",
"out_file": "./logs/app-out.log"
},
{
"name": "questionnaire-cbn",
"script": "npm",
"args": "run start:cbn",
"instances": "max",
"exec_mode": "cluster",
"autorestart": true,
"max_memory_restart": "8G",
"env": {
"port": 4001,
"mode": "cbn",
"NODE_ENV": "production"
},
"error_file": "./logs/app-err.log",
"out_file": "./logs/app-out.log"
},
{
"name": "questionnaire-huawei",
"script": "npm",
"args": "run start:huawei",
"instances": "max",
"exec_mode": "cluster",
"autorestart": true,
"max_memory_restart": "8G",
"env": {
"port": 34001,
"mode": "huawei",
"NODE_ENV": "production"
},
"error_file": "./logs/app-err.log",
"out_file": "./logs/app-out.log"
},
{
"name": "questionnaire-cbnclouds",
"script": "npm",
"args": "run start:cbnclouds",
"instances": "max",
"exec_mode": "cluster",
"autorestart": true,
"max_memory_restart": "32G",
"env": {
"port": 4001,
"mode": "cbnclouds",
"NODE_ENV": "production"
},
"error_file": "./logs/app-err.log",
"out_file": "./logs/app-out.log"
},
{
"name": "questionnaire-cuc",
"script": "npm",
"args": "run start:cuc",
"instances": "max",
"exec_mode": "cluster",
"autorestart": true,
"max_memory_restart": "32G",
"env": {
"port": 4001,
"mode": "cuc",
"NODE_ENV": "production"
},
"error_file": "./logs/app-err.log",
"out_file": "./logs/app-out.log"
}
]
}
\ No newline at end of file
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<meta http-equiv="Cache-Control" content="no-store no-cache" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!-- <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" /> -->
<link href="<%= BASE_URL %><%= process.env.VUE_APP_ASSETS_DIR %>/config.js" rel="preload" as="script" />
<script src="<%= BASE_URL %><%= process.env.VUE_APP_ASSETS_DIR %>/config.js"></script>
<title></title>
<script>
;(function() {
// Function to create and add a link element
function _addLink(href, rel) {
var linkTag = document.createElement('link')
linkTag.rel = rel
linkTag.href = href
document.head.appendChild(linkTag)
}
// Function to create and add a script element
function _addScript(src) {
var scriptTag = document.createElement('script')
scriptTag.src = src
document.head.appendChild(scriptTag)
}
// Add favicon and iconfont stylesheets
_addLink('//' + window.__GDY_ENV_CONFIG__.OSS_DOMAIN + '/common/img/gdy_favicon.png', 'icon')
_addLink('//' + window.__GDY_ENV_CONFIG__.OSS_DOMAIN + '/common/icon/iconfont.css', 'stylesheet')
_addLink('//' + window.__GDY_ENV_CONFIG__.STATIC_SOURCE_DOMAIN + '/web-component/complaintsDeal/complaintsDeal.min.css', 'stylesheet')
_addLink('//apiliveroom.dev.guangdianyun.tv/v1', 'dns-prefetch')
_addLink('//activity.guangdianyun.tv', 'dns-prefetch')
_addLink('//static-pro.guangdianyun.tv', 'dns-prefetch')
_addLink('//res.wx.qq.com', 'dns-prefetch')
_addLink('//www.googletagmanager.com', 'dns-prefetch')
_addLink('//' + window.__GDY_ENV_CONFIG__.STATIC_SOURCE_DOMAIN + '/custom-plugins-library/login-center/style.css', 'stylesheet')
_addScript('//' + window.__GDY_ENV_CONFIG__.STATIC_SOURCE_DOMAIN + '/web-component/complaintsDeal/complaintsDeal.min.js')
_addScript('//' + window.__GDY_ENV_CONFIG__.STATIC_SOURCE_DOMAIN + '/custom-plugins-library/login-center/login-center.min.js')
})()
</script>
<style>
</style>
</head>
<body>
<noscript>
<strong
>We're sorry but web_questionnaire doesn't work properly without JavaScript enabled. Please enable it to
continue.</strong
>
</noscript>
<div id="app">
</div>
<!-- built files will be auto injected -->
</body>
</html>
<template>
<div id="app">
<router-view></router-view>
</div>
</template>
<script>
export default {
name: 'App',
mounted() {
setTimeout(() => {
const { uin } = this.$route.query
console.log(123123, uin, !Number(uin));
if (!Number(uin)) {
this.$router.push('/error')
}
}, 1000)
}
}
</script>
<style lang="less">
// html {
// // width: 100%;
// // height: 100%;
// // margin: 0;
// // padding: 0;
// // font-family: 'Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, 微软雅黑, Arial, sans-serif';
// body {
// width: 100%;
// height: 100%;
// margin: 0;
// padding: 0;
// #app {
// width: 100%;
// height: 100%;
// // background: #f7f7f7;
// }
// }
// }
</style>
......@@ -6,9 +6,9 @@
4# 业务模块需要哪个接口则引入哪个
*/
import { get, post } from '@/api/request'
import CONFIG from '@/config'
import CONFIG, { ENV_CONFIG } from '@/config'
const { privateDomain, goDomain } = CONFIG
const flag = process.env.X_CA_STAGE
const flag = ENV_CONFIG.X_CA_STAGE
// 获取dms sub_key
export const getDmsInfo = (data) =>
......
import { post, get } from "@/api/request";
import CONFIG from "@/config";
import CONFIG, { ENV_CONFIG } from '@/config'
const { activityDomain, consolesDomian } = CONFIG
const flag = process.env.X_CA_STAGE
const flag = ENV_CONFIG.X_CA_STAGE
// 获取问卷信息
export const getQuestionnaire = data =>
......
......@@ -4,6 +4,7 @@ import qs from 'qs'
import VueCookie from 'vue-cookie'
// message消息弹窗,可自行引入其他插件
import { Toast } from 'vant'
import { ENV_CONFIG } from '@/config'
// 创建axios实例,不污染axios全局
const axiosService = axios.create()
......@@ -11,14 +12,15 @@ const axiosService = axios.create()
// 默认content-type
axiosService.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded'
// 默认baseURL
axiosService.defaults.baseURL = `//${process.env.CUSTOMER_API_DOMAIN}/v1`
axiosService.defaults.baseURL = `//${ENV_CONFIG.CUSTOMER_API_DOMAIN}/v1`
// 默认请求超时时间
axiosService.defaults.timeout = 3 * 1000
// 请求拦截器
/* eslint-disable no-param-reassign */
axiosService.interceptors.request.use(
(config) => {
const token = VueCookie.get(process.env.CUSTOMER_TOKEN_KEY)
const token = VueCookie.get(ENV_CONFIG.CUSTOMER_TOKEN_KEY)
const { method, headers } = config
const data = filterNull(config.data)
// 格式化序列,目前只对post进行处理,可新增其他请求逻辑
......@@ -35,7 +37,7 @@ axiosService.interceptors.request.use(
config.headers.token = token
}
// 自定义header键:X-Ca-Stage(环境变量)
config.headers['X-Ca-Stage'] = process.env.X_CA_STAGE
config.headers['X-Ca-Stage'] = ENV_CONFIG.X_CA_STAGE
config.metadata = { startTime: new Date() }
return config
},
......
@import './variable.less';
// rem 单位换算:定为 75px 只是方便运算,750px-75px、640-64px、1080px-108px,如此类推
@vw_fontsize: 75; // iPhone 6尺寸的根元素大小基准值
// @function rem($px) {
// @return ($px / $vw_fontsize) * 1rem;
// }
// // 页面最大宽度限制
// @--body-max-width: 750PX;
// // 页面最小宽度限制
// @--body-min-width: 320PX;
// // 主题色
// @--main-color: #3F7DF7;
// 根元素大小使用 vw 单位
@vw_design: 750;
......
@import './reset.less'; // 去除默认样式
@import 'normalize.css/normalize.css'; // 统一各个浏览器样式的插件
@import '~normalize.css/normalize.css'; // 统一各个浏览器样式的插件
@import './adapt.less'; // 适配
@import '~vant/lib/index.less';
@import './variable.less';
html,
body {
......
......@@ -6,6 +6,7 @@
import Bus from '@/utils/Bus'
import { mapGetters } from 'vuex'
import { CUSTOM_SOURCE_TYPE } from '@/utils/constant'
import { ENV_CONFIG } from '@/config'
export default {
name: 'ComplaintsDeal',
......@@ -41,7 +42,7 @@ export default {
company: '管理员',
pageId: id,
pageType: CUSTOM_SOURCE_TYPE.questionnaire,
env: process.env.X_CA_STAGE,
env: ENV_CONFIG.X_CA_STAGE,
beforeShow: next => {
if (this.isLogin) {
next()
......@@ -51,7 +52,7 @@ export default {
message: '请先登录',
duration: 1500,
onClose() {
if (process.client && window.self !== window.top) return
if (window.self !== window.top) return
self.showLogin()
}
})
......
......@@ -20,8 +20,8 @@
<script>
// 默认背景图
import CONFIG from '@/config'
import { mapGetters } from 'vuex'
import CONFIG,{ ENV_CONFIG } from '@/config'
export default {
name: 'Banner',
......@@ -44,7 +44,7 @@ export default {
info: 'questionnaire/questionnaireInfo',
}),
bannerImg() {
const img = this.info.logo || `//${process.env.OSS_DOMAIN}/common/img/questionnaire_banner_default_v3.png`
const img = this.info.logo || `//${ENV_CONFIG.OSS_DOMAIN}/common/img/questionnaire_banner_default_v3.png`
return `${img}${CONFIG.ossImageServe}`
},
bannerLink() {
......
......@@ -36,7 +36,7 @@
<script>
// 倒计时逻辑处理
import { mapGetters } from 'vuex'
import { ACTIVITY_STATE, ACTIVITY_STATE_TXT } from '~/utils/constant'
import { ACTIVITY_STATE, ACTIVITY_STATE_TXT } from '@/utils/constant'
export default {
name: 'CountDownBar',
filters: {
......
......@@ -20,6 +20,7 @@ export default {
</script>
<style lang='less' scoped>
@--main-color: #3F7DF7;
.finished-notice {
min-height: 5.8rem;
display: flex;
......
......@@ -58,6 +58,7 @@ export default {
},
},
data() {
/* eslint-disable no-param-reassign */
const asyncValidator = (val, rules) => {
if (this.isValid) {
return Promise.resolve()
......@@ -116,7 +117,7 @@ export default {
message: '请先登录',
duration: 1500,
onClose() {
if (process.client && window.self !== window.top) return
if (window.self !== window.top) return
self.showLogin()
},
})
......
......@@ -12,7 +12,7 @@
<div>
<div class="tip">请选择一个答案</div>
<div class="list">
<div v-for="(item, index) in formItem.option" class="list-item" :key="index" :disabled="disabled" :name="item.id" @click="input(item.id)">
<div v-for="(item, index) in formItem.option" :key="index" :disabled="disabled" :name="item.id" class="list-item" @click="input(item.title)">
<div class="ques-radio__img"></div>
<div>{{ item.title }}</div>
<div class="ques-radio__img"><img v-if="item.img" v-lazy="item.img" class="ques-radio__img" alt @click.stop="previewImg(item.img)" /></div>
......@@ -36,7 +36,7 @@
<span class="ques-radio__text">{{ item.title }}</span>
<img v-if="item.img" v-lazy="item.img" class="ques-radio__img" alt @click.stop="previewImg(item.img)" />
</template>
<template v-else>
<template v-else #icon>
<span class="ques-radio__text">{{ item.title }}</span>
<img v-if="item.img" v-lazy="item.img" class="ques-radio__img" alt @click.stop="previewImg(item.img)" />
</template>
......
......@@ -73,7 +73,7 @@ import {
QuesAddressPicker,
} from '@/components/Questionnaire'
import { getUserSimpleInfo } from '@/api/modules/questionnaire'
import { ACTIVITY_STATE, ACTIVITY_STATE_TXT } from '~/utils/constant'
import { ACTIVITY_STATE, ACTIVITY_STATE_TXT } from '@/utils/constant'
export default {
name: 'QuestionForm',
......@@ -108,7 +108,7 @@ export default {
},
isButtonDisabled() {
const { questionnaireInfo } = this
return +questionnaireInfo?.status !== ACTIVITY_STATE.start
return Number(questionnaireInfo?.status) !== ACTIVITY_STATE.start
},
buttonText() {
const { questionnaireInfo } = this
......@@ -128,6 +128,7 @@ export default {
},
formData: {
handler(nVal) {
/* eslint-disable no-param-reassign */
const count = nVal.reduce((total, currentValue) => {
if (currentValue && currentValue.answer && currentValue.answer !== '' && currentValue.answer.length !== 0) {
total += 1
......
......@@ -9,7 +9,7 @@
<div class="question-form-item__title">{{ info.title }}</div>
<div class="question-form-item__type">{{ info | showType }}</div>
</div>
<div class="question-form-item__content" @click="isLogin()">
<div class="question-form-item__content" @click="isLogin">
<slot></slot>
</div>
</div>
......@@ -18,7 +18,7 @@
<script>
import { mapActions } from 'vuex'
import { QUESTION_TYPE } from '~/utils/constant'
import { QUESTION_TYPE } from '@/utils/constant'
export default {
name: 'QuestionFormItem',
......@@ -77,6 +77,7 @@ export default {
</script>
<style lang='less' scoped>
@--main-color: #3F7DF7;
.question-form-item {
background: #fff;
margin-top: 15px;
......
<template>
<div class="user-info">
<div class="user-info__logged" v-if="isLogin">您好,{{userInfo.userNick}}</div>
<div class="user-info__login" v-else>
<div v-if="isLogin" class="user-info__logged">您好,{{userInfo.userNick}}</div>
<div v-else class="user-info__login">
<a @click="jump">登录</a>
,即可参与填写问卷!
</div>
......
export const ENV_CONFIG = window.__GDY_ENV_CONFIG__
export default {
goDomain: `//${ENV_CONFIG.GO_API_DOMAIN}/v1`,
activityDomain: `//${ENV_CONFIG.ACTIVITY_API_DOMAIN}/v1`,
privateDomain: `//${ENV_CONFIG.PRIVATE_API_DOMAIN}/v1`,
consolesDomian: `//${ENV_CONFIG.CONSOLES_API_DOMAIN}/v1`,
defShareImg: `https://${ENV_CONFIG.CUSTOMER_API_DOMAIN}/common/img/questionnaire_share.png`,
ossImageServe: ENV_CONFIG.IS_PRIVATE
? ''
: '?x-oss-process=style/mobilebackground',
}
......@@ -4,6 +4,8 @@
* 传入数字字符串则没有限制
* @param {number|string} digit
*/
/* eslint-disable no-param-reassign */
/* eslint-disable no-unreachable-loop */
export default (digit) => {
digit = typeof digit === 'number' ? String(digit) : digit;
const zh = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
......@@ -13,7 +15,8 @@ export default (digit) => {
let breakLen = Math.ceil(digit.length / 4);
let notBreakSegment = digit.length % 4 || 4;
let segment;
let zeroFlag = [], allZeroFlag = [];
let zeroFlag = []
let allZeroFlag = [];
let result = '';
while (breakLen > 0) {
......@@ -21,7 +24,7 @@ export default (digit) => {
segment = digit.slice(0, notBreakSegment);
let segmentLen = segment.length;
for (let i = 0; i < segmentLen; i++) {
if (segment[i] != 0) {
if (segment[i] !== 0) {
if (zeroFlag.length > 0) {
result += '零' + zh[segment[i]] + unit[4 - segmentLen + i];
// 判断是否需要加上 quot 单位
......@@ -40,7 +43,7 @@ export default (digit) => {
}
} else {
// 处理为 0 的情形
if (segmentLen == 1) {
if (segmentLen === 1) {
result += zh[segment[i]];
break;
}
......@@ -53,7 +56,7 @@ export default (digit) => {
notBreakSegment += 4;
for (let j = 0; j < segment.length; j++) {
if (segment[j] != 0) {
if (segment[j] !== 0) {
if (zeroFlag.length > 0) {
// 第一次执行zeroFlag长度不为0,说明上一个分区最后有0待处理
if (j === 0) {
......@@ -77,8 +80,8 @@ export default (digit) => {
zeroFlag.push(segment[j]);
} else if (allZeroFlag.length > 0) {
// 执行到最后
if (breakLen == 1) {
result += '';
if (breakLen === 1) {
result = String(result);
} else {
zeroFlag.length = 0;
}
......
<template>
<div class="container">
<nuxt />
<router-view />
</div>
</template>
<script>
export default {}
export default {
mounted() {
const { uin } = this.$route.query
if (!Number(uin)) {
this.$router.push('/error')
}
}
}
</script>
<style lang="less" scoped>
.container {
......
<template>
<div class="error">
<div v-if="statusCode === 404" class="error__lost"></div>
<div v-else class="error__other">
<div class="error__lost"></div>
<!-- <div v-else class="error__other">
<span>{{ errorMessage }}</span>
</div>
</div> -->
</div>
</template>
......@@ -19,7 +19,7 @@ export default {
},
computed: {
statusCode() {
return +this.error?.statusCode || 0
return Number(this.error?.statusCode) || 0
},
errorMessage() {
return this.error?.message || '发生了一些不可预知的错误'
......@@ -31,15 +31,13 @@ export default {
},
methods: {
setTitle(type) {
if (process.client) {
switch (type) {
case 404:
document.title = '抱歉,您的页面迷路了!'
break
default:
document.title = this.errorMessage
break
}
switch (type) {
case 404:
document.title = '抱歉,您的页面迷路了!'
break
default:
document.title = this.errorMessage
break
}
}
}
......
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import '@/assets/styles/main.less' // global css
import '@/plugins/vant'
import '@/plugins/gtag'
import '@/plugins/DeviceId'
import '@/filters'
new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')
......@@ -47,6 +47,7 @@ import { mapGetters, mapActions } from 'vuex'
import debounce from 'lodash/debounce'
import Bus from '@/utils/Bus'
import loginAction from '@/plugins/UserAction/login'
import { ENV_CONFIG } from '@/config'
export default {
components: {
......@@ -137,7 +138,7 @@ export default {
// 加载列表
this.loadData()
} else {
this.app.context.error({ statusCode: 404, message: 'This page could not be found' })
this.$router.push('/error')
}
},
changeIsError(val) {
......@@ -153,6 +154,7 @@ export default {
this.scrollTop = vertical?.scrollTop || 0
this.stickyListener()
},
/* eslint-disable no-invalid-this */
stickyListener: debounce(
function () {
const targetDom = this.$refs?.progressWrap
......@@ -192,8 +194,8 @@ export default {
backUrl: encodeURIComponent(window.location.href),
wxPcRedirect,
state,
serviceAgreement: `//${process.env.OSS_DOMAIN}/staticPages/agreement_user.html`,
privacyAgreement: `//${process.env.OSS_DOMAIN}/staticPages/agreement_privacy.html`,
serviceAgreement: `//${ENV_CONFIG.OSS_DOMAIN}/staticPages/agreement_user.html`,
privacyAgreement: `//${ENV_CONFIG.OSS_DOMAIN}/staticPages/agreement_privacy.html`,
successCallback: ({ type, response }) => {
if (type === 'recover'){
this.$toast("密码修改成功!");
......
/* eslint-disable no-invalid-this */
import Cookie from 'js-cookie'
export default function({token, onFinished} = {token: ''}) {
......@@ -6,8 +7,9 @@ export default function({token, onFinished} = {token: ''}) {
token && Cookie.set('token', token, { expires: 10 });
this.$store.dispatch('users/getUerInfo', { uin })
setTimeout(() => {
this.$store.dispatch('users/postInfo', { id })
this.$store.dispatch('users/postInfo', id)
}, 1000)
window.location.reload()
onFinished && onFinished()
return this
}
import Vue from "vue";
import VueGtag from "vue-gtag"; // 谷歌统计
import { ENV_CONFIG } from '@/config'
if (process.env.NODE_ENV === "production" && !process.env.IS_PRIVATE) {
if (process.env.NODE_ENV === "production" && !ENV_CONFIG.IS_PRIVATE) {
Vue.use(VueGtag, {
config: {
id: process.env.GTAG_ID,
id: ENV_CONFIG.GTAG_ID,
params: {
anonymize_ip: true,
send_page_view: false,
......
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const routes = [
{
path: '/',
name: '',
component: () => import('@/layouts/default'),
redirect: '/index/:id',
children: [
{
path: '/index/:id',
name: 'index',
component: () => import('../pages/index'),
},
]
},
{
path: '/error',
name: '404',
component: () => import('@/layouts/error'),
}
]
const router = new VueRouter({
mode: 'history',
base: process.env.BASE_URL,
routes
})
export default router
import vue from 'vue'
import vuex from 'vuex'
import createLogger from 'vuex/dist/logger' // 修改日志
vue.use(vuex)
// https://webpack.js.org/guides/dependency-management/#requirecontext
const modulesFiles = require.context('./modules', true, /\.js$/)
// you do not need `import app from './modules/app'`
// it will auto require all vuex module from modules file
const modules = modulesFiles.keys().reduce((files, modulePath) => {
// set './app.js' => 'app'
const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
const value = modulesFiles(modulePath)
files[moduleName] = value.default
return files
}, {})
export default new vuex.Store({
modules,
plugins: process.env.NODE_ENV !== 'production' ? [createLogger()] : [] // 开发环境下显示vuex的状态修改
})
......@@ -6,7 +6,7 @@ import { Toast } from 'vant'
export const state = () => ({
isPageLoading: true, // 加载动画
wxShareInfo: {
link: process.client ? window.location.href : '', // 访问链接
link: window.location.href, // 访问链接
title: '', // 标题
desc: '', // 副标题
imgUrl: CONFIG.defShareImg, // 分享图
......@@ -21,7 +21,7 @@ export const mutations = {
state.isPageLoading = isLoading
},
SET_WXSHAREINFO: (state, info) => {
const newObj = Object.assign(state.wxShareInfo, info)
const newObj = { ...state.wxShareInfo, ...info }
state.wxShareInfo = newObj
},
}
......@@ -40,7 +40,7 @@ export const actions = {
},
/* 请求授权 */
getWxJsApiToken({ dispatch }, params = {}) {
const obj = Object.assign({ href: window.location.href }, params)
const obj = { href: window.location.href, ...params }
getWxShareSecret(obj).then((res) => {
const { code, errorCode, data, errorMessage } = res
if (code === 200 && errorCode === 0) {
......@@ -72,3 +72,11 @@ export const getters = {
isPageLoading: (state) => state.isPageLoading, // 是否加载
wxShareInfo: (state) => state.wxShareInfo, // 是否加载
}
export default {
namespaced: true,
state,
mutations,
actions,
getters
}
......@@ -6,7 +6,7 @@ import UserAgents from '@/utils/UserAgents'
import CONFIG from '@/config'
import Bus from '@/utils/Bus'
const isIframe = process.client ? window.self !== window.top : true
const isIframe = window.self !== window.top
export const state = () => ({
isLoading: true, // 是否正在加载
......@@ -50,7 +50,7 @@ export const actions = {
// 设置网页标题
document.title = title || '调查问卷'
// 鉴权成功则转跳接口返回的对应网址
if (referUrl && +status === ACTIVITY_STATE.end) {
if (referUrl && Number(status) === ACTIVITY_STATE.end) {
Dialog.alert({
message: '活动已结束,点击“确认”可以直接返回',
}).then(() => {
......@@ -58,7 +58,7 @@ export const actions = {
})
}
// 鉴权成功则转跳接口返回的对应网址
if (referUrl && !!isJoined && +status === ACTIVITY_STATE.start) {
if (referUrl && !!isJoined && Number(status) === ACTIVITY_STATE.start) {
Dialog.alert({
message: '您已提交过问卷,点击“确认”可以直接返回',
}).then(() => {
......@@ -76,7 +76,7 @@ export const actions = {
commit('SET_QUESTIONNAIREFORM', formatQuestion)
commit('SET_ISLOADING', false)
// 微信分享初始化
if (UserAgents.isWx && process.client) {
if (UserAgents.isWx) {
const wxShare = require('@/utils/wxShare').default
const HtmlToText = function (htmlStr) {
const theConvertDiv = document.createElement("div")
......@@ -98,7 +98,7 @@ export const actions = {
} else {
Toast.fail(errorMessage)
if (errorCode === 9) {
this.app.context.error({ statusCode: 404, message: 'This page could not be found' })
this.$router.push('/error')
}
}
})
......@@ -110,7 +110,7 @@ export const actions = {
// 提交问卷答案
submitAnswer({ state, dispatch, rootState }, params) {
const { questionnaireInfo } = state
if (+questionnaireInfo.status !== ACTIVITY_STATE.start) {
if (Number(questionnaireInfo.status) !== ACTIVITY_STATE.start) {
Toast(`活动${ACTIVITY_STATE_TXT[questionnaireInfo.status].label}!`)
return
}
......@@ -193,3 +193,11 @@ export const getters = {
isLoading: (state) => state.isLoading,
isError: (state) => state.isError,
}
export default {
namespaced: true,
state,
mutations,
actions,
getters
}
......@@ -34,7 +34,7 @@ export const actions = {
}
return new Promise((resolve, reject) => {
if (isReqSuccess) {
return resolve(data)
resolve(data)
}
reject(new Error(JSON.stringify({ errorCode, errorMessage })))
})
......@@ -65,3 +65,10 @@ export const getters = {
userInfo: (state) => state.userInfo, // 用户信息
uin: (state) => state.uin,
}
export default {
namespaced: true,
state,
mutations,
actions,
getters
}
const userAgent = () => {
if (!process.client) return {}
const u = navigator.userAgent.toLowerCase()
const json = {
isAndroid: /Android|Linux|Adr/i.test(u),
......
......@@ -13,9 +13,10 @@
* api(请求地址,请求成功与否,请求耗时,请求状态码,请求返回 Msg)
*/
const BrowerLogger = require('alife-logger')
import { ENV_CONFIG } from '@/config'
const __bl = (pid, disableHook = false, enableSPA = true) => {
if (process.env.NODE_ENV === 'production' && !process.env.IS_PRIVATE) {
if (process.env.NODE_ENV === 'production' && !ENV_CONFIG.IS_PRIVATE) {
try {
return BrowerLogger.singleton({
pid,
......
import ROP from '@whzcorcd/rop-client'
import { ENV_CONFIG } from '@/config'
export default new ROP({
ICS_ADDR: `mqttdms.${process.env.ROP_DOMAIN}`,
ROP_FLASH_SITE: `https://cdn.${process.env.ROP_DOMAIN}/dms/`
ICS_ADDR: `mqttdms.${ENV_CONFIG.ROP_DOMAIN}`,
ROP_FLASH_SITE: `https://cdn.${ENV_CONFIG.ROP_DOMAIN}/dms/`
})
import wx from 'weixin-js-sdk'
import { getWxShareSecret } from '@/api/modules/common'
import { ENV_CONFIG } from '@/config'
class WxShare {
constructor() {
......@@ -58,7 +59,7 @@ class WxShare {
link: info?.link || window.location.href,
title: info?.title || '分享',
desc: info?.desc || window.location.href, // 副标题
imgUrl: info?.imgUrl || `${window.location.protocol}//${process.env.OSS_DOMAIN}/common/img/shop_share.png`,
imgUrl: info?.imgUrl || `${window.location.protocol}//${ENV_CONFIG.OSS_DOMAIN}/common/img/shop_share.png`,
success: info?.success || function () {},
fail: info?.fail || function () {},
}
......
#!/bin/sh
/etc/init.d/zabbix_agentd start
yarn run pm2:prod
while true
do
sleep 5;
done
const { defineConfig } = require('@vue/cli-service');
const path = require('path');
const fs = require('fs');
/* config 配置读取 */
const { downloadConfigFile } = require('@gdyfe/config');
const assetsDirMap = {
test: 'test',
preview: 'pre',
production: 'prod',
};
const assetsDir = assetsDirMap[process.env.mode] || 'prod';
const BASE_URL = '/questionnaire/';
const assetsDirPath = path.join(__dirname, './public', assetsDir);
if (!fs.existsSync(assetsDirPath)) {
fs.mkdirSync(assetsDirPath);
}
// 下载配置文件到指定目录
downloadConfigFile({
server: process.env.mode,
ic: 'ZmUtZ5WNp%XBzDw=',
path: path.resolve(__dirname, `${assetsDirPath}/config.js`),
})
.then(() => {
console.log('$$ config file downloaded $$');
})
.catch((err) => {
console.log('$$ config file download failed $$', err);
});
module.exports = defineConfig({
publicPath: BASE_URL,
assetsDir,
transpileDependencies: true,
chainWebpack: (config) => {
// 别名
config.resolve.alias
.set('@', path.join(__dirname, 'src'))
.set('assets', path.resolve('src/assets'))
.set('public', path.resolve(__dirname, 'public'));
// DefinePlugin
config.plugin('define').tap((args) => {
args[0]['process.env'] = {
...args[0]['process.env'],
mode: JSON.stringify(process.env.mode),
BASE_URL: JSON.stringify(BASE_URL),
VUE_APP_ASSETS_DIR: JSON.stringify(assetsDir),
};
return args;
});
// terser
if (process.env.NODE_ENV === 'production') {
config.optimization.minimizer('terser').tap((args) => {
args[0].terserOptions.compress.drop_console = true;
args[0].terserOptions.compress.drop_debugger = true;
return args;
});
}
},
});
FROM alpine AS builder
WORKDIR /home/app
RUN apk add --no-cache --update nodejs yarn
COPY package.json yarn.lock ./
RUN yarn install --registry=https://registry.yarnpkg.com
FROM registry.cn-hangzhou.aliyuncs.com/open_images/node12.13.1-pm2
ADD ./ /var/www/web_questionnaire
ENV HOST 0.0.0.0
ENV TZ Asia/Shanghai
WORKDIR /var/www/web_questionnaire
COPY --from=builder /home/app/package.json ./package.json
COPY --from=builder /home/app/node_modules ./node_modules
RUN yarn build:vvku
RUN rm -rf assets components layouts middleware pages plugins store .eslintrc.js .gitignore build.yml Dockerfile README.md start.sh
EXPOSE 4001
RUN chmod +x vvkuStart.sh
ENTRYPOINT ["./vvkuStart.sh"]
#!/bin/sh
yarn run pm2:vvku
while true
do
sleep 5;
done
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment