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

1. 修复在安卓10以下设备,操作登陆获取不到oaid会直接导致登陆失败的bug 2. 修复uniCloud版本为阿里云版时删除头像设置失败,腾讯云版删除头像后二次上传失败的问题

上级 a0044ec1
## 1.0.29(2021-06-29)
1. 修复在安卓10以下设备,操作登陆获取不到oaid会直接导致登陆失败的bug
2. 修复uniCloud版本为阿里云版时删除头像设置失败,腾讯云版删除头像后二次上传失败的问题
## 1.0.28(2021-06-28) ## 1.0.28(2021-06-28)
修复云函数uni-id-cf的resetPwdBySmsCode接口,未注册过的用户也能调用的问题 修复云函数uni-id-cf的resetPwdBySmsCode接口,未注册过的用户也能调用的问题
## 1.0.27(2021-06-25) ## 1.0.27(2021-06-25)
......
...@@ -8,7 +8,6 @@ import interceptorChooseImage from '@/uni_modules/json-interceptor-chooseImage/j ...@@ -8,7 +8,6 @@ import interceptorChooseImage from '@/uni_modules/json-interceptor-chooseImage/j
// #endif // #endif
const db = uniCloud.database() const db = uniCloud.database()
export default function() { export default function() {
// #ifndef H5 // #ifndef H5
setTimeout(()=>{ setTimeout(()=>{
// #endif // #endif
...@@ -80,7 +79,7 @@ export default function() { ...@@ -80,7 +79,7 @@ export default function() {
// console.log('getOAID success: '+JSON.stringify(e)); // console.log('getOAID success: '+JSON.stringify(e));
}, },
fail:function(e){ fail:function(e){
fail() callBack()
console.log('getOAID failed: '+JSON.stringify(e)); console.log('getOAID failed: '+JSON.stringify(e));
} }
}); });
...@@ -97,7 +96,7 @@ export default function() { ...@@ -97,7 +96,7 @@ export default function() {
// console.log('getOAID success: '+JSON.stringify(e)); // console.log('getOAID success: '+JSON.stringify(e));
}, },
fail:function(e){ fail:function(e){
fail() callBack()
console.log('getOAID failed: '+JSON.stringify(e)); console.log('getOAID failed: '+JSON.stringify(e));
} }
}); });
...@@ -105,11 +104,24 @@ export default function() { ...@@ -105,11 +104,24 @@ export default function() {
callBack() 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 = { let deviceInfo = {
"push_clientid":plus.push.getClientInfo().clientid,// 获取匿名设备标识符 push_clientid,// 获取匿名设备标识符
"imei":imei, imei,oaid,idfa
"oaid":oaid,
"idfa":plus.storage.getItem('idfa')||'' //idfa有需要的用户在应用首次启动时自己获取存储到storage中
} }
console.log("重新登陆/注册,获取设备id",deviceInfo); console.log("重新登陆/注册,获取设备id",deviceInfo);
option.data.deviceInfo = deviceInfo option.data.deviceInfo = deviceInfo
...@@ -148,11 +160,11 @@ export default function() { ...@@ -148,11 +160,11 @@ export default function() {
}, },
fail(e) { // 失败回调拦截 fail(e) { // 失败回调拦截
if(Debug){ if(Debug){
console.log(e);
uni.showModal({ uni.showModal({
content: JSON.stringify(e), content:JSON.stringify(e),
showCancel: false showCancel: false
}); });
console.error(e);
}else{ }else{
uni.showModal({ uni.showModal({
content: "系统错误请稍后再试!", content: "系统错误请稍后再试!",
......
{ {
"id": "uni-starter", "id": "uni-starter",
"displayName": "uni-starter", "displayName": "uni-starter",
"version": "1.0.28", "version": "1.0.29",
"description": "云端一体应用快速开发基本项目模版", "description": "云端一体应用快速开发基本项目模版",
"keywords": [ "keywords": [
"uni-starter", "uni-starter",
......
...@@ -31,13 +31,6 @@ ...@@ -31,13 +31,6 @@
export default { export default {
data() { data() {
return { 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: { univerifyStyle: {
authButton: { authButton: {
"title": "本机号码一键绑定", // 授权按钮文案 "title": "本机号码一键绑定", // 授权按钮文案
...@@ -62,11 +55,12 @@ ...@@ -62,11 +55,12 @@
...mapGetters({ ...mapGetters({
userInfo: 'user/info', userInfo: 'user/info',
login: 'user/hasLogin' login: 'user/hasLogin'
}) }),
}, avatar_file(){
onLoad() { if(this.userInfo.avatar_file&&this.userInfo.avatar_file.url){
this.avatar_file = this.userInfo.avatar_file return this.userInfo.avatar_file
console.log(this.avatar_file); }
}
}, },
methods: { methods: {
...mapMutations({ ...mapMutations({
...@@ -163,7 +157,13 @@ ...@@ -163,7 +157,13 @@
} }
}, },
removeAvatar(){ removeAvatar(){
this.setAvatarFile(null) this.setAvatarFile({
"extname": "jpg",
"fileType": "image",
"name": "",
"size": 0,
"url": ""
})
}, },
setAvatarFile(avatar_file){ setAvatarFile(avatar_file){
uni.showLoading({ uni.showLoading({
...@@ -186,7 +186,6 @@ ...@@ -186,7 +186,6 @@
title: '删除成功' title: '删除成功'
}) })
} }
this.avatar_file = avatar_file
this.setUserInfo({ this.setUserInfo({
avatar_file avatar_file
}); });
...@@ -213,10 +212,10 @@ ...@@ -213,10 +212,10 @@
console.log(res); console.log(res);
let tempFile = res.tempFiles[0], let tempFile = res.tempFiles[0],
avatar_file = { avatar_file = {
// #ifndef APP-PLUS // #ifdef H5
extname:tempFile.name.split('.')[tempFile.name.split('.').length-1], extname:tempFile.name.split('.')[tempFile.name.split('.').length-1],
// #endif // #endif
// #ifdef APP-PLUS // #ifndef H5
extname:tempFile.path.split('.')[tempFile.path.split('.').length-1] extname:tempFile.path.split('.')[tempFile.path.split('.').length-1]
// #endif // #endif
}, },
......
{ {
"name" : "uni-starter", "name" : "uni-starter",
"appid" : "__UNI__7D0D57D", "appid" : "__UNI__E5373F7",
"description" : "云端一体应用快速开发模版", "description" : "云端一体应用快速开发模版",
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : "100", "versionCode" : "100",
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
"oauth": { "oauth": {
"weixin": { "weixin": {
"appid": "wx81dbb061d2258234", "appid": "wx81dbb061d2258234",
"appsecret": "04478a5719d0ae70c7e3023bc8078410" "appsecret": "51977820eb14cd71377d4048a1b4754e"
} }
} }
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册