diff --git a/changelog.md b/changelog.md index de78e1779dae47106d8ff493e4544a833aa5dab4..9a0c9b3f723e2664f4419bc4febb1c4e38c75d14 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,6 @@ +## 1.0.29(2021-06-29) +1. 修复在安卓10以下设备,操作登陆获取不到oaid会直接导致登陆失败的bug +2. 修复uniCloud版本为阿里云版时删除头像设置失败,腾讯云版删除头像后二次上传失败的问题 ## 1.0.28(2021-06-28) 修复云函数uni-id-cf的resetPwdBySmsCode接口,未注册过的用户也能调用的问题 ## 1.0.27(2021-06-25) diff --git a/common/appInit.js b/common/appInit.js index 42a4c60d2d3e35728434e6185526ffde1bd707b1..8b005efc2e4d646bdcbf2ae3e85598fc01972619 100644 --- a/common/appInit.js +++ b/common/appInit.js @@ -8,7 +8,6 @@ import interceptorChooseImage from '@/uni_modules/json-interceptor-chooseImage/j // #endif const db = uniCloud.database() export default function() { - // #ifndef H5 setTimeout(()=>{ // #endif @@ -80,7 +79,7 @@ export default function() { // console.log('getOAID success: '+JSON.stringify(e)); }, fail:function(e){ - fail() + callBack() console.log('getOAID failed: '+JSON.stringify(e)); } }); @@ -97,7 +96,7 @@ export default function() { // console.log('getOAID success: '+JSON.stringify(e)); }, fail:function(e){ - fail() + callBack() console.log('getOAID failed: '+JSON.stringify(e)); } }); @@ -105,11 +104,24 @@ export default function() { callBack() } }) + + let push_clientid = '', + idfa = plus.storage.getItem('idfa')||'';//idfa有需要的用户在应用首次启动时自己获取存储到storage中 + + try{ + push_clientid = plus.push.getClientInfo().clientid + }catch(e){ + uni.showModal({ + content: '获取推送标识失败。如果你的应用不需要推送功能,请注释掉本代码块', + showCancel: false, + confirmText:"好的" + }); + console.log(e) + } + let deviceInfo = { - "push_clientid":plus.push.getClientInfo().clientid,// 获取匿名设备标识符 - "imei":imei, - "oaid":oaid, - "idfa":plus.storage.getItem('idfa')||'' //idfa有需要的用户在应用首次启动时自己获取存储到storage中 + push_clientid,// 获取匿名设备标识符 + imei,oaid,idfa } console.log("重新登陆/注册,获取设备id",deviceInfo); option.data.deviceInfo = deviceInfo @@ -148,11 +160,11 @@ export default function() { }, fail(e) { // 失败回调拦截 if(Debug){ - console.log(e); uni.showModal({ - content: JSON.stringify(e), + content:JSON.stringify(e), showCancel: false }); + console.error(e); }else{ uni.showModal({ content: "系统错误请稍后再试!", diff --git a/package.json b/package.json index 90d1037cb6d8efa9b77d11ab9c5871b745448896..a79f51819f6930d176d2e6a83e292d5c788e7782 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "id": "uni-starter", "displayName": "uni-starter", - "version": "1.0.28", + "version": "1.0.29", "description": "云端一体应用快速开发基本项目模版", "keywords": [ "uni-starter", diff --git a/pages/ucenter/userinfo/userinfo.vue b/pages/ucenter/userinfo/userinfo.vue index 363861e3e84a8d43185474b2c1cf614c65d04db3..d7aa1be4b7e989766b01820a83980302e39f5d1c 100644 --- a/pages/ucenter/userinfo/userinfo.vue +++ b/pages/ucenter/userinfo/userinfo.vue @@ -31,13 +31,6 @@ export default { data() { return { - avatar_file: { - "extname": "jpg", - "fileType": "image", - "name": "707756af-e9a9-4d08-8db9-5d1f34b84ea6.jpg", - "size": 98513, - "url": "cloud://tcb-lseqkmkcq0w1wzwcb18f3-be0d77.7463-tcb-lseqkmkcq0w1wzwcb18f3-be0d77-1304530278/1624523618672_0.jpg" - }, univerifyStyle: { authButton: { "title": "本机号码一键绑定", // 授权按钮文案 @@ -62,12 +55,13 @@ ...mapGetters({ userInfo: 'user/info', login: 'user/hasLogin' - }) + }), + avatar_file(){ + if(this.userInfo.avatar_file&&this.userInfo.avatar_file.url){ + return this.userInfo.avatar_file + } + } }, - onLoad() { - this.avatar_file = this.userInfo.avatar_file - console.log(this.avatar_file); - }, methods: { ...mapMutations({ setUserInfo: 'user/login' @@ -163,7 +157,13 @@ } }, removeAvatar(){ - this.setAvatarFile(null) + this.setAvatarFile({ + "extname": "jpg", + "fileType": "image", + "name": "", + "size": 0, + "url": "" + }) }, setAvatarFile(avatar_file){ uni.showLoading({ @@ -186,7 +186,6 @@ title: '删除成功' }) } - this.avatar_file = avatar_file this.setUserInfo({ avatar_file }); @@ -213,10 +212,10 @@ console.log(res); let tempFile = res.tempFiles[0], avatar_file = { - // #ifndef APP-PLUS + // #ifdef H5 extname:tempFile.name.split('.')[tempFile.name.split('.').length-1], // #endif - // #ifdef APP-PLUS + // #ifndef H5 extname:tempFile.path.split('.')[tempFile.path.split('.').length-1] // #endif }, diff --git a/uni_modules_tools/copy/manifest.json b/uni_modules_tools/copy/manifest.json index 14c5b65a6ed1eea0989fe62dae70232152082549..bace7b21c8ebfd2580676ed046bf31d9c749722c 100644 --- a/uni_modules_tools/copy/manifest.json +++ b/uni_modules_tools/copy/manifest.json @@ -1,6 +1,6 @@ { "name" : "uni-starter", - "appid" : "__UNI__7D0D57D", + "appid" : "__UNI__E5373F7", "description" : "云端一体应用快速开发模版", "versionName" : "1.0.0", "versionCode" : "100", 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 23349ef3c7bdfd1688b5613582dae27651675f3d..0c7975cff914bc230489e73fd44f995774528a8f 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 @@ -24,7 +24,7 @@ "oauth": { "weixin": { "appid": "wx81dbb061d2258234", - "appsecret": "04478a5719d0ae70c7e3023bc8078410" + "appsecret": "51977820eb14cd71377d4048a1b4754e" } } },