feat(eps): 新增自定义页面功能
- 添加 FixturesMouldEntity 接口,用于定义自定义页面的数据结构 - 实现 FixturesMould 接口,提供获取首页和指定页面的方法 - 在 eps.json 中添加相关 API 路径 - 在 pages.json 中添加自定义页面的路由配置
This commit is contained in:
parent
28e34c191d
commit
c0ebd61b76
112
build/cool/eps.d.ts
vendored
112
build/cool/eps.d.ts
vendored
@ -250,6 +250,61 @@ declare namespace Eps {
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
interface FixturesMouldEntity {
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
* 页面名称
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* 页面背景色
|
||||
*/
|
||||
background?: string;
|
||||
/**
|
||||
* 页面背景图
|
||||
*/
|
||||
backgroundImage?: string;
|
||||
/**
|
||||
* 是否首页 0-否 1-是
|
||||
*/
|
||||
isHome?: number;
|
||||
/**
|
||||
* 状态 0-关闭 1-正常
|
||||
*/
|
||||
status?: number;
|
||||
/**
|
||||
* 状态栏占位 0-隐藏 1-显示
|
||||
*/
|
||||
statusBar?: number;
|
||||
/**
|
||||
* 状态栏占位颜色
|
||||
*/
|
||||
statusBarColor?: string;
|
||||
/**
|
||||
* 组件数据
|
||||
*/
|
||||
data?: json;
|
||||
/**
|
||||
* 组件数据-未发布
|
||||
*/
|
||||
form?: json;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime?: Date;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
updateTime?: Date;
|
||||
/**
|
||||
* 任意键值
|
||||
*/
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
interface GoodsCommentEntity {
|
||||
/**
|
||||
* ID
|
||||
@ -955,42 +1010,46 @@ declare namespace Eps {
|
||||
request: Service["request"];
|
||||
}
|
||||
|
||||
interface CsSession {
|
||||
/**
|
||||
* 会话详情
|
||||
*/
|
||||
detail(data?: any): Promise<any>;
|
||||
/**
|
||||
* 创建会话
|
||||
*/
|
||||
create(data?: any): Promise<any>;
|
||||
/**
|
||||
* 权限标识
|
||||
*/
|
||||
permission: { detail: string; create: string };
|
||||
/**
|
||||
* 权限状态
|
||||
*/
|
||||
_permission: { detail: boolean; create: boolean };
|
||||
/**
|
||||
* 请求
|
||||
*/
|
||||
request: Service["request"];
|
||||
}
|
||||
|
||||
interface DictInfo {
|
||||
/**
|
||||
* 获得字典数据
|
||||
*/
|
||||
data(data?: any): Promise<any>;
|
||||
/**
|
||||
* create
|
||||
*/
|
||||
create(data?: any): Promise<any>;
|
||||
/**
|
||||
* 权限标识
|
||||
*/
|
||||
permission: { data: string };
|
||||
permission: { data: string; create: string };
|
||||
/**
|
||||
* 权限状态
|
||||
*/
|
||||
_permission: { data: boolean };
|
||||
_permission: { data: boolean; create: boolean };
|
||||
/**
|
||||
* 请求
|
||||
*/
|
||||
request: Service["request"];
|
||||
}
|
||||
|
||||
interface FixturesMould {
|
||||
/**
|
||||
* 获取首页
|
||||
*/
|
||||
getHomePage(data?: any): Promise<any>;
|
||||
/**
|
||||
* 获取指定页面
|
||||
*/
|
||||
getPage(data?: any): Promise<any>;
|
||||
/**
|
||||
* 权限标识
|
||||
*/
|
||||
permission: { getHomePage: string; getPage: string };
|
||||
/**
|
||||
* 权限状态
|
||||
*/
|
||||
_permission: { getHomePage: boolean; getPage: boolean };
|
||||
/**
|
||||
* 请求
|
||||
*/
|
||||
@ -1669,8 +1728,9 @@ declare namespace Eps {
|
||||
}): Promise<any>;
|
||||
app: { complain: AppComplain; feedback: AppFeedback; goods: AppGoods; version: AppVersion };
|
||||
base: { comm: BaseComm };
|
||||
cs: { msg: CsMsg; session: CsSession };
|
||||
cs: { msg: CsMsg };
|
||||
dict: { info: DictInfo };
|
||||
fixtures: { mould: FixturesMould };
|
||||
goods: {
|
||||
comment: GoodsComment;
|
||||
info: GoodsInfo;
|
||||
|
@ -1 +1 @@
|
||||
[{"prefix":"/app/app/complain","name":"AppComplainEntity","api":[{"method":"post","path":"/submit"},{"method":"post","path":"/page"},{"method":"get","path":"/info"}]},{"prefix":"/app/app/feedback","name":"AppFeedbackEntity","api":[{"method":"post","path":"/submit"},{"method":"post","path":"/page"},{"method":"get","path":"/info"}]},{"prefix":"/app/app/goods","name":"AppGoodsEntity","api":[{"method":"post","path":"/list"}]},{"prefix":"/app/app/version","name":"AppVersionEntity","api":[{"method":"get","path":"/check"}]},{"prefix":"/app/base/comm","name":"","api":[{"method":"get","path":"/uploadMode"},{"method":"post","path":"/upload"},{"method":"get","path":"/param"},{"method":"get","path":"/eps"}]},{"prefix":"/app/cs/msg","name":"CsMsgEntity","api":[{"method":"get","path":"/unreadCount"},{"method":"post","path":"/read"},{"method":"post","path":"/page"}]},{"prefix":"/app/cs/session","name":"","api":[{"method":"get","path":"/detail"},{"method":"post","path":"/create"}]},{"prefix":"/app/dict/info","name":"","api":[{"method":"post","path":"/data"}]},{"prefix":"/app/goods/comment","name":"GoodsCommentEntity","api":[{"method":"post","path":"/submit"},{"method":"post","path":"/page"}]},{"prefix":"/app/goods/info","name":"GoodsInfoEntity","api":[{"method":"post","path":"/page"},{"method":"get","path":"/info"}]},{"prefix":"/app/goods/searchKeyword","name":"GoodsSearchKeywordEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/app/goods/spec","name":"GoodsSpecEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/app/goods/type","name":"GoodsTypeEntity","api":[{"method":"post","path":"/list"}]},{"prefix":"/app/info/banner","name":"InfoBannerEntity","api":[{"method":"post","path":"/list"}]},{"prefix":"/app/market/coupon/info","name":"MarketCouponInfoEntity","api":[{"method":"post","path":"/page"}]},{"prefix":"/app/market/coupon/user","name":"MarketCouponUserEntity","api":[{"method":"post","path":"/receive"},{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/app/order/info","name":"OrderInfoEntity","api":[{"method":"get","path":"/logistics"},{"method":"get","path":"/userCount"},{"method":"get","path":"/confirm"},{"method":"post","path":"/create"},{"method":"post","path":"/cancel"},{"method":"post","path":"/refund"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/page"}]},{"prefix":"/app/order/pay","name":"","api":[{"method":"post","path":"/wxMiniPay"},{"method":"post","path":"/wxNotify"},{"method":"post","path":"/wxAppPay"},{"method":"post","path":"/wxMpPay"}]},{"prefix":"/app/user/address","name":"UserAddressEntity","api":[{"method":"get","path":"/default"},{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/app/user/comm","name":"","api":[{"method":"post","path":"/wxMpConfig"}]},{"prefix":"/app/user/info","name":"UserInfoEntity","api":[{"method":"post","path":"/updatePassword"},{"method":"post","path":"/updatePerson"},{"method":"post","path":"/bindPhone"},{"method":"post","path":"/miniPhone"},{"method":"get","path":"/person"},{"method":"post","path":"/logoff"}]},{"prefix":"/app/user/login","name":"","api":[{"method":"post","path":"/refreshToken"},{"method":"post","path":"/password"},{"method":"get","path":"/captcha"},{"method":"post","path":"/smsCode"},{"method":"post","path":"/wxApp"},{"method":"post","path":"/phone"},{"method":"post","path":"/mini"},{"method":"post","path":"/mp"}]},{"prefix":"/","name":"","api":[{"method":"get","path":"/"}]},{"prefix":"/app/test","name":"TestEntity","api":[{"path":"/page"},{"path":"/list"},{"path":"/info"},{"path":"/delete"},{"path":"/update"},{"path":"/add"}]}]
|
||||
[{"prefix":"/app/app/complain","name":"AppComplainEntity","api":[{"method":"post","path":"/submit"},{"method":"post","path":"/page"},{"method":"get","path":"/info"}]},{"prefix":"/app/app/feedback","name":"AppFeedbackEntity","api":[{"method":"post","path":"/submit"},{"method":"post","path":"/page"},{"method":"get","path":"/info"}]},{"prefix":"/app/app/goods","name":"AppGoodsEntity","api":[{"method":"post","path":"/list"}]},{"prefix":"/app/app/version","name":"AppVersionEntity","api":[{"method":"get","path":"/check"}]},{"prefix":"/app/base/comm","name":"","api":[{"method":"get","path":"/uploadMode"},{"method":"post","path":"/upload"},{"method":"get","path":"/param"},{"method":"get","path":"/eps"}]},{"prefix":"/app/cs/msg","name":"CsMsgEntity","api":[{"method":"get","path":"/unreadCount"},{"method":"post","path":"/read"},{"method":"post","path":"/page"}]},{"prefix":"/app/dict/info","name":"","api":[{"method":"post","path":"/data"},{"method":"post","path":"/create"}]},{"prefix":"/app/fixtures/mould","name":"FixturesMouldEntity","api":[{"method":"get","path":"/getHomePage"},{"method":"get","path":"/getPage"}]},{"prefix":"/app/goods/comment","name":"GoodsCommentEntity","api":[{"method":"post","path":"/submit"},{"method":"post","path":"/page"}]},{"prefix":"/app/goods/info","name":"GoodsInfoEntity","api":[{"method":"post","path":"/page"},{"method":"get","path":"/info"}]},{"prefix":"/app/goods/searchKeyword","name":"GoodsSearchKeywordEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/app/goods/spec","name":"GoodsSpecEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/app/goods/type","name":"GoodsTypeEntity","api":[{"method":"post","path":"/list"}]},{"prefix":"/app/info/banner","name":"InfoBannerEntity","api":[{"method":"post","path":"/list"}]},{"prefix":"/app/market/coupon/info","name":"MarketCouponInfoEntity","api":[{"method":"post","path":"/page"}]},{"prefix":"/app/market/coupon/user","name":"MarketCouponUserEntity","api":[{"method":"post","path":"/receive"},{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/app/order/info","name":"OrderInfoEntity","api":[{"method":"get","path":"/logistics"},{"method":"get","path":"/userCount"},{"method":"get","path":"/confirm"},{"method":"post","path":"/create"},{"method":"post","path":"/cancel"},{"method":"post","path":"/refund"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/page"}]},{"prefix":"/app/order/pay","name":"","api":[{"method":"post","path":"/wxMiniPay"},{"method":"post","path":"/wxNotify"},{"method":"post","path":"/wxAppPay"},{"method":"post","path":"/wxMpPay"}]},{"prefix":"/app/user/address","name":"UserAddressEntity","api":[{"method":"get","path":"/default"},{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/app/user/comm","name":"","api":[{"method":"post","path":"/wxMpConfig"}]},{"prefix":"/app/user/info","name":"UserInfoEntity","api":[{"method":"post","path":"/updatePassword"},{"method":"post","path":"/updatePerson"},{"method":"post","path":"/bindPhone"},{"method":"post","path":"/miniPhone"},{"method":"get","path":"/person"},{"method":"post","path":"/logoff"}]},{"prefix":"/app/user/login","name":"","api":[{"method":"post","path":"/refreshToken"},{"method":"post","path":"/password"},{"method":"get","path":"/captcha"},{"method":"post","path":"/smsCode"},{"method":"post","path":"/wxApp"},{"method":"post","path":"/phone"},{"method":"post","path":"/mini"},{"method":"post","path":"/mp"}]},{"prefix":"/","name":"","api":[{"method":"get","path":"/"}]},{"prefix":"/app/test","name":"TestEntity","api":[{"path":"/page"},{"path":"/list"},{"path":"/info"},{"path":"/delete"},{"path":"/update"},{"path":"/add"}]}]
|
20
pages.json
20
pages.json
@ -90,6 +90,26 @@
|
||||
],
|
||||
"isTemp": true
|
||||
},
|
||||
{
|
||||
"root": "uni_modules/cool-fixtures/pages",
|
||||
"pages": [
|
||||
{
|
||||
"path": "detail",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "自定义页面"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "preview",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "页面预览"
|
||||
}
|
||||
}
|
||||
],
|
||||
"isTemp": true
|
||||
},
|
||||
{
|
||||
"root": "pages/market",
|
||||
"pages": [
|
||||
|
Loading…
Reference in New Issue
Block a user