diff --git a/package.json b/package.json index f5dfb49f28f5f7cf776581fdae95d05ab3c9d236..da2456dde0d055873c3bb0dedcb5b5586f0891a2 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 19cb815c9e0a5047f16ec2f2b71e74ed645073a9..002152f3620c46e3b548f07d22a9f6eeda52ad2a 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 897b616c0ad0f2fdbe746c26d00999f153f50c45..20a9be9eef2a8ce54f22c3464936771b39ba2e72 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" } },