提交 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)
修复云函数uni-id-cf的resetPwdBySmsCode接口,未注册过的用户也能调用的问题
## 1.0.27(2021-06-25)
......
......@@ -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: "系统错误请稍后再试!",
......
{
"id": "uni-starter",
"displayName": "uni-starter",
"version": "1.0.28",
"version": "1.0.29",
"description": "云端一体应用快速开发基本项目模版",
"keywords": [
"uni-starter",
......
......@@ -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,11 +55,12 @@
...mapGetters({
userInfo: 'user/info',
login: 'user/hasLogin'
})
},
onLoad() {
this.avatar_file = this.userInfo.avatar_file
console.log(this.avatar_file);
}),
avatar_file(){
if(this.userInfo.avatar_file&&this.userInfo.avatar_file.url){
return this.userInfo.avatar_file
}
}
},
methods: {
...mapMutations({
......@@ -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
},
......
{
"name" : "uni-starter",
"appid" : "__UNI__7D0D57D",
"appid" : "__UNI__E5373F7",
"description" : "云端一体应用快速开发模版",
"versionName" : "1.0.0",
"versionCode" : "100",
......
......@@ -24,7 +24,7 @@
"oauth": {
"weixin": {
"appid": "wx81dbb061d2258234",
"appsecret": "04478a5719d0ae70c7e3023bc8078410"
"appsecret": "51977820eb14cd71377d4048a1b4754e"
}
}
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册