This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 项目开发流程 | |
### 1. 项目需求文档 | |
产品经理总结提炼需求, 编写出需求文档 | |
### 2. 项目技术概要文档 | |
项目技术人员根据需求文档,编写项目技术概要文档 | |
### 3. 项目 技术详细设计文档 | |
项目技术任务 根据需求文档,概要文档, 编写项目 详细设计文档 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 一.引言 | |
### 1. 编写目的(阐明编写详细设计说明书的目的,指明读者对象。) | |
### 2. 项目背景(应包括项目的来源和主管部门等。) | |
### 3. 定义(列出文档中用到的专门术语定义和缩写词的原意。) | |
### 4. 参考资料(列出这些资料的作者、标题、编号、发表日期、出版单位或资料来源,可包括:(1)项目的计划任务书,合同或批文;(2)项目开发计划;(3)需求规格说明书;(3)概要设计说明书;(4)测试计划(初稿);(5)用户操作手册(初稿);(5)文档所引用的其他资料、软件开发标准或规范。) | |
## 二.总体设计 | |
### 1.需求概述 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## egret 启用特定版本 | |
最新方法,在项目文件夹通过npm安装一个局部的egret | |
npm init | |
npm install https://github.com/egret-labs/egret-core/archive/v1.7.3.tar.gz --save | |
并在项目内新建一个文件egret.cmd | |
内容如下 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##第三方定时任务概要设计文档 | |
### 1. 定义 | |
第三方定时任务: 定时运行第三方接入任务,同步第三方与平台数据。 | |
### 2. 需求 | |
每天定时运行第三方接入任务,与第三方同步数据。 可以监控到任务运行状态: (运行社区, 定时运行时间, 调用类, 调用方法, 描述, 状态 ), 开启或关闭任务。 | |
### 3. 方案 | |
#### 3.1 方案一 | |
定时任务队列: 新建mongo数据库表,添加 社区, 运行任务描述, 任务调用类, 任务调用方法,状态 等任务相关设置,组成任务队列。 | |
当服务器启动时,从数据库中读取出整个队列,使用node-schedule模块,为每个任务定义一个定时器, 到点自动运行。 | |
**优点**: 使用node-schedule模块直接定义了任务的运行, 不需要再自己解析定时任务的运行时间,逻辑简单。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# nodejs入职任务 | |
`已熟悉的请跳过,要备注` | |
## 安装基础环境 | |
到 文件服务器下载系统镜像ubuntu系统(或者你有其他经常使用的系统, 如 deepin),下载vmware,安装虚拟机 | |
[ubuntu下载地址](https://www.ubuntu.com/download/desktop) | |
[deepin下载地址](https://www.deepin.org/download/) | |
[配置nodejs环境](https://www.cnblogs.com/hf8051/p/4778359.html),下载webstome. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## node 4.* 版本代码编写注意事项 | |
### 'use strict' | |
node 4.× 支持let,const,class 都必须开启strict模式才能够使用,所以在代码的头部添加'use strict',开启strict模式 | |
### class | |
class 示例: | |
``` | |
'use strict'; | |
class Point { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: co流程控制 | |
date: 2016-04-10 16:07:43 | |
tags: [co,nodejs] | |
categories: [co,nodejs] | |
--- | |
# co流程控制 | |
## nodejs常见异步流程 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## socket连接通讯错误 | |
### 问题描述: | |
一个网页医生端登陆一个账号 | |
一个居民端登陆一个账号 | |
使用另一个手机医生端登陆之前的医生账号,网页端有异地提示 | |
再网页医生端重新登陆,手机端有异地提示 | |
再使用手机医生端重新登陆,没有异地提示,为什么? | |
居民发送消息,也不会在最新登陆的医生显示,而在之前的医生那里,为什么??? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 运行环境 | |
* [nodejs-v4.4.2 LTS](https://nodejs.org/en/download/releases/) | |
* Windows、Linux 或 MacOS 操作系统 | |
* [mongodb-v3.2.1]((https://www.mongodb.org/)) | |
* [redis-v3.*](http://redis.io/download) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 运行环境 | |
* [nodejs-v4.4.2 LTS](https://nodejs.org/en/download/releases/) | |
* Windows、Linux 或 MacOS 操作系统 | |
* [mongodb-v3.2.1]((https://www.mongodb.org/)) | |
* [redis-v3.*](http://redis.io/download) | |