diff --git a/Dockerfile b/Dockerfile
index 555cce28..7a0bffee 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -11,7 +11,7 @@ RUN npm config set registry https://registry.npmjs.org/
# 安装项目依赖
RUN cd /xiaoju-survey/web && npm install && npm run build
-
+# 用了后端服务代理启动,建议使用nginx启动
RUN cd /xiaoju-survey && cp -af ./web/dist/* ./server/public/
RUN cd /xiaoju-survey/server && npm install && npm run build
diff --git a/README.md b/README.md
index 680f45e1..8d51a9e7 100644
--- a/README.md
+++ b/README.md
@@ -23,7 +23,7 @@
- **XiaoJuSurvey**是一套轻量、安全的问卷系统,提供面向个人和企业的一站式产品级解决方案,快速满足各类线上调研场景。
+ **XIAOJUSURVEY**是一套轻量、安全的**问卷系统**,提供面向个人和企业的一站式产品级解决方案,快速满足各类线上调研场景。
系统已沉淀40+种题型,累积精选模板100+,适用于市场调研、客户满意度调研、在线考试、投票、报道、测评等众多场景。数据能力上,经过上亿量级打磨,沉淀了分题统计、交叉分析、多渠道分析等在线报表能力,快速满足专业化分析。
@@ -34,16 +34,26 @@
- 多样化题型:单行输入框、多行输入框、单项选择、多项选择、判断题、评分、投票
- _(更多题型将陆续开放,也欢迎您参与共建提交自定义题型)_
+ _(更多题型将陆续开放。快速[自定义题型](https://xiaojusurvey.didi.cn/docs/document/%E5%BC%80%E5%8F%91%E6%89%8B%E5%86%8C/%E9%A2%98%E5%9E%8B%E6%89%A9%E5%B1%95))_
- 用户管理:登录、注册、权限管理
- 数据安全:传输加密、脱敏等
-
+> 查阅[官方Feature](https://github.com/didi/xiaoju-survey/issues/45)
+
+
_**(个人和企业用户均可快速构建特定领域的调研类解决方案。)**_
+# 技术
+Web端:Vue2(Vue3版本24年上半年推出)+ ElementUI
+
+Server端:Nestjs + MongoDB
+
+架构:[架构解读](https://xiaojusurvey.didi.cn/docs/document/%E8%AE%BE%E8%AE%A1%E5%8E%9F%E7%90%86/%E6%9E%B6%E6%9E%84)
+
+
# 项目优势
**一、具备全面的综合性和专业性**
@@ -91,7 +101,7 @@ _**(个人和企业用户均可快速构建特定领域的调研类解决方案
# 快速启动
-Node版本>=14.21.0,
+Node版本 >= 16.x,
[查看环境准备指导](https://xiaojusurvey.didi.cn/docs/document/%E6%A6%82%E8%BF%B0/%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B)
复制工程
@@ -102,7 +112,7 @@ git clone git@github.com:didi/xiaoju-survey.git
## 服务端启动
### 方案一、快速启动,无需安装数据库
-_便于快速预览工程,对于正式项目需要使用方案二。_
+> _便于快速预览工程,对于正式项目需要使用方案二。_
#### 1、安装依赖
```shell
@@ -115,33 +125,17 @@ npm install
npm run local
```
-:cyclone:NOTE:
-
-服务运行依赖 [mongodb-memory-server](https://github.com/nodkz/mongodb-memory-server):
+> 服务运行依赖 [mongodb-memory-server](https://github.com/nodkz/mongodb-memory-server):
+>
> 1、数据保存在内存中,重启服务会更新数据。
2、启动内存服务器新实例时,如果找不到MongoDB二进制文件会自动下载,因此首次可能需要一些时间。
-### 方案二、(推荐)
+### 方案二、(生产推荐)
#### 1、启动数据库
-项目使用MongoDB:
+> 项目使用MongoDB:[MongoDB安装指导](https://xiaojusurvey.didi.cn/docs/document/%E6%A6%82%E8%BF%B0/%E5%AE%89%E8%A3%85%E7%8E%AF%E5%A2%83)
-> 没有安装可以查看 [MongoDB安装指导](https://xiaojusurvey.didi.cn/docs/document/%E6%A6%82%E8%BF%B0/%E5%AE%89%E8%A3%85%E7%8E%AF%E5%A2%83)
-
-```
-mongod --dbpath ~/data/db --logpath ~/data/log/mongodb/mongo.log --fork
-```
-验证启动
-```
-ps aux | grep -v grep | grep mongod
-```
-
-
-> 工程默认的mongo链接如下,需要修改可查看[配置修改指导](https://xiaojusurvey.didi.cn/docs/document/%E6%A6%82%E8%BF%B0/%E5%AE%89%E8%A3%85%E7%8E%AF%E5%A2%83#%E9%85%8D%E7%BD%AE):
-
-```
-mongodb://localhost:27017
-```
+启动和配置数据库,查看[MongoDB启动](http://localhost:5000/docs/next/document/%E6%A6%82%E8%BF%B0/%E5%AE%89%E8%A3%85%E7%8E%AF%E5%A2%83#%E4%BA%94%E5%90%AF%E5%8A%A8)
#### 2、安装依赖
```shell
@@ -176,7 +170,6 @@ npm run serve
[http://localhost:8080/render/:surveyPath](http://localhost:8080/render/:surveyPath)
-
# 交流群
## 微信
diff --git a/docker-compose.yaml b/docker-compose.yaml
index 7eaceee8..6f2ecd5e 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -1,6 +1,5 @@
-version: '3.6'
+version: "3.6"
services:
-
mongo:
image: mongo:4
container_name: xiaoju-survey-mongo
@@ -22,9 +21,7 @@ services:
ports:
- "8080:3000" # API端口
environment:
- XIAOJU_SURVEY_MONGO_URL: mongodb://${MONGO_INITDB_ROOT_USERNAME}:${MONGO_INITDB_ROOT_PASSWORD}@xiaoju-survey-mongo:27017 # docker-compose 会根据容器名称自动处理
- XIAOJU_SURVEY_JWT_SECRET: surveyEngineJwtSecret
- XIAOJU_SURVEY_JWT_EXPIRES_IN: 8h
+ XIAOJU_SURVEY_MONGO_URL: mongodb://${MONGO_INITDB_ROOT_USERNAME}:${MONGO_INITDB_ROOT_PASSWORD}@xiaoju-survey-mongo:27017 # docker-compose 会根据容器名称自动处理
links:
- mongo:mongo
depends_on:
@@ -37,5 +34,5 @@ volumes:
networks:
xiaoju-survey:
- name: xiaoju-survey
- driver: bridge
\ No newline at end of file
+ name: xiaoju-survey
+ driver: bridge
diff --git a/server/package.json b/server/package.json
index 80502257..0cef4880 100644
--- a/server/package.json
+++ b/server/package.json
@@ -9,13 +9,13 @@
"local": "ts-node ./scripts/run-local.ts",
"start": "nest start",
"dev": "npm run start:dev",
- "start:dev": "NODE_ENV=development nest start --watch",
- "start:debug": "NODE_ENV=development nest start --debug --watch",
+ "start:dev": "cross-env NODE_ENV=development nest start --watch",
+ "start:debug": "cross-env NODE_ENV=development nest start --debug --watch",
"start:prod": "NODE_ENV=production node dist/main",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
- "test": "NODE_ENV=development jest",
- "test:watch": "NODE_ENV=development jest --watch",
- "test:cov": "NODE_ENV=development jest --coverage",
+ "test": "jest",
+ "test:watch": "jest --watch",
+ "test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand"
},
"dependencies": {
diff --git a/server/src/modules/survey/__test/survey.controller.spec.ts b/server/src/modules/survey/__test/survey.controller.spec.ts
index 5cc7c17d..6d98c340 100644
--- a/server/src/modules/survey/__test/survey.controller.spec.ts
+++ b/server/src/modules/survey/__test/survey.controller.spec.ts
@@ -169,7 +169,7 @@ describe('SurveyController', () => {
begTime: '2024-01-23 21:59:05',
endTime: '2034-01-23 21:59:05',
},
- bottomConf: { logoImage: '/imgs/Logo.jpg', logoImageWidth: '60%' },
+ bottomConf: { logoImage: '/imgs/Logo.webp', logoImageWidth: '60%' },
skinConf: { skinColor: '#4a4c5b', inputBgColor: '#ffffff' },
submitConf: {},
dataConf: {
diff --git a/server/src/modules/survey/template/surveyTemplate/survey/normal.json b/server/src/modules/survey/template/surveyTemplate/survey/normal.json
index 7794b7af..ad7cfabd 100644
--- a/server/src/modules/survey/template/surveyTemplate/survey/normal.json
+++ b/server/src/modules/survey/template/surveyTemplate/survey/normal.json
@@ -5,7 +5,7 @@
"subTitle": ""
},
"bannerConfig": {
- "bgImage": "/imgs/skin/17e06b7604a007e1d3e1453b9ddadc3c.jpg",
+ "bgImage": "/imgs/skin/17e06b7604a007e1d3e1453b9ddadc3c.webp",
"videoLink": "",
"postImg": ""
}
@@ -129,4 +129,4 @@
"skinColor": "#4a4c5b",
"inputBgColor": "#ffffff"
}
-}
\ No newline at end of file
+}
diff --git a/server/src/modules/survey/template/surveyTemplate/survey/nps.json b/server/src/modules/survey/template/surveyTemplate/survey/nps.json
index 71e1fe19..0cedd519 100644
--- a/server/src/modules/survey/template/surveyTemplate/survey/nps.json
+++ b/server/src/modules/survey/template/surveyTemplate/survey/nps.json
@@ -23,7 +23,7 @@
"subTitle": ""
},
"bannerConfig": {
- "bgImage": "/imgs/skin/17e06b7604a007e1d3e1453b9ddadc3c.jpg",
+ "bgImage": "/imgs/skin/17e06b7604a007e1d3e1453b9ddadc3c.webp",
"videoLink": "",
"postImg": ""
}
diff --git a/server/src/modules/survey/template/surveyTemplate/survey/register.json b/server/src/modules/survey/template/surveyTemplate/survey/register.json
index 5dfcf17b..853af1aa 100644
--- a/server/src/modules/survey/template/surveyTemplate/survey/register.json
+++ b/server/src/modules/survey/template/surveyTemplate/survey/register.json
@@ -5,7 +5,7 @@
"subTitle": ""
},
"bannerConfig": {
- "bgImage": "/imgs/skin/17e06b7604a007e1d3e1453b9ddadc3c.jpg",
+ "bgImage": "/imgs/skin/17e06b7604a007e1d3e1453b9ddadc3c.webp",
"videoLink": "",
"postImg": ""
}
diff --git a/server/src/modules/survey/template/surveyTemplate/survey/vote.json b/server/src/modules/survey/template/surveyTemplate/survey/vote.json
index 50ab9ee2..293cf607 100644
--- a/server/src/modules/survey/template/surveyTemplate/survey/vote.json
+++ b/server/src/modules/survey/template/surveyTemplate/survey/vote.json
@@ -5,7 +5,7 @@
"subTitle": ""
},
"bannerConfig": {
- "bgImage": "/imgs/skin/17e06b7604a007e1d3e1453b9ddadc3c.jpg",
+ "bgImage": "/imgs/skin/17e06b7604a007e1d3e1453b9ddadc3c.webp",
"videoLink": "",
"postImg": ""
}
diff --git a/server/src/modules/survey/template/surveyTemplate/templateBase.json b/server/src/modules/survey/template/surveyTemplate/templateBase.json
index a3aa6dfe..4ecea689 100644
--- a/server/src/modules/survey/template/surveyTemplate/templateBase.json
+++ b/server/src/modules/survey/template/surveyTemplate/templateBase.json
@@ -5,7 +5,7 @@
"subTitle": ""
},
"bannerConfig": {
- "bgImage": "/imgs/skin/17e06b7604a007e1d3e1453b9ddadc3c.jpg",
+ "bgImage": "/imgs/skin/17e06b7604a007e1d3e1453b9ddadc3c.webp",
"videoLink": "",
"postImg": ""
}
@@ -25,7 +25,7 @@
}
},
"bottomConf": {
- "logoImage": "/imgs/Logo.jpg",
+ "logoImage": "/imgs/Logo.webp",
"logoImageWidth": "60%"
},
"baseConf": {
diff --git a/web/public/imgs/Logo.jpg b/web/public/imgs/Logo.jpg
new file mode 100644
index 00000000..1c819a7e
Binary files /dev/null and b/web/public/imgs/Logo.jpg differ
diff --git a/web/src/management/pages/create/types.js b/web/src/management/pages/create/types.js
index 24294401..a17fc022 100644
--- a/web/src/management/pages/create/types.js
+++ b/web/src/management/pages/create/types.js
@@ -2,7 +2,7 @@ export const SURVEY_TYPE_LIST = [
{
type: 'normal',
title: '基础调查',
- img: '/imgs/create/normal-icon.png',
+ img: '/imgs/create/normal-icon.webp',
desc: '市场调研 / 用户分析 / 产品测评 / 需求调研',
},
// {
@@ -14,13 +14,13 @@ export const SURVEY_TYPE_LIST = [
{
type: 'vote',
title: '投票评选',
- img: '/imgs/create/vote-icon.png',
+ img: '/imgs/create/vote-icon.webp',
desc: '才艺比赛 / 优秀员工 / 最佳人气 / 投票选举',
},
{
type: 'register',
title: '在线报名',
- img: '/imgs/create/register-icon.png',
+ img: '/imgs/create/register-icon.webp',
desc: '活动报名 / 会议报名',
},
];
diff --git a/web/src/management/pages/edit/modules/generalModule/pageTitle.vue b/web/src/management/pages/edit/modules/generalModule/pageTitle.vue
index f8f7f3df..15a131b4 100644
--- a/web/src/management/pages/edit/modules/generalModule/pageTitle.vue
+++ b/web/src/management/pages/edit/modules/generalModule/pageTitle.vue
@@ -14,4 +14,11 @@ export default {
},
};
-
+