| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -34,12 +34,7 @@ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 --> | 
					 | 
					 | 
					 | 
					 --> | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									<u-upload  | 
					 | 
					 | 
					 | 
									<u-upload :fileList="photoList" @afterRead="afterRead" @delete="deletePic" name="1" multiple | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											:fileList="photoList" | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											@afterRead="afterRead" | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											@delete="deletePic" | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											name="1" | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											multiple | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										:maxCount="10"> | 
					 | 
					 | 
					 | 
										:maxCount="10"> | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										<view class="photo_main_face_4 photo_full_blue_btn" style="margin-left: 24rpx;"> | 
					 | 
					 | 
					 | 
										<view class="photo_main_face_4 photo_full_blue_btn" style="margin-left: 24rpx;"> | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											上传照片 | 
					 | 
					 | 
					 | 
											上传照片 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -171,6 +166,9 @@ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									show_2: false, | 
					 | 
					 | 
					 | 
									show_2: false, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									show_3: false, | 
					 | 
					 | 
					 | 
									show_3: false, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									photoList: [], | 
					 | 
					 | 
					 | 
									photoList: [], | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
									uploadFiles:[], | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
									successFiles:[], | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
									errorFiles:[] | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								} | 
					 | 
					 | 
					 | 
								} | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							}, | 
					 | 
					 | 
					 | 
							}, | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -229,8 +227,11 @@ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								async afterRead(event) { | 
					 | 
					 | 
					 | 
								async afterRead(event) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									var _this = this; | 
					 | 
					 | 
					 | 
									var _this = this; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									let lists = [].concat(event.file); | 
					 | 
					 | 
					 | 
									let lists = [].concat(event.file); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									console.log(lists); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									 | 
					 | 
					 | 
					 | 
									 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
									uni.showLoading({ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
										title: '图片上传中', | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
									}); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
									_this.uploadFiles = []; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									for (let i = 0; i < lists.length; i++) { | 
					 | 
					 | 
					 | 
									for (let i = 0; i < lists.length; i++) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										var edetail = lists[i].url; | 
					 | 
					 | 
					 | 
										var edetail = lists[i].url; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										let filePath = edetail; | 
					 | 
					 | 
					 | 
										let filePath = edetail; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -240,7 +241,10 @@ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										let fileName = address + _date.getTime() + ext_name; | 
					 | 
					 | 
					 | 
										let fileName = address + _date.getTime() + ext_name; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										const img_info = await unit.getImgInfo(filePath); | 
					 | 
					 | 
					 | 
										const img_info = await unit.getImgInfo(filePath); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											let { width, height } = img_info; | 
					 | 
					 | 
					 | 
										let { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
											width, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
											height | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
										} = img_info; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										let maxWidth = 2480; | 
					 | 
					 | 
					 | 
										let maxWidth = 2480; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										if (width > maxWidth) { | 
					 | 
					 | 
					 | 
										if (width > maxWidth) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											let scale = Math.ceil(width / maxWidth); | 
					 | 
					 | 
					 | 
											let scale = Math.ceil(width / maxWidth); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -248,17 +252,35 @@ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											width = Math.ceil(maxWidth); | 
					 | 
					 | 
					 | 
											width = Math.ceil(maxWidth); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										} | 
					 | 
					 | 
					 | 
										} | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										let compress_path = ''; | 
					 | 
					 | 
					 | 
										let compress_path = ''; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											compress_path = await unit.compressImg(filePath, { compressedWidth: width }).catch((res) => { | 
					 | 
					 | 
					 | 
										compress_path = await unit.compressImg(filePath, { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
											compressedWidth: width | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
										}).catch((res) => { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											console.log('上传压缩失败', err); | 
					 | 
					 | 
					 | 
											console.log('上传压缩失败', err); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										}); | 
					 | 
					 | 
					 | 
										}); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										compress_path = compress_path ? compress_path : filePath; | 
					 | 
					 | 
					 | 
										compress_path = compress_path ? compress_path : filePath; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											console.log('&&&&&&&&&&',compress_path,fileName)	;		 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											_this.upload_img(compress_path, fileName); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										 | 
					 | 
					 | 
					 | 
										 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
										//_this.upload_img(compress_path, fileName); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
										//上传 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
										var upData = {filePath:compress_path,fileType:'image',scene:'user_max'}; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
										// _this.$api.ossUpload(upData, function(res) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
										// 	console.log('ossUpload success', res); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
										// 	if(res.code == 200){ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
										// 		//_this.uploadFiles.push(res.data.file_url); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
										// 	} | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
										// 	// var d = res.data; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
										// 	// _this.info.avatar = d.file_url; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
										// 	// _this.uploadImg = [{ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
										// 	// 	url: _this.$api.ossurl(d.file_url) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
										// 	// }];; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
										// }, function(err) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
										// 	console.log('ossUpload fail', err); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
										// }); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									} | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
									} | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
									uni.hideLoading(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
									console.log('***************',_this.uploadFiles) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								}, | 
					 | 
					 | 
					 | 
								}, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								uploadFilePromise(url) { | 
					 | 
					 | 
					 | 
								uploadFilePromise(url) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -272,7 +294,9 @@ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											title: '图片上传中', | 
					 | 
					 | 
					 | 
											title: '图片上传中', | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										}); | 
					 | 
					 | 
					 | 
										}); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										const { file_url = '' } = await photoUploadFile(filePath, fileName,'user_avatar') | 
					 | 
					 | 
					 | 
										const { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
											file_url = '' | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
										} = await photoUploadFile(filePath, fileName, 'user_avatar') | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											.finally(() => { | 
					 | 
					 | 
					 | 
											.finally(() => { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
												uni.hideLoading(); | 
					 | 
					 | 
					 | 
												uni.hideLoading(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											}) | 
					 | 
					 | 
					 | 
											}) | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -288,13 +312,13 @@ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										console.log('success upload') | 
					 | 
					 | 
					 | 
										console.log('success upload') | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										console.log(file_url); | 
					 | 
					 | 
					 | 
										console.log(file_url); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										_this.info.avatar = file_url; | 
					 | 
					 | 
					 | 
										_this.info.avatar = file_url; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										_this.wxAvatar = [{url:ossurl(file_url, 'user_face')}]; | 
					 | 
					 | 
					 | 
										_this.wxAvatar = [{ | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
											url: ossurl(file_url, 'user_face') | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
										}]; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										updateUserInfo(_this.info).then(res => { | 
					 | 
					 | 
					 | 
										updateUserInfo(_this.info).then(res => { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											if (res.code != 200) { | 
					 | 
					 | 
					 | 
											if (res.code != 200) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
												uni.$u.toast(res.msg); | 
					 | 
					 | 
					 | 
												uni.$u.toast(res.msg); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										    } | 
					 | 
					 | 
					 | 
											} else { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											else | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											{ | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
												store.commit('userInfo/set_user_info', _this.info); | 
					 | 
					 | 
					 | 
												store.commit('userInfo/set_user_info', _this.info); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
											} | 
					 | 
					 | 
					 | 
											} | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |