提交 770b928c 编写于 作者: VK1688's avatar VK1688

1.4.9

上级 98d77485
# http://editorconfig.org
root = true
# all files
[*]
charset = utf-8
indent_style = tab
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
# md files
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
\ No newline at end of file
### uniCloud云函数路由框架研究Q群:22466457 如有问题或建议可以在群内讨论。
### 插件名称:`vk-unicloud-router`
### 作者:VK
### 更新时间:2020-10-28
### 更新时间:2020-10-30
## 主要功能 以及 对开发者的价值
#### 1、实现云函数路由模式
......
### uniCloud 云函数路由研究群:22466457 如有问题或建议可以在群内讨论。
##### gitee公共仓库地址:https://gitee.com/vk-uni/vk-uni-cloud-router.git
### 更新内容
##### 1、【优化】API `vk.callFunctionUtil.updateRequestGlobalParam` 支持正则匹配, 用于设置全局公共请求参数(即每次请求云函数都会额外带上这些参数)
##### 2、【新增】API `vk.callFunctionUtil.deleteRequestGlobalParam` 删除全局公共请求参数
[对应文档持续更新中...](https://gitee.com/vk-uni/vk-uni-cloud-router/wikis/%E8%AE%BE%E7%BD%AE%E5%85%A8%E5%B1%80%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0?sort_id=3046816)
### 你也可以在评论区发布留言交流心得。
\ No newline at end of file
......@@ -12,7 +12,7 @@
"dependencies": {
"config": "file:../common/config",
"uni-id": "file:../common/uni-id",
"vk-unicloud": "^1.7.6"
"vk-unicloud": "^1.7.7"
},
"private": true
}
......@@ -16,15 +16,15 @@ module.exports = {
let { uniID, pubFun, vk , db, _ } = util;
let { uid } = data;
let res = { code : 0, msg : 'ok' };
// 业务逻辑开始-----------------------------------------------------------
// 想要两表以上的连接,请使用vk.baseDao.selects
// 业务逻辑开始-----------------------------------------------------------
// 想要两表以上的连接,请使用vk.baseDao.selects
res = await vk.baseDao.select2({
dbName:"vk-test",
dbName2:"uni-id-users",
foreignKeyType:"many-to-one", // one-to-many 一对多 many-to-one 多对一
foreignKey:"user_id",
foreignKey2:"_id",
as:"kehuInfo",
as:"userInfo",
getCount:true,
pageIndex:1,
pageSize:10,
......@@ -36,8 +36,6 @@ module.exports = {
password:false,
}
}, event.util);
console.log(res.rows.length);
// 业务逻辑结束-----------------------------------------------------------
return res;
}
......
......@@ -39,6 +39,7 @@ module.exports = {
dbName:"vk-test",
foreignKey:"user_id",
as:"testList",
limit:1,
// 副表where条件
whereJson:{ },
// 副表字段显示规则
......@@ -56,8 +57,7 @@ module.exports = {
// 副表字段显示规则
fieldJson:{ },
// 副表排序规则
sortArr:[{"name":"id", "type":"desc"}
],
sortArr:[{"name":"id", "type":"desc"}],
},
]
}, event.util);
......
......@@ -10,9 +10,9 @@
"integrity": "sha512-CpSWQyRlOYkPLOWWhFM5so6Epy3Wp+7HGPg2rGyMaC9kKHEv848a2T7xq6qgZsVjcYZOZwJCMJel7TiZZKNV8w=="
},
"vk-unicloud-page": {
"version": "1.10.4",
"resolved": "https://registry.npmjs.org/vk-unicloud-page/-/vk-unicloud-page-1.10.4.tgz",
"integrity": "sha512-8fkqo3O/N6JeDrsB5mDo9J6gDVe5NklpMf1g8lADT8BDoe9eTlf6lZiXCdZM9ep8xF3Ec8Jn7NfjQIhsiG84KQ==",
"version": "1.10.5",
"resolved": "https://registry.npmjs.org/vk-unicloud-page/-/vk-unicloud-page-1.10.5.tgz",
"integrity": "sha512-IzXjKscU+3mhbMx0wJ4PueCK49aD2pWwwwfoG6T6cvjBpZPFERAvvF1xiU+SeLrUMo4qS7o09fyy0xIKZ0Iong==",
"requires": {
"uview-ui": "~1.7.7"
}
......
......@@ -4,7 +4,7 @@
"description": "【开箱即用】vk-uniCloud-router - 云函数路由模式 - uniCloud开发框架 - 已集成uni-id",
"main": "main.js",
"dependencies": {
"vk-unicloud-page": "^1.10.4"
"vk-unicloud-page": "^1.10.6"
},
"devDependencies": {},
"scripts": {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册