@@ -20,7 +20,7 @@
import cacheManager from '@/utils/cacheManager.js';
import {
getFilePolicy,
- updataHead
+ updataHead,myInfo
} from '@/api/my.js'
onLoad
@@ -156,7 +156,20 @@
return currentPlatform.value = 'android'
}
+ function getMyInfo() {
+ myInfo({}).then(res => {
+ if (res.code == 0) {
+ userImg.value = res.data.icon;
+ } else {
+ toast('获取头像失败')
+ return false
+ }
+
+ })
onLoad((options) => {
- isIOSorAndroid()
+ isIOSorAndroid();
+ getMyInfo();
})
</script>