更新:登录功能
This commit is contained in:
12
uniCloud-aliyun/database/JQL查询.jql
Normal file
12
uniCloud-aliyun/database/JQL查询.jql
Normal file
@@ -0,0 +1,12 @@
|
||||
// 本文件用于,使用JQL语法操作项目关联的uniCloud空间的数据库,方便开发调试和远程数据库管理
|
||||
// 编写clientDB的js API(也支持常规js语法,比如var),可以对云数据库进行增删改查操作。不支持uniCloud-db组件写法
|
||||
// 可以全部运行,也可以选中部分代码运行。点击工具栏上的运行按钮或者按下【F5】键运行代码
|
||||
// 如果文档中存在多条JQL语句,只有最后一条语句生效
|
||||
// 如果混写了普通js,最后一条语句需是数据库操作语句
|
||||
// 此处代码运行不受DB Schema的权限控制,移植代码到实际业务中注意在schema中配好permission
|
||||
// 不支持clientDB的action
|
||||
// 数据库查询有最大返回条数限制,详见:https://uniapp.dcloud.net.cn/uniCloud/cf-database.html#limit
|
||||
// 详细JQL语法,请参考:https://uniapp.dcloud.net.cn/uniCloud/jql.html
|
||||
|
||||
// 下面示例查询uni-id-users表的所有数据
|
||||
db.collection('uni-id-users').get();
|
||||
27
uniCloud-aliyun/database/hello.schema.json
Normal file
27
uniCloud-aliyun/database/hello.schema.json
Normal file
@@ -0,0 +1,27 @@
|
||||
// 文档教程: https://uniapp.dcloud.net.cn/uniCloud/schema
|
||||
{
|
||||
"bsonType": "object",
|
||||
"required": ["name"],
|
||||
"permission": {
|
||||
"read": true,
|
||||
"create": true,
|
||||
"update": true,
|
||||
"delete": true
|
||||
},
|
||||
"properties": {
|
||||
"_id": {
|
||||
"description": "ID"
|
||||
},
|
||||
"name": {
|
||||
"bsonType": "string",
|
||||
"label": "%name%",
|
||||
"minLength": 1,
|
||||
"maxLength": 8,
|
||||
"errorMessage": {
|
||||
"format": "{label}%name.format%",
|
||||
"minLength": "{label}%name.minLength%",
|
||||
"maxLength": "{label}%name.maxLength%"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
6
uniCloud-aliyun/database/locale/hello/en.json
Normal file
6
uniCloud-aliyun/database/locale/hello/en.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "Name",
|
||||
"name.format": " invalid format",
|
||||
"name.minLength": "{label} length cannot be less than {{minLength}}",
|
||||
"name.maxLength": "{label} length cannot exceed {{maxLength}}"
|
||||
}
|
||||
6
uniCloud-aliyun/database/locale/hello/zh-Hans.json
Normal file
6
uniCloud-aliyun/database/locale/hello/zh-Hans.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "姓名",
|
||||
"name.format": "格式无效",
|
||||
"name.minLength": "{label}不能小于{{minLength}}个字符",
|
||||
"name.maxLength": "{label}不能大于{{maxLength}}个字符"
|
||||
}
|
||||
Reference in New Issue
Block a user