chagne add
This commit is contained in:
parent
ac698d86d2
commit
5fdf5ed6c3
|
@ -5,14 +5,14 @@
|
|||
<view class="person_itm_sign" @click="goChangeInfo('姓名',userInfoObj.userName)">
|
||||
<text class="person_itm_sign_tit">姓名</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text> {{userInfoObj.userName}}</text>
|
||||
<text> {{userInfoObj.userName}}</text>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="person_itm_sign" @click="goChangeInfo('性别',userInfoObj.sex)">
|
||||
<text class="person_itm_sign_tit">性别 </text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text> {{userInfoObj.sex}}</text>
|
||||
<text> {{userInfoObj.sex}}</text>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -73,6 +73,13 @@
|
|||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="person_itm_sign" @click="goChangeInfo('密码','')">
|
||||
<text class="person_itm_sign_tit">密码</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text> {{userInfoObj.pasw}}</text>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="person_itm_sign" @click="goChangeInfo('头像',userInfoObj.images)">
|
||||
<text class="person_itm_sign_tit">头像</text>
|
||||
<view class="person_itm_sign_right">
|
||||
|
@ -190,11 +197,13 @@
|
|||
|
||||
|
||||
<view class="person_itm">
|
||||
<view @click="goChangeInfo('服务内容介绍',userInfoObj.info)">
|
||||
<view class="textAreaCss" >
|
||||
<text>服务内容介绍</text> <u-icon name="arrow-right"></u-icon>
|
||||
<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>
|
||||
<u--textarea v-model="userInfoObj.info" placeholder="请输入介绍" style="background-color: #F8F8F8;">
|
||||
</u--textarea>
|
||||
</view>
|
||||
|
||||
<view class="person_itm_sign" @click="goChangeInfo('负责人姓名',userInfoObj.fzr)">
|
||||
|
@ -208,31 +217,40 @@
|
|||
<view class="person_itm_sign" @click="goChangeInfo('服务开始时间',userInfoObj.timeStart)">
|
||||
<text class="person_itm_sign_tit">服务开始时间</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text>09:00 {{userInfoObj.timeStart}}</text>
|
||||
<text> {{userInfoObj.timeStart}}</text>
|
||||
<u-icon name="calendar"></u-icon>
|
||||
</view>
|
||||
</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>
|
||||
<text> {{userInfoObj.timeEnd}}</text>
|
||||
<u-icon name="calendar"></u-icon>
|
||||
</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>
|
||||
<view class="person_itm_sign_right">
|
||||
<text>13888888888</text>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="person_itm_sign" @click="goChangeInfo('密码',userInfoObj.pasw)">
|
||||
<text class="person_itm_sign_tit">密码</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text> {{userInfoObj.pasw}}</text>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 服务商个人中心 ed-->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import http from '../../request/interface.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -241,9 +259,9 @@
|
|||
honorList: ['荣誉', '无上荣誉'],
|
||||
stanWorkList: ['蒙娜丽莎', '高月'],
|
||||
userInfoObj: {},
|
||||
baseurl: 'http://192.168.0.9:8080',
|
||||
info: 'dddddddddddddddddddddddddd',
|
||||
xieName:''
|
||||
baseurl: http.config.baseUrl.replace('/h5/api', ''), //'http://192.168.0.9:8080'
|
||||
|
||||
xieName: ''
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -253,17 +271,25 @@
|
|||
url: `/pages/PersonalCenter/ReEditSingleInfo?key=${JSON.stringify(k)}&value=${JSON.stringify(v)}`
|
||||
})
|
||||
|
||||
},
|
||||
requestUserinfo(){
|
||||
this.http.request('/user/userInfo', {}, "GET").then((res) => {
|
||||
console.log("res", res.data);
|
||||
this.userInfoObj = res.data
|
||||
|
||||
}).catch((error) => {
|
||||
uni.showToast({
|
||||
title: error
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
this.http.request('/user/userInfo', {}, "GET").then((res) => {
|
||||
console.log("res", res.data);
|
||||
this.userInfoObj = res.data
|
||||
|
||||
}).catch((error) => {
|
||||
|
||||
console.log(error);
|
||||
})
|
||||
this.requestUserinfo()
|
||||
},
|
||||
onShow() {
|
||||
this.requestUserinfo()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -284,9 +310,15 @@
|
|||
background-color: #FFFFFF;
|
||||
margin-bottom: 24rpx;
|
||||
padding: 24rpx;
|
||||
.textAreaCss{
|
||||
font-weight: 700; margin-bottom: 16rpx; display: flex; justify-content: space-between;align-items: center;
|
||||
}
|
||||
|
||||
.textAreaCss {
|
||||
font-weight: 700;
|
||||
margin-bottom: 16rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.person_itm_sign {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
|
|
@ -1,143 +1,156 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="m16" v-if="Edkey=='姓名'||Edkey=='负责人姓名'||Edkey=='服务名称'||Edkey=='地址'">
|
||||
<u--input class="p32 nameClass" placeholder="请填写" clearable v-model="Edvalue" border="none"
|
||||
@blur="CheckValue" @clear="clearFun">
|
||||
</u--input>
|
||||
</view>
|
||||
|
||||
<u--form :model="model1" ref="form1">
|
||||
|
||||
<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=='地址'">
|
||||
<u--input class="p32" placeholder="请填写" clearable v-model="model1.userInfo.Edvalue" border="none"
|
||||
@blur="CheckValue" @clear="clearFun">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<view class="sex" style="background-color: #FFFFFF;" v-if="model1.userInfo.Edkey=='性别'">
|
||||
<u-radio-group v-model="model1.userInfo.Edvalue" iconPlacement="right"
|
||||
:customStyle="{margin: '16px',backgroundColor: '#FFFFFF'}" placement="column" :borderBottom="true">
|
||||
<u-radio activeColor="red" name="男" label="男"></u-radio>
|
||||
<u-radio activeColor="red" name="女" label="女"></u-radio>
|
||||
</u-radio-group>
|
||||
|
||||
|
||||
<view class="sex" style="background-color: #FFFFFF;margin: 32rpx;" v-if="Edkey=='性别'">
|
||||
<u-radio-group v-model="Edvalue" iconPlacement="right"
|
||||
:customStyle="{ backgroundColor: '#FFFFFF'}" placement="column" >
|
||||
<u-radio activeColor="#99241B" name="男" label="男" labelColor="#251B1D" ></u-radio>
|
||||
<u-divider :hairline="true"></u-divider>
|
||||
<u-radio activeColor="#99241B" name="女" label="女" labelColor="#251B1D"></u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="date m16" @click="DatePicker"
|
||||
v-if="Edkey=='出生日期'||Edkey=='入会时间'||Edkey=='服务开始时间'||Edkey=='服务结束时间'">
|
||||
<u--input class='p32 gray' readonly v-model="Edvalue" border="none">
|
||||
</u--input>
|
||||
</view>
|
||||
<!-- 政治面貌 民族 籍贯 选择 input-->
|
||||
<view class="select m16" @click="zhengzhiShow=true"
|
||||
v-if="Edkey=='政治面貌'||Edkey=='民族'||Edkey=='籍贯'||Edkey=='人才类型'||Edkey=='所属协会'">
|
||||
<u--input class="p32 gray" readonly v-model="Edvalue" border="none">
|
||||
</u--input>
|
||||
</view>
|
||||
<!-- 政治面貌 民族 籍贯 选择 input ed-->
|
||||
<!-- 身份证号码 -->
|
||||
<view class=" m16" v-if="Edkey=='身份证号码'">
|
||||
<u--input class="p32 gray" placeholder="请填写" clearable v-model="Edvalue" border="none" @blur="CheckId">
|
||||
</u--input>
|
||||
</view>
|
||||
<!-- 身份证号码 ed -->
|
||||
<!--phone number -->
|
||||
<view class="phoneNumber" v-if="Edkey=='联系电话'||Edkey=='电话'">
|
||||
<u--input class="p32" placeholder="请填写" clearable v-model="Edvalue" border="none" @blur="CheckNumber">
|
||||
</u--input>
|
||||
</view>
|
||||
<!--phone number ed-->
|
||||
|
||||
<!-- 成就类 -->
|
||||
<view class=" m16" v-if="Edkey=='艺术成就'||Edkey=='荣誉奖项'">
|
||||
<view class="flc-top" v-for="(v,i) in Edvalue" :key="i">
|
||||
<input type="text " style="flex: 1; padding: 18rpx 32rpx; " class=" gray" v-model="Edvalue[i]"
|
||||
placeholder="请输入艺术成就" />
|
||||
|
||||
<view class="right_img_box">
|
||||
|
||||
<view style="width: 80rpx; height: 80rpx;" class="addImg" @click="AddItem"
|
||||
v-if="Edvalue.length==i+1">
|
||||
<image style="width: 80rpx; height: 80rpx;" src="../../static/improveData/redAdd.png" mode="">
|
||||
</image>
|
||||
</view>
|
||||
|
||||
<view class="delImg" @click="delItem" v-if="Edvalue.length>1&&Edvalue.length!=i+1">
|
||||
<img style="width: 80rpx; height: 80rpx;" src="../../static/improveData/del.png" alt="">
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 成就类ed -->
|
||||
<!-- 代表作 -->
|
||||
<view class="opus" v-if="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="date" @click="DatePicker"
|
||||
v-if="model1.userInfo.Edkey=='出生日期'||model1.userInfo.Edkey=='入会时间'||model1.userInfo.Edkey=='服务时间'">
|
||||
<u--input class="p32" readonly v-model="model1.userInfo.Edvalue" border="none">
|
||||
</u--input>
|
||||
</view>
|
||||
<!-- 政治面貌 民族 籍贯 选择 input-->
|
||||
<view class="select" @click="zhengzhiShow=true "
|
||||
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>
|
||||
</view>
|
||||
<!-- 政治面貌 民族 籍贯 选择 input ed-->
|
||||
<!-- 身份证号码 -->
|
||||
<view class="creat_id" v-if="model1.userInfo.Edkey=='身份证号码'">
|
||||
<u--input class="p32" placeholder="请填写" clearable v-model="model1.userInfo.Edvalue" border="none"
|
||||
@blur="CheckId">
|
||||
</u--input>
|
||||
</view>
|
||||
<!-- 身份证号码 ed -->
|
||||
<!--phone number -->
|
||||
<view class="phoneNumber" v-if="model1.userInfo.Edkey=='联系电话'||model1.userInfo.Edkey=='电话'">
|
||||
<u--input class="p32" placeholder="请填写" clearable v-model="model1.userInfo.Edvalue" border="none"
|
||||
@blur="CheckNumber">
|
||||
</u--input>
|
||||
</view>
|
||||
<!--phone number ed-->
|
||||
|
||||
<!-- 成就类 -->
|
||||
<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"
|
||||
style="display: flex; justify-content: space-between; align-items: center;">
|
||||
<input type="text" v-model="model1.userInfo.Edvalue[i]" placeholder="请输入艺术成就" class="chengjiu" />
|
||||
|
||||
<view class="right_img_box">
|
||||
|
||||
<view style="width: 80rpx; height: 80rpx;" class="addImg" @click="AddItem"
|
||||
v-if="model1.userInfo.Edvalue.length==i+1">
|
||||
<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>
|
||||
mode=""></image>
|
||||
</view>
|
||||
|
||||
<view class="delImg" @click="delItem"
|
||||
v-if="model1.userInfo.Edvalue.length>1&&model1.userInfo.Edvalue.length!=i+1">
|
||||
<img style="width: 80rpx; height: 80rpx;" src="../../static/improveData/del.png" alt="">
|
||||
<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>
|
||||
<!-- 成就类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">
|
||||
</view>
|
||||
<!-- 代表作ed -->
|
||||
<!-- 头像上传 -->
|
||||
<view v-if="Edkey=='头像'">
|
||||
<u-upload style=" margin: 16rpx 32rpx 0rpx;" 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-->
|
||||
</view>
|
||||
|
||||
<!-- 头像上传 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">
|
||||
<!-- 实景 资质上传 -->
|
||||
<view v-if="Edkey=='实景照'||Edkey=='资质证'" >
|
||||
<u-upload style="margin: 16rpx 32rpx 0rpx;" 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-->
|
||||
</view>
|
||||
|
||||
<!-- 实景 资质上传 ed-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<u-picker :show="zhengzhiShow" confirmColor="#99241B" @confirm="confimZheng" immediateChange
|
||||
closeOnClickOverlay @close="zhengzhiClose" @cancel="zhengzhiClose"
|
||||
: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 :show="zhengzhiShow" confirmColor="#99241B" @confirm="confimZheng" immediateChange closeOnClickOverlay
|
||||
@close="zhengzhiClose" @cancel="zhengzhiClose"
|
||||
:columns="Edkey=='政治面貌'? Zhengcolumns : Edkey =='民族' ? Zucolumns : Edkey=='籍贯' ? Jicolumns : Edkey=='人才类型'? peopleSkillColums:Edkey=='所属协会'? xiecolumns:[]">
|
||||
</u-picker>
|
||||
|
||||
<u-datetime-picker confirmColor="#99241B" :minDate="-2207520000000" :show="showBirthday"
|
||||
v-if="Edkey=='出生日期'||Edkey=='入会时间'||Edkey=='服务开始时间'||Edkey=='服务结束时间'" :value="Edvalue" :mode="timeMode"
|
||||
closeOnClickOverlay @confirm="birthdayConfirm" @cancel="birthdayClose" @close="birthdayClose">
|
||||
</u-datetime-picker>
|
||||
|
||||
|
||||
|
||||
<!-- 服务内容介绍 -->
|
||||
<view class="textAreaInfo" v-if="Edkey == '服务内容介绍'">
|
||||
<u--textarea v-model="Edvalue" placeholder="请输入介绍" style="background-color: #F8F8F8;">
|
||||
</u--textarea>
|
||||
</view>
|
||||
<!-- 服务内容介绍ed -->
|
||||
|
||||
|
||||
|
||||
<!-- #D5D4D6 -->
|
||||
<u-button class="custom-style" :disabled='!isSubmit'
|
||||
style="background-color:#99241B ; color: #FFFFFF; margin-top: 32rpx; width: calc(100% - 96rpx);"
|
||||
type="default" @click="submit()">保存</u-button>
|
||||
|
||||
<u-datetime-picker confirmColor="#99241B" :minDate="-2207520000000" :show="showBirthday"
|
||||
v-if="model1.userInfo.Edkey=='出生日期'||model1.userInfo.Edkey=='入会时间'||model1.userInfo.Edkey=='服务时间'"
|
||||
:value="model1.userInfo.Edvalue" mode="date" closeOnClickOverlay @confirm="birthdayConfirm"
|
||||
@cancel="birthdayClose" @close="birthdayClose"></u-datetime-picker>
|
||||
<!-- #D5D4D6 -->
|
||||
<u-button class="custom-style" :disabled='!isSubmit'
|
||||
style="background-color:#99241B ; color: #FFFFFF; margin-top: 32rpx; width: calc(100% - 96rpx);"
|
||||
type="default" @click="submit()">保存</u-button>
|
||||
|
||||
</u--form>
|
||||
|
||||
|
||||
|
||||
|
@ -152,9 +165,36 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
postListObj: {
|
||||
'服务名称': 'serviceName',
|
||||
'姓名': 'userName',
|
||||
'负责人姓名': 'fzr',
|
||||
'服务名称': 'serviceName',
|
||||
'地址': 'serviceAddress',
|
||||
'性别': 'sex',
|
||||
'政治面貌': 'politics',
|
||||
'民族': 'nation',
|
||||
'籍贯': 'base',
|
||||
'人才类型': 'rcType',
|
||||
// '所属协会':,
|
||||
'身份证号码': 'idCard',
|
||||
'出生日期': 'birthDay',
|
||||
'入会时间': 'comeTime',
|
||||
'服务开始时间': 'timeStart',
|
||||
'服务结束时间': 'timeEnd',
|
||||
// '头像':'images',
|
||||
// '实景照':'photo',
|
||||
// '资质证':'cfPhoto',
|
||||
'服务内容介绍': 'info',
|
||||
'艺术成就': 'artAtt',
|
||||
'荣誉奖项': 'greats',
|
||||
'密码': 'password'
|
||||
|
||||
},
|
||||
timeMode: 'date', //时间选择器模式 date tiem
|
||||
postFileList2: [], //用来上传的数组
|
||||
baseurl: 'http://192.168.0.9:8080',
|
||||
fileList4: [], //资质照片上传
|
||||
baseurl: http.config.baseUrl.replace('/h5/api', ''),
|
||||
fileList4: [], //头像上传
|
||||
fileList1: [],
|
||||
fileList2: [], //代表作照片
|
||||
StandradList: [], //代表作名称
|
||||
|
@ -163,12 +203,9 @@
|
|||
isSubmit: true,
|
||||
tempValue: '',
|
||||
zhengzhiShow: false,
|
||||
model1: {
|
||||
userInfo: {
|
||||
Edkey: '',
|
||||
Edvalue: '',
|
||||
}
|
||||
},
|
||||
Edkey: '',
|
||||
Edvalue: '',
|
||||
|
||||
xiecolumns: [],
|
||||
Zhengcolumns: [
|
||||
["群众", "党员", '共青团员'],
|
||||
|
@ -183,36 +220,25 @@
|
|||
peopleSkillColums: [
|
||||
["书法家", "画家", "雕塑家"]
|
||||
],
|
||||
// 校验规则
|
||||
rules: {
|
||||
'userInfo.Edvalue': [{
|
||||
required: true,
|
||||
message: '不能为空',
|
||||
trigger: ['blur', 'change']
|
||||
}, {
|
||||
// 此为同步验证,可以直接返回true或者false,如果是异步验证,稍微不同,见下方说明
|
||||
validator: (rule, value, callback) => {
|
||||
// 调用uView自带的js验证规则,详见:
|
||||
return uni.$u.test.isEmpty(value);
|
||||
},
|
||||
message: "不能为空",
|
||||
// 触发器可以同时用blur和change,二者之间用英文逗号隔开
|
||||
trigger: ["change", "blur"],
|
||||
}],
|
||||
}
|
||||
// 校验规则ed
|
||||
};
|
||||
},
|
||||
onLoad(opt) {
|
||||
console.log("===opt", opt);
|
||||
this.model1.userInfo.Edkey = JSON.parse(opt.key)
|
||||
this.model1.userInfo.Edvalue = JSON.parse(opt.value)
|
||||
this.Edkey = JSON.parse(opt.key)
|
||||
this.Edvalue = JSON.parse(opt.value)
|
||||
this.tempValue = JSON.parse(opt.value)
|
||||
console.log("optvalue", this.model1.userInfo.Edvalue);
|
||||
console.log("optvalue", this.Edvalue);
|
||||
uni.setNavigationBarTitle({
|
||||
title: JSON.parse(opt.key)
|
||||
})
|
||||
if (this.model1.userInfo.Edkey == '所属协会') {
|
||||
// 日期选择器模式的转换
|
||||
if (this.Edkey == '出生日期' || this.Edkey == '入会时间') {
|
||||
this.timeMode = 'date'
|
||||
} else {
|
||||
this.timeMode = 'time'
|
||||
}
|
||||
|
||||
if (this.Edkey == '所属协会') {
|
||||
this.http.request('/association/list', {}, "GET").then((res) => {
|
||||
let xieList = res.data.records.map((v, i) => {
|
||||
return v.name
|
||||
|
@ -228,17 +254,17 @@
|
|||
})
|
||||
}
|
||||
|
||||
if (this.model1.userInfo.Edkey == '头像') {
|
||||
console.log("ll", JSON.parse(this.model1.userInfo.Edvalue)[0]);
|
||||
if (this.Edkey == '头像') {
|
||||
// console.log("ll", JSON.parse(this.Edvalue)[0]);
|
||||
this.fileList4.push({
|
||||
url: this.baseurl + JSON.parse(this.model1.userInfo.Edvalue)[0]
|
||||
url: this.baseurl + JSON.parse(this.Edvalue)[0]
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
if (this.model1.userInfo.Edkey == '实景照' || this.model1.userInfo.Edkey == '资质证') {
|
||||
if (this.Edkey == '实景照' || this.Edkey == '资质证') {
|
||||
let urL = this.baseurl
|
||||
let arr = JSON.parse(this.model1.userInfo.Edvalue).map((vv, ii) => {
|
||||
let arr = JSON.parse(this.Edvalue).map((vv, ii) => {
|
||||
return urL + vv
|
||||
|
||||
})
|
||||
|
@ -251,17 +277,17 @@
|
|||
console.log("this.fileList1", this.fileList1);
|
||||
|
||||
}
|
||||
if (this.model1.userInfo.Edkey == '代表作') {
|
||||
if (this.Edkey == '代表作') {
|
||||
this.isSubmit = true
|
||||
// 分化为 stanlist 和fileList2
|
||||
this.model1.userInfo.Edvalue.map((v, i) => {
|
||||
this.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);
|
||||
console.log("this.Edvalue==", this.Edvalue);
|
||||
// 代表作 提交用的 数组
|
||||
this.postFileList2 = this.model1.userInfo.Edvalue.map((v, i) => {
|
||||
this.postFileList2 = this.Edvalue.map((v, i) => {
|
||||
return v.value
|
||||
})
|
||||
console.log(" this.postFileList2===", this.postFileList2);
|
||||
|
@ -293,59 +319,60 @@
|
|||
|
||||
onReady() {
|
||||
|
||||
this.$refs.form1.setRules(this.rules);
|
||||
// this.$refs.form1.setRules(this.rules);
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
AddItem() {
|
||||
if (this.model1.userInfo.Edkey == '代表作') {
|
||||
if (this.Edkey == '代表作') {
|
||||
this.StandradList.push('')
|
||||
this.fileList2.push([])
|
||||
this.postFileList2.push([])
|
||||
} else {
|
||||
this.model1.userInfo.Edvalue.push("")
|
||||
this.Edvalue.push("")
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
delItem(num) {
|
||||
if (this.model1.userInfo.Edkey == '代表作') {
|
||||
if (this.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.Edvalue.splice(num, 1)
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
CheckId() {
|
||||
var value = this.model1.userInfo.Edvalue
|
||||
var value = this.Edvalue
|
||||
const reg =
|
||||
/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
|
||||
if (reg.test(value) === false && value) {
|
||||
this.isSubmit = true
|
||||
this.isSubmit = false
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: '请输入正确格式的身份证号码',
|
||||
|
||||
})
|
||||
} else {
|
||||
this.isSubmit = false
|
||||
this.isSubmit = true
|
||||
console.log('身份证号码格式正确')
|
||||
}
|
||||
},
|
||||
CheckNumber() {
|
||||
var tele = this.model1.userInfo.Edvalue
|
||||
var tele = this.Edvalue
|
||||
let reg = /^[1][3,4,5,7,8,9][0-9]{9}$/ //正则表达式定义手机号正确格式
|
||||
if (!tele) { //判断如果手机号(this.tele)为空,提示用户输入手机号
|
||||
this.isSubmit = true
|
||||
|
@ -372,7 +399,7 @@
|
|||
},
|
||||
confimZheng(e) {
|
||||
this.zhengzhiShow = false
|
||||
this.model1.userInfo.Edvalue = e.value[0]
|
||||
this.Edvalue = e.value[0]
|
||||
},
|
||||
DatePicker() {
|
||||
this.showBirthday = true
|
||||
|
@ -385,28 +412,60 @@
|
|||
birthdayConfirm(e) {
|
||||
this.showBirthday = false
|
||||
|
||||
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')
|
||||
if (this.Edkey == '出生日期' || this.Edkey == '入会时间') {
|
||||
this.Edvalue = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
|
||||
} else {
|
||||
this.model1.userInfo.Edvalue = e.value
|
||||
this.Edvalue = e.value
|
||||
}
|
||||
|
||||
},
|
||||
submit() {
|
||||
var baseStr = http.config.baseUrl.replace('/h5/api', '')
|
||||
if (this.Edkey == '头像') {
|
||||
if (this.fileList4[0]) {
|
||||
var str = JSON.stringify(this.fileList4.map((v, i) => {
|
||||
return v.url.replace(baseStr, '')
|
||||
}))
|
||||
console.log('str===', str);
|
||||
this.PostChangerRequest({
|
||||
'images': str
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'error',
|
||||
title: '头像不能为空'
|
||||
})
|
||||
}
|
||||
|
||||
} else if (this.Edkey == '资质证' || this.Edkey == '实景照') {
|
||||
|
||||
if (this.fileList1[0]) {
|
||||
var str = JSON.stringify(this.fileList1.map((v, i) => {
|
||||
return v.url.replace(baseStr, '')
|
||||
}))
|
||||
console.log('str===', str);
|
||||
if (this.Edkey == '资质证') {
|
||||
this.PostChangerRequest({
|
||||
'cfPhoto': str
|
||||
})
|
||||
} else if (this.Edkey == '实景照') {
|
||||
this.PostChangerRequest({
|
||||
'photo': str
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'error',
|
||||
title: '照片不应少于一张'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/* this.$refs.form1.validate().then(res => {
|
||||
uni.$u.toast('Thanks your helping')
|
||||
}).catch(errors => {
|
||||
uni.$u.toast('您的资料还未补充完整')
|
||||
}) */
|
||||
|
||||
/* uni.navigateBack({
|
||||
delta:1
|
||||
}) */
|
||||
if (this.model1.userInfo.Edkey == '代表作') {
|
||||
|
||||
|
||||
} else if (this.Edkey == '代表作') {
|
||||
console.log("submit", this.postFileList2);
|
||||
// this.StandradList
|
||||
var opsArr = []
|
||||
|
@ -419,26 +478,52 @@
|
|||
})
|
||||
}
|
||||
console.log("opsArr", opsArr);
|
||||
this.http.request('/user', {
|
||||
this.PostChangerRequest({
|
||||
'opus': opsArr
|
||||
}, "POST").then((res) => {
|
||||
console.log("ressss", res.data);
|
||||
}).catch((error) => {
|
||||
uni.showToast({
|
||||
title: error
|
||||
})
|
||||
})
|
||||
} else {
|
||||
// postListObj 通过对应列表 来发起修改请求
|
||||
this.PostChangerRequest({
|
||||
[this.postListObj[this.Edkey]]: this.Edvalue
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* if (this.Edkey == '姓名') {
|
||||
this.PostChangerRequest({
|
||||
'userName': this.Edvalue
|
||||
})
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
},
|
||||
// 提交修改的方法
|
||||
PostChangerRequest(obj) {
|
||||
this.http.request('/user', obj, "POST").then((res) => {
|
||||
uni.showToast({
|
||||
title: "修改成功"
|
||||
})
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}).catch((error) => {
|
||||
uni.showToast({
|
||||
title: "修改失败",
|
||||
icon: 'error'
|
||||
})
|
||||
})
|
||||
},
|
||||
CheckValue() {
|
||||
// console.log("event",event);
|
||||
// console.log("dddd",this.model1.userInfo.Edkey);
|
||||
if (this.model1.userInfo.Edkey) {
|
||||
// console.log("dddd",this.Edkey);
|
||||
if (this.Edkey) {
|
||||
|
||||
// uni.$u.toast('不能为空')
|
||||
// console.log(this.tempValue);
|
||||
|
||||
// this.model1.userInfo.Edvalue=this.tempValue
|
||||
// this.Edvalue=this.tempValue
|
||||
|
||||
|
||||
}
|
||||
|
@ -457,9 +542,9 @@
|
|||
this.fileList2[event.name].splice(event.index, 1)
|
||||
this.postFileList2[event.name].splice(event.index, 1)
|
||||
// 如果图片为零 且 名称为无 时 删除项目
|
||||
/* if(xx){
|
||||
delItem(xx)
|
||||
} */
|
||||
/* if(xx){
|
||||
delItem(xx)
|
||||
} */
|
||||
},
|
||||
// 新增图片
|
||||
async afterRead(event) {
|
||||
|
@ -511,7 +596,7 @@
|
|||
fileListLen++
|
||||
}
|
||||
// console.log("postFileList2", this.postFileList2);
|
||||
// console.log("this.model1.userInfo.Edvalue", this.model1.userInfo.Edvalue );
|
||||
// console.log("this.Edvalue", this.Edvalue );
|
||||
},
|
||||
uploadFilePromise(url) {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
@ -530,13 +615,11 @@
|
|||
// upload ed
|
||||
},
|
||||
watch: {
|
||||
'model1.userInfo.Edvalue': function(n, o) {
|
||||
'Edvalue': function(n, o) {
|
||||
console.log("n", n);
|
||||
|
||||
if (!n) {
|
||||
// console.log(this);
|
||||
uni.$u.toast('不能为空')
|
||||
// this.model1.userInfo.Edvalue = this.tempValue
|
||||
this.isSubmit=false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -548,6 +631,31 @@
|
|||
background-color: #f5f5f5;
|
||||
}
|
||||
*/
|
||||
.flc-top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
|
||||
.m16 {
|
||||
margin: 0 32rpx;
|
||||
}
|
||||
|
||||
.gray {
|
||||
background-color: #F8F8F8 !important;
|
||||
}
|
||||
|
||||
.textAreaInfo {
|
||||
margin-top: 8px;
|
||||
width: calc(100% - 64rpx);
|
||||
margin: 16rpx auto;
|
||||
}
|
||||
|
||||
.nameClass {
|
||||
background-color: #F8F8F8 !important;
|
||||
}
|
||||
|
||||
.sexBox {
|
||||
.sexItm {
|
||||
display: flex;
|
||||
|
|
|
@ -255,7 +255,7 @@
|
|||
|
||||
<u-form-item ref="item1" @click="showServeTime=true" class="data_itm">
|
||||
<text class="label_t">服务开始时间</text>
|
||||
<u--input class="p32" placeholder="请填选择服务开始时间" v-model="model1.userInfo.serveTime" readonly
|
||||
<u--input class="p32" placeholder="请选择服务开始时间" v-model="model1.userInfo.serveTime" readonly
|
||||
inputAlign="right" border="none">
|
||||
<u-icon slot="suffix" name="calendar"></u-icon>
|
||||
</u--input>
|
||||
|
@ -263,7 +263,7 @@
|
|||
|
||||
<u-form-item ref="item1" @click="showServeTimeend=true" class="data_itm">
|
||||
<text class="label_t">服务结束时间</text>
|
||||
<u--input class="p32" placeholder="请填选择服务结束时间" v-model="model1.userInfo.serveTimeend" readonly
|
||||
<u--input class="p32" placeholder="请选择服务结束时间" v-model="model1.userInfo.serveTimeend" readonly
|
||||
inputAlign="right" border="none">
|
||||
<u-icon slot="suffix" name="calendar"></u-icon>
|
||||
</u--input>
|
||||
|
@ -280,6 +280,11 @@
|
|||
<u--input class="p32" placeholder="请输入电话" inputAlign="right" clearable
|
||||
v-model="model1.userInfo.ServephoneNum" border="none"></u--input>
|
||||
</u-form-item> -->
|
||||
<u-form-item prop="userInfo.pasw" ref="item1" class="data_itm">
|
||||
<text class="label_t">密码</text>
|
||||
<u--input class="p32" placeholder="请输入密码" inputAlign="right" clearable
|
||||
v-model="model1.userInfo.pasw" border="none"></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
@ -805,6 +810,7 @@
|
|||
"timeStart": that.serveTime,
|
||||
"userName": that.name,
|
||||
"userType": this.pageTypeId,
|
||||
"fzr":that.DutyPeopleName
|
||||
}
|
||||
console.log("dataddddddddd", data);
|
||||
this.http.request('/auth/init', data, "POST").then(res => {
|
||||
|
|
|
@ -7,7 +7,7 @@ export default {
|
|||
config: {
|
||||
// baseUrl: "http://192.168.0.57:8090/h5/api", //王锡
|
||||
// baseUrl: "http://192.168.124.110:8088/api", //周源
|
||||
baseUrl: "http://192.168.0.9:8080/h5/api", //俞燕红
|
||||
baseUrl: "http://192.168.0.29:8080/h5/api", //俞燕红
|
||||
// baseUrl: "https://wlsq.ydool.com.cn/api", //线上
|
||||
header: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
|
|
Loading…
Reference in New Issue