Explorar el Código

王国宇修改

tanxue hace 2 meses
padre
commit
f01b9271ba
Se han modificado 1 ficheros con 15 adiciones y 2 borrados
  1. 15 2
      pages/my/headImg.vue

+ 15 - 2
pages/my/headImg.vue

@@ -20,7 +20,7 @@
 	import cacheManager from '@/utils/cacheManager.js';
 	import {
 		getFilePolicy,
-		updataHead
+		updataHead,myInfo
 	} from '@/api/my.js'
 	import {
 		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>