diff --git a/App.vue b/App.vue index 1f641bbcef262341bb791e859b62dfa5d67db4c2..70062a151fda953547a58a3b3cd4f884c418ef05 100644 --- a/App.vue +++ b/App.vue @@ -13,7 +13,6 @@ }, onLaunch: function() { console.log('App Launch') - this.globalData.$i18n = this.$i18n this.globalData.$t = str => this.$t(str) @@ -43,7 +42,7 @@ // #endif let initLanguageAfter = () => { - console.log(this.$t('tabbar')); + console.log('作用于多语言国际化功能,这里获取语言包lang/en.js、lang/zh-Hans.js的tabbar中配置的值更新当前应用的底部tabbar,如果你不需要多语言国际化。直接删除App.vue页面的47-55行即可'); //底部tabbar更新 this.$t('tabbar').split(',').forEach((text, index) => { uni.setTabBarItem({ @@ -55,29 +54,29 @@ }) }) //更新 uni-starter.config - //agreements - let agreements = [{ - "title": "用户服务协议", //协议名称 + //agreements + let agreements = [{ + "title": "用户服务协议", //协议名称 + "url": "请填写用户服务协议链接" //对应的网络链接 + }, + { + "title": "隐私政策", + "url": "请填写隐私政策链接" + } + ] + if(getApp().globalData.$i18n.locale == 'en'){ + agreements = [{ + "title": "User service agreement", //协议名称 "url": "请填写用户服务协议链接" //对应的网络链接 }, { - "title": "隐私政策", + "title": "Privacy policy", "url": "请填写隐私政策链接" } ] - if(getApp().globalData.$i18n.locale == 'en'){ - agreements = [{ - "title": "User service agreement", //协议名称 - "url": "请填写用户服务协议链接" //对应的网络链接 - }, - { - "title": "Privacy policy", - "url": "请填写隐私政策链接" - } - ] - } - // console.log(getApp().globalData.config) - getApp().globalData.config.about.agreements = agreements + } + // console.log(getApp().globalData.config) + getApp().globalData.config.about.agreements = agreements } setTimeout(()=>{ initLanguageAfter() diff --git a/changelog.md b/changelog.md index 5815b1bc30969ff81a637c7372bf13dfaaa46e45..39b7699b994d77d2a145d4c1bf18ad90c6afae93 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,5 @@ +## 1.1.6(2021-09-13) +纠正错误schema权限表达式`doc.uid`为`doc.user_id` ## 1.1.5(2021-09-01) 为了更直观理解路由拦截。移除路由拦截器中,默认过滤登陆相关页面拦截的逻辑。确保所有白名单页面均在配置文件router.visitor中体现 ## 1.1.4(2021-08-31) diff --git a/manifest.json b/manifest.json index d70cfa7f98905d0be7383e5e6f28c6021ce8679b..4d879fd5fcf5992447dcc80fb0537df32123c8b2 100644 --- a/manifest.json +++ b/manifest.json @@ -221,4 +221,4 @@ } //... // 中文(简体) -// 应用名称 \ No newline at end of file +// 应用名称 diff --git a/package.json b/package.json index f7c51cf2e9d49e590bd725b8c60b64c36bfeb06e..f3255627a801f1a6762a148d1d0bd7952d2e17f9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "id": "uni-starter", "displayName": "uni-starter", - "version": "1.1.5", + "version": "1.1.6", "description": "云端一体应用快速开发基本项目模版", "keywords": [ "login", diff --git a/uniCloud-aliyun/database/guestbook.schema.json b/uniCloud-aliyun/database/guestbook.schema.json index b7fbe6b9894ccaac6a93f3d78a217d5b555afbdb..2c2fc4aec2dd2b205d116eadca22fe0f3da00ed9 100644 --- a/uniCloud-aliyun/database/guestbook.schema.json +++ b/uniCloud-aliyun/database/guestbook.schema.json @@ -3,19 +3,19 @@ "bsonType": "object", "required": [], "permission": { - "read": "doc.state || auth.uid == doc.uid || 'AUDITOR' in auth.role", + "read": "doc.state || auth.uid == doc.user_id || 'AUDITOR' in auth.role", "create": "auth.uid != null", "update": true, - "delete": "auth.uid == doc.uid" + "delete": "auth.uid == doc.user_id" }, "properties": { "_id": { "description": "ID,系统自动生成" }, "text": { - "bsonType": "string", - "permission":{ - "update":"'AUDITOR' in auth.role" + "bsonType": "string", + "permission":{ + "update":"'AUDITOR' in auth.role" } }, "user_id": { diff --git a/uniCloud-aliyun/database/opendb-news-articles-detail.schema.json b/uniCloud-aliyun/database/opendb-news-articles-detail.schema.json index 0e48ba8da70f5abdf2b37d52ea84fb323ce0150f..92071076b6c990f1a9822c4691277db84a029c86 100644 --- a/uniCloud-aliyun/database/opendb-news-articles-detail.schema.json +++ b/uniCloud-aliyun/database/opendb-news-articles-detail.schema.json @@ -2,9 +2,9 @@ "bsonType": "object", "permission": { "create": "auth.uid != null", - "delete": "doc.uid == auth.uid", + "delete": "doc.user_id == auth.uid", "read": true, - "update": "doc.uid == auth.uid" + "update": "doc.user_id == auth.uid" }, "properties": { "_id": { diff --git a/uniCloud-aliyun/database/opendb-news-articles.schema.json b/uniCloud-aliyun/database/opendb-news-articles.schema.json index 07b046a872426f4efae0a06296346a865cb8277b..2b966278cc08859247866c567b053e57efcdf3ea 100644 --- a/uniCloud-aliyun/database/opendb-news-articles.schema.json +++ b/uniCloud-aliyun/database/opendb-news-articles.schema.json @@ -2,10 +2,10 @@ "bsonType": "object", "required": ["user_id", "title", "content"], "permission": { - "read": "doc.article_status == 1", + "read": false, "create": "auth.uid != null", - "update": "doc.uid == auth.uid", - "delete": "doc.uid == auth.uid" + "update": "doc.user_id == auth.uid", + "delete": "doc.user_id == auth.uid" }, "properties": { "_id": { diff --git a/uniCloud-aliyun/database/opendb-news-comments.schema.json b/uniCloud-aliyun/database/opendb-news-comments.schema.json index b5612ec537047326a5bff04dbc6aa956d7653712..c4aa84ebd255ca1c6da48dd7bbfbfdb6d17d5730 100644 --- a/uniCloud-aliyun/database/opendb-news-comments.schema.json +++ b/uniCloud-aliyun/database/opendb-news-comments.schema.json @@ -6,8 +6,8 @@ "permission": { "read": true, "create": "auth.uid != null && get(`database.opendb-news-article.${doc.article_id}`).comment_status == 1", - "update": "doc.uid == auth.uid", - "delete": "doc.uid == auth.uid" + "update": "doc.user_id == auth.uid", + "delete": "doc.user_id == auth.uid" }, "properties": { "_id": { @@ -65,4 +65,4 @@ } } } -} +} diff --git a/uniCloud-aliyun/database/opendb-news-favorite.schema.json b/uniCloud-aliyun/database/opendb-news-favorite.schema.json index 0c9376be0bacfe17b1b86f8d426c054abfce1d26..88b285a6b27dc1a6edbc4942f148a4f33d0ec456 100644 --- a/uniCloud-aliyun/database/opendb-news-favorite.schema.json +++ b/uniCloud-aliyun/database/opendb-news-favorite.schema.json @@ -2,10 +2,10 @@ "bsonType": "object", "required": ["user_id", "article_id"], "permission": { - "read": "doc.uid == auth.uid", + "read": "doc.user_id == auth.uid", "create": "auth.uid != null", - "update": "doc.uid == auth.uid", - "delete": "doc.uid == auth.uid" + "update": "doc.user_id == auth.uid", + "delete": "doc.user_id == auth.uid" }, "properties": { "_id": { @@ -43,4 +43,4 @@ } } } -} +} diff --git a/uniCloud-aliyun/database/read-news-log.schema.json b/uniCloud-aliyun/database/read-news-log.schema.json index 02c6a323781abca4d2d6f2f9fc8ec48cc0e7c457..17efd4b4f8ccad6c626989361df6bdf1c0a9b023 100644 --- a/uniCloud-aliyun/database/read-news-log.schema.json +++ b/uniCloud-aliyun/database/read-news-log.schema.json @@ -2,10 +2,10 @@ "bsonType": "object", "required": ["user_id", "article_id"], "permission": { - "read": "doc.uid == auth.uid", + "read": "doc.user_id == auth.uid", "create": "auth.uid != null", - "update": "doc.uid == auth.uid" - //"delete": "doc.uid == auth.uid" + "update": "doc.user_id == auth.uid" + //"delete": "doc.user_id == auth.uid" }, "properties": { "_id": { @@ -32,4 +32,4 @@ } } } -} +} diff --git a/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json b/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json index bfc8dbfa9fe1f4088ab844a5dfa8280f044cd218..17500c4c354799821de17837f0cbce79e080fa33 100644 --- a/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json +++ b/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json @@ -4,7 +4,7 @@ "tokenExpiresIn": 7200, "tokenExpiresThreshold": 600, "passwordErrorLimit": 6, - "bindTokenToDevice": true, + "bindTokenToDevice": false, "passwordErrorRetryTime": 3600, "autoSetInviteCode": false, "forceInviteCode": false, diff --git a/uni_modules_tools/copy/manifest.json b/uni_modules_tools/copy/manifest.json index 4d879fd5fcf5992447dcc80fb0537df32123c8b2..f4b3f42e2e016e8af5c74c005b851314e1bbc0d3 100644 --- a/uni_modules_tools/copy/manifest.json +++ b/uni_modules_tools/copy/manifest.json @@ -1,224 +1,204 @@ { - "name": "统一应用基本项目", - "appid": "请点击重新获取", - "description": "云端一体应用快速开发模版", - "versionName": "1.0.0", - "versionCode": "100", - "transformPx": false, - "app-plus": { - "locales": { - "en": { + "name" : "统一应用基本项目", + "appid" : "__UNI__E5373F7", + "description" : "云端一体应用快速开发模版", + "versionName" : "1.0.0", + "versionCode" : "100", + "transformPx" : false, + "app-plus" : { + "locales" : { + "en" : { // 英文 - "name": "uni-starter", // 应用名称 - "android": { - "strings": { + "name" : "uni-starter", // 应用名称 + "android" : { + "strings" : { //Android平台自定义字符串 - "CustomKey": "CustomValue" - } - }, - "ios": { - "privacyDescription": { + "CustomKey" : "CustomValue" + } + }, + "ios" : { + "privacyDescription" : { //iOS平台隐私访问描述信息 - "NSPhotoLibraryUsageDescription": "access to the user’s photo library(read)" - }, - "infoPlist": { + "NSPhotoLibraryUsageDescription" : "access to the user’s photo library(read)" + }, + "infoPlist" : { //iOS平台自定义InfoPlist.strings - "CustomKey": "CustomValue" - } - } - }, - "zh": { + "CustomKey" : "CustomValue" + } + } + }, + "zh" : { // 中文(简体) - "name": "统一应用基本项目" // 应用名称 - } - }, - "privacy": { - "prompt": "template", - "template": { - "title": "服务协议和隐私政策", - "message": "  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。
  你可阅读《服务协议》《隐私政策》了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。", - "buttonAccept": "同意", - "buttonRefuse": "暂不同意" - } - }, - "compatible": { - "ignoreVersion": true - }, - "usingComponents": true, - "nvueStyleCompiler": "uni-app", - "compilerVersion": 3, - "splashscreen": { - "alwaysShowBeforeRender": false, - "waiting": true, - "autoclose": true, - "delay": 0 - }, - "modules": { - "Fingerprint": { - }, - "Share": { - }, - "OAuth": { - }, - "FaceID": { - }, - "Push": { - }, - "Geolocation": { - } - }, - "distribute": { - "android": { - "permissions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "abiFilters": [ - "armeabi-v7a", - "arm64-v8a", - "x86" - ] - }, - "ios": { - "capabilities": { - "entitlements": { - "com.apple.developer.associated-domains": [ - "applinks:static-76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e.bspapp.com" - ] - } - } - }, - "sdkConfigs": { - "oauth": { - "apple": { - }, - "weixin": { - "appid": "", - "appsecret": "", - "UniversalLinks": "" - }, - "univerify": { - } + "name" : "统一应用基本项目" // 应用名称 + } }, - "ad": { + "privacy" : { + "prompt" : "template", + "template" : { + "title" : "服务协议和隐私政策", + "message" : "  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。
  你可阅读《服务协议》《隐私政策》了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。", + "buttonAccept" : "同意", + "buttonRefuse" : "暂不同意" + } }, - "share": { - "weixin": { - "appid": "", - "UniversalLinks": "" - } + "compatible" : { + "ignoreVersion" : true }, - "geolocation": { - "baidu": { - "__platform__": [ - "ios", - "android" - ], - "appkey_ios": "请填写地图的key", - "appkey_android": "请填写地图的key" - } + "usingComponents" : true, + "nvueStyleCompiler" : "uni-app", + "compilerVersion" : 3, + "splashscreen" : { + "alwaysShowBeforeRender" : false, + "waiting" : true, + "autoclose" : true, + "delay" : 0 }, - "push": { - "unipush": { - } + "modules" : { + "Fingerprint" : {}, + "Share" : {}, + "OAuth" : {}, + "FaceID" : {}, + "Push" : {}, + "Geolocation" : {} }, - "payment": { - } - }, - "icons": { - "android": { - "hdpi": "", - "xhdpi": "", - "xxhdpi": "", - "xxxhdpi": "" + "distribute" : { + "android" : { + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ] + }, + "ios" : { + "capabilities" : { + "entitlements" : { + "com.apple.developer.associated-domains" : [ "applinks:static-76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e.bspapp.com" ] + } + } + }, + "sdkConfigs" : { + "oauth" : { + "apple" : {}, + "weixin" : { + "appid" : "wxffdd8fa6ec4ef2a0", + "appsecret" : "", + "UniversalLinks" : "" + }, + "univerify" : {} + }, + "ad" : {}, + "share" : { + "weixin" : { + "appid" : "wxffdd8fa6ec4ef2a0", + "UniversalLinks" : "" + } + }, + "geolocation" : { + "baidu" : { + "__platform__" : [ "ios", "android" ], + "appkey_ios" : "请填写地图的key", + "appkey_android" : "请填写地图的key" + } + }, + "push" : { + "unipush" : {} + }, + "payment" : {} + }, + "icons" : { + "android" : { + "hdpi" : "", + "xhdpi" : "", + "xxhdpi" : "", + "xxxhdpi" : "" + }, + "ios" : { + "appstore" : "", + "ipad" : { + "app" : "", + "app@2x" : "", + "notification" : "", + "notification@2x" : "", + "proapp@2x" : "", + "settings" : "", + "settings@2x" : "", + "spotlight" : "", + "spotlight@2x" : "" + }, + "iphone" : { + "app@2x" : "", + "app@3x" : "", + "notification@2x" : "", + "notification@3x" : "", + "settings@2x" : "", + "settings@3x" : "", + "spotlight@2x" : "", + "spotlight@3x" : "" + } + } + }, + "splashscreen" : { + "iosStyle" : "common", + "androidStyle" : "common" + } + }, + "nvueLaunchMode" : "" + }, + "quickapp" : {}, + "mp-weixin" : { + "appid" : "", + "setting" : { + "urlCheck" : false, + "es6" : false }, - "ios": { - "appstore": "", - "ipad": { - "app": "", - "app@2x": "", - "notification": "", - "notification@2x": "", - "proapp@2x": "", - "settings": "", - "settings@2x": "", - "spotlight": "", - "spotlight@2x": "" - }, - "iphone": { - "app@2x": "", - "app@3x": "", - "notification@2x": "", - "notification@3x": "", - "settings@2x": "", - "settings@3x": "", - "spotlight@2x": "", - "spotlight@3x": "" - } + "usingComponents" : true, + "betterScopedSlots" : true, + "permission" : { + "scope.userLocation" : { + "desc" : "演示在onShow生命周期获取地理位置" + } } - }, - "splashscreen": { - "iosStyle": "common", - "androidStyle": "common" - } }, - "nvueLaunchMode": "" - }, - "quickapp": { - }, - "mp-weixin": { - "appid": "", - "setting": { - "urlCheck": false, - "es6": false + "mp-alipay" : { + "usingComponents" : true + }, + "mp-baidu" : { + "usingComponents" : true }, - "usingComponents": true, - "betterScopedSlots": true, - "permission": { - "scope.userLocation": { - "desc": "演示在onShow生命周期获取地理位置" - } - } - }, - "mp-alipay": { - "usingComponents": true - }, - "mp-baidu": { - "usingComponents": true - }, - "mp-toutiao": { - "usingComponents": true - }, - "uniStatistics": { - "enable": false - }, - "h5": { - "template": "", - "sdkConfigs": { - "maps": { - "qqmap": { - "key": "" + "mp-toutiao" : { + "usingComponents" : true + }, + "uniStatistics" : { + "enable" : false + }, + "h5" : { + "template" : "", + "sdkConfigs" : { + "maps" : { + "qqmap" : { + "key" : "" + } + } } - } - } - }, - "_spaceID": "", - "vueVersion": "2" + }, + "_spaceID" : "", + "vueVersion" : "2" } //... // 中文(简体) // 应用名称 + diff --git a/uni_modules_tools/copy/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json b/uni_modules_tools/copy/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json index bfc8dbfa9fe1f4088ab844a5dfa8280f044cd218..1d308ea6f8a860fd5629f104e78464e860fd456c 100644 --- a/uni_modules_tools/copy/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json +++ b/uni_modules_tools/copy/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json @@ -1,52 +1,52 @@ -{ - "passwordSecret": "passwordSecret-demo", - "tokenSecret": "tokenSecret-demo", - "tokenExpiresIn": 7200, - "tokenExpiresThreshold": 600, - "passwordErrorLimit": 6, - "bindTokenToDevice": true, - "passwordErrorRetryTime": 3600, - "autoSetInviteCode": false, - "forceInviteCode": false, - "app-plus": { - "tokenExpiresIn": 2592000, - "oauth": { - "weixin": { - "appid": "填写来源微信开放平台https://open.weixin.qq.com/创建的应用的appid", - "appsecret": "填写来源微信开放平台https://open.weixin.qq.com/创建的应用的appsecret" - }, - "apple": { - "bundleId": "苹果开发者后台获取的bundleId" - } - } - }, - "mp-weixin": { - "oauth": { - "weixin": { - "appid": "微信小程序登录所用的appid、appsecret需要在对应的小程序管理控制台获取", - "appsecret": "微信小程序后台获取的appsecret" - } - } - }, - "mp-alipay": { - "oauth": { - "alipay": { - "appid": "支付宝小程序登录用到的appid、privateKey请参考支付宝小程序的文档进行设置或者获取,https://opendocs.alipay.com/open/291/105971#LDsXr", - "privateKey": "支付宝小程序登录用到的appid、privateKey请参考支付宝小程序的文档进行设置或者获取,https://opendocs.alipay.com/open/291/105971#LDsXr" - } - } - }, - "service": { - "sms": { - "name": "应用名称,对应短信模版的name", - "codeExpiresIn": 300, - "smsKey": "短信密钥key,开通短信服务处可以看到", - "smsSecret": "短信密钥secret,开通短信服务处可以看到" - }, - "univerify": { - "appid": "当前应用的appid,使用云函数URL化,此项必须配置", - "apiKey": "apiKey 和 apiSecret 在开发者中心获取,开发者中心:https://dev.dcloud.net.cn/uniLogin/index?type=0,文档:https://ask.dcloud.net.cn/article/37965", - "apiSecret": "" - } - } -} \ No newline at end of file +{ + "passwordSecret": "passwordSecret-demo", + "tokenSecret": "tokenSecret-demo", + "tokenExpiresIn": 7200, + "tokenExpiresThreshold": 600, + "passwordErrorLimit": 6, + "bindTokenToDevice": false, + "passwordErrorRetryTime": 3600, + "autoSetInviteCode": false, + "forceInviteCode": false, + "app-plus": { + "tokenExpiresIn": 2592000, + "oauth": { + "weixin": { + "appid": "wxffdd8fa6ec4ef2a0", + "appsecret": "6c9119430d7be0a147bcbbb73ef33acf" + }, + "apple": { + "bundleId": "苹果开发者后台获取的bundleId" + } + } + }, + "mp-weixin": { + "oauth": { + "weixin": { + "appid": "wx81dbb061d2258234", + "appsecret": "51977820eb14cd71377d4048a1b4754e" + } + } + }, + "mp-alipay": { + "oauth": { + "alipay": { + "appid": "支付宝小程序登录用到的appid、privateKey请参考支付宝小程序的文档进行设置或者获取,https://opendocs.alipay.com/open/291/105971#LDsXr", + "privateKey": "支付宝小程序登录用到的appid、privateKey请参考支付宝小程序的文档进行设置或者获取,https://opendocs.alipay.com/open/291/105971#LDsXr" + } + } + }, + "service": { + "sms": { + "name": "应用名称,对应短信模版的name", + "codeExpiresIn": 300, + "smsKey": "短信密钥key,开通短信服务处可以看到", + "smsSecret": "短信密钥secret,开通短信服务处可以看到" + }, + "univerify": { + "appid": "当前应用的appid,使用云函数URL化,此项必须配置", + "apiKey": "apiKey 和 apiSecret 在开发者中心获取,开发者中心:https://dev.dcloud.net.cn/uniLogin/index?type=0,文档:https://ask.dcloud.net.cn/article/37965", + "apiSecret": "" + } + } +}