change add

This commit is contained in:
周源 2022-04-28 17:25:07 +08:00
parent c776e7eb50
commit ac698d86d2
4 changed files with 429 additions and 156 deletions

View File

@ -1,33 +1,34 @@
<template> <template>
<view> <view>
<view class="person_itm"> <view class="person_itm">
<view class="person_itm_sign" @click="goChangeInfo('姓名','谢家星')">
<view class="person_itm_sign" @click="goChangeInfo('姓名',userInfoObj.userName)">
<text class="person_itm_sign_tit">姓名</text> <text class="person_itm_sign_tit">姓名</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<text>谢家星</text> <text> {{userInfoObj.userName}}</text>
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
</view> </view>
<view class="person_itm_sign" @click="goChangeInfo('性别','男')"> <view class="person_itm_sign" @click="goChangeInfo('性别',userInfoObj.sex)">
<text class="person_itm_sign_tit">性别 </text> <text class="person_itm_sign_tit">性别 </text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<text></text> <text> {{userInfoObj.sex}}</text>
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
</view> </view>
<view class="person_itm_sign" @click="goChangeInfo('出生日期','1997/02/01')"> <view class="person_itm_sign" @click="goChangeInfo('出生日期',userInfoObj.birthDay )">
<text class="person_itm_sign_tit">出生日期</text> <text class="person_itm_sign_tit">出生日期</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<text>1997/02/01</text> <text> {{userInfoObj.birthDay}}</text>
<u-icon name="calendar"></u-icon> <u-icon name="calendar"></u-icon>
</view> </view>
</view> </view>
<view class="person_itm_sign" @click="goChangeInfo('身份证号码','41852199825252651')"> <view class="person_itm_sign" @click="goChangeInfo('身份证号码',JSON.parse(userInfoObj.idCard))">
<text class="person_itm_sign_tit">身份证号码</text> <text class="person_itm_sign_tit">身份证号码</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<text>41852199825252651</text> <text> {{userInfoObj.idCard}}</text>
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
</view> </view>
@ -35,28 +36,28 @@
<view class="person_itm"> <view class="person_itm">
<view class="person_itm_sign" @click="goChangeInfo('民族','汉族')"> <view class="person_itm_sign" @click="goChangeInfo('民族',userInfoObj.nation)">
<text class="person_itm_sign_tit">民族</text> <text class="person_itm_sign_tit">民族</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<text>汉族</text> <text> {{userInfoObj.nation}}</text>
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
</view> </view>
<view class="person_itm_sign" @click="goChangeInfo('籍贯','宁波')"> <view class="person_itm_sign" @click="goChangeInfo('籍贯',userInfoObj.base)">
<text class="person_itm_sign_tit">籍贯</text> <text class="person_itm_sign_tit">籍贯</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<text>宁波</text> <text> {{userInfoObj.base}}</text>
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
</view> </view>
<view class="person_itm_sign" @click="goChangeInfo('政治面貌','党员')"> <view class="person_itm_sign" @click="goChangeInfo('政治面貌',userInfoObj.politics)">
<text class="person_itm_sign_tit">政治面貌</text> <text class="person_itm_sign_tit">政治面貌</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<text>党员</text> <text> {{userInfoObj.politics}}</text>
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
</view> </view>
@ -65,75 +66,72 @@
<view class="person_itm"> <view class="person_itm">
<view class="person_itm_sign" @click="goChangeInfo('联系电话','13888888888')"> <!-- <view class="person_itm_sign" @click="goChangeInfo('联系电话','13888888888')">
<text class="person_itm_sign_tit">联系电话</text> <text class="person_itm_sign_tit">联系电话</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<text>13888888888</text> <text>13888888888</text>
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
</view> </view> -->
<view class="person_itm_sign" @click="goChangeInfo('头像',userInfoObj.images)">
<view class="person_itm_sign" @click="goChangeInfo('头像','头像地址')">
<text class="person_itm_sign_tit">头像</text> <text class="person_itm_sign_tit">头像</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<image style="width: 80rpx; height: 80rpx;" src="../../static/RewardWork/avator.png" mode=""> <image class="avator" style="" :src=" baseurl+JSON.parse(userInfoObj.images)[0] ">
</image> </image>
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
</view> </view>
</view> </view>
<view class="person_itm"> <view class="person_itm">
<view class="person_itm_sign" @click="goChangeInfo('所属协会','协会名称')"> <view class="person_itm_sign" @click="goChangeInfo('所属协会',userInfoObj.association.name )">
<text class="person_itm_sign_tit">所属协会</text> <text class="person_itm_sign_tit">所属协会</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<text>协会名称</text> <text v-if="userInfoObj.association">{{userInfoObj.association.name}}</text>
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
</view> </view>
<view class="person_itm_sign" @click="goChangeInfo('入会时间','2022/02/01')"> <view class="person_itm_sign" @click="goChangeInfo('入会时间',userInfoObj.comeTime)">
<text class="person_itm_sign_tit">入会时间</text> <text class="person_itm_sign_tit">入会时间</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<text>2022/02/01</text> <text> {{userInfoObj.comeTime}}</text>
<u-icon name="calendar"></u-icon> <u-icon name="calendar"></u-icon>
</view> </view>
</view> </view>
</view> </view>
<!-- 文艺人才-个人中心 --> <!-- 文艺人才-个人中心 -->
<view class="person_itm"> <view class="person_itm">
<view class="person_itm_sign" @click="goChangeInfo('人才类型','书法家')"> <view class="person_itm_sign" @click="goChangeInfo('人才类型',userInfoObj.rcType)">
<text class="person_itm_sign_tit">人才类型</text> <text class="person_itm_sign_tit">人才类型</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<text>书法家</text> <text> {{userInfoObj.rcType}}</text>
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
</view> </view>
<view class="person_itm_sign" @click="goChangeInfo('艺术成就',artList)"> <view class="person_itm_sign" @click="goChangeInfo('艺术成就',JSON.parse(userInfoObj.artAtt))">
<text class="person_itm_sign_tit">艺术成就</text> <text class="person_itm_sign_tit">艺术成就</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
</view> </view>
<view class="person_itm_sign" @click="goChangeInfo('荣誉奖项',honorList)"> <view class="person_itm_sign" @click="goChangeInfo('荣誉奖项',JSON.parse(userInfoObj.greats))">
<text class="person_itm_sign_tit">荣誉奖项</text> <text class="person_itm_sign_tit">荣誉奖项</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
</view> </view>
<view class="person_itm_sign" @click="goChangeInfo('代表作',stanWorkList)"> <view class="person_itm_sign" @click="goChangeInfo('代表作',JSON.parse(userInfoObj.opus))">
<text class="person_itm_sign_tit">代表作</text> <text class="person_itm_sign_tit">代表作</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
</view> </view>
@ -141,38 +139,38 @@
<view class="person_itm_sign"> <view class="person_itm_sign">
<text class="person_itm_sign_tit">是否已入协会</text> <text class="person_itm_sign_tit">是否已入协会</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<u-switch disabled v-model="userInfoObj.isAssociation" activeColor="#99241B" size=20></u-switch>
<u-switch disabled v-model="isJioned" activeColor="#99241B" size=20></u-switch>
</view> </view>
</view> </view>
<view class="person_itm_sign" @click="goChangeInfo('入会时间','2022/02/01')"> <view class="person_itm_sign" @click="goChangeInfo('入会时间',userInfoObj.comeTime)"
v-if="userInfoObj.isAssociation">
<text class="person_itm_sign_tit">入会时间</text> <text class="person_itm_sign_tit">入会时间</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<text>2022/02/01</text> <text> {{userInfoObj.comeTime}}</text>
<u-icon name="calendar"></u-icon> <u-icon name="calendar"></u-icon>
</view> </view>
</view> </view>
</view> </view>
<!-- 服务商个人中心 --> <!-- 服务商个人中心 -->
<view class="person_itm"> <view class="person_itm">
<view class="person_itm_sign" @click="goChangeInfo('服务名称','服务名称')"> <view class="person_itm_sign" @click="goChangeInfo('服务名称',userInfoObj.serviceName)">
<text class="person_itm_sign_tit">服务名称</text> <text class="person_itm_sign_tit">服务名称</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<text>服务名称</text> <text>{{userInfoObj.serviceName}}</text>
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
</view> </view>
<view class="person_itm_sign" @click="goChangeInfo('地址','宁波象山县')"> <view class="person_itm_sign" @click="goChangeInfo('地址',userInfoObj.serviceAddress)">
<text class="person_itm_sign_tit">地址</text> <text class="person_itm_sign_tit">地址</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<text>宁波象山县</text> <text> {{userInfoObj.serviceAddress}}</text>
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
</view> </view>
<view class="person_itm_sign" @click="goChangeInfo('实景照','照片url')"> <view class="person_itm_sign" @click="goChangeInfo('实景照',userInfoObj.photo)">
<text class="person_itm_sign_tit">实景照</text> <text class="person_itm_sign_tit">实景照</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
@ -180,40 +178,55 @@
</view> </view>
</view> </view>
<view class="person_itm_sign"> <view class="person_itm_sign" @click="goChangeInfo('资质证',userInfoObj.cfPhoto)">
<text class="person_itm_sign_tit">资质证</text> <text class="person_itm_sign_tit">资质证</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
</view> </view>
</view> </view>
<view class="person_itm"> <view class="person_itm">
<view class="person_itm_sign" @click="goChangeInfo('负责人姓名','王一')"> <view @click="goChangeInfo('服务内容介绍',userInfoObj.info)">
<view class="textAreaCss" >
<text>服务内容介绍</text> <u-icon name="arrow-right"></u-icon>
</view>
<u--textarea v-model="userInfoObj.info" placeholder="请输入介绍" style="background-color: #F8F8F8;"></u--textarea>
</view>
<view class="person_itm_sign" @click="goChangeInfo('负责人姓名',userInfoObj.fzr)">
<text class="person_itm_sign_tit">负责人姓名</text> <text class="person_itm_sign_tit">负责人姓名</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<text>王一</text> <text> {{userInfoObj.fzr}}</text>
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
</view> </view>
<view class="person_itm_sign" @click="goChangeInfo('服务时间','2022/02/01')"> <view class="person_itm_sign" @click="goChangeInfo('服务开始时间',userInfoObj.timeStart)">
<text class="person_itm_sign_tit">服务时间</text> <text class="person_itm_sign_tit">服务开始时间</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<text>2022/02/01</text> <text>09:00 {{userInfoObj.timeStart}}</text>
<u-icon name="calendar"></u-icon>
</view>
</view>
<view class="person_itm_sign" @click="goChangeInfo('服务结束时间',userInfoObj.timeEnd)">
<text class="person_itm_sign_tit">服务结束时间</text>
<view class="person_itm_sign_right">
<text>22:00 {{userInfoObj.timeEnd}}</text>
<u-icon name="calendar"></u-icon> <u-icon name="calendar"></u-icon>
</view> </view>
</view> </view>
<view class="person_itm_sign" @click="goChangeInfo('电话','13888888888')"> <!-- <view class="person_itm_sign" @click="goChangeInfo('电话','13888888888')">
<text class="person_itm_sign_tit">电话</text> <text class="person_itm_sign_tit">电话</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<text>13888888888</text> <text>13888888888</text>
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
</view> </view> -->
</view> </view>
<!-- 服务商个人中心 ed--> <!-- 服务商个人中心 ed-->
</view> </view>
@ -226,7 +239,11 @@
isJioned: true, isJioned: true,
artList: ['文艺大家', '集大成者'], artList: ['文艺大家', '集大成者'],
honorList: ['荣誉', '无上荣誉'], honorList: ['荣誉', '无上荣誉'],
stanWorkList:['蒙娜丽莎','高月'] stanWorkList: ['蒙娜丽莎', '高月'],
userInfoObj: {},
baseurl: 'http://192.168.0.9:8080',
info: 'dddddddddddddddddddddddddd',
xieName:''
}; };
}, },
methods: { methods: {
@ -237,6 +254,16 @@
}) })
} }
},
onReady() {
this.http.request('/user/userInfo', {}, "GET").then((res) => {
console.log("res", res.data);
this.userInfoObj = res.data
}).catch((error) => {
console.log(error);
})
} }
} }
</script> </script>
@ -246,11 +273,20 @@
background-color: #F4F5F7; background-color: #F4F5F7;
} }
.avator {
width: 80rpx;
height: 80rpx;
overflow: hidden;
border-radius: 40rpx;
}
.person_itm { .person_itm {
background-color: #FFFFFF; background-color: #FFFFFF;
margin-bottom: 24rpx; margin-bottom: 24rpx;
padding: 24rpx; padding: 24rpx;
.textAreaCss{
font-weight: 700; margin-bottom: 16rpx; display: flex; justify-content: space-between;align-items: center;
}
.person_itm_sign { .person_itm_sign {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;

View File

@ -4,7 +4,7 @@
<u--form :model="model1" ref="form1"> <u--form :model="model1" ref="form1">
<u-form-item prop="userInfo.EdValue" ref="item1" class="data_itm" <u-form-item prop="userInfo.EdValue" ref="item1" class="data_itm"
v-if="model1.userInfo.Edkey=='姓名'||model1.userInfo.Edkey=='负责人姓名'||model1.userInfo.Edkey=='服务名称'||model1.userInfo.Edkey=='地址'||model1.userInfo.Edkey=='协会名称'"> v-if="model1.userInfo.Edkey=='姓名'||model1.userInfo.Edkey=='负责人姓名'||model1.userInfo.Edkey=='服务名称'||model1.userInfo.Edkey=='地址'">
<u--input class="p32" placeholder="请填写" clearable v-model="model1.userInfo.Edvalue" border="none" <u--input class="p32" placeholder="请填写" clearable v-model="model1.userInfo.Edvalue" border="none"
@blur="CheckValue" @clear="clearFun"> @blur="CheckValue" @clear="clearFun">
</u--input> </u--input>
@ -25,7 +25,7 @@
</view> </view>
<!-- 政治面貌 民族 籍贯 选择 input--> <!-- 政治面貌 民族 籍贯 选择 input-->
<view class="select" @click="zhengzhiShow=true " <view class="select" @click="zhengzhiShow=true "
v-if="model1.userInfo.Edkey=='政治面貌'||model1.userInfo.Edkey=='民族'||model1.userInfo.Edkey=='籍贯'||model1.userInfo.Edkey=='人才类型'"> v-if="model1.userInfo.Edkey=='政治面貌'||model1.userInfo.Edkey=='民族'||model1.userInfo.Edkey=='籍贯'||model1.userInfo.Edkey=='人才类型'||model1.userInfo.Edkey=='所属协会'">
<u--input class="p32" readonly v-model="model1.userInfo.Edvalue" border="none"> <u--input class="p32" readonly v-model="model1.userInfo.Edvalue" border="none">
</u--input> </u--input>
</view> </view>
@ -46,7 +46,7 @@
<!--phone number ed--> <!--phone number ed-->
<!-- 成就类 --> <!-- 成就类 -->
<view class="chengjiu" v-if="model1.userInfo.Edkey=='艺术成就'||model1.userInfo.Edkey=='代表作'||model1.userInfo.Edkey=='荣誉奖项'"> <view class="chengjiu" v-if="model1.userInfo.Edkey=='艺术成就'||model1.userInfo.Edkey=='荣誉奖项'">
<view class="chen_itm" v-for="(v,i) in model1.userInfo.Edvalue" :key="i" <view class="chen_itm" v-for="(v,i) in model1.userInfo.Edvalue" :key="i"
style="display: flex; justify-content: space-between; align-items: center;"> style="display: flex; justify-content: space-between; align-items: center;">
<input type="text" v-model="model1.userInfo.Edvalue[i]" placeholder="请输入艺术成就" class="chengjiu" /> <input type="text" v-model="model1.userInfo.Edvalue[i]" placeholder="请输入艺术成就" class="chengjiu" />
@ -55,7 +55,8 @@
<view style="width: 80rpx; height: 80rpx;" class="addImg" @click="AddItem" <view style="width: 80rpx; height: 80rpx;" class="addImg" @click="AddItem"
v-if="model1.userInfo.Edvalue.length==i+1"> v-if="model1.userInfo.Edvalue.length==i+1">
<image style="width: 80rpx; height: 80rpx;" src="../../static/improveData/redAdd.png" mode=""> <image style="width: 80rpx; height: 80rpx;" src="../../static/improveData/redAdd.png"
mode="">
</image> </image>
</view> </view>
@ -68,9 +69,63 @@
</view> </view>
</view> </view>
<!-- 成就类ed --> <!-- 成就类ed -->
<!-- 代表作 -->
<view class="opus" v-if="model1.userInfo.Edkey=='代表作'">
<view v-for="(val,index) in StandradList" :key="index">
<view class="tt" style="display: flex; justify-content: space-between; align-items: center; ">
<input type="text" v-model="StandradList[index]" placeholder="请输入作品名称" class="chengjiu" />
<view class="right_img_box" style="margin-left: 16rpx;">
<view style="width: 80rpx; height: 80rpx;" class="addImg" @click="AddItem(2)"
v-if="StandradList.length==index+1">
<image style="width: 80rpx; height: 80rpx;" src="../../static/improveData/redAdd.png"
mode=""></image>
</view>
<view class="delImg" @click="delItem(index)"
v-if="StandradList.length>1&&StandradList.length!=index+1">
<img style="width: 40rpx; height: 40rpx;" src="../../static/improveData/del.png" alt="">
</view>
</view>
</view>
<view class="chen_itm ">
<u-upload class="WenYiUpload" accept="image" width="172rpx" height="172rpx"
:fileList="fileList2[index]" @afterRead="afterRead1" @delete="deletePic1"
:name='String(index)' multiple>
<image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/imgjia.png">
</image>
</u-upload>
</view>
</view>
</view>
<!-- 代表作ed -->
<!-- 头像上传 -->
<u-upload style="margin-top: 16rpx;" v-if="model1.userInfo.Edkey=='头像'" accept="image" width="172rpx"
height="172rpx" :fileList="fileList4" @afterRead="afterRead" @delete="deletePic" name="4" multiple
:maxCount="1">
<image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image>
</u-upload>
<!-- 头像上传 ed-->
<!-- 实景 资质上传 -->
<u-upload style="margin-top: 16rpx;" v-if="model1.userInfo.Edkey=='实景照'||model1.userInfo.Edkey=='资质证'"
accept="image" width="172rpx" height="172rpx" :fileList="fileList1" @afterRead="afterRead"
@delete="deletePic" name="1">
<image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image>
</u-upload>
<!-- 实景 资质上传 ed-->
<u-picker :show="zhengzhiShow" confirmColor="#99241B" @confirm="confimZheng" immediateChange <u-picker :show="zhengzhiShow" confirmColor="#99241B" @confirm="confimZheng" immediateChange
closeOnClickOverlay @close="zhengzhiClose" @cancel="zhengzhiClose" closeOnClickOverlay @close="zhengzhiClose" @cancel="zhengzhiClose"
:columns="model1.userInfo.Edkey=='政治面貌'? zhengzhiShow : model1.userInfo.Edkey =='民族' ? Zucolumns : model1.userInfo.Edkey=='籍贯' ? Jicolumns : model1.userInfo.Edkey=='人才类型'? peopleSkillColums:[]"> :columns="model1.userInfo.Edkey=='政治面貌'? zhengzhiShow : model1.userInfo.Edkey =='民族' ? Zucolumns : model1.userInfo.Edkey=='籍贯' ? Jicolumns : model1.userInfo.Edkey=='人才类型'? peopleSkillColums:model1.userInfo.Edkey=='所属协会'? xiecolumns:[]">
</u-picker> </u-picker>
<u-datetime-picker confirmColor="#99241B" :minDate="-2207520000000" :show="showBirthday" <u-datetime-picker confirmColor="#99241B" :minDate="-2207520000000" :show="showBirthday"
@ -78,7 +133,7 @@
:value="model1.userInfo.Edvalue" mode="date" closeOnClickOverlay @confirm="birthdayConfirm" :value="model1.userInfo.Edvalue" mode="date" closeOnClickOverlay @confirm="birthdayConfirm"
@cancel="birthdayClose" @close="birthdayClose"></u-datetime-picker> @cancel="birthdayClose" @close="birthdayClose"></u-datetime-picker>
<!-- #D5D4D6 --> <!-- #D5D4D6 -->
<u-button class="custom-style" :disabled='isSubmit' <u-button class="custom-style" :disabled='!isSubmit'
style="background-color:#99241B ; color: #FFFFFF; margin-top: 32rpx; width: calc(100% - 96rpx);" style="background-color:#99241B ; color: #FFFFFF; margin-top: 32rpx; width: calc(100% - 96rpx);"
type="default" @click="submit()">保存</u-button> type="default" @click="submit()">保存</u-button>
@ -93,9 +148,16 @@
</template> </template>
<script> <script>
import http from '../../request/interface.js'
export default { export default {
data() { data() {
return { return {
postFileList2: [], //
baseurl: 'http://192.168.0.9:8080',
fileList4: [], //
fileList1: [],
fileList2: [], //
StandradList: [], //
artlist: [''], artlist: [''],
showBirthday: false, showBirthday: false,
isSubmit: true, isSubmit: true,
@ -107,6 +169,7 @@
Edvalue: '', Edvalue: '',
} }
}, },
xiecolumns: [],
Zhengcolumns: [ Zhengcolumns: [
["群众", "党员", '共青团员'], ["群众", "党员", '共青团员'],
], ],
@ -141,27 +204,127 @@
}; };
}, },
onLoad(opt) { onLoad(opt) {
console.log(opt); console.log("===opt", opt);
this.model1.userInfo.Edkey = JSON.parse(opt.key) this.model1.userInfo.Edkey = JSON.parse(opt.key)
this.model1.userInfo.Edvalue = JSON.parse(opt.value) this.model1.userInfo.Edvalue = JSON.parse(opt.value)
this.tempValue = JSON.parse(opt.value) this.tempValue = JSON.parse(opt.value)
console.log("optvalue", this.model1.userInfo.Edvalue);
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: JSON.parse(opt.key) title: JSON.parse(opt.key)
}) })
if (this.model1.userInfo.Edkey == '所属协会') {
this.http.request('/association/list', {}, "GET").then((res) => {
let xieList = res.data.records.map((v, i) => {
return v.name
})
this.xiecolumns.push(xieList)
}).catch((error) => {
uni.showToast({
title: error,
icon: "none",
});
})
}
if (this.model1.userInfo.Edkey == '头像') {
console.log("ll", JSON.parse(this.model1.userInfo.Edvalue)[0]);
this.fileList4.push({
url: this.baseurl + JSON.parse(this.model1.userInfo.Edvalue)[0]
})
}
if (this.model1.userInfo.Edkey == '实景照' || this.model1.userInfo.Edkey == '资质证') {
let urL = this.baseurl
let arr = JSON.parse(this.model1.userInfo.Edvalue).map((vv, ii) => {
return urL + vv
})
for (let i = 0; i < arr.length; i++) {
this.fileList1.push({
url: arr[i]
})
}
console.log("this.fileList1", this.fileList1);
}
if (this.model1.userInfo.Edkey == '代表作') {
this.isSubmit = true
// stanlist fileList2
this.model1.userInfo.Edvalue.map((v, i) => {
this.StandradList.push(v.name)
this.fileList2.push(v.value)
})
console.log("flieList2", this.fileList2);
console.log("this.model1.userInfo.Edvalue==", this.model1.userInfo.Edvalue);
//
this.postFileList2 = this.model1.userInfo.Edvalue.map((v, i) => {
return v.value
})
console.log(" this.postFileList2===", this.postFileList2);
var urL = this.baseurl
var sarr = this.fileList2.map((v, i) => {
return v.map((vv, ii) => {
return urL + vv
})
})
this.fileList2 = this.fileList2.map((v, i) => {
return v = []
})
for (let i = 0; i < sarr.length; i++) {
for (let j = 0; j < sarr[i].length; j++) {
this.fileList2[i].push({
url: sarr[i][j]
})
}
}
// this.fileList2.splice(1,0)
console.log(" this.fileList2", this.fileList2);
}
}, },
onReady() { onReady() {
this.$refs.form1.setRules(this.rules); this.$refs.form1.setRules(this.rules);
}, },
methods: { methods: {
AddItem() { AddItem() {
if (this.model1.userInfo.Edkey == '代表作') {
this.StandradList.push('')
this.fileList2.push([])
this.postFileList2.push([])
} else {
this.model1.userInfo.Edvalue.push("") this.model1.userInfo.Edvalue.push("")
}
}, },
delItem( ) { delItem(num) {
if (this.model1.userInfo.Edkey == '代表作') {
//
this.StandradList.splice(num, 1)
//
this.fileList2.splice(num, 1, [''])
//
this.postFileList2.splice(num, 1)
} else {
this.model1.userInfo.Edvalue.splice(num, 1) this.model1.userInfo.Edvalue.splice(num, 1)
}
}, },
@ -222,7 +385,13 @@
birthdayConfirm(e) { birthdayConfirm(e) {
this.showBirthday = false this.showBirthday = false
this.model1.userInfo.Edvalue = uni.$u.timeFormat(e.value, 'yyyy/mm/dd') if (this.model1.userInfo.Edkey == '出生日期' || this.model1.userInfo.Edkey == '入会时间' || this.model1.userInfo
.Edkey ==
'服务时间') {
this.model1.userInfo.Edvalue = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
} else {
this.model1.userInfo.Edvalue = e.value
}
}, },
submit() { submit() {
@ -237,6 +406,29 @@
/* uni.navigateBack({ /* uni.navigateBack({
delta:1 delta:1
}) */ }) */
if (this.model1.userInfo.Edkey == '代表作') {
console.log("submit", this.postFileList2);
// this.StandradList
var opsArr = []
for (let i = 0; i < this.StandradList.length; i++) {
// console.log("=====", this.fileList2);
opsArr.push({
name: this.StandradList[i],
value: this.postFileList2[i]
})
}
console.log("opsArr", opsArr);
this.http.request('/user', {
'opus': opsArr
}, "POST").then((res) => {
console.log("ressss", res.data);
}).catch((error) => {
uni.showToast({
title: error
})
})
}
}, },
CheckValue() { CheckValue() {
// console.log("event",event); // console.log("event",event);
@ -253,26 +445,109 @@
}, },
clearFun() { clearFun() {
console.log("清空"); console.log("清空");
},
// upload
//
deletePic(event) {
// console.log("=======",this.fileList1);
this[`fileList${event.name}`].splice(event.index, 1)
},
//
deletePic1(event) {
this.fileList2[event.name].splice(event.index, 1)
this.postFileList2[event.name].splice(event.index, 1)
//
/* if(xx){
delItem(xx)
} */
},
//
async afterRead(event) {
// mutiple true , file
let lists = [].concat(event.file)
let fileListLen = this[`fileList${event.name}`].length
lists.map((item) => {
this[`fileList${event.name}`].push({
...item,
status: 'uploading',
message: '上传中'
})
})
for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url)
let item = this[`fileList${event.name}`][fileListLen]
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
status: 'success',
message: '',
url: result
}))
fileListLen++
} }
},
//
async afterRead1(event) {
let lists = [].concat(event.file)
let fileListLen = this.fileList2[event.name].length
console.log("fileListLen", fileListLen);
lists.map((item) => {
this.fileList2[event.name].push({
...item,
status: 'uploading',
message: '上传中'
})
})
for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url)
let item = this.fileList2[event.name][fileListLen]
this.fileList2[event.name].splice(fileListLen, 1, Object.assign(item, {
status: 'success',
message: '',
url: result
}))
this.postFileList2[event.name].splice(fileListLen, 1, result)
fileListLen++
}
// console.log("postFileList2", this.postFileList2);
// console.log("this.model1.userInfo.Edvalue", this.model1.userInfo.Edvalue );
},
uploadFilePromise(url) {
return new Promise((resolve, reject) => {
let a = uni.uploadFile({
url: http.config.baseUrl + '/upload/upload',
filePath: url,
name: 'file',
success: (res) => {
setTimeout(() => {
resolve(JSON.parse(res.data).data.path)
}, 1000)
}
});
})
},
// upload ed
}, },
watch: { watch: {
'model1.userInfo.Edvalue': function(n, o) { 'model1.userInfo.Edvalue': function(n, o) {
console.log("n", n); console.log("n", n);
if (!n) { if (!n) {
// console.log(this); // console.log(this);
uni.$u.toast('不能为空') uni.$u.toast('不能为空')
// this.model1.userInfo.Edvalue = this.tempValue // this.model1.userInfo.Edvalue = this.tempValue
} }
} }
} },
} }
</script> </script>
<style lang="scss"> <style lang="scss">
page { /* page {
background-color: #f5f5f5; background-color: #f5f5f5;
} }
*/
.sexBox { .sexBox {
.sexItm { .sexItm {
display: flex; display: flex;

View File

@ -87,11 +87,11 @@
<view class="data_itm"> <view class="data_itm">
<view class="data_itm_key label_t"> <view class="data_itm_key label_t">
照片上传 头像上传
</view> </view>
</view> </view>
<u-upload class="upload" accept="image" width="172rpx" height="172rpx" :fileList="fileList3" <u-upload class="upload" accept="image" width="172rpx" height="172rpx" :fileList="fileList3"
@afterRead="afterRead" @delete="deletePic" name="3" multiple :maxCount="2"> @afterRead="afterRead" @delete="deletePic" name="3" multiple :maxCount="1">
<image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image> <image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image>
</u-upload> </u-upload>
@ -109,13 +109,6 @@
<u-icon slot="suffix" name="arrow-right"></u-icon> <u-icon slot="suffix" name="arrow-right"></u-icon>
</u--input> </u--input>
</u-form-item> </u-form-item>
<u-form-item ref="item1" @click="showJionmeet=true" class="data_itm" > <u-form-item ref="item1" @click="showJionmeet=true" class="data_itm" >
<text class="label_t">入会时间</text> <text class="label_t">入会时间</text>
<u--input class="p32" placeholder="请选择时间" v-model="model1.userInfo.jionTime" readonly <u--input class="p32" placeholder="请选择时间" v-model="model1.userInfo.jionTime" readonly
@ -173,8 +166,6 @@
</view> </view>
</view> </view>
</u-form-item> </u-form-item>
<u-form-item ref="item1" label='代表作' class="data_itm te"> <u-form-item ref="item1" label='代表作' class="data_itm te">
<view v-for="(val,index) in StandradList" :key="index"> <view v-for="(val,index) in StandradList" :key="index">
@ -196,29 +187,27 @@
</view> </view>
</view> </view>
<view class="chen_itm" style="width: 200rpx;"> <view class="chen_itm " >
<u-upload class="WenYiUpload" accept="image" width="172rpx" height="172rpx" <u-upload class="WenYiUpload" accept="image" width="172rpx" height="172rpx"
:fileList="fileList2[index]" @afterRead="afterRead1" @delete="deletePic1" :fileList="fileList2[index]" @afterRead="afterRead1" @delete="deletePic1"
:name='String(index)' multiple :maxCount="2"> :name='String(index)' multiple >
<image style="width: 172rpx;height: 172rpx;" <image style="width: 172rpx;height: 172rpx;"
src="../../static/improveData/imgjia.png"> src="../../static/improveData/imgjia.png">
</image> </image>
</u-upload> </u-upload>
</view>
</view> </view>
</view>
</u-form-item> </u-form-item>
<view class="data_itm" style="display: flex;justify-content: space-between; align-items: center;"> <view class="data_itm xie " >
<!-- 是否已加入协会 --> <!-- 是否已加入协会 -->
<text class="label_t">是否已加入协会</text> <text class="label_t">是否已加入协会</text>
<u-switch v-model="isJioned" activeColor="#99241B" size=20></u-switch> <u-switch v-model="isJioned" activeColor="#99241B" size=20></u-switch>
</view> </view>
<u-form-item ref="item1" @click="showJionmeet=true" class="data_itm"> <u-form-item ref="item1" @click="showJionmeet=true" class="data_itm" v-if="isJioned">
<text class="label_t">入会时间</text> <text class="label_t">入会时间</text>
<u--input class="p32" placeholder="请选择时间" v-model="model1.userInfo.jionTime" readonly <u--input class="p32" placeholder="请选择时间" v-model="model1.userInfo.jionTime" readonly
inputAlign="right" border="none"> inputAlign="right" border="none">
@ -244,14 +233,14 @@
<u-form-item ref="item1" label="实景照片上传" class="data_itm"> <u-form-item ref="item1" label="实景照片上传" class="data_itm">
<u-upload class="upload" accept="image" width="172rpx" height="172rpx" :fileList="fileList1" <u-upload class="upload" accept="image" width="172rpx" height="172rpx" :fileList="fileList1"
@afterRead="afterRead" @delete="deletePic" name="1" multiple :maxCount="2"> @afterRead="afterRead" @delete="deletePic" name="1" multiple >
<image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image> <image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image>
</u-upload> </u-upload>
</u-form-item> </u-form-item>
<u-form-item ref="item1" label="资质照片上传" class="data_itm">
<u-form-item ref="item1" label="资质照片上传" class="data_itm">
<u-upload class="upload" accept="image" width="172rpx" height="172rpx" :fileList="fileList4" <u-upload class="upload" accept="image" width="172rpx" height="172rpx" :fileList="fileList4"
@afterRead="afterRead" @delete="deletePic" name="4" multiple :maxCount="2"> @afterRead="afterRead" @delete="deletePic" name="4" multiple >
<image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image> <image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image>
</u-upload> </u-upload>
</u-form-item> </u-form-item>
@ -503,42 +492,11 @@
trigger: ['change', 'blur'], trigger: ['change', 'blur'],
} }
] ]
/* ,
"userInfo.phoneNum": [{
required: true,
message: '请输入联系电话',
trigger: ['change', 'blur'],
},
},
{
validator: (rule, value, callback) => {
return uni.$u.test.mobile(value);
},
message: '手机号码不正确',
trigger: ['change', 'blur'],
}
] */
/* ,
"userInfo.ServephoneNum": [{
required: true,
message: '请输入联系电话',
trigger: ['change', 'blur'],
},
{
validator: (rule, value, callback) => {
return uni.$u.test.mobile(value);
},
message: '手机号码不正确',
trigger: ['change', 'blur'],
}
] */
, ,
'userInfo.ServerName': [{ 'userInfo.ServerName': [{
type: 'string', type: 'string',
required: true, required: true,
message: '请填写姓名', message: '请填写服务名称',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}, { }, {
// truefalse // truefalse
@ -777,6 +735,7 @@
if (this.fileList3) { if (this.fileList3) {
var fl3 = JSON.stringify(this.fileList3.map((v, i) => { var fl3 = JSON.stringify(this.fileList3.map((v, i) => {
return v.url return v.url
// return v.thumb
})) }))
} else { } else {
var fl3 = '[]' var fl3 = '[]'
@ -785,6 +744,7 @@
if (this.fileList4) { if (this.fileList4) {
var fl4 = JSON.stringify(this.fileList4.map((v, i) => { var fl4 = JSON.stringify(this.fileList4.map((v, i) => {
return v.url return v.url
// return v.thumb
})) }))
} else { } else {
var fl4 = '[]' var fl4 = '[]'
@ -793,6 +753,7 @@
if (this.fileList1) { if (this.fileList1) {
var fl1 = JSON.stringify(this.fileList1.map((v, i) => { var fl1 = JSON.stringify(this.fileList1.map((v, i) => {
return v.url return v.url
// return v.thumb
})) }))
} else { } else {
var fl1 = '[]' var fl1 = '[]'
@ -806,11 +767,12 @@
name: this.StandradList[i], name: this.StandradList[i],
value: this.fileList2[i].map((v, num) => { value: this.fileList2[i].map((v, num) => {
return v.url return v.url
// return v.thumb
}) })
}) })
} }
} }
console.log("opsArr====",opsArr);
var yishucj = JSON.stringify(this.artlist) var yishucj = JSON.stringify(this.artlist)
@ -845,11 +807,11 @@
"userType": this.pageTypeId, "userType": this.pageTypeId,
} }
console.log("dataddddddddd", data); console.log("dataddddddddd", data);
this.http.request('/user/init', data, "POST").then(res => { this.http.request('/auth/init', data, "POST").then(res => {
if (res.code == 200) { if (res.code == 200) {
/* uni.navigateTo({ uni.navigateTo({
url: '/pages/pageHome/pageHome' url: '/pages/pageHome/pageHome'
}) */ })
uni.showToast({ uni.showToast({
title: "成功了", title: "成功了",
icon: "none", icon: "none",
@ -887,9 +849,6 @@
} }
.WenYiUpload { .WenYiUpload {
// padding: 32rpx;
// background-color: #F8F8F8;
margin-top: 16rpx; margin-top: 16rpx;
} }
@ -938,6 +897,9 @@
font-weight: 600; font-weight: 600;
} }
} }
.xie{
display: flex;justify-content: space-between; align-items: center;margin-bottom: 16rpx;
}

View File

@ -7,7 +7,7 @@ export default {
config: { config: {
// baseUrl: "http://192.168.0.57:8090/h5/api", //王锡 // baseUrl: "http://192.168.0.57:8090/h5/api", //王锡
// baseUrl: "http://192.168.124.110:8088/api", //周源 // baseUrl: "http://192.168.124.110:8088/api", //周源
baseUrl: "http://192.168.0.11:8080/h5/api", //俞燕红 baseUrl: "http://192.168.0.9:8080/h5/api", //俞燕红
// baseUrl: "https://wlsq.ydool.com.cn/api", //线上 // baseUrl: "https://wlsq.ydool.com.cn/api", //线上
header: { header: {
'Content-Type': 'application/json;charset=UTF-8', 'Content-Type': 'application/json;charset=UTF-8',