wangxy il y a 5 jours
Parent
commit
2483151b33
2 fichiers modifiés avec 24 ajouts et 10 suppressions
  1. 14 7
      pages.json
  2. 10 3
      pages/client/my/myInfo.vue

+ 14 - 7
pages.json

@@ -1,5 +1,12 @@
 {
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
+	{
+		"path" : "pages/Login/test",
+		"style" : 
+		{
+			"navigationBarTitleText" : ""
+		}
+	},
 		{
 			"path": "pages/Login/clientIndex",
 			"style": {
@@ -20,14 +27,14 @@
 			"style": {
 				"navigationStyle": "custom"
 			}
-		},
-		{
-			"path" : "pages/Login/test",
-			"style" : 
-			{
-				"navigationBarTitleText" : ""
-			}
 		}
+		// {
+		// 	"path" : "pages/Login/test",
+		// 	"style" : 
+		// 	{
+		// 		"navigationBarTitleText" : ""
+		// 	}
+		// }
 	],
 	"subPackages": [{
 			"root": "pages/client/my",

+ 10 - 3
pages/client/my/myInfo.vue

@@ -3,9 +3,13 @@
 		<!-- 导航区域 -->
 		<customNavbarVue title="个人信息" :show-back-btn="true" @back="handleBack"></customNavbarVue>
 		<!-- 头像 -->
-		<view class="user-img-box" @click="openFilePicker">
+		<view class="user-img-box" >
 			<view class="user-title">头像</view>
-			<uni-file-picker ref="filePicker" return-type="object" v-model="data.images" :del-icon="false" mode="grid" disable-preview :auto-upload="false"
+
+      <view v-if="!data.images" @click="openFilePicker">默认图</view>
+<!--      <img v-else src="" @click="openFilePicker">-->
+
+			<uni-file-picker ref="filePicker" v-show="false" return-type="object" v-model="data.images" :del-icon="false" mode="grid" disable-preview :auto-upload="false"
 				@select="handleSelect" file-mediatype="image" class="phone-file-picker user-file-picker">
 			</uni-file-picker>
 			<icon class="user-jt-icon" :style="{ backgroundImage: 'url(' + data.jtIcon + ')' }"></icon>
@@ -134,7 +138,10 @@
 									title: '上传成功',
 									icon: 'success'
 								});
-								data.images = { url: data.icon, extname: 'png', name: 'touxiang.png' }
+								// data.images = { url: data.icon, extname: 'png', name: 'touxiang.png' }
+
+                data.images = data.icon
+
 							} else {
 								uni.showToast({
 									icon: 'none',