From 8c215923b85653dfe930f01e2ba2b5bd7c81d88a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=A6=86=E9=92=B1=E8=90=BD=E5=B0=BD=E6=A7=BF=E8=8A=B1?=
=?UTF-8?q?=E7=A8=80?= <2675540038@qq.com>
Date: Wed, 14 Aug 2024 16:29:26 +0800
Subject: [PATCH] 1
---
src/pages/user/user_edit.vue | 37 ++++++++++++++++++++++++-----------
src/pages/user/user_index.vue | 30 +++++++++++++++++++++++++++-
2 files changed, 55 insertions(+), 12 deletions(-)
diff --git a/src/pages/user/user_edit.vue b/src/pages/user/user_edit.vue
index 59ed31d..2bf0ffb 100644
--- a/src/pages/user/user_edit.vue
+++ b/src/pages/user/user_edit.vue
@@ -116,7 +116,7 @@
点击上传图片
- 请选择身份证正面照
+ 请选择形象照片
@@ -570,22 +570,17 @@ getRegion() {
this.formData.other_contacts = res.data.other_contacts;
this.formData.other_social_positions = res.data.other_social_positions;
this.formData.position = res.data.position;
- if (res.data.cardf_image == '') {
+ if (res.data.cardf_image == '' || res.data.cardf_image == null) {
this.formData.cardf_image_show = [];
} else {
this.formData.cardf_image_show = [{url: store.state.user.apiUrl + res.data.cardf_image}];
}
- if (res.data.cardz_image == '') {
+ if (res.data.cardz_image == '' || res.data.cardz_image == null) {
this.formData.cardz_image_show = [];
} else {
this.formData.cardz_image_show = [{url: store.state.user.apiUrl + res.data.cardz_image}];
}
- if (res.data.photo_image == '') {
- this.formData.photo_image_show = [];
- } else {
- this.formData.photo_image_show = [{url: store.state.user.apiUrl + res.data.photo_image}];
- }
- if (res.data.company_image == '') {
+ if (res.data.company_image == '' || res.data.company_image == null) {
this.formData.company_image_show = [];
} else {
this.formData.company_image_show = [{url: store.state.user.apiUrl + res.data.company_image}];
@@ -594,7 +589,7 @@ getRegion() {
this.formData.cardz_image = res.data.cardz_image;
this.formData.photo_image = res.data.photo_image;
this.formData.company_image = res.data.company_image;
- if (res.data.business_license_image == '') {
+ if (res.data.business_license_image == ''|| res.data.business_license_image == null) {
this.formData.business_license_image_show = [];
} else {
this.formData.business_license_image_show = [{url: store.state.user.apiUrl + res.data.business_license_image}];
@@ -622,7 +617,11 @@ getRegion() {
this.formData.tuanweifuzerenxinxi = res.data.tuanweifuzerenxinxi;
this.formData.documents_file = res.data.documents_file;
this.formData.enterprise_location = res.data.enterprise_location;
- this.formData.documents_file_show = [{url: store.state.user.apiUrl + res.data.documents_file}];
+ if (res.data.documents_file == ''|| res.data.documents_file == null) {
+ this.formData.documents_file_show = [];
+ } else {
+ this.formData.documents_file_show = [{url: store.state.user.apiUrl + res.data.documents_file}];
+ }
this.formData.introduction = res.data.introduction;
this.formData.enterprise_name = res.data.enterprise_name;
@@ -746,6 +745,22 @@ getRegion() {
// }
// }
this.formData.member_id = this.id;
+ if(this.formData.cardz_image_show.length==0){
+ this.formData.cardz_image='';
+ }
+ if(this.formData.cardf_image_show.length==0){
+ this.formData.cardf_image='';
+ }
+ if(this.formData.company_image_show.length==0){
+ this.formData.company_image='';
+ }
+ if(this.formData.documents_file_show.length==0){
+ this.formData.documents_file='';
+ }
+ if(this.formData.business_license_image_show.length==0){
+ this.formData.business_license_image='';
+ }
+ console.log(this.formData);
this.$request
.post("/member/update", this.formData)
.then((res) => {
diff --git a/src/pages/user/user_index.vue b/src/pages/user/user_index.vue
index ca731d4..0c552ac 100644
--- a/src/pages/user/user_index.vue
+++ b/src/pages/user/user_index.vue
@@ -54,9 +54,23 @@
查询
-
+
$router.push('/user/user_add')"> 新增会员
+
+
+ 批量导入
+
+
@@ -159,6 +173,20 @@ export default {
this.getRegion();
},
methods: {
+ formatResponse(res) {
+ console.log(res);
+ if(res.code==1){
+ this.$message.success('导入成功!');
+ setTimeout(()=>{
+ this.tabIndex=0;
+ this.getList();
+ },1000)
+ }else{
+ this.$message.error(res.msg);
+ }
+ //this.addForm.image = res.data.url;
+ //return {url: res.data.fullurl,name:res.data.url};
+ },
getRegion() {
this.$request
.post("/region")