Skip to content

Commit

Permalink
feat: merge develop
Browse files Browse the repository at this point in the history
  • Loading branch information
luch1994 committed Sep 27, 2024
2 parents ef2126f + 054095e commit bcb41c6
Show file tree
Hide file tree
Showing 16 changed files with 337 additions and 108 deletions.
133 changes: 133 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@

# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official email address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[[email protected]](mailto:[email protected]).
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
2 changes: 1 addition & 1 deletion DATA_COLLECTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ XIAOJUSURVEY will never collect and/or report sensitive information, such as pri

## How do I opt-in to or opt-out of data sharing?

See [docs](https://xiaojusurvey.didi.cn/docs/next/community/%E6%95%B0%E6%8D%AE%E9%87%87%E9%9B%86%E5%A3%B0%E6%98%8E) for information on configuring this functionality.
See [docs](https://xiaojusurvey.didi.cn/docs/next/community/%E6%95%B0%E6%8D%AE%E4%B8%8A%E6%8A%A5%E5%A3%B0%E6%98%8E) for information on configuring this functionality.
147 changes: 47 additions & 100 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,45 @@

  内部系统已沉淀 40+种题型,累积精选模板 100+,适用于市场调研、客户满意度调研、在线考试、投票、报道、测评等众多场景。数据能力上,经过上亿量级打磨,沉淀了分题统计、交叉分析、多渠道分析等在线报表能力,快速满足专业化分析。

# 功能简介
# 功能特性

- 问卷管理:创、编、投、收、数据分析
**🌈 好用**

- 多样化题型:单行输入框、多行输入框、单项选择、多项选择、判断题、评分、投票、...
- 多类型数据采集,轻松创建调研表单。

- 用户管理:登录、注册、权限管理
- 智能逻辑编排,设计多规则动态表单。

- 数据安全:传输加密、脱敏等
- 数据在线分析和导出,洞察调研结果。

> 更全的建设请查阅 [功能介绍](https://xiaojusurvey.didi.cn/docs/next/document/%E4%BA%A7%E5%93%81%E6%89%8B%E5%86%8C/%E5%8A%9F%E8%83%BD%E4%BB%8B%E7%BB%8D/%E5%9F%BA%E7%A1%80%E6%B5%81%E7%A8%8B)
**🎨 好看**

- 主题自由定制,适配您的品牌。

- 无缝嵌入各终端,满足不同场景需求。

**🚀 好扩展**

- 自定义 Hook 配置,轻松集成多方系统与各类工具。

<img src="https://github.com/didi/xiaoju-survey/assets/16012672/dd427471-368d-49d9-bc44-13c34d84e3be" width="700" />

_**(个人和企业用户均可快速构建特定领域的调研类解决方案。)**_
1、 **全部功能**请查看 [功能介绍](https://xiaojusurvey.didi.cn/docs/next/document/%E4%BA%A7%E5%93%81%E6%89%8B%E5%86%8C/%E5%8A%9F%E8%83%BD%E4%BB%8B%E7%BB%8D/%E5%9F%BA%E7%A1%80%E6%B5%81%E7%A8%8B)

2、**企业****个人**均可快速构建特定领域的调研类解决方案。

# 技术

Web 端:Vue3 + ElementPlus;C 端多端渲染(规划中)
**1、Web 端:Vue3 + ElementPlus**

&ensp;&ensp;C 端多端渲染:ReactNative SDK 建设中

Server 端:Nestjs + MongoDB;Java(在建,[欢迎加入共建](https://github.com/didi/xiaoju-survey/issues/306)
**2、Server 端:NestJS + MongoDB**

智能化基座:(规划中)
&ensp;&ensp;Java 版:建设中,[欢迎加入共建](https://github.com/didi/xiaoju-survey/issues/306)

**3、能力增强**

&ensp;&ensp;在线平台:建设中、智能化问卷:规划中

# 项目优势

Expand Down Expand Up @@ -106,120 +122,51 @@ Server 端:Nestjs + MongoDB;Java(在建,[欢迎加入共建](https://git

前后端分离,提供 Docker 化方案,提供了完善的部署指导手册。

# 快速启动

Node 版本 >= 18.x,
[查看环境准备指导](https://xiaojusurvey.didi.cn/docs/next/document/%E6%A6%82%E8%BF%B0/%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B)

复制工程

```shell
git clone [email protected]:didi/xiaoju-survey.git
```

## 服务端启动

### 方案一、快速启动,无需安装数据库

> _便于快速预览工程,对于正式项目需要使用方案二。_
#### 1、安装依赖

```shell
cd server
npm install
```

#### 2、启动

```shell
npm run local
```

> 服务运行依赖 [mongodb-memory-server](https://github.com/nodkz/mongodb-memory-server)
>
> 1、数据保存在内存中,重启服务会更新数据。<br />2、启动内存服务器新实例时,如果找不到 MongoDB 二进制文件会自动下载,因此首次可能需要一些时间。
### 方案二、(生产推荐)

#### 1、配置数据库

> 项目使用 MongoDB,需要提前准备,请查看[如何拥有 MongoDB 指南](https://xiaojusurvey.didi.cn/docs/next/document/%E6%A6%82%E8%BF%B0/%E6%95%B0%E6%8D%AE%E5%BA%93#%E5%AE%89%E8%A3%85)
配置数据库信息,查看[MongoDB 配置](https://xiaojusurvey.didi.cn/docs/next/document/%E6%A6%82%E8%BF%B0/%E6%95%B0%E6%8D%AE%E5%BA%93)
# 快速使用

#### 2、安装依赖
_(在线平台建设中)_

```shell
cd server
npm install
```
# 本地开发

#### 3、启动
请查看 [本地安装手册](https://xiaojusurvey.didi.cn/docs/next/document/%E6%A6%82%E8%BF%B0/%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B) 来启动项目。

```shell
npm run dev
```
# 快速部署

## 前端启动
### 服务部署

### 安装依赖
请查看 [快速部署指导](https://xiaojusurvey.didi.cn/docs/next/document/%E5%B7%A5%E7%A8%8B%E9%83%A8%E7%BD%B2/Docker%E9%83%A8%E7%BD%B2)

```shell
cd web
npm install
```
### 一键部署

### 启动

```shell
npm run serve
```

## 访问

### 问卷管理端

[http://localhost:8080/management](http://localhost:8080)

### 问卷投放端

创建并发布问卷。

[http://localhost:8080/render/:surveyPath](http://localhost:8080/render/:surveyPath)
_(手册编写中)_

<br /><br />

## 微信交流群(推荐)

官方群会发布项目最新消息、建设计划和社区活动,欢迎你的加入。任何问题和合作可以联系小助手:
## Star

<img src="https://img-hxy021.didistatic.com/static/starimg/img/KXKvc7sjHz1700061188156.png" width="200" />
开源不易,如果该项目对你有帮助,请 star 一下 ❤️❤️❤️,你的支持是我们最大的动力。

## QQ 交流群
[![Star History Chart](https://api.star-history.com/svg?repos=didi/xiaoju-survey&type=Date)](https://star-history.com/#didi/xiaoju-survey&Date)

官方群会发布项目最新消息、建设计划和社区活动,欢迎你的加入:
## 交流群

[<img src="https://img-hxy021.didistatic.com/static/starimg/img/iJUmLIHKV21700192846057.png" width="210" />](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=P61UJI_q8AzizyBLGOm-bUvzNrUnSQq-&authKey=yZFtL9biGB5yiIME3%2Bi%2Bf6XMOdTNiuf0pCIaviEEAIryySNzVy6LJ4xl7uHdEcrM&noverify=0&group_code=920623419)
官方群会发布项目最新消息、建设计划和社区活动,欢迎你的加入。

## Star
<img src="https://img-hxy021.didistatic.com/static/starimg/img/KXKvc7sjHz1700061188156.png" width="200" />
_任何问题和合作可以联系小助手。_

开源不易,如果该项目对你有帮助,请 star 一下 ❤️❤️❤️,你的支持是我们最大的动力。
## 案例

[![Star History Chart](https://api.star-history.com/svg?repos=didi/xiaoju-survey&type=Date)](https://star-history.com/#didi/xiaoju-survey&Date)
如果你使用了该项目,请记录反馈:[我在使用](https://github.com/didi/xiaoju-survey/issues/64),你的支持是我们最大的动力。

## 记录
## Future Tasks

如果你使用了该项目,请记录反馈:[我在使用](https://github.com/didi/xiaoju-survey/issues/64),你的支持是我们最大的动力。
[欢迎了解项目发展和共建](https://github.com/didi/xiaoju-survey/issues/85),你的支持是我们最大的动力。

## 贡献

如果你想成为贡献者或者扩展技术栈,请查看:[贡献者指南](https://xiaojusurvey.didi.cn/docs/next/share/%E5%A6%82%E4%BD%95%E5%8F%82%E4%B8%8E%E8%B4%A1%E7%8C%AE),你的加入使我们最大的荣幸。

## Future Tasks

[欢迎共建](https://github.com/didi/xiaoju-survey/issues/85)

## CHANGELOG

关注重大变更[MAJOR CHANGELOG](https://github.com/didi/xiaoju-survey/issues/48)
关注重大项目变更[MAJOR CHANGELOG](https://github.com/didi/xiaoju-survey/issues/48)
2 changes: 2 additions & 0 deletions server/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ import { PluginManagerProvider } from './securityPlugin/pluginManager.provider';
import { LogRequestMiddleware } from './middlewares/logRequest.middleware';
import { PluginManager } from './securityPlugin/pluginManager';
import { Logger } from './logger';
import { DownloadTask } from './models/downloadTask.entity';
import { Session } from './models/session.entity';

@Module({
imports: [
Expand Down
7 changes: 7 additions & 0 deletions server/src/interfaces/survey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,17 @@ export interface MsgContent {
msg_9004: string;
}

export interface JumpConfig {
type: string;
link: string;
buttonText?: string;
}

export interface SubmitConf {
submitTitle: string;
confirmAgain: ConfirmAgain;
msgContent: MsgContent;
jumpConfig?: JumpConfig;
}

// 白名单类型
Expand Down
2 changes: 1 addition & 1 deletion server/src/middlewares/logRequest.middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class LogRequestMiddleware implements NestMiddleware {
const userAgent = req.get('user-agent') || '';
const startTime = Date.now();
const traceId = genTraceId({ ip });
req['traceId'] = traceId;
this.logger.setTraceId(traceId);
const query = JSON.stringify(req.query);
const body = JSON.stringify(req.body);
this.logger.info(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,11 @@ describe('DataStatisticController', () => {
again_text: '确认要提交吗?',
},
link: '',
jumpConfig: {
type: 'link',
link: '',
buttonText: '',
},
},
logicConf: {
showLogicConf: [],
Expand Down
Loading

0 comments on commit bcb41c6

Please sign in to comment.