提交 eaaecec4 编写于 作者: DCloud_JSON's avatar DCloud_JSON

1.0.15 - 更新表结构,解决在uni-admin中部分clientDB操作没有权限的问题

上级 8fd283e5
## 1.0.15(2022-09-19)
- 更新表结构,解决在uni-admin中部分clientDB操作没有权限的问题
## 1.0.14(2022-09-16)
- 修改 配置项`isAdmin`默认值为`false`
## 1.0.13(2022-09-16) ## 1.0.13(2022-09-16)
- 新增 支持通过`isAdmin`配置项区分是否为管理端或者用户端
- 新增 管理员注册页面 - 新增 管理员注册页面
- 新增 配置项`isAdmin`区分是否为管理端
- 新增 登录成功后自动跳转;跳转优先级:路由携带(`uniIdRedirectUrl`参数) > 返回上一路由 > 跳转首页 - 新增 登录成功后自动跳转;跳转优先级:路由携带(`uniIdRedirectUrl`参数) > 返回上一路由 > 跳转首页
- 优化 管理端下部分页面展示 - uni-id-co 优化 注册管理员时管理员存在提示文案
- 优化 注册管理员时管理员存在提示文案
## 1.0.12(2022-09-07) ## 1.0.12(2022-09-07)
- 修复 getSupportedLoginType判断是否支持微信公众号、PC网页微信扫码登录方式报错的Bug - 修复 getSupportedLoginType判断是否支持微信公众号、PC网页微信扫码登录方式报错的Bug
- 优化 适配pc端样式 - 优化 适配pc端样式
......
...@@ -8,6 +8,8 @@ export default { ...@@ -8,6 +8,8 @@ export default {
uni.redirectTo({ uni.redirectTo({
url: config.isAdmin ? '/uni_modules/uni-id-pages/pages/login/login-withpwd': '/uni_modules/uni-id-pages/pages/login/login-withoutpwd', 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') uni.$emit('uni-id-pages-logout')
}, },
} }
...@@ -5,7 +5,7 @@ export default { ...@@ -5,7 +5,7 @@ export default {
登录类型 未列举到的或运行环境不支持的,将被自动隐藏。 登录类型 未列举到的或运行环境不支持的,将被自动隐藏。
如果需要在不同平台有不同的配置,直接用条件编译即可 如果需要在不同平台有不同的配置,直接用条件编译即可
*/ */
"isAdmin": true, // 区分管理端与用户端 "isAdmin": false, // 区分管理端与用户端
"loginTypes": [ "loginTypes": [
// "qq", // "qq",
// "xiaomi", // "xiaomi",
......
{ {
"id": "uni-id-pages", "id": "uni-id-pages",
"displayName": "uni-id-pages", "displayName": "uni-id-pages",
"version": "1.0.13", "version": "1.0.15",
"description": "云端一体简单、统一、可扩展的用户中心页面模版", "description": "云端一体简单、统一、可扩展的用户中心页面模版",
"keywords": [ "keywords": [
"用户管理", "用户管理",
......
...@@ -132,7 +132,10 @@ export default { ...@@ -132,7 +132,10 @@ export default {
/* 前往注册 */ /* 前往注册 */
toRegister() { toRegister() {
uni.navigateTo({ 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);
}
}) })
} }
} }
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
// #endif // #endif
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
this.$refs['bind-mobile'].open() this.$refs['bind-mobile-by-sms'].open()
// #endif // #endif
// #ifdef H5 // #ifdef H5
......
...@@ -82,6 +82,12 @@ ...@@ -82,6 +82,12 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},{
"path": "uni_modules/uni-id-pages/pages/register/register-admin",
"style": {
"navigationBarTitleText": "注册管理员账号",
"enablePullDownRefresh": false
}
} }
] ]
} }
\ No newline at end of file
...@@ -39,7 +39,7 @@ module.exports = async function (params = {}) { ...@@ -39,7 +39,7 @@ module.exports = async function (params = {}) {
if (getAdminRes.data.length > 0) { if (getAdminRes.data.length > 0) {
return { return {
errCode: ERROR.ADMIN_EXISTS, errCode: ERROR.ADMIN_EXISTS,
errMsg: '管理员已存在' errMsg: this.t('uni-id-admin-exists')
} }
} }
const { const {
......
{ {
"name": "uni-id-co", "name": "uni-id-co",
"version": "1.0.12", "version": "1.0.15",
"lockfileVersion": 1, "lockfileVersion": 2,
"requires": true, "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": { "dependencies": {
"buffer-equal-constant-time": { "buffer-equal-constant-time": {
"version": "1.0.1", "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==" "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA=="
}, },
"ecdsa-sig-formatter": { "ecdsa-sig-formatter": {
"version": "1.0.11", "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==", "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
"requires": { "requires": {
"safe-buffer": "^5.0.1" "safe-buffer": "^5.0.1"
...@@ -19,7 +185,7 @@ ...@@ -19,7 +185,7 @@
}, },
"jsonwebtoken": { "jsonwebtoken": {
"version": "8.5.1", "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==", "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==",
"requires": { "requires": {
"jws": "^3.2.2", "jws": "^3.2.2",
...@@ -36,7 +202,7 @@ ...@@ -36,7 +202,7 @@
}, },
"jwa": { "jwa": {
"version": "1.4.1", "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==", "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
"requires": { "requires": {
"buffer-equal-constant-time": "1.0.1", "buffer-equal-constant-time": "1.0.1",
...@@ -46,7 +212,7 @@ ...@@ -46,7 +212,7 @@
}, },
"jws": { "jws": {
"version": "3.2.2", "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==", "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
"requires": { "requires": {
"jwa": "^1.4.1", "jwa": "^1.4.1",
...@@ -55,68 +221,63 @@ ...@@ -55,68 +221,63 @@
}, },
"lodash.includes": { "lodash.includes": {
"version": "4.3.0", "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==" "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w=="
}, },
"lodash.isboolean": { "lodash.isboolean": {
"version": "3.0.3", "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==" "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg=="
}, },
"lodash.isinteger": { "lodash.isinteger": {
"version": "4.0.4", "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==" "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA=="
}, },
"lodash.isnumber": { "lodash.isnumber": {
"version": "3.0.3", "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==" "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw=="
}, },
"lodash.isplainobject": { "lodash.isplainobject": {
"version": "4.0.6", "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==" "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA=="
}, },
"lodash.isstring": { "lodash.isstring": {
"version": "4.0.1", "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==" "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw=="
}, },
"lodash.merge": { "lodash.merge": {
"version": "4.6.2", "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==" "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ=="
}, },
"lodash.once": { "lodash.once": {
"version": "4.1.1", "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==" "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg=="
}, },
"ms": { "ms": {
"version": "2.1.3", "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==" "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
}, },
"safe-buffer": { "safe-buffer": {
"version": "5.2.1", "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==" "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
}, },
"semver": { "semver": {
"version": "5.7.1", "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==" "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
}, },
"uni-captcha": { "uni-captcha": {
"version": "file:../../../../uni-captcha/uniCloud/cloudfunctions/common/uni-captcha", "version": "file:../../../../uni-captcha/uniCloud/cloudfunctions/common/uni-captcha",
"requires": { "requires": {
"uni-config-center": "file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" "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": { "uni-config-center": {
...@@ -125,23 +286,13 @@ ...@@ -125,23 +286,13 @@
"uni-id-common": { "uni-id-common": {
"version": "file:../../../../uni-id-common/uniCloud/cloudfunctions/common/uni-id-common", "version": "file:../../../../uni-id-common/uniCloud/cloudfunctions/common/uni-id-common",
"requires": { "requires": {
"uni-config-center": "file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" "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-open-bridge-common": { "uni-open-bridge-common": {
"version": "file:../../../../uni-open-bridge-common/uniCloud/cloudfunctions/common/uni-open-bridge-common", "version": "file:../../../../uni-open-bridge-common/uniCloud/cloudfunctions/common/uni-open-bridge-common",
"requires": { "requires": {
"uni-config-center": "file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" "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"
}
} }
} }
} }
......
{ {
"name": "uni-id-co", "name": "uni-id-co",
"version": "1.0.12", "version": "1.0.15",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"keywords": [], "keywords": [],
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
}, },
"network_model": { "network_model": {
"bsonType": "string", "bsonType": "string",
"description": "设备网络型号wifi/3G/4G/" "description": "设备网络型号wifi\/3G\/4G\/"
}, },
"window_width": { "window_width": {
"bsonType": "string", "bsonType": "string",
......
{ {
"bsonType": "object", "bsonType": "object",
"required": ["user_id"],
"permission": {
"read": "'READ_UNI_ID_LOG' in auth.permission"
},
"properties": { "properties": {
"_id": { "_id": {
"description": "ID,系统自动生成" "description": "ID,系统自动生成"
...@@ -44,6 +48,7 @@ ...@@ -44,6 +48,7 @@
}, },
"user_id": { "user_id": {
"bsonType": "string", "bsonType": "string",
"foreignKey": "uni-id-users._id",
"description": "用户id,参考uni-id-users表" "description": "用户id,参考uni-id-users表"
}, },
"username": { "username": {
...@@ -62,6 +67,5 @@ ...@@ -62,6 +67,5 @@
"bsonType": "string", "bsonType": "string",
"description": "客户端DCloud AppId" "description": "客户端DCloud AppId"
} }
}, }
"required": []
} }
{ {
"bsonType": "object", "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": { "properties": {
"_id": { "_id": {
"description": "存储文档 ID,系统自动生成" "description": "存储文档 ID,系统自动生成"
...@@ -41,9 +48,5 @@ ...@@ -41,9 +48,5 @@
"title": "权限名称", "title": "权限名称",
"trim": "both" "trim": "both"
} }
}, }
"required": [
"permission_id",
"permission_name"
]
} }
{ {
"bsonType": "object", "bsonType": "object",
"required": ["role_id", "role_name"],
"permission": { "permission": {
"create": false, "read": "'READ_UNI_ID_ROLES' in auth.permission",
"delete": false, "create": "'CREATE_UNI_ID_ROLES' in auth.permission",
"read": false, "update": "'UPDATE_UNI_ID_ROLES' in auth.permission",
"update": false "delete": "'DELETE_UNI_ID_ROLES' in auth.permission"
}, },
"properties": { "properties": {
"_id": { "_id": {
"description": "存储文档 ID,系统自动生成" "description": "存储文档 ID,系统自动生成"
}, },
"comment": { "comment": {
"title": "备注",
"bsonType": "string", "bsonType": "string",
"description": "备注", "description": "备注",
"title": "备注",
"trim": "both" "trim": "both"
}, },
"create_date": { "create_date": {
...@@ -24,25 +25,26 @@ ...@@ -24,25 +25,26 @@
} }
}, },
"permission": { "permission": {
"title": "权限",
"bsonType": "array", "bsonType": "array",
"description": "角色拥有的权限列表",
"foreignKey": "uni-id-permissions.permission_id", "foreignKey": "uni-id-permissions.permission_id",
"title": "权限" "description": "角色拥有的权限列表",
"enum": {
"collection": "uni-id-permissions",
"field": "permission_name as text, permission_id as value"
}
}, },
"role_id": { "role_id": {
"title": "唯一ID",
"bsonType": "string", "bsonType": "string",
"description": "角色唯一标识,不可修改,不允许重复", "description": "角色唯一标识,不可修改,不允许重复",
"title": "唯一ID",
"trim": "both" "trim": "both"
}, },
"role_name": { "role_name": {
"title": "名称",
"bsonType": "string", "bsonType": "string",
"description": "角色名称", "description": "角色名称",
"title": "名称",
"trim": "both" "trim": "both"
} }
}, }
"required": [
"role_id"
]
} }
{ {
"bsonType": "object", "bsonType": "object",
"required": ["username", "password"],
"permission": { "permission": {
"update": "doc._id == auth.uid", "read": true,
"read": "doc._id == auth.uid" "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": { "properties": {
"_id": { "_id": {
...@@ -12,14 +15,16 @@ ...@@ -12,14 +15,16 @@
"bsonType": "string", "bsonType": "string",
"description": "支付宝平台openid", "description": "支付宝平台openid",
"permission": { "permission": {
"write": false "write": false,
"read": "doc._id == auth.uid"
} }
}, },
"apple_openid": { "apple_openid": {
"bsonType": "string", "bsonType": "string",
"description": "苹果登录openid", "description": "苹果登录openid",
"permission": { "permission": {
"write": false "write": false,
"read": "doc._id == auth.uid"
} }
}, },
"avatar": { "avatar": {
...@@ -39,7 +44,8 @@ ...@@ -39,7 +44,8 @@
"title": "备注", "title": "备注",
"trim": "both", "trim": "both",
"permission": { "permission": {
"write": false "write": false,
"read": false
} }
}, },
"dcloud_appid": { "dcloud_appid": {
...@@ -47,7 +53,8 @@ ...@@ -47,7 +53,8 @@
"description": "允许登录的客户端的appid列表", "description": "允许登录的客户端的appid列表",
"foreignKey": "opendb-app-list.appid", "foreignKey": "opendb-app-list.appid",
"permission": { "permission": {
"write": false "write": false,
"read": "doc._id == auth.uid"
} }
}, },
"department_id": { "department_id": {
...@@ -61,7 +68,8 @@ ...@@ -61,7 +68,8 @@
"enumType": "tree", "enumType": "tree",
"title": "部门", "title": "部门",
"permission": { "permission": {
"write": false "write": false,
"read": "doc._id == auth.uid"
} }
}, },
"email": { "email": {
...@@ -71,7 +79,8 @@ ...@@ -71,7 +79,8 @@
"title": "邮箱", "title": "邮箱",
"trim": "both", "trim": "both",
"permission": { "permission": {
"write": false "write": false,
"read": "doc._id == auth.uid"
} }
}, },
"email_confirmed": { "email_confirmed": {
...@@ -89,7 +98,8 @@ ...@@ -89,7 +98,8 @@
], ],
"title": "邮箱验证状态", "title": "邮箱验证状态",
"permission": { "permission": {
"write": false "write": false,
"read": "doc._id == auth.uid"
} }
}, },
"gender": { "gender": {
...@@ -111,14 +121,16 @@ ...@@ -111,14 +121,16 @@
], ],
"title": "性别", "title": "性别",
"permission": { "permission": {
"write": false "write": false,
"read": "doc._id == auth.uid"
} }
}, },
"invite_time": { "invite_time": {
"bsonType": "timestamp", "bsonType": "timestamp",
"description": "受邀时间", "description": "受邀时间",
"permission": { "permission": {
"write": false "write": false,
"read": "doc._id == auth.uid"
} }
}, },
"inviter_uid": { "inviter_uid": {
...@@ -126,21 +138,24 @@ ...@@ -126,21 +138,24 @@
"description": "用户全部上级邀请者", "description": "用户全部上级邀请者",
"trim": "both", "trim": "both",
"permission": { "permission": {
"write": false "write": false,
"read": "doc._id == auth.uid"
} }
}, },
"last_login_date": { "last_login_date": {
"bsonType": "timestamp", "bsonType": "timestamp",
"description": "最后登录时间", "description": "最后登录时间",
"permission": { "permission": {
"write": false "write": false,
"read": "doc._id == auth.uid"
} }
}, },
"last_login_ip": { "last_login_ip": {
"bsonType": "string", "bsonType": "string",
"description": "最后登录时 IP 地址", "description": "最后登录时 IP 地址",
"permission": { "permission": {
"write": false "write": false,
"read": "doc._id == auth.uid"
} }
}, },
"mobile": { "mobile": {
...@@ -150,7 +165,8 @@ ...@@ -150,7 +165,8 @@
"title": "手机号码", "title": "手机号码",
"trim": "both", "trim": "both",
"permission": { "permission": {
"write": false "write": false,
"read": "doc._id == auth.uid"
} }
}, },
"mobile_confirmed": { "mobile_confirmed": {
...@@ -168,14 +184,16 @@ ...@@ -168,14 +184,16 @@
], ],
"title": "手机号验证状态", "title": "手机号验证状态",
"permission": { "permission": {
"write": false "write": false,
"read": "doc._id == auth.uid"
} }
}, },
"my_invite_code": { "my_invite_code": {
"bsonType": "string", "bsonType": "string",
"description": "用户自身邀请码", "description": "用户自身邀请码",
"permission": { "permission": {
"write": false "write": false,
"read": "doc._id == auth.uid"
} }
}, },
"nickname": { "nickname": {
...@@ -207,7 +225,8 @@ ...@@ -207,7 +225,8 @@
"bsonType": "object", "bsonType": "object",
"description": "实名认证信息", "description": "实名认证信息",
"permission": { "permission": {
"write": false "write": false,
"read": "doc._id == auth.uid"
}, },
"properties": { "properties": {
"auth_date": { "auth_date": {
...@@ -272,14 +291,16 @@ ...@@ -272,14 +291,16 @@
"bsonType": "timestamp", "bsonType": "timestamp",
"description": "注册时间", "description": "注册时间",
"forceDefaultValue": { "forceDefaultValue": {
"$env": "now" "$env": "now",
"read": "doc._id == auth.uid"
} }
}, },
"register_ip": { "register_ip": {
"bsonType": "string", "bsonType": "string",
"description": "注册时 IP 地址", "description": "注册时 IP 地址",
"forceDefaultValue": { "forceDefaultValue": {
"$env": "clientIP" "$env": "clientIP",
"read": "doc._id == auth.uid"
} }
}, },
"role": { "role": {
...@@ -291,7 +312,8 @@ ...@@ -291,7 +312,8 @@
}, },
"foreignKey": "uni-id-roles.role_id", "foreignKey": "uni-id-roles.role_id",
"permission": { "permission": {
"write": false "write": false,
"read": "doc._id == auth.uid"
}, },
"title": "角色" "title": "角色"
}, },
...@@ -299,7 +321,8 @@ ...@@ -299,7 +321,8 @@
"bsonType": "int", "bsonType": "int",
"description": "用户积分,积分变更记录可参考:uni-id-scores表定义", "description": "用户积分,积分变更记录可参考:uni-id-scores表定义",
"permission": { "permission": {
"write": false "write": false,
"read": "doc._id == auth.uid"
} }
}, },
"status": { "status": {
...@@ -307,7 +330,8 @@ ...@@ -307,7 +330,8 @@
"defaultValue": 0, "defaultValue": 0,
"description": "用户状态:0 正常 1 禁用 2 审核中 3 审核拒绝", "description": "用户状态:0 正常 1 禁用 2 审核中 3 审核拒绝",
"permission": { "permission": {
"write": false "write": false,
"read": "doc._id == auth.uid"
}, },
"enum": [{ "enum": [{
"text": "正常", "text": "正常",
...@@ -330,7 +354,10 @@ ...@@ -330,7 +354,10 @@
}, },
"token": { "token": {
"bsonType": "array", "bsonType": "array",
"description": "用户token" "description": "用户token",
"permission": {
"read": "doc._id == auth.uid"
}
}, },
"username": { "username": {
"bsonType": "string", "bsonType": "string",
...@@ -363,14 +390,16 @@ ...@@ -363,14 +390,16 @@
} }
}, },
"permission": { "permission": {
"write": false "write": false,
"read": "doc._id == auth.uid"
} }
}, },
"wx_unionid": { "wx_unionid": {
"bsonType": "string", "bsonType": "string",
"description": "微信unionid", "description": "微信unionid",
"permission": { "permission": {
"write": false "write": false,
"read": "doc._id == auth.uid"
} }
}, },
"qq_openid": { "qq_openid": {
...@@ -387,16 +416,17 @@ ...@@ -387,16 +416,17 @@
} }
}, },
"permission": { "permission": {
"write": false "write": false,
"read": "doc._id == auth.uid"
} }
}, },
"qq_unionid": { "qq_unionid": {
"bsonType": "string", "bsonType": "string",
"description": "QQ unionid", "description": "QQ unionid",
"permission": { "permission": {
"write": false "write": false,
"read": "doc._id == auth.uid"
}
} }
} }
},
"required": []
} }
...@@ -40,6 +40,18 @@ ...@@ -40,6 +40,18 @@
} }
} }
}, },
"web": {
"oauth": {
"h5-weixin": {
"appid": "微信浏览器内微信登录,所用的微信公众号appid",
"appsecret": "微信公众号后台获取的appsecret"
},
"web-weixin": {
"appid": "手机微信扫码登录,所用的微信开放平台(https://open.weixin.qq.com/)-网站应用的appid",
"appsecret": "微信开放平台-网站应用的appsecret"
}
}
},
"mp-weixin": { "mp-weixin": {
"oauth": { "oauth": {
"weixin": { "weixin": {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册