From eaaecec4b641bb0e3a7ad4e9597c71f6299f58d5 Mon Sep 17 00:00:00 2001 From: linju Date: Mon, 19 Sep 2022 15:04:06 +0800 Subject: [PATCH] =?UTF-8?q?1.0.15=20-=20=E6=9B=B4=E6=96=B0=E8=A1=A8?= =?UTF-8?q?=E7=BB=93=E6=9E=84=EF=BC=8C=E8=A7=A3=E5=86=B3=E5=9C=A8uni-admin?= =?UTF-8?q?=E4=B8=AD=E9=83=A8=E5=88=86clientDB=E6=93=8D=E4=BD=9C=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E6=9D=83=E9=99=90=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uni_modules/uni-id-pages/changelog.md | 9 +- uni_modules/uni-id-pages/common/common.js | 2 + uni_modules/uni-id-pages/config.js | 2 +- uni_modules/uni-id-pages/package.json | 2 +- .../pages/login/login-withpwd.vue | 5 +- .../uni-id-pages/pages/userinfo/userinfo.vue | 2 +- uni_modules/uni-id-pages/pages_init.json | 24 +- .../module/register/register-admin.js | 2 +- .../uni-id-co/package-lock.json | 223 ++++- .../cloudfunctions/uni-id-co/package.json | 2 +- .../database/opendb-device.schema.json | 2 +- .../uniCloud/database/uni-id-log.schema.json | 8 +- .../database/uni-id-permissions.schema.json | 15 +- .../database/uni-id-roles.schema.json | 30 +- .../database/uni-id-users.schema.json | 832 +++++++++--------- uni_modules_tools/config.js | 12 + 16 files changed, 694 insertions(+), 478 deletions(-) diff --git a/uni_modules/uni-id-pages/changelog.md b/uni_modules/uni-id-pages/changelog.md index b9e0c6d..69b77e7 100644 --- a/uni_modules/uni-id-pages/changelog.md +++ b/uni_modules/uni-id-pages/changelog.md @@ -1,9 +1,12 @@ +## 1.0.15(2022-09-19) +- 更新表结构,解决在uni-admin中部分clientDB操作没有权限的问题 +## 1.0.14(2022-09-16) +- 修改 配置项`isAdmin`默认值为`false` ## 1.0.13(2022-09-16) -- 新增 支持通过`isAdmin`配置项区分是否为管理端或者用户端 - 新增 管理员注册页面 +- 新增 配置项`isAdmin`区分是否为管理端 - 新增 登录成功后自动跳转;跳转优先级:路由携带(`uniIdRedirectUrl`参数) > 返回上一路由 > 跳转首页 -- 优化 管理端下部分页面展示 -- 优化 注册管理员时管理员存在提示文案 +- uni-id-co 优化 注册管理员时管理员存在提示文案 ## 1.0.12(2022-09-07) - 修复 getSupportedLoginType判断是否支持微信公众号、PC网页微信扫码登录方式报错的Bug - 优化 适配pc端样式 diff --git a/uni_modules/uni-id-pages/common/common.js b/uni_modules/uni-id-pages/common/common.js index 16fb468..913c378 100644 --- a/uni_modules/uni-id-pages/common/common.js +++ b/uni_modules/uni-id-pages/common/common.js @@ -8,6 +8,8 @@ export default { uni.redirectTo({ url: config.isAdmin ? '/uni_modules/uni-id-pages/pages/login/login-withpwd': '/uni_modules/uni-id-pages/pages/login/login-withoutpwd', }); + // uniIdRouter -> loginPage + uni.$emit('uni-id-pages-logout') }, } diff --git a/uni_modules/uni-id-pages/config.js b/uni_modules/uni-id-pages/config.js index 9e653a5..dcf9194 100644 --- a/uni_modules/uni-id-pages/config.js +++ b/uni_modules/uni-id-pages/config.js @@ -5,7 +5,7 @@ export default { 登录类型 未列举到的或运行环境不支持的,将被自动隐藏。 如果需要在不同平台有不同的配置,直接用条件编译即可 */ - "isAdmin": true, // 区分管理端与用户端 + "isAdmin": false, // 区分管理端与用户端 "loginTypes": [ // "qq", // "xiaomi", diff --git a/uni_modules/uni-id-pages/package.json b/uni_modules/uni-id-pages/package.json index 4c4c7e4..bf909e7 100644 --- a/uni_modules/uni-id-pages/package.json +++ b/uni_modules/uni-id-pages/package.json @@ -1,7 +1,7 @@ { "id": "uni-id-pages", "displayName": "uni-id-pages", - "version": "1.0.13", + "version": "1.0.15", "description": "云端一体简单、统一、可扩展的用户中心页面模版", "keywords": [ "用户管理", diff --git a/uni_modules/uni-id-pages/pages/login/login-withpwd.vue b/uni_modules/uni-id-pages/pages/login/login-withpwd.vue index ed53bac..b7cfae0 100644 --- a/uni_modules/uni-id-pages/pages/login/login-withpwd.vue +++ b/uni_modules/uni-id-pages/pages/login/login-withpwd.vue @@ -132,7 +132,10 @@ export default { /* 前往注册 */ toRegister() { uni.navigateTo({ - url: this.config.isAdmin ? '/uni_modules/uni-id-pages/pages/register/register-admin': '/uni_modules/uni-id-pages/pages/register/register' + url: this.config.isAdmin ? '/uni_modules/uni-id-pages/pages/register/register-admin': '/uni_modules/uni-id-pages/pages/register/register', + fail(e) { + console.error(e); + } }) } } diff --git a/uni_modules/uni-id-pages/pages/userinfo/userinfo.vue b/uni_modules/uni-id-pages/pages/userinfo/userinfo.vue index cdc7a3f..b401f40 100644 --- a/uni_modules/uni-id-pages/pages/userinfo/userinfo.vue +++ b/uni_modules/uni-id-pages/pages/userinfo/userinfo.vue @@ -117,7 +117,7 @@ // #endif // #ifdef MP-WEIXIN - this.$refs['bind-mobile'].open() + this.$refs['bind-mobile-by-sms'].open() // #endif // #ifdef H5 diff --git a/uni_modules/uni-id-pages/pages_init.json b/uni_modules/uni-id-pages/pages_init.json index 5d2a4e8..cd8682a 100644 --- a/uni_modules/uni-id-pages/pages_init.json +++ b/uni_modules/uni-id-pages/pages_init.json @@ -74,14 +74,20 @@ "enablePullDownRefresh": false } } - ,{ - "path" : "uni_modules/uni-id-pages/pages/userinfo/change_pwd/change_pwd", - "style" : - { - "navigationBarTitleText": "修改密码", - "enablePullDownRefresh": false - } - - } + ,{ + "path" : "uni_modules/uni-id-pages/pages/userinfo/change_pwd/change_pwd", + "style" : + { + "navigationBarTitleText": "修改密码", + "enablePullDownRefresh": false + } + + },{ + "path": "uni_modules/uni-id-pages/pages/register/register-admin", + "style": { + "navigationBarTitleText": "注册管理员账号", + "enablePullDownRefresh": false + } + } ] } \ No newline at end of file diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/register/register-admin.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/register/register-admin.js index 8a88229..d9b8f33 100644 --- a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/register/register-admin.js +++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/register/register-admin.js @@ -39,7 +39,7 @@ module.exports = async function (params = {}) { if (getAdminRes.data.length > 0) { return { errCode: ERROR.ADMIN_EXISTS, - errMsg: '管理员已存在' + errMsg: this.t('uni-id-admin-exists') } } const { diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/package-lock.json b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/package-lock.json index e856acd..c7338d7 100644 --- a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/package-lock.json +++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/package-lock.json @@ -1,17 +1,183 @@ { "name": "uni-id-co", - "version": "1.0.12", - "lockfileVersion": 1, + "version": "1.0.15", + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "name": "uni-id-co", + "version": "1.0.12", + "dependencies": { + "jsonwebtoken": "8.5.1", + "lodash.merge": "^4.6.2", + "uni-captcha": "file:../../../../uni-captcha/uniCloud/cloudfunctions/common/uni-captcha", + "uni-config-center": "file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center", + "uni-id-common": "file:../../../../uni-id-common/uniCloud/cloudfunctions/common/uni-id-common", + "uni-open-bridge-common": "file:../../../../uni-open-bridge-common/uniCloud/cloudfunctions/common/uni-open-bridge-common" + } + }, + "../../../../uni-captcha/uniCloud/cloudfunctions/common/uni-captcha": { + "version": "0.2.2", + "license": "Apache-2.0", + "dependencies": { + "uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" + } + }, + "../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center": { + "version": "0.0.2", + "license": "Apache-2.0" + }, + "../../../../uni-id-common/uniCloud/cloudfunctions/common/uni-id-common": { + "version": "1.0.13", + "license": "Apache-2.0", + "dependencies": { + "uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" + } + }, + "../../../../uni-open-bridge-common/uniCloud/cloudfunctions/common/uni-open-bridge-common": { + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" + } + }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmmirror.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jsonwebtoken": { + "version": "8.5.1", + "resolved": "https://registry.npmmirror.com/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", + "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "dependencies": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=4", + "npm": ">=1.4.28" + } + }, + "node_modules/jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmmirror.com/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmmirror.com/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" + }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmmirror.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" + }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmmirror.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmmirror.com/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmmirror.com/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/uni-captcha": { + "resolved": "../../../../uni-captcha/uniCloud/cloudfunctions/common/uni-captcha", + "link": true + }, + "node_modules/uni-config-center": { + "resolved": "../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center", + "link": true + }, + "node_modules/uni-id-common": { + "resolved": "../../../../uni-id-common/uniCloud/cloudfunctions/common/uni-id-common", + "link": true + }, + "node_modules/uni-open-bridge-common": { + "resolved": "../../../../uni-open-bridge-common/uniCloud/cloudfunctions/common/uni-open-bridge-common", + "link": true + } + }, "dependencies": { "buffer-equal-constant-time": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "resolved": "https://registry.npmmirror.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" }, "ecdsa-sig-formatter": { "version": "1.0.11", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "resolved": "https://registry.npmmirror.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", "requires": { "safe-buffer": "^5.0.1" @@ -19,7 +185,7 @@ }, "jsonwebtoken": { "version": "8.5.1", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", + "resolved": "https://registry.npmmirror.com/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", "requires": { "jws": "^3.2.2", @@ -36,7 +202,7 @@ }, "jwa": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "resolved": "https://registry.npmmirror.com/jwa/-/jwa-1.4.1.tgz", "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", "requires": { "buffer-equal-constant-time": "1.0.1", @@ -46,7 +212,7 @@ }, "jws": { "version": "3.2.2", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "resolved": "https://registry.npmmirror.com/jws/-/jws-3.2.2.tgz", "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", "requires": { "jwa": "^1.4.1", @@ -55,68 +221,63 @@ }, "lodash.includes": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "resolved": "https://registry.npmmirror.com/lodash.includes/-/lodash.includes-4.3.0.tgz", "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" }, "lodash.isboolean": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "resolved": "https://registry.npmmirror.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" }, "lodash.isinteger": { "version": "4.0.4", - "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "resolved": "https://registry.npmmirror.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" }, "lodash.isnumber": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "resolved": "https://registry.npmmirror.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" }, "lodash.isplainobject": { "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "resolved": "https://registry.npmmirror.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" }, "lodash.isstring": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "resolved": "https://registry.npmmirror.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz", "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" }, "lodash.merge": { "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "resolved": "https://registry.npmmirror.com/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, "lodash.once": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "resolved": "https://registry.npmmirror.com/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" }, "ms": { "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "safe-buffer": { "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, "semver": { "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "resolved": "https://registry.npmmirror.com/semver/-/semver-5.7.1.tgz", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" }, "uni-captcha": { "version": "file:../../../../uni-captcha/uniCloud/cloudfunctions/common/uni-captcha", "requires": { - "uni-config-center": "file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" - }, - "dependencies": { - "uni-config-center": { - "version": "file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" - } + "uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" } }, "uni-config-center": { @@ -125,23 +286,13 @@ "uni-id-common": { "version": "file:../../../../uni-id-common/uniCloud/cloudfunctions/common/uni-id-common", "requires": { - "uni-config-center": "file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" - }, - "dependencies": { - "uni-config-center": { - "version": "file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" - } + "uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" } }, "uni-open-bridge-common": { "version": "file:../../../../uni-open-bridge-common/uniCloud/cloudfunctions/common/uni-open-bridge-common", "requires": { - "uni-config-center": "file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" - }, - "dependencies": { - "uni-config-center": { - "version": "file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" - } + "uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" } } } diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/package.json b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/package.json index 90f8554..e6cf73b 100644 --- a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/package.json +++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/package.json @@ -1,6 +1,6 @@ { "name": "uni-id-co", - "version": "1.0.12", + "version": "1.0.15", "description": "", "main": "index.js", "keywords": [], diff --git a/uni_modules/uni-id-pages/uniCloud/database/opendb-device.schema.json b/uni_modules/uni-id-pages/uniCloud/database/opendb-device.schema.json index 529b672..c3591cc 100644 --- a/uni_modules/uni-id-pages/uniCloud/database/opendb-device.schema.json +++ b/uni_modules/uni-id-pages/uniCloud/database/opendb-device.schema.json @@ -77,7 +77,7 @@ }, "network_model": { "bsonType": "string", - "description": "设备网络型号wifi/3G/4G/" + "description": "设备网络型号wifi\/3G\/4G\/" }, "window_width": { "bsonType": "string", diff --git a/uni_modules/uni-id-pages/uniCloud/database/uni-id-log.schema.json b/uni_modules/uni-id-pages/uniCloud/database/uni-id-log.schema.json index 31dfaeb..ff4f797 100644 --- a/uni_modules/uni-id-pages/uniCloud/database/uni-id-log.schema.json +++ b/uni_modules/uni-id-pages/uniCloud/database/uni-id-log.schema.json @@ -1,5 +1,9 @@ { "bsonType": "object", + "required": ["user_id"], + "permission": { + "read": "'READ_UNI_ID_LOG' in auth.permission" + }, "properties": { "_id": { "description": "ID,系统自动生成" @@ -44,6 +48,7 @@ }, "user_id": { "bsonType": "string", + "foreignKey": "uni-id-users._id", "description": "用户id,参考uni-id-users表" }, "username": { @@ -62,6 +67,5 @@ "bsonType": "string", "description": "客户端DCloud AppId" } - }, - "required": [] + } } diff --git a/uni_modules/uni-id-pages/uniCloud/database/uni-id-permissions.schema.json b/uni_modules/uni-id-pages/uniCloud/database/uni-id-permissions.schema.json index 014b3ca..25209cb 100644 --- a/uni_modules/uni-id-pages/uniCloud/database/uni-id-permissions.schema.json +++ b/uni_modules/uni-id-pages/uniCloud/database/uni-id-permissions.schema.json @@ -1,5 +1,12 @@ { "bsonType": "object", + "required": ["permission_id", "permission_name"], + "permission": { + "read": "'READ_UNI_ID_PERMISSIONS' in auth.permission", + "create": "'CREATE_UNI_ID_PERMISSIONS' in auth.permission", + "update": "'UPDATE_UNI_ID_PERMISSIONS' in auth.permission", + "delete": "'DELETE_UNI_ID_PERMISSIONS' in auth.permission" + }, "properties": { "_id": { "description": "存储文档 ID,系统自动生成" @@ -41,9 +48,5 @@ "title": "权限名称", "trim": "both" } - }, - "required": [ - "permission_id", - "permission_name" - ] -} \ No newline at end of file + } +} diff --git a/uni_modules/uni-id-pages/uniCloud/database/uni-id-roles.schema.json b/uni_modules/uni-id-pages/uniCloud/database/uni-id-roles.schema.json index de7a015..e2fe322 100644 --- a/uni_modules/uni-id-pages/uniCloud/database/uni-id-roles.schema.json +++ b/uni_modules/uni-id-pages/uniCloud/database/uni-id-roles.schema.json @@ -1,19 +1,20 @@ { "bsonType": "object", + "required": ["role_id", "role_name"], "permission": { - "create": false, - "delete": false, - "read": false, - "update": false + "read": "'READ_UNI_ID_ROLES' in auth.permission", + "create": "'CREATE_UNI_ID_ROLES' in auth.permission", + "update": "'UPDATE_UNI_ID_ROLES' in auth.permission", + "delete": "'DELETE_UNI_ID_ROLES' in auth.permission" }, "properties": { "_id": { "description": "存储文档 ID,系统自动生成" }, "comment": { + "title": "备注", "bsonType": "string", "description": "备注", - "title": "备注", "trim": "both" }, "create_date": { @@ -24,25 +25,26 @@ } }, "permission": { + "title": "权限", "bsonType": "array", - "description": "角色拥有的权限列表", "foreignKey": "uni-id-permissions.permission_id", - "title": "权限" + "description": "角色拥有的权限列表", + "enum": { + "collection": "uni-id-permissions", + "field": "permission_name as text, permission_id as value" + } }, "role_id": { + "title": "唯一ID", "bsonType": "string", "description": "角色唯一标识,不可修改,不允许重复", - "title": "唯一ID", "trim": "both" }, "role_name": { + "title": "名称", "bsonType": "string", "description": "角色名称", - "title": "名称", "trim": "both" } - }, - "required": [ - "role_id" - ] -} \ No newline at end of file + } +} diff --git a/uni_modules/uni-id-pages/uniCloud/database/uni-id-users.schema.json b/uni_modules/uni-id-pages/uniCloud/database/uni-id-users.schema.json index 31c4e89..84f7230 100644 --- a/uni_modules/uni-id-pages/uniCloud/database/uni-id-users.schema.json +++ b/uni_modules/uni-id-pages/uniCloud/database/uni-id-users.schema.json @@ -1,402 +1,432 @@ -{ - "bsonType": "object", - "permission": { - "update": "doc._id == auth.uid", - "read": "doc._id == auth.uid" - }, - "properties": { - "_id": { - "description": "存储文档 ID(用户 ID),系统自动生成" - }, - "ali_openid": { - "bsonType": "string", - "description": "支付宝平台openid", - "permission": { - "write": false - } - }, - "apple_openid": { - "bsonType": "string", - "description": "苹果登录openid", - "permission": { - "write": false - } - }, - "avatar": { - "bsonType": "string", - "description": "头像地址", - "title": "头像地址", - "trim": "both" - }, - "avatar_file": { - "bsonType": "file", - "description": "用file类型方便使用uni-file-picker组件", - "title": "头像文件" - }, - "comment": { - "bsonType": "string", - "description": "备注", - "title": "备注", - "trim": "both", - "permission": { - "write": false - } - }, - "dcloud_appid": { - "bsonType": "array", - "description": "允许登录的客户端的appid列表", - "foreignKey": "opendb-app-list.appid", - "permission": { - "write": false - } - }, - "department_id": { - "bsonType": "array", - "description": "部门ID", - "enum": { - "collection": "opendb-department", - "field": "_id as value, name as text", - "orderby": "name asc" - }, - "enumType": "tree", - "title": "部门", - "permission": { - "write": false - } - }, - "email": { - "bsonType": "string", - "description": "邮箱地址", - "format": "email", - "title": "邮箱", - "trim": "both", - "permission": { - "write": false - } - }, - "email_confirmed": { - "bsonType": "int", - "defaultValue": 0, - "description": "邮箱验证状态:0 未验证 1 已验证", - "enum": [{ - "text": "未验证", - "value": 0 - }, - { - "text": "已验证", - "value": 1 - } - ], - "title": "邮箱验证状态", - "permission": { - "write": false - } - }, - "gender": { - "bsonType": "int", - "defaultValue": 0, - "description": "用户性别:0 未知 1 男性 2 女性", - "enum": [{ - "text": "未知", - "value": 0 - }, - { - "text": "男", - "value": 1 - }, - { - "text": "女", - "value": 2 - } - ], - "title": "性别", - "permission": { - "write": false - } - }, - "invite_time": { - "bsonType": "timestamp", - "description": "受邀时间", - "permission": { - "write": false - } - }, - "inviter_uid": { - "bsonType": "array", - "description": "用户全部上级邀请者", - "trim": "both", - "permission": { - "write": false - } - }, - "last_login_date": { - "bsonType": "timestamp", - "description": "最后登录时间", - "permission": { - "write": false - } - }, - "last_login_ip": { - "bsonType": "string", - "description": "最后登录时 IP 地址", - "permission": { - "write": false - } - }, - "mobile": { - "bsonType": "string", - "description": "手机号码", - "pattern": "^\\+?[0-9-]{3,20}$", - "title": "手机号码", - "trim": "both", - "permission": { - "write": false - } - }, - "mobile_confirmed": { - "bsonType": "int", - "defaultValue": 0, - "description": "手机号验证状态:0 未验证 1 已验证", - "enum": [{ - "text": "未验证", - "value": 0 - }, - { - "text": "已验证", - "value": 1 - } - ], - "title": "手机号验证状态", - "permission": { - "write": false - } - }, - "my_invite_code": { - "bsonType": "string", - "description": "用户自身邀请码", - "permission": { - "write": false - } - }, - "nickname": { - "bsonType": "string", - "description": "用户昵称", - "title": "昵称", - "trim": "both" - }, - "password": { - "bsonType": "password", - "description": "密码,加密存储", - "title": "密码", - "trim": "both", - "permission": { - "write": false, - "read": false - } - }, - "password_secret_version": { - "bsonType": "int", - "description": "密码使用的passwordSecret版本", - "title": "passwordSecret", - "permission": { - "write": false, - "read": false - } - }, - "realname_auth": { - "bsonType": "object", - "description": "实名认证信息", - "permission": { - "write": false - }, - "properties": { - "auth_date": { - "bsonType": "timestamp", - "description": "认证通过时间" - }, - "auth_status": { - "bsonType": "int", - "description": "认证状态:0 未认证 1 等待认证 2 认证通过 3 认证失败", - "maximum": 3, - "minimum": 0 - }, - "contact_email": { - "bsonType": "string", - "description": "联系人邮箱" - }, - "contact_mobile": { - "bsonType": "string", - "description": "联系人手机号码" - }, - "contact_person": { - "bsonType": "string", - "description": "联系人姓名" - }, - "id_card_back": { - "bsonType": "string", - "description": "身份证反面照 URL" - }, - "id_card_front": { - "bsonType": "string", - "description": "身份证正面照 URL" - }, - "identity": { - "bsonType": "string", - "description": "身份证号码/营业执照号码" - }, - "in_hand": { - "bsonType": "string", - "description": "手持身份证照片 URL" - }, - "license": { - "bsonType": "string", - "description": "营业执照 URL" - }, - "real_name": { - "bsonType": "string", - "description": "真实姓名/企业名称" - }, - "type": { - "bsonType": "int", - "description": "用户类型:0 个人用户 1 企业用户", - "maximum": 1, - "minimum": 0 - } - }, - "required": [ - "type", - "auth_status" - ] - }, - "register_date": { - "bsonType": "timestamp", - "description": "注册时间", - "forceDefaultValue": { - "$env": "now" - } - }, - "register_ip": { - "bsonType": "string", - "description": "注册时 IP 地址", - "forceDefaultValue": { - "$env": "clientIP" - } - }, - "role": { - "bsonType": "array", - "description": "用户角色", - "enum": { - "collection": "uni-id-roles", - "field": "role_id as value, role_name as text" - }, - "foreignKey": "uni-id-roles.role_id", - "permission": { - "write": false - }, - "title": "角色" - }, - "score": { - "bsonType": "int", - "description": "用户积分,积分变更记录可参考:uni-id-scores表定义", - "permission": { - "write": false - } - }, - "status": { - "bsonType": "int", - "defaultValue": 0, - "description": "用户状态:0 正常 1 禁用 2 审核中 3 审核拒绝", - "permission": { - "write": false - }, - "enum": [{ - "text": "正常", - "value": 0 - }, - { - "text": "禁用", - "value": 1 - }, - { - "text": "审核中", - "value": 2 - }, - { - "text": "审核拒绝", - "value": 3 - } - ], - "title": "用户状态" - }, - "token": { - "bsonType": "array", - "description": "用户token" - }, - "username": { - "bsonType": "string", - "description": "用户名,不允许重复", - "title": "用户名", - "trim": "both", - "permission": { - "write": false - } - }, - "wx_openid": { - "bsonType": "object", - "description": "微信各个平台openid", - "properties": { - "app": { - "bsonType": "string", - "description": "app平台微信openid" - }, - "mp": { - "bsonType": "string", - "description": "微信小程序平台openid" - }, - "h5": { - "bsonType": "string", - "description": "微信公众号登录openid" - }, - "web": { - "bsonType": "string", - "description": "PC页面扫码登录openid" - } - }, - "permission": { - "write": false - } - }, - "wx_unionid": { - "bsonType": "string", - "description": "微信unionid", - "permission": { - "write": false - } - }, - "qq_openid": { - "bsonType": "object", - "description": "QQ各个平台openid", - "properties": { - "app": { - "bsonType": "string", - "description": "app平台QQ openid" - }, - "mp": { - "bsonType": "string", - "description": "QQ小程序平台openid" - } - }, - "permission": { - "write": false - } - }, - "qq_unionid": { - "bsonType": "string", - "description": "QQ unionid", - "permission": { - "write": false - } - } - }, - "required": [] +{ + "bsonType": "object", + "required": ["username", "password"], + "permission": { + "read": true, + "create": "'CREATE_UNI_ID_USERS' in auth.permission", + "update": "doc._id == auth.uid || 'UPDATE_UNI_ID_USERS' in auth.permission", + "delete": "'DELETE_UNI_ID_USERS' in auth.permission" + }, + "properties": { + "_id": { + "description": "存储文档 ID(用户 ID),系统自动生成" + }, + "ali_openid": { + "bsonType": "string", + "description": "支付宝平台openid", + "permission": { + "write": false, + "read": "doc._id == auth.uid" + } + }, + "apple_openid": { + "bsonType": "string", + "description": "苹果登录openid", + "permission": { + "write": false, + "read": "doc._id == auth.uid" + } + }, + "avatar": { + "bsonType": "string", + "description": "头像地址", + "title": "头像地址", + "trim": "both" + }, + "avatar_file": { + "bsonType": "file", + "description": "用file类型方便使用uni-file-picker组件", + "title": "头像文件" + }, + "comment": { + "bsonType": "string", + "description": "备注", + "title": "备注", + "trim": "both", + "permission": { + "write": false, + "read": false + } + }, + "dcloud_appid": { + "bsonType": "array", + "description": "允许登录的客户端的appid列表", + "foreignKey": "opendb-app-list.appid", + "permission": { + "write": false, + "read": "doc._id == auth.uid" + } + }, + "department_id": { + "bsonType": "array", + "description": "部门ID", + "enum": { + "collection": "opendb-department", + "field": "_id as value, name as text", + "orderby": "name asc" + }, + "enumType": "tree", + "title": "部门", + "permission": { + "write": false, + "read": "doc._id == auth.uid" + } + }, + "email": { + "bsonType": "string", + "description": "邮箱地址", + "format": "email", + "title": "邮箱", + "trim": "both", + "permission": { + "write": false, + "read": "doc._id == auth.uid" + } + }, + "email_confirmed": { + "bsonType": "int", + "defaultValue": 0, + "description": "邮箱验证状态:0 未验证 1 已验证", + "enum": [{ + "text": "未验证", + "value": 0 + }, + { + "text": "已验证", + "value": 1 + } + ], + "title": "邮箱验证状态", + "permission": { + "write": false, + "read": "doc._id == auth.uid" + } + }, + "gender": { + "bsonType": "int", + "defaultValue": 0, + "description": "用户性别:0 未知 1 男性 2 女性", + "enum": [{ + "text": "未知", + "value": 0 + }, + { + "text": "男", + "value": 1 + }, + { + "text": "女", + "value": 2 + } + ], + "title": "性别", + "permission": { + "write": false, + "read": "doc._id == auth.uid" + } + }, + "invite_time": { + "bsonType": "timestamp", + "description": "受邀时间", + "permission": { + "write": false, + "read": "doc._id == auth.uid" + } + }, + "inviter_uid": { + "bsonType": "array", + "description": "用户全部上级邀请者", + "trim": "both", + "permission": { + "write": false, + "read": "doc._id == auth.uid" + } + }, + "last_login_date": { + "bsonType": "timestamp", + "description": "最后登录时间", + "permission": { + "write": false, + "read": "doc._id == auth.uid" + } + }, + "last_login_ip": { + "bsonType": "string", + "description": "最后登录时 IP 地址", + "permission": { + "write": false, + "read": "doc._id == auth.uid" + } + }, + "mobile": { + "bsonType": "string", + "description": "手机号码", + "pattern": "^\\+?[0-9-]{3,20}$", + "title": "手机号码", + "trim": "both", + "permission": { + "write": false, + "read": "doc._id == auth.uid" + } + }, + "mobile_confirmed": { + "bsonType": "int", + "defaultValue": 0, + "description": "手机号验证状态:0 未验证 1 已验证", + "enum": [{ + "text": "未验证", + "value": 0 + }, + { + "text": "已验证", + "value": 1 + } + ], + "title": "手机号验证状态", + "permission": { + "write": false, + "read": "doc._id == auth.uid" + } + }, + "my_invite_code": { + "bsonType": "string", + "description": "用户自身邀请码", + "permission": { + "write": false, + "read": "doc._id == auth.uid" + } + }, + "nickname": { + "bsonType": "string", + "description": "用户昵称", + "title": "昵称", + "trim": "both" + }, + "password": { + "bsonType": "password", + "description": "密码,加密存储", + "title": "密码", + "trim": "both", + "permission": { + "write": false, + "read": false + } + }, + "password_secret_version": { + "bsonType": "int", + "description": "密码使用的passwordSecret版本", + "title": "passwordSecret", + "permission": { + "write": false, + "read": false + } + }, + "realname_auth": { + "bsonType": "object", + "description": "实名认证信息", + "permission": { + "write": false, + "read": "doc._id == auth.uid" + }, + "properties": { + "auth_date": { + "bsonType": "timestamp", + "description": "认证通过时间" + }, + "auth_status": { + "bsonType": "int", + "description": "认证状态:0 未认证 1 等待认证 2 认证通过 3 认证失败", + "maximum": 3, + "minimum": 0 + }, + "contact_email": { + "bsonType": "string", + "description": "联系人邮箱" + }, + "contact_mobile": { + "bsonType": "string", + "description": "联系人手机号码" + }, + "contact_person": { + "bsonType": "string", + "description": "联系人姓名" + }, + "id_card_back": { + "bsonType": "string", + "description": "身份证反面照 URL" + }, + "id_card_front": { + "bsonType": "string", + "description": "身份证正面照 URL" + }, + "identity": { + "bsonType": "string", + "description": "身份证号码/营业执照号码" + }, + "in_hand": { + "bsonType": "string", + "description": "手持身份证照片 URL" + }, + "license": { + "bsonType": "string", + "description": "营业执照 URL" + }, + "real_name": { + "bsonType": "string", + "description": "真实姓名/企业名称" + }, + "type": { + "bsonType": "int", + "description": "用户类型:0 个人用户 1 企业用户", + "maximum": 1, + "minimum": 0 + } + }, + "required": [ + "type", + "auth_status" + ] + }, + "register_date": { + "bsonType": "timestamp", + "description": "注册时间", + "forceDefaultValue": { + "$env": "now", + "read": "doc._id == auth.uid" + } + }, + "register_ip": { + "bsonType": "string", + "description": "注册时 IP 地址", + "forceDefaultValue": { + "$env": "clientIP", + "read": "doc._id == auth.uid" + } + }, + "role": { + "bsonType": "array", + "description": "用户角色", + "enum": { + "collection": "uni-id-roles", + "field": "role_id as value, role_name as text" + }, + "foreignKey": "uni-id-roles.role_id", + "permission": { + "write": false, + "read": "doc._id == auth.uid" + }, + "title": "角色" + }, + "score": { + "bsonType": "int", + "description": "用户积分,积分变更记录可参考:uni-id-scores表定义", + "permission": { + "write": false, + "read": "doc._id == auth.uid" + } + }, + "status": { + "bsonType": "int", + "defaultValue": 0, + "description": "用户状态:0 正常 1 禁用 2 审核中 3 审核拒绝", + "permission": { + "write": false, + "read": "doc._id == auth.uid" + }, + "enum": [{ + "text": "正常", + "value": 0 + }, + { + "text": "禁用", + "value": 1 + }, + { + "text": "审核中", + "value": 2 + }, + { + "text": "审核拒绝", + "value": 3 + } + ], + "title": "用户状态" + }, + "token": { + "bsonType": "array", + "description": "用户token", + "permission": { + "read": "doc._id == auth.uid" + } + }, + "username": { + "bsonType": "string", + "description": "用户名,不允许重复", + "title": "用户名", + "trim": "both", + "permission": { + "write": false + } + }, + "wx_openid": { + "bsonType": "object", + "description": "微信各个平台openid", + "properties": { + "app": { + "bsonType": "string", + "description": "app平台微信openid" + }, + "mp": { + "bsonType": "string", + "description": "微信小程序平台openid" + }, + "h5": { + "bsonType": "string", + "description": "微信公众号登录openid" + }, + "web": { + "bsonType": "string", + "description": "PC页面扫码登录openid" + } + }, + "permission": { + "write": false, + "read": "doc._id == auth.uid" + } + }, + "wx_unionid": { + "bsonType": "string", + "description": "微信unionid", + "permission": { + "write": false, + "read": "doc._id == auth.uid" + } + }, + "qq_openid": { + "bsonType": "object", + "description": "QQ各个平台openid", + "properties": { + "app": { + "bsonType": "string", + "description": "app平台QQ openid" + }, + "mp": { + "bsonType": "string", + "description": "QQ小程序平台openid" + } + }, + "permission": { + "write": false, + "read": "doc._id == auth.uid" + } + }, + "qq_unionid": { + "bsonType": "string", + "description": "QQ unionid", + "permission": { + "write": false, + "read": "doc._id == auth.uid" + } + } + } } diff --git a/uni_modules_tools/config.js b/uni_modules_tools/config.js index 0372df0..25f9972 100644 --- a/uni_modules_tools/config.js +++ b/uni_modules_tools/config.js @@ -39,6 +39,18 @@ "bundleId": "苹果开发者后台获取的bundleId" } } + }, + "web": { + "oauth": { + "h5-weixin": { + "appid": "微信浏览器内微信登录,所用的微信公众号appid", + "appsecret": "微信公众号后台获取的appsecret" + }, + "web-weixin": { + "appid": "手机微信扫码登录,所用的微信开放平台(https://open.weixin.qq.com/)-网站应用的appid", + "appsecret": "微信开放平台-网站应用的appsecret" + } + } }, "mp-weixin": { "oauth": { -- GitLab