Tang 4 лет назад
Родитель
Сommit
47610466ac
4 измененных файлов с 14 добавлено и 7 удалено
  1. 1 0
      common/request.js
  2. 1 1
      components/recruitment.vue
  3. 3 2
      pages2/wd/avatar.vue
  4. 9 4
      pages2/wd/info.vue

+ 1 - 0
common/request.js

@@ -1,3 +1,4 @@
+
 // 'http://192.168.1.222:8088','https://file-dev.xyyxt.net/'线下
 // 'https://api.xyyxt.net' 'https://file.xyyxt.net/'线上
 import store from '@/store/index.js'

+ 1 - 1
components/recruitment.vue

@@ -66,7 +66,7 @@
 			<view v-if="current === 1">
 				<view class="boxsize" v-for="(item, index) in enterprise" :key="index">
 					<view class="dis_flexs" @click="jumpCompany(item)">
-						<view class="imgboxs"><image style="width: 100%; height: 100%;" src="/static/avatar1.png" mode=""></image></view>
+						<view class="imgboxs"><image style="width: 100%; height: 100%;" :src="$method.splitImgHost(item.logoUrl)" mode=""></image></view>
 						<view style="flex: 1;">
 							<view class="headTits">{{ item.companyName }}</view>
 							<view class="lisz">

+ 3 - 2
pages2/wd/avatar.vue

@@ -2,7 +2,7 @@
 	<view>
 		<u-cell-group>
 				<u-cell-item  title="头像" @click="editAvatar">
-					<image :src="$method.splitImgHost(avatarUrl)" class="avatar"></image>
+					<image :src="avatarUrl" class="avatar"></image>
 				</u-cell-item>
 				<u-cell-item  title="昵称" :value="nickname" @click="editNickName"></u-cell-item>
 			</u-cell-group>
@@ -32,7 +32,7 @@
 			}
 		},
 		onLoad(option) {
-			this.avatarUrl = this.userInfo.avatar
+			this.avatarUrl = this.$method.splitImgHost(this.userInfo.avatar)
 			this.nickname = this.userInfo.nickname
 		},
 		methods: {
@@ -157,6 +157,7 @@
 				    count: 1, //默认9
 				    sizeType: [ 'compressed'], //可以指定是原图还是压缩图,默认二者都有
 				    success: function (res) {
+						console.log(that.avatarUrl,999)
 						that.avatarUrl = res.tempFilePaths[0]
 				    }
 				});

+ 9 - 4
pages2/wd/info.vue

@@ -26,7 +26,7 @@
 				<u-form-item label="邮箱" prop="email" :label-width="auto"><u-input v-model="form.email" /></u-form-item>
 				<u-form-item label="出生日期" prop="userBirth" :label-width="auto">
 					<picker mode="date" :value="form.userBirth" @change="bindDateChange">
-						<view class="picker">{{ form.userBirth }}</view>
+						<view class="picker">{{ form.userBirth?form.userBirth:'未知' }}</view>
 					</picker>
 				</u-form-item>
 				<!-- <u-form-item label="身份"></u-form-item> -->
@@ -62,9 +62,10 @@
 						size-type="['compressed']"
 						max-count="1"
 						@on-list-change="changePhotoListHeader"
+						@on-remove="onRemovePic"
 					>
 						<template v-slot:addBtn>
-							<image :src="form.oneInchPhotos ? $method.splitImgHost( form.oneInchPhotos) : '/static/info_1.png'" style="width: 120rpx; height: 169rpx;"></image>
+							<image  :src="form.oneInchPhotos ? $method.splitImgHost( form.oneInchPhotos) : '/static/info_1.png'" style="width: 120rpx; height: 169rpx;"></image>
 						</template>
 					</u-upload>
 				</u-form-item>
@@ -199,6 +200,9 @@ export default {
 		this.array_politic = this.$store.state.dictObj['politic_status']
 	},
 	methods: {
+		onRemovePic(){
+			this.form.oneInchPhotos = null
+		},
 		getUserInfos(){
 			var self = this
 			this.$api.getInfo().then(res => {
@@ -278,9 +282,10 @@ export default {
 		},
 		async submitForm() {
 			var self = this;
-			if (this.fileList.length > 0) {
-				const waitYS = await this.imageInfos();
+			if (self.fileList.length > 0&&self.fileList[0].url!=self.$method.splitImgHost(self.form.oneInchPhotos)) {
+				const waitYS = await self.imageInfos();
 			}
+			console.log(343223)
 			var data = {
 				userId: this.form.userId,
 				email: this.form.email,