Ver código fonte

默认头像, 修改手机号

zhengkaixin 1 ano atrás
pai
commit
0271414c60

+ 10 - 0
apis/pagejs/tab.js

@@ -9,6 +9,16 @@ export function createUser(data) {
   	})
   	})
  }
  }
  
  
+ export function changePhone(telephone) {
+   	return request({
+   		method: 'get',
+   		data: {
+			telephone:telephone
+		},
+   		url: '/mobile/user/changePhone'
+   	})
+  }
+  
  export function findRecruitSearch(data) {
  export function findRecruitSearch(data) {
    	return requestWhite({
    	return requestWhite({
    		method: 'post',
    		method: 'post',

+ 3 - 3
config/.env.dev.js

@@ -8,9 +8,9 @@ const UNI_APP = {
 	SIMPLE_RUN:false,// 无视权限控制跳转页面   , 用于样式人员快速访问各种功能 ,快速测试等
 	SIMPLE_RUN:false,// 无视权限控制跳转页面   , 用于样式人员快速访问各种功能 ,快速测试等
 
 
 	openId:"o_5WO4hc7MyyVNjSDePRIft6AokI",//个人企业都注册
 	openId:"o_5WO4hc7MyyVNjSDePRIft6AokI",//个人企业都注册
-	openId:"o_5WO4qUozermjNRBqypzMZg56Qw",// 杨所199
-	openId:"o_5WO4tDGT3bJ-9Bpdizcdbs-HbI", //152
-	//openId:"o_5WO4vGBgkh_aAzZV19XV5aKVas",// 个人  注册 ,企业未
+	//openId:"o_5WO4qUozermjNRBqypzMZg56Qw",// 杨所199
+	//openId:"o_5WO4tDGT3bJ-9Bpdizcdbs-HbI", //152
+	//openId:"o_5WO4m3IkzHIQ7u4m5itak6juyE",// 客户
 	//openId:"323",// 个人  未注册 ,企业 注册
 	//openId:"323",// 个人  未注册 ,企业 注册
 	 
 	 
 	//小鹏管家appid
 	//小鹏管家appid

+ 1 - 1
pages/packages/choreInformation/jobSearchDetails.vue

@@ -57,7 +57,7 @@
 				<view class="details">
 				<view class="details">
 					<!-- 照片 -->
 					<!-- 照片 -->
 					<view class="photo">
 					<view class="photo">
-						<u-avatar :src="personInfo.photo"></u-avatar>
+						<u-avatar :src="personInfo.photo"  :gender="personInfo.gender"></u-avatar>
 						
 						
 					</view>
 					</view>
 					<view class="linkman-infos">
 					<view class="linkman-infos">

+ 2 - 1
pages/packages/mine/employmentService/receiveRegistration.vue

@@ -19,7 +19,8 @@
 				<view class="photo">
 				<view class="photo">
 					<!--  -->
 					<!--  -->
 					<span  v-if="current==0&&!item.isRead" class="tag" >未读</span>
 					<span  v-if="current==0&&!item.isRead" class="tag" >未读</span>
-					<u-avatar :src="item.jobInformationInfo.photo"></u-avatar>
+					<u-avatar   :gender="item.workPersonInfo.gender"
+					:src="item.jobInformationInfo.photo"></u-avatar>
 					<span>{{item.workPersonInfo?getPersonName(item.workPersonInfo.realName,item.workPersonInfo):''}}</span>
 					<span>{{item.workPersonInfo?getPersonName(item.workPersonInfo.realName,item.workPersonInfo):''}}</span>
 					
 					
 				</view>
 				</view>

+ 19 - 3
pages/packages/mine/myJobInformation/myJobInformation.vue

@@ -28,7 +28,9 @@
 				</view>
 				</view>
 
 
 				<view class="photo" @click="uploadPhoto">
 				<view class="photo" @click="uploadPhoto">
-					<u-avatar :src="src" size="120" mode="circle"></u-avatar>
+					<u-avatar :src="src"  :gender="userInfo.gender"
+					
+					size="120" mode="circle"></u-avatar>
 					<img class="camera" src="@/assets/img/riFill-camera-fill Copy@1x.png" alt="">
 					<img class="camera" src="@/assets/img/riFill-camera-fill Copy@1x.png" alt="">
 
 
 				</view>
 				</view>
@@ -746,10 +748,24 @@
 				}
 				}
 
 
 			}
 			}
-
+			.photo::before {
+				content: "";
+				border-radius: 100rpx;
+				position: absolute;
+				top: 0;
+				left: 0;
+				width: 100%;
+				height: 100%;
+				background-color: rgba(104,101,101,0.25);
+				z-index: 1;
+			}
+			.photo img {
+				position: relative;
+				z-index: 2;
+			}
 			.photo {
 			.photo {
 				position: relative;
 				position: relative;
-
+				display: inline-block;
 				img {
 				img {
 					width: 60px;
 					width: 60px;
 					height: 60px;
 					height: 60px;

+ 1 - 1
pages/packages/search/search.vue

@@ -55,7 +55,7 @@
 			  @click="gotoUrl('pages/packages/choreInformation/jobSearchDetails?id='+item.id)" >
 			  @click="gotoUrl('pages/packages/choreInformation/jobSearchDetails?id='+item.id)" >
 				<!-- 照片 -->
 				<!-- 照片 -->
 				<view class="photo">
 				<view class="photo">
-					<u-avatar :src="item.photo"></u-avatar>
+					<u-avatar :src="item.photo"  :gender="item.gender" ></u-avatar>
 					
 					
 				</view>
 				</view>
 				<view class="content">
 				<view class="content">

+ 1 - 1
pages/packages/shareEmployment/articleDetail.vue

@@ -10,7 +10,7 @@
 			<!-- 其他信息 -->
 			<!-- 其他信息 -->
 			<view class="infos">
 			<view class="infos">
 				<view class="photo">
 				<view class="photo">
-					<u-avatar class="avatar"
+					<u-avatar class="avatar" 
 						:src="photo != null ? photo : '@/assets/img/headPortrait.png'" size="48">
 						:src="photo != null ? photo : '@/assets/img/headPortrait.png'" size="48">
 					</u-avatar>
 					</u-avatar>
 				</view>
 				</view>

+ 6 - 0
pages/tab/as-components/riLine-edit-2-line.svg

@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32" width="16" height="16" style="border-color: rgba(0,0,0,0);border-width: bpx;border-style: undefined" filter="none">
+    
+    <g>
+    <path d="M6.667 25.333h1.885l12.419-12.419-1.885-1.885-12.419 12.419v1.885zM28 28h-24v-5.657l17.913-17.913c0.241-0.241 0.575-0.39 0.943-0.39s0.701 0.149 0.943 0.39l3.772 3.772c0.241 0.241 0.39 0.575 0.39 0.943s-0.149 0.701-0.39 0.943l-15.247 15.247h15.676v2.667zM20.971 9.144l1.885 1.885 1.885-1.885-1.885-1.885-1.885 1.885z" fill="rgba(255,255,255,1)"></path>
+    </g>
+  </svg>

+ 1 - 1
pages/tab/choreInformation/choreInformation.vue

@@ -32,7 +32,7 @@
 			  @click="gotoUrl('pages/packages/choreInformation/jobSearchDetails?id='+item.id)" >
 			  @click="gotoUrl('pages/packages/choreInformation/jobSearchDetails?id='+item.id)" >
 				<!-- 照片 -->
 				<!-- 照片 -->
 				<view class="photo">
 				<view class="photo">
-					<u-avatar :src="item.photo"></u-avatar>
+					<u-avatar :src="item.photo"  :gender="item.gender" ></u-avatar>
 					
 					
 				</view>
 				</view>
 				<view class="content">
 				<view class="content">

+ 55 - 11
pages/tab/mine/mine.vue

@@ -4,7 +4,7 @@
 			:background="{backgroundColor: '#2795FD',}" :back-text-style="{color: '#ffffff'}"></u-navbar>
 			:background="{backgroundColor: '#2795FD',}" :back-text-style="{color: '#ffffff'}"></u-navbar>
 		<view class="top">
 		<view class="top">
 			<view class="photo">
 			<view class="photo">
-				<u-avatar :src="src"></u-avatar>
+				<u-avatar :src="src"  :gender="userInfo.gender"  ></u-avatar>
 			</view>
 			</view>
 			<!-- <view class="login">
 			<!-- <view class="login">
 				请登录
 				请登录
@@ -23,10 +23,9 @@
 						<img src="@/assets/img/riFill-shield-user-fill@1x.png" alt="">
 						<img src="@/assets/img/riFill-shield-user-fill@1x.png" alt="">
 					</view>
 					</view>
 				</view>
 				</view>
-				<view class="tel">
-					<template v-if="userInfo&&userInfo.id">
-						{{userInfo.phone}}
-					</template>
+				<view class="tel" @click="changePhone"  v-if="userInfo&&userInfo.id">
+					{{userInfo.phone}}
+					<img src="@/pages/tab/as-components/riLine-edit-2-line.svg">
 				</view>
 				</view>
 
 
 			</view>
 			</view>
@@ -246,6 +245,23 @@
 			}
 			}
 		},
 		},
 		methods: {
 		methods: {
+			changePhone(){
+				var _this=this;
+				uni.showModal({
+					title: '提示',
+					content: '是否修改当前手机号',
+					//confirmText:"",
+					showCancel: true,
+					success: function(res) {
+						if (res.confirm) {
+							_this.show=true	
+							//uni.navigateBack()
+						} else if (res.cancel) {
+							//.log('用户点击取消');
+						}
+					}
+				});
+			},
 			updateintentionBtn(e){
 			updateintentionBtn(e){
 				console.log(e);
 				console.log(e);
 				var intention=e[0].value
 				var intention=e[0].value
@@ -454,7 +470,22 @@
 					})
 					})
 				}
 				}
 				// #endif
 				// #endif
-			},
+			},
+			changePhoneUser(phone) {
+				console.log("createUser",phone)
+				API.changePhone(phone).then((res2) => {
+					
+					
+					this.findByOpenId()
+			
+				}).catch(error2 => {
+					uni.showToast({
+						icon: 'none',
+						title: error2
+					})
+				})
+			},
+			
 			createUser(phone) {
 			createUser(phone) {
 				console.log("createUser",phone)
 				console.log("createUser",phone)
 				API.createUser({
 				API.createUser({
@@ -491,8 +522,14 @@
 					success: function(res) {
 					success: function(res) {
 
 
 						if (res.confirm) {
 						if (res.confirm) {
-							_this.createUser(res.content)
-
+							//_this.createUser(res.content)
+							if (_this.userInfo.id) {
+								_this.changePhoneUser(res.content)
+								
+							} else{
+								_this.createUser(res.content)
+								
+							}
 						} else if (res.cancel) {
 						} else if (res.cancel) {
 							//.log('用户点击取消');
 							//.log('用户点击取消');
 						}
 						}
@@ -515,8 +552,14 @@
 							}).then((res) => {
 							}).then((res) => {
 								
 								
 								console.log(res)
 								console.log(res)
-								if (res.data) {
-									_this.createUser(res.data)
+								if (res.data) {
+									if (_this.userInfo.id) {
+										_this.changePhoneUser(res.data)
+										
+									} else{
+										_this.createUser(res.data)
+										
+									}
 
 
 								} else {
 								} else {
 									uni.showToast({
 									uni.showToast({
@@ -665,7 +708,8 @@
 
 
 			.tel {
 			.tel {
 				margin-top: 8rpx;
 				margin-top: 8rpx;
-				font-size: 32rpx;
+				font-size: 32rpx;
+				display: flex;
 			}
 			}
 		}
 		}
 
 

+ 1 - 0
uni_modules/uview-ui/components/u-avatar/man.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1691053170611" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="16278" xmlns:xlink="http://www.w3.org/1999/xlink" width="256" height="256"><path d="M1023.993685 512.002475A511.996843 511.996843 0 1 1 511.996843 0.005632a509.607524 509.607524 0 0 1 511.996842 511.996843z" fill="#ECF1FB" p-id="16279"></path><path d="M638.442996 603.632843l31.999803 6.929024c1.706656-34.59392 32.95553-23.500655 33.911257-72.840084a32.170468 32.170468 0 0 0-32.187534-32.170469h-16.571632z" fill="#CBD4E6" p-id="16280"></path><path d="M383.997632 603.632843l-31.982736 6.929024c-1.706656-34.59392-32.95553-23.500655-33.928324-72.840084a32.170468 32.170468 0 0 1 32.187535-32.170469h16.571631z" fill="#CBD4E6" p-id="16281"></path><path d="M864.643201 884.224179a511.024049 511.024049 0 0 1-701.435674 0.853328 155.408108 155.408108 0 0 1 106.836674-87.380794l123.220574-28.501158a19.746012 19.746012 0 0 0 19.626546-19.626545v-43.349066h202.409418v43.349066a19.780145 19.780145 0 0 0 19.797211 19.626545l123.049908 28.501158a156.056638 156.056638 0 0 1 106.495343 86.527466z" fill="#CBD4E6" p-id="16282"></path><path d="M508.58353 745.14877a163.344059 163.344059 0 0 1-160.425677-132.214651l-28.569424-147.164959a191.538019 191.538019 0 0 1 194.405201-211.181631 191.520952 191.520952 0 0 1 194.388135 211.181631l-42.000808 158.002225a163.344059 163.344059 0 0 1-157.797427 121.377385z" fill="#CBD4E6" p-id="16283"></path></svg>

Diferenças do arquivo suprimidas por serem muito extensas
+ 17 - 1
uni_modules/uview-ui/components/u-avatar/u-avatar.vue


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
uni_modules/uview-ui/components/u-avatar/woman.svg


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff