Browse Source

修改bug

wangxy 4 days ago
parent
commit
8271272ebd
2 changed files with 5 additions and 28 deletions
  1. 3 14
      pages/client/my/myInfo.vue
  2. 2 14
      pages/kehu/my/myInfo.vue

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

@@ -19,12 +19,7 @@
 			<input v-model="data.realName"  placeholder="请输入姓名" />
 			<icon :style="{ backgroundImage: 'url(' + data.jtIcon + ')' }"></icon>
 		</view>
-		<!-- 手机号 -->
-		<view class="form-label-input">
-			<view class="phone-form-label"><text class="form-label-require">*</text>手机号</view>
-			<input v-model="data.userName"  placeholder="请输入手机号" />
-			<icon :style="{ backgroundImage: 'url(' + data.jtIcon + ')' }"></icon>
-		</view>
+
 		<!-- 证件号 -->
 		<view class="form-label-input">
 			<view class="phone-form-label"><text class="form-label-require">*</text>证件号</view>
@@ -70,7 +65,6 @@
 		icon: '',
 		realName: '',
 		idcard: '',
-		userName: '',
 		userId: null,
 		images: null,
 		jtIcon: '',
@@ -180,16 +174,13 @@
 		if (!data.realName) {
 			arr.push('姓名');
 		}
-		if (!data.userName) {
-			arr.push('电话');
-		}
 		if (!data.icon) {
 			arr.push('头像');
 		}
 		if (!data.idcard) {
 			arr.push('证件号');
 		}
-		if (!data.realName || !data.userName||!data.icon||!data.idcard) {
+		if (!data.realName ||!data.icon||!data.idcard) {
 			uni.showToast({
 				icon: 'none',
 				title: `请完善${arr.join('、')}信息!`
@@ -203,7 +194,6 @@
 			idcard: data.idcard,
 			realName: data.realName,
 			userId: data.userId,
-			userName: data.userName,
 		}
 		myApi.getMineUpdate(opt).then(res => {
 			if (res.data) {
@@ -240,12 +230,11 @@
 
 	function initPage() {
 		myApi.getMineUser().then(res => {
-			const {gender,icon,idcard,realName,userName,userId} = res.data;
+			const {gender,icon,idcard,realName,userId} = res.data;
 			data.gender = res.data.gender;
 			data.icon = res.data.icon;
 			data.idcard = res.data.idcard;
 			data.realName = res.data.realName; 
-			data.userName = res.data.userName;
 			data.userId = res.data.userId;
       // data.images = data.icon?{ url: data.icon, extname: 'png', name: 'touxiang.png' }:defaultImage1.value
       data.images = data.icon?data.icon:defaultImage1.value

+ 2 - 14
pages/kehu/my/myInfo.vue

@@ -8,12 +8,6 @@
 			<input v-model="data.realName"  placeholder="请输入姓名" />
 			<icon :style="{ backgroundImage: 'url(' + data.jtIcon + ')' }"></icon>
 		</view>
-		<!-- 手机号 -->
-		<view class="form-label-input">
-			<view class="phone-form-label"><text class="form-label-require">*</text>手机号</view>
-			<input v-model="data.userName"  placeholder="请输入手机号" />
-			<icon :style="{ backgroundImage: 'url(' + data.jtIcon + ')' }"></icon>
-		</view>
 		<!-- 证件号 -->
 		<view class="form-label-input">
 			<view class="phone-form-label" @click="idCardChange">
@@ -56,7 +50,6 @@
 		from: 'shouye', // my | kaoshi | shouye
 		realName: '',
 		idcard: '',
-		userName: '',
 		userId: null,
 		jtIcon: '',
 		juzhuDizhi: '',
@@ -78,13 +71,10 @@
 		if (!data.realName) {
 			arr.push('姓名');
 		}
-		if (!data.userName) {
-			arr.push('电话');
-		}
 		if (!data.idcard) {
 			arr.push('证件号');
 		}
-		if (!data.realName || !data.userName||!data.idcard) {
+		if (!data.realName ||!data.idcard) {
 			uni.showToast({
 				icon: 'none',
 				title: `请完善${arr.join('、')}信息!`
@@ -98,7 +88,6 @@
 			idcard: data.idcard,
 			realName: data.realName,
 			userId: data.userId,
-			userName: data.userName,
 		}
 		myApi.getKehuUpdate(opt).then(res => {
 			if (res.data) {
@@ -117,11 +106,10 @@
 
 	function initPage() {
 		myApi.getKehuUser().then(res => {
-			const {juzhuDizhi,idtype,idcard,realName,userName,userId} = res.data;
+			const {juzhuDizhi,idtype,idcard,realName,userId} = res.data;
 			data.idtype = res.data.idtype;
 			data.idcard = res.data.idcard;
 			data.realName = res.data.realName; 
-			data.userName = res.data.userName;
 			data.userId = res.data.userId;
 			data.juzhuDizhi = res.data.juzhuDizhi
 		})