From c7121fbc55cbfa3cb2bda754d2ca1abe597b0422 Mon Sep 17 00:00:00 2001 From: anne-lxm <1076217653@qq.com> Date: Wed, 24 May 2023 15:30:29 +0800 Subject: [PATCH] update uni-id-users --- package.json | 15 +++++++++------ pages/ucenter/ucenter.test.js | 1 + .../uniCloud/database/uni-id-users.schema.json | 4 ++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index f5dfb49..da2456d 100644 --- a/package.json +++ b/package.json @@ -4,12 +4,12 @@ "version": "2.1.0", "description": "云端一体应用快速开发基本项目模版", "keywords": [ - "login", - "登录", - "搜索", - "uni-id实例", - "留言板" - ], + "login", + "登录", + "搜索", + "uni-id实例", + "留言板" + ], "repository": "https://gitcode.net/dcloud/uni-starter", "engines": { "HBuilderX": "^3.2.6" @@ -83,5 +83,8 @@ }, "dependencies": { "qrcodejs2": "^0.0.2" + }, + "devDependencies": { + "jest-image-snapshot": "^6.1.0" } } diff --git a/pages/ucenter/ucenter.test.js b/pages/ucenter/ucenter.test.js index 19cb815..002152f 100644 --- a/pages/ucenter/ucenter.test.js +++ b/pages/ucenter/ucenter.test.js @@ -66,6 +66,7 @@ describe('pages/ucenter/ucenter.vue', () => { it('我的积分', async () => { if(uniToken){ const getScoreRes = await page.callMethod('getScore') + await page.waitFor(500) console.log("getScoreRes: ", getScoreRes); if (getScoreRes && getScoreRes.score) { console.log("已登录--今日已签到"); 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 897b616..20a9be9 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 @@ -32,7 +32,7 @@ "title": "头像地址", "trim": "both", "permission": { - "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission", + "read": true, "write": "doc._id == auth.uid || 'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission" } }, @@ -41,7 +41,7 @@ "description": "用file类型方便使用uni-file-picker组件", "title": "头像文件", "permission": { - "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission", + "read": true, "write": "doc._id == auth.uid || 'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission" } }, -- GitLab