config-helper
Configuration helper
Installation
$ npm install kenote-config-helper# Or $ yarn add kenote-config-helper
Usages
Create Channel
/data/channels/account.yml
---# 频道 我的帐户 配置 #################################################################### ###################################################################################### # 频道 ID id : 1# 频道名称 name : 我的帐户# 频道标识 label : account# 频道描述 description : 查看和管理自己的信息、活动、安全选项和隐私偏好设置# 默认打开页面 default : /account/baseinfo# 自定义参数 options: # 用户方案类型 plan_type: - key : ditch name : 渠道 - key : sendmail name : 系统邮件# 频道导航 navs: # 导航分栏 -- 帐户管理 - index : 1-1 name : 帐户管理 icon : iconfont icon-passport children: - index : /account/baseinfo name : 基本资料 - index : /account/security name : 安全设置 - index : /account/plan name : 方案管理
app.ts
if channel
Use Error Set
// thrown custom errorthrow ErrorInfo__ErrorCode.ERROR_AUTH_FLAG_ACCESS // handing errorstry catch error
License
this repo is released under the MIT License.