# 葫芦岛微信
**Repository Path**: daodangui/HuLuDaoWeiXin
## Basic Information
- **Project Name**: 葫芦岛微信
- **Description**: 葫芦岛微信项目
- **Primary Language**: JavaScript
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 2
- **Forks**: 0
- **Created**: 2017-09-25
- **Last Updated**: 2021-04-20
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# 葫芦岛微信 HuLuDaoWeiXin
> 慧鼎 葫芦岛微信
> 1.依赖 ydui
> 内置API:
1. 网络请求 this.hdajax({})
> 示例 :
```
this.hdajax({
// 请求的接口地址
url : this.API.login,
// 请求参数
data: {
password: xxxx,
username: xxxx
},
// 成功返回回调函数
success: (resultData) => {
}
})
```
依赖 axios
其他参数:
```
{
// 请求的接口,在请求的时候,如axios.get(url,config);这里的url会覆盖掉config中的url
url: '',
// 请求方法同上
method: 'get', // default
// 基础url前缀
baseURL: '',
// 请求之前的数据
transformRequest: [function (data) {
// 这里可以在发送请求之前对请求数据做处理,比如form-data格式化等,这里可以使用开头引入的Qs(这个模块在安装axios的时候就已经安装了,不需要另外安装)
// data = Qs.stringify({});
return data
}],
// 请求之后的数据
transformResponse: [function (data) {
// 这里提前处理返回的数据
return data
}],
// 请求头信息
headers: {},
// parameter参数
params: {},
// post参数,使用axios.post(url,{},config);如果没有额外的也必须要用一个空对象,否则会报错
data: {},
// 设置超时时间(毫秒)
timeout: 5000,
// 返回数据类型
responseType: 'json' // default
}
```
2. store 存储 this.store.set('key','vlaue','有效时间(毫秒)')
> 示例:
```
this.store.set(this.STORECONST.USERINFO, UserInfo, new Date().getTime() + 300000)
```
3. 接口暴露位置
> src/common/src/apiurl.js
4. stroe 存储规则
### 组件说明
> 1. yd-input
1. 新增属性 hdLabel : 用于错误提示
2. 新增校验属性 hdVdate : idcard 用于校验身份证信息
> 示例:
```
```
### vscode ftp 设置
下载 ftp-sync
1. 按f1 输入 ftp-sync: init
2. 然后配置 ftp
2. 提交 在文件上点击右键 选择提交
### 图标使用规范
1. 所有图标 使用 SVG 格式图标
2. 使用方法
```
```
3. 详见 : http://www.iconfont.cn/
4. 目录结构
```
├── README.md 项目说明,包括项目内的常用 api
├── build 构建时候需要的配置文件
│ ├── build.js
│ ├── check-versions
│ ├── dev-client.js
│ ├── dev-server.js
│ ├── utils.js
│ ├── vue-loader.conf.js
│ ├── webpack.base.conf.js
│ ├── webpack.dev.conf.js
│ └── webpack.prod.conf.js
├── config 环境设置
│ ├── dev.env.js // 开发配置
│ ├── index.js // 配置入口文件
│ └── prod.env.js // 生产配置
├── index.html // 程序html入口文件
├── package.json // ***项目依赖配置文件
├── src
│ ├── App.vue // *** 程序入口文件
│ ├── common // 项目定义公共文件
│ │ ├── apiurl.js // ***接口写在这里
│ │ ├── guid.js
│ │ ├── hd-validate // 慧鼎定制校验工具
│ │ │ ├── idcard.js // 身份证校验工具
│ │ │ ├── index.js // 工具入口
│ │ │ └── mobile.js // 手机号校验
│ │ ├── mixin.js
│ │ ├── storeConst.js // store 存储 key 管理
│ │ └── vue-ydui-hdutils // 慧鼎组件库 for ydui
│ │ ├── HDUtils.js
│ │ └── components
│ │ ├── hdAjax.js // 请求组件
│ │ ├── hdCheckForm.js // 通用校验表单
│ │ ├── hdLog.js // 日志组件
│ │ └── index.js // 工具组件入口
│ ├── components // 通用组件
│ │ └── hdui
│ │ ├── hdheader // 通用头组件
│ │ │ ├── index.js
│ │ │ └── src
│ │ │ └── hd-header.vue
│ │ ├── hdsvgicon // 通用图标
│ │ │ ├── index.js
│ │ │ └── src
│ │ │ └── hd-svg-icon.vue
│ │ ├── index.js // 组件入口
│ │ └── yduiinpput // 重新 ydui input
│ │ ├── index.js
│ │ └── src
│ │ └── hd-ydui-input.vue
│ ├── filter // 过滤器 ,格式化字符串之类的
│ │ └── index.js
│ ├── main.js
│ ├── pages // 展示页面
│ │ ├── xxxx
│ │ │ ├── xxxx.vue
│ ├── router // 路由文件
│ │ └── index.js
│ └── store // vue store
│ ├── action.js
│ ├── getters.js
│ ├── index.js
│ ├── mutation-types.js
│ └── mutations.js
└── static // 静态文件, 图片, 字体, 样式
└── iconfont // 字体文件
├── demo.css
├── demo_fontclass.html
├── demo_symbol.html
├── demo_unicode.html
├── iconfont.css
├── iconfont.eot
├── iconfont.js
├── iconfont.svg
├── iconfont.ttf
└── iconfont.woff
```
### 项目打包命令说明
```
npm run build -- -dev -log -assets=xxxx
```
> 命令说明
1. -dev 打包测试环境
2. -log 开启log
3. -assets 域名二级访问路径
### 测试环境打包命令
```
npm run build -- -dev -log -assets=/weifenxiao/
```
## Build Setup
``` bash
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
```
For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).