From e23a1db0b60437f17d09d65c65f8fd0c8a5d88c7 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 26 八月 2024 18:11:07 +0800
Subject: [PATCH] 最新版本

---
 h5/pages/userinfo/userinfo.vue |   32 +++++++++++++++++---------------
 1 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/h5/pages/userinfo/userinfo.vue b/h5/pages/userinfo/userinfo.vue
index ea96237..65bb981 100644
--- a/h5/pages/userinfo/userinfo.vue
+++ b/h5/pages/userinfo/userinfo.vue
@@ -10,7 +10,7 @@
 			<view class="cell">
 				<view class="title"><b>*</b>鎵嬫満鍙�</view>
 				<view class="content">
-					<input class="input" maxlength="11" placeholder-style="color: #999999;" v-model="visitorData.phone" placeholder="璇疯緭鍏ユ偍鐨勬墜鏈哄彿" />
+					<input type="number" class="input" maxlength="11" placeholder-style="color: #999999;" v-model="visitorData.phone" placeholder="璇疯緭鍏ユ偍鐨勬墜鏈哄彿" />
 				</view>
 			</view>
 			<view class="cell">
@@ -74,7 +74,8 @@
 	import tlyPictureCut from "@/components/tly-picture-cut/tlyPictureCut.vue";
 	import QfImageCropper from '@/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.vue';
 	import { mapState } from 'vuex'
-	import { uploadUrl } from "@/utils/config"
+	import { uploadAvatar } from "@/utils/config"
+	import { getSystemDictData, visitorSub } from '@/api'
 	export default {
 		data() {
 			return {
@@ -88,7 +89,7 @@
 					userAnswerId: '',
 					name: '',
 					phone: '',
-					idcardType: '0',
+					idcardType: 0,
 					idcardTypeName: '韬唤璇�',
 					idcardNo: '',
 					faceImg: '',
@@ -129,8 +130,8 @@
 					this.visitorData.idcardTypeName = '鎶ょ収'
 				}
 			}
-			this.visitorData.userAnswerId = option.userAnswerId
-			this.getVisit()
+			this.visitorData.userAnswerId = option.answerId || ''
+			// this.getVisit()
 			// uni.$on('update', (data) => {
 			// 	this.uploadImg(data.tempFilePath)
 			// })
@@ -138,6 +139,7 @@
 
 		methods: {
 			submit() {
+				const { visitorData } = this
 				if (!this.visitorData.name) return uni.showToast({
 					title: '濮撳悕涓嶈兘涓虹┖',
 					icon: 'none'
@@ -174,19 +176,19 @@
 					title: '浜鸿劯鐓х墖涓嶈兘涓虹┖',
 					icon: 'none'
 				})
-				if (this.visit === '1') {
-					if (!this.visitorData.imgurl) return uni.showToast({
-						title: '鍋ュ悍璇佷笉鑳戒负绌�',
-						icon: 'none'
-					})
-				}
+				// if (this.visit === '1') {
+				// 	if (!this.visitorData.imgurl) return uni.showToast({
+				// 		title: '鍋ュ悍璇佷笉鑳戒负绌�',
+				// 		icon: 'none'
+				// 	})
+				// }
 				uni.navigateTo({
 					url: `/pages/visitorApplication/visitorApplication?data=${JSON.stringify(this.visitorData)}`
 				});
 			},
 			getVisit() {
-				// 鏄惁闇�瑕佺瓟棰�
-				this.$u.api.getSystemDictData({
+				// 鏄惁闇�瑕� 鍋ュ悍璇�
+				getSystemDictData({
 					dictCode: 'SYSTEM',
 					label: 'HEALTH_CARD'
 				}).then(res => {
@@ -200,7 +202,7 @@
 				that.$refs.cropper.close()
 				uni.showLoading({ title: '涓婁紶涓�', mask: true });
 				uni.uploadFile({
-					url: uploadUrl,
+					url: uploadAvatar,
 					filePath: file.tempFilePath,
 					name: 'file',
 					formData: {
@@ -236,7 +238,7 @@
 						if (type === 'imgurl') {
 							uni.showLoading({ title: '涓婁紶涓�', mask: true });
 							uni.uploadFile({
-								url: uploadUrl,
+								url: uploadAvatar,
 								filePath: chooseImageRes.tempFilePaths[0],
 								name: 'file',
 								formData: {

--
Gitblit v1.9.3