Merge branch 'master' of https://e.coding.net/boss-01/yxx/app
This commit is contained in:
commit
9cd81332f2
|
@ -113,7 +113,7 @@
|
|||
|
||||
|
||||
<!-- 积分明细区 -->
|
||||
<view class="pointBox">
|
||||
<view class="pointBox" @click="goPointDetail">
|
||||
|
||||
<view class="P_title">
|
||||
<text class="L_title">积分明细</text>
|
||||
|
@ -143,7 +143,12 @@
|
|||
methods:{
|
||||
back(){
|
||||
uni.navigateBack()
|
||||
}
|
||||
},
|
||||
goPointDetail(){
|
||||
uni.navigateTo({
|
||||
url:'/pages/MyPoints/pointDetail'
|
||||
})
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
const systemMsg = uni.getSystemInfoSync();
|
||||
|
|
|
@ -1,232 +1,273 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="person_itm">
|
||||
<view class="person_itm_sign" @click="goChangeInfo('姓名','谢家星')">
|
||||
<text class="person_itm_sign_tit">姓名</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text>谢家星</text>
|
||||
<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>男</text>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="person_itm_sign" @click="goChangeInfo('出生日期','1997/02/01')">
|
||||
<text class="person_itm_sign_tit">出生日期</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text>1997/02/01</text>
|
||||
<u-icon name="calendar"></u-icon>
|
||||
<view class="wanShan" v-if="userInfoObj.userType!=='fws'">
|
||||
<view class="person_itm">
|
||||
|
||||
<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>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="person_itm_sign" @click="goChangeInfo('身份证号码','41852199825252651')">
|
||||
<text class="person_itm_sign_tit">身份证号码</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text>41852199825252651</text>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
<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>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="person_itm_sign" @click="goChangeInfo('出生日期',userInfoObj.birthDay )">
|
||||
<text class="person_itm_sign_tit">出生日期</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text> {{userInfoObj.birthDay}}</text>
|
||||
<u-icon name="calendar"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="person_itm">
|
||||
<view class="person_itm_sign" @click="goChangeInfo('民族','汉族')">
|
||||
<text class="person_itm_sign_tit">民族</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text>汉族</text>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
<view class="person_itm_sign" @click="goChangeInfo('身份证号码',JSON.parse(userInfoObj.idCard))">
|
||||
<text class="person_itm_sign_tit">身份证号码</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text> {{userInfoObj.idCard}}</text>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="person_itm">
|
||||
<view class="person_itm_sign" @click="goChangeInfo('民族',userInfoObj.nation)">
|
||||
<text class="person_itm_sign_tit">民族</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text> {{userInfoObj.nation}}</text>
|
||||
<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>宁波</text>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
|
||||
|
||||
<view class="person_itm_sign" @click="goChangeInfo('籍贯',userInfoObj.base)">
|
||||
<text class="person_itm_sign_tit">籍贯</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text> {{userInfoObj.base}}</text>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="person_itm_sign" @click="goChangeInfo('政治面貌',userInfoObj.politics)">
|
||||
<text class="person_itm_sign_tit">政治面貌</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text> {{userInfoObj.politics}}</text>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="person_itm_sign" @click="goChangeInfo('政治面貌','党员')">
|
||||
<text class="person_itm_sign_tit">政治面貌</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text>党员</text>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<view class="person_itm">
|
||||
<view class="person_itm_sign" @click="goChangeInfo('联系电话','13888888888')">
|
||||
<view class="person_itm">
|
||||
<!-- <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> -->
|
||||
<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">
|
||||
<image class="avator" style="" :src=" baseurl+JSON.parse(userInfoObj.images)[0] ">
|
||||
</image>
|
||||
|
||||
|
||||
|
||||
<view class="person_itm_sign" @click="goChangeInfo('头像','头像地址')">
|
||||
<text class="person_itm_sign_tit">头像</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<image style="width: 80rpx; height: 80rpx;" src="../../static/RewardWork/avator.png" mode="">
|
||||
</image>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="person_itm">
|
||||
<view class="person_itm_sign" @click="goChangeInfo('所属协会','协会名称')">
|
||||
|
||||
<!-- 协会会员个人中心 -->
|
||||
<view class="person_itm" v-if="userInfoObj.userType=='xhhy'">
|
||||
<view class="person_itm_sign" @click="goChangeInfo('所属协会',userInfoObj.association.name )">
|
||||
<text class="person_itm_sign_tit">所属协会</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text>协会名称</text>
|
||||
<text v-if="userInfoObj.association">{{userInfoObj.association.name}}</text>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</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>
|
||||
<view class="person_itm_sign_right">
|
||||
<text>2022/02/01</text>
|
||||
<text> {{userInfoObj.comeTime}}</text>
|
||||
<u-icon name="calendar"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 文艺人才-个人中心 -->
|
||||
<view class="person_itm">
|
||||
<view class="person_itm_sign" @click="goChangeInfo('人才类型','书法家')">
|
||||
<view class="person_itm" v-if="userInfoObj.userType=='wyrc'">
|
||||
<view class="person_itm_sign" @click="goChangeInfo('人才类型',userInfoObj.rcType)">
|
||||
<text class="person_itm_sign_tit">人才类型</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text>书法家</text>
|
||||
<text> {{userInfoObj.rcType}}</text>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</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>
|
||||
<view class="person_itm_sign_right">
|
||||
|
||||
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</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>
|
||||
<view class="person_itm_sign_right">
|
||||
|
||||
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</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>
|
||||
<view class="person_itm_sign_right">
|
||||
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="person_itm_sign">
|
||||
<view class="person_itm_sign" @click="goChangeInfo('是否已入协会',JSON.parse(userInfoObj.isAssociation))">
|
||||
<text class="person_itm_sign_tit">是否已入协会</text>
|
||||
<view class="person_itm_sign_right">
|
||||
|
||||
<u-switch disabled v-model="isJioned" activeColor="#99241B" size=20></u-switch>
|
||||
<u-switch disabled v-model="userInfoObj.isAssociation" activeColor="#99241B" size=20></u-switch>
|
||||
</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>
|
||||
<view class="person_itm_sign_right">
|
||||
<text>2022/02/01</text>
|
||||
<text> {{userInfoObj.comeTime}}</text>
|
||||
<u-icon name="calendar"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 服务商个人中心 -->
|
||||
<view class="person_itm">
|
||||
<view class="person_itm_sign" @click="goChangeInfo('服务名称','服务名称')">
|
||||
<text class="person_itm_sign_tit">服务名称</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text>服务名称</text>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
<view class="fwsBox" v-if="userInfoObj.userType=='fws'">
|
||||
<view class="person_itm">
|
||||
<view class="person_itm_sign" @click="goChangeInfo('服务名称',userInfoObj.serviceName)">
|
||||
<text class="person_itm_sign_tit">服务名称</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text>{{userInfoObj.serviceName}}</text>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="person_itm_sign" @click="goChangeInfo('地址',userInfoObj.serviceAddress)">
|
||||
<text class="person_itm_sign_tit">地址</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text> {{userInfoObj.serviceAddress}}</text>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="person_itm_sign" @click="goChangeInfo('实景照',userInfoObj.photo)">
|
||||
<text class="person_itm_sign_tit">实景照</text>
|
||||
<view class="person_itm_sign_right">
|
||||
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="person_itm_sign" @click="goChangeInfo('资质证',userInfoObj.cfPhoto)">
|
||||
<text class="person_itm_sign_tit">资质证</text>
|
||||
<view class="person_itm_sign_right">
|
||||
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="person_itm_sign" @click="goChangeInfo('地址','宁波象山县')">
|
||||
<text class="person_itm_sign_tit">地址</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text>宁波象山县</text>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="person_itm_sign" @click="goChangeInfo('实景照','照片url')">
|
||||
<text class="person_itm_sign_tit">实景照</text>
|
||||
<view class="person_itm_sign_right">
|
||||
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
<view class="person_itm">
|
||||
<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>
|
||||
|
||||
<view class="person_itm_sign">
|
||||
<text class="person_itm_sign_tit">资质证</text>
|
||||
<view class="person_itm_sign_right">
|
||||
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
<view class="person_itm_sign" @click="goChangeInfo('负责人姓名',userInfoObj.fzr)">
|
||||
<text class="person_itm_sign_tit">负责人姓名</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text> {{userInfoObj.fzr}}</text>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="person_itm_sign" @click="goChangeInfo('服务开始时间',userInfoObj.timeStart)">
|
||||
<text class="person_itm_sign_tit">服务开始时间</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text> {{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> {{userInfoObj.timeEnd}}</text>
|
||||
<u-icon name="calendar"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <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>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="person_itm">
|
||||
<view class="person_itm_sign" @click="goChangeInfo('负责人姓名','王一')">
|
||||
<text class="person_itm_sign_tit">负责人姓名</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text>王一</text>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="person_itm_sign" @click="goChangeInfo('服务时间','2022/02/01')">
|
||||
<text class="person_itm_sign_tit">服务时间</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text>2022/02/01</text>
|
||||
<u-icon name="calendar"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<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>
|
||||
<!-- 服务商个人中心 ed-->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import http from '../../request/interface.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isJioned: true,
|
||||
artList: ['文艺大家', '集大成者'],
|
||||
honorList:['荣誉','无上荣誉'],
|
||||
stanWorkList:['蒙娜丽莎','高月']
|
||||
honorList: ['荣誉', '无上荣誉'],
|
||||
stanWorkList: ['蒙娜丽莎', '高月'],
|
||||
userInfoObj: {},
|
||||
baseurl: http.config.baseUrl.replace('/h5/api', ''), //'http://192.168.0.9:8080'
|
||||
|
||||
xieName: '',
|
||||
userType: ''
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -236,7 +277,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.requestUserinfo()
|
||||
},
|
||||
onShow() {
|
||||
this.requestUserinfo()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -246,11 +305,26 @@
|
|||
background-color: #F4F5F7;
|
||||
}
|
||||
|
||||
.avator {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
overflow: hidden;
|
||||
border-radius: 40rpx;
|
||||
}
|
||||
|
||||
.person_itm {
|
||||
background-color: #FFFFFF;
|
||||
margin-bottom: 24rpx;
|
||||
padding: 24rpx;
|
||||
|
||||
.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,88 +1,159 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="m16" v-if="Edkey=='姓名'||Edkey=='负责人姓名'||Edkey=='服务名称'||Edkey=='地址'">
|
||||
<u--input class="p32 nameClass" placeholder="请填写" clearable v-model="Edvalue" border="none"
|
||||
@input="CheckValue" @clear="clearFun">
|
||||
</u--input>
|
||||
</view>
|
||||
<!-- 是否已加入协会 -->
|
||||
<view class="xiehui" v-if="Edkey=='是否已入协会'"
|
||||
style="display: flex;justify-content: space-between; align-items: center;padding: 0 32rpx;">
|
||||
<text class="person_itm_sign_tit">是否已入协会</text>
|
||||
<u-switch v-model="Edvalue" activeColor="#99241B" size=20></u-switch>
|
||||
</view>
|
||||
<!-- 是否已加入协会ed -->
|
||||
|
||||
<u--form :model="model1" ref="form1">
|
||||
<!-- 性别选择 -->
|
||||
<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>
|
||||
<!-- 性别选择ed -->
|
||||
|
||||
<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=='协会名称'">
|
||||
<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="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" @input="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" @input="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="opus_inputBox">
|
||||
<input type="text" v-model="StandradList[index]" placeholder="请输入作品名称" class="opus_inputBox_inpt" />
|
||||
<view class="opus_inputBox_img">
|
||||
<view style="width: 80rpx; height: 80rpx;" class="addImg" @click="AddItem"
|
||||
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: 80rpx; height: 80rpx;" src="../../static/improveData/del.png" alt="">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<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 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>
|
||||
<!-- 政治面貌 民族 籍贯 选择 input-->
|
||||
<view class="select" @click="zhengzhiShow=true "
|
||||
v-if="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>
|
||||
<!-- 代表作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>
|
||||
</view>
|
||||
|
||||
<!-- 成就类 -->
|
||||
<view class="chengjiu" v-if="model1.userInfo.Edkey=='艺术成就'||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">
|
||||
<image style="width: 80rpx; height: 80rpx;" src="../../static/improveData/redAdd.png" 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>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</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:[]">
|
||||
</u-picker>
|
||||
<!-- 头像上传 ed-->
|
||||
|
||||
<!-- 实景 资质上传 -->
|
||||
<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>
|
||||
</view>
|
||||
|
||||
<!-- 实景 资质上传 ed-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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" :maxDate="1786778555000"
|
||||
: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>
|
||||
|
||||
|
||||
|
||||
|
@ -93,20 +164,52 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import http from '../../request/interface.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
artlist: [''],
|
||||
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.config.baseUrl.replace('/h5/api', ''),
|
||||
fileList4: [], //头像上传
|
||||
fileList1: [], //资质证 实景照
|
||||
fileList2: [], //代表作照片
|
||||
StandradList: [], //代表作名称
|
||||
// artlist: [''],
|
||||
showBirthday: false,
|
||||
isSubmit: true,
|
||||
tempValue: '',
|
||||
zhengzhiShow: false,
|
||||
model1: {
|
||||
userInfo: {
|
||||
Edkey: '',
|
||||
Edvalue: '',
|
||||
}
|
||||
},
|
||||
Edkey: '',
|
||||
Edvalue: '',
|
||||
|
||||
xiecolumns: [],
|
||||
Zhengcolumns: [
|
||||
["群众", "党员", '共青团员'],
|
||||
],
|
||||
|
@ -120,69 +223,152 @@
|
|||
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
|
||||
xiehuiObj: {}//协会的name id 为key value 对象
|
||||
};
|
||||
},
|
||||
onLoad(opt) {
|
||||
console.log(opt);
|
||||
this.model1.userInfo.Edkey = JSON.parse(opt.key)
|
||||
this.model1.userInfo.Edvalue = JSON.parse(opt.value)
|
||||
console.log("===opt", opt);
|
||||
this.Edkey = JSON.parse(opt.key)
|
||||
this.Edvalue = JSON.parse(opt.value)
|
||||
this.tempValue = JSON.parse(opt.value)
|
||||
console.log("optvalue", this.Edvalue);
|
||||
uni.setNavigationBarTitle({
|
||||
title: JSON.parse(opt.key)
|
||||
})
|
||||
// 日期选择器模式的转换
|
||||
if (this.Edkey == '出生日期' || this.Edkey == '入会时间') {
|
||||
this.timeMode = 'date'
|
||||
} else {
|
||||
this.timeMode = 'time'
|
||||
}
|
||||
// 请求 协会 内容
|
||||
if (this.Edkey == '所属协会') {
|
||||
this.http.request('/association/list', {}, "GET").then((res) => {
|
||||
|
||||
res.data.records.map((v, i) => {
|
||||
return this.xiehuiObj[v.name] = v.id
|
||||
})
|
||||
|
||||
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.Edkey == '头像') {
|
||||
// console.log("ll", JSON.parse(this.Edvalue)[0]);
|
||||
this.fileList4.push({
|
||||
url: this.baseurl + JSON.parse(this.Edvalue)[0]
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
if (this.Edkey == '实景照' || this.Edkey == '资质证') {
|
||||
let urL = this.baseurl
|
||||
let arr = JSON.parse(this.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.Edkey == '代表作') {
|
||||
this.isSubmit = true
|
||||
// 分化为 stanlist 和fileList2
|
||||
this.Edvalue.map((v, i) => {
|
||||
this.StandradList.push(v.name)
|
||||
this.fileList2.push(v.value)
|
||||
})
|
||||
console.log("flieList2", this.fileList2);
|
||||
console.log("this.Edvalue==", this.Edvalue);
|
||||
// 代表作 提交用的 数组
|
||||
this.postFileList2 = this.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() {
|
||||
|
||||
this.$refs.form1.setRules(this.rules);
|
||||
// this.$refs.form1.setRules(this.rules);
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
AddItem( ) {
|
||||
this.model1.userInfo.Edvalue.push("")
|
||||
|
||||
|
||||
AddItem() {
|
||||
if (this.Edkey == '代表作') {
|
||||
this.StandradList.push('')
|
||||
this.fileList2.push([])
|
||||
this.postFileList2.push([])
|
||||
} else {
|
||||
this.Edvalue.push("")
|
||||
}
|
||||
},
|
||||
delItem( ) {
|
||||
this.model1.userInfo.Edvalue.splice(num, 1)
|
||||
|
||||
|
||||
delItem(num) {
|
||||
if (this.Edkey == '代表作') {
|
||||
// 是用来 显示 作品名称 和 列数的
|
||||
this.StandradList.splice(num, 1)
|
||||
// 是用来显示
|
||||
this.fileList2.splice(num, 1 )
|
||||
// 是用来 提交修改数据用的
|
||||
this.postFileList2.splice(num, 1)
|
||||
} else {
|
||||
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
|
||||
|
@ -209,7 +395,7 @@
|
|||
},
|
||||
confimZheng(e) {
|
||||
this.zhengzhiShow = false
|
||||
this.model1.userInfo.Edvalue = e.value[0]
|
||||
this.Edvalue = e.value[0]
|
||||
},
|
||||
DatePicker() {
|
||||
this.showBirthday = true
|
||||
|
@ -221,57 +407,309 @@
|
|||
},
|
||||
birthdayConfirm(e) {
|
||||
this.showBirthday = false
|
||||
|
||||
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.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 == '是否已入协会') {
|
||||
var str = JSON.stringify(this.Edvalue)
|
||||
this.PostChangerRequest({
|
||||
'isAssociation': str
|
||||
})
|
||||
} else if (this.Edkey == '所属协会') {
|
||||
var xiehuiId = this.xiehuiObj[this.Edvalue]
|
||||
// console.log('xiehuiId',xiehuiId);
|
||||
this.PostChangerRequest({
|
||||
'associationId': xiehuiId
|
||||
})
|
||||
} else if (this.Edkey == '资质证' || this.Edkey == '实景照') {
|
||||
|
||||
/* this.$refs.form1.validate().then(res => {
|
||||
uni.$u.toast('Thanks your helping')
|
||||
}).catch(errors => {
|
||||
uni.$u.toast('您的资料还未补充完整')
|
||||
}) */
|
||||
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: '照片不应少于一张'
|
||||
})
|
||||
}
|
||||
} else if (this.Edkey == '艺术成就' || this.Edkey == '荣誉奖项') {
|
||||
var str = JSON.stringify(this.Edvalue)
|
||||
|
||||
/* uni.navigateBack({
|
||||
delta:1
|
||||
}) */
|
||||
if (this.Edkey == '艺术成就') {
|
||||
this.PostChangerRequest({
|
||||
'artAtt': str
|
||||
})
|
||||
} else {
|
||||
this.PostChangerRequest({
|
||||
'greats': str
|
||||
})
|
||||
}
|
||||
|
||||
} else if (this.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.PostChangerRequest({
|
||||
'opus': opsArr
|
||||
})
|
||||
} 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: "修改成功"
|
||||
})
|
||||
setTimeout(function() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}, 500);
|
||||
|
||||
}).catch((error) => {
|
||||
uni.showToast({
|
||||
title: "修改失败",
|
||||
icon: 'error'
|
||||
})
|
||||
})
|
||||
},
|
||||
CheckValue() {
|
||||
// console.log("event",event);
|
||||
// console.log("dddd",this.model1.userInfo.Edkey);
|
||||
if (this.model1.userInfo.Edkey) {
|
||||
|
||||
// uni.$u.toast('不能为空')
|
||||
// console.log(this.tempValue);
|
||||
|
||||
// this.model1.userInfo.Edvalue=this.tempValue
|
||||
|
||||
|
||||
// 获取的是input 的value 值
|
||||
// console.log("event", event.target.value);
|
||||
// console.log("gg", event.target.value.indexOf(" ") >= 0);
|
||||
this.Edvalue = this.Edvalue.trim()
|
||||
if (!this.Edvalue) {
|
||||
uni.showToast({
|
||||
title: "值不能为空或者空格",
|
||||
icon: 'error'
|
||||
})
|
||||
this.isSubmit = false
|
||||
} else if (event) {
|
||||
if (event.target.value !== '') {
|
||||
this.isSubmit = true
|
||||
}
|
||||
}
|
||||
// console.log("this.Edvalue",!this.Edvalue );
|
||||
/* if (event) {
|
||||
if (event.target.value !== '') {
|
||||
this.isSubmit = true
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
},
|
||||
clearFun() {
|
||||
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.Edvalue", this.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: {
|
||||
'model1.userInfo.Edvalue': function(n, o) {
|
||||
console.log("n", n);
|
||||
if (!n) {
|
||||
// console.log(this);
|
||||
uni.$u.toast('不能为空')
|
||||
// this.model1.userInfo.Edvalue = this.tempValue
|
||||
'Edvalue': function(n, o) {
|
||||
// console.log("n", n);
|
||||
// console.log("event.target.value", event.target.value);
|
||||
if (this.Edkey == '是否已入协会') {
|
||||
this.isSubmit = true
|
||||
} else {
|
||||
if (!n && n == "") {
|
||||
uni.$u.toast('值不能为空')
|
||||
this.isSubmit = false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
/* page {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
*/
|
||||
// 代表作
|
||||
.opus {
|
||||
width: calc(100% - 64rpx);
|
||||
margin: 0 32rpx;
|
||||
|
||||
.opus_inputBox {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 16rpx;
|
||||
|
||||
.opus_inputBox_inpt {
|
||||
flex: 1;
|
||||
height: 80rpx;
|
||||
padding-left: 16rpx;
|
||||
background-color: #F8F8F8;
|
||||
|
||||
.opus_inputBox_img {
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 代表作ed
|
||||
.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 {
|
||||
|
|
|
@ -87,11 +87,11 @@
|
|||
|
||||
<view class="data_itm">
|
||||
<view class="data_itm_key label_t">
|
||||
照片上传
|
||||
头像上传
|
||||
</view>
|
||||
</view>
|
||||
<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>
|
||||
|
||||
</u-upload>
|
||||
|
@ -109,14 +109,7 @@
|
|||
<u-icon slot="suffix" name="arrow-right"></u-icon>
|
||||
</u--input>
|
||||
</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>
|
||||
<u--input class="p32" placeholder="请选择时间" v-model="model1.userInfo.jionTime" readonly
|
||||
inputAlign="right" border="none">
|
||||
|
@ -173,8 +166,6 @@
|
|||
</view>
|
||||
</view>
|
||||
</u-form-item>
|
||||
|
||||
|
||||
<u-form-item ref="item1" label='代表作' class="data_itm te">
|
||||
|
||||
<view v-for="(val,index) in StandradList" :key="index">
|
||||
|
@ -196,29 +187,27 @@
|
|||
</view>
|
||||
|
||||
</view>
|
||||
<view class="chen_itm" style="width: 200rpx;">
|
||||
<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 :maxCount="2">
|
||||
:name='String(index)' multiple >
|
||||
<image style="width: 172rpx;height: 172rpx;"
|
||||
src="../../static/improveData/imgjia.png">
|
||||
</image>
|
||||
</u-upload>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
</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>
|
||||
<u-switch v-model="isJioned" activeColor="#99241B" size=20></u-switch>
|
||||
</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>
|
||||
<u--input class="p32" placeholder="请选择时间" v-model="model1.userInfo.jionTime" readonly
|
||||
inputAlign="right" border="none">
|
||||
|
@ -244,14 +233,14 @@
|
|||
<u-form-item ref="item1" label="实景照片上传" class="data_itm">
|
||||
|
||||
<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>
|
||||
</u-upload>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item ref="item1" label="资质照片上传" class="data_itm">
|
||||
|
||||
<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>
|
||||
</u-upload>
|
||||
</u-form-item>
|
||||
|
@ -266,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>
|
||||
|
@ -274,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>
|
||||
|
@ -291,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>
|
||||
|
||||
|
@ -377,9 +371,9 @@
|
|||
isJioned: false,
|
||||
renCaiShow: false,
|
||||
zhengzhiShow: false,
|
||||
zhengzhiValue: '',
|
||||
renCaiValue: '',
|
||||
zuValue: "",
|
||||
zhengzhiValue: '群众',
|
||||
renCaiValue: '天才',
|
||||
zuValue: "汉族",
|
||||
xieValue: '',
|
||||
zuShow: false,
|
||||
xieShow: false,
|
||||
|
@ -407,7 +401,7 @@
|
|||
[]
|
||||
], //代表作照片
|
||||
fileList3: [], //照片上传
|
||||
jiguan: '',
|
||||
jiguan: '浙江',
|
||||
jigaunShow: false,
|
||||
showBirthday: false,
|
||||
showServeTime: false,
|
||||
|
@ -424,7 +418,7 @@
|
|||
userInfo: {
|
||||
name: '',
|
||||
sex: '',
|
||||
birthday: "",
|
||||
birthday: "2000-01-01",
|
||||
idCOde: '',
|
||||
|
||||
phoneNum: '',
|
||||
|
@ -433,9 +427,9 @@
|
|||
ServerName: '',
|
||||
Address: '',
|
||||
serverInstrutor: '', //服务介绍
|
||||
serveTime: '',
|
||||
serveTimeend: '',
|
||||
jionTime: '',
|
||||
serveTime: '09:00',
|
||||
serveTimeend: '17:00',
|
||||
jionTime: '2000-01-01',
|
||||
DutyPeopleName: '', //负责人名称
|
||||
// ServephoneNum: '', //服务商电话
|
||||
pasw: ''
|
||||
|
@ -446,7 +440,7 @@
|
|||
type: 'string',
|
||||
required: true,
|
||||
message: '密码不能为空',
|
||||
trigger: ['blur']
|
||||
trigger: ['blur','change']
|
||||
}],
|
||||
'userInfo.serverInstrutor': [{
|
||||
type: 'string',
|
||||
|
@ -503,42 +497,11 @@
|
|||
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': [{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请填写姓名',
|
||||
message: '请填写服务名称',
|
||||
trigger: ['blur', 'change']
|
||||
}, {
|
||||
// 此为同步验证,可以直接返回true或者false,如果是异步验证,稍微不同,见下方说明
|
||||
|
@ -766,15 +729,11 @@
|
|||
})
|
||||
},
|
||||
submit() {
|
||||
this.$refs.form1.validate().then(res => {
|
||||
uni.$u.toast('Thanks your helping')
|
||||
}).catch(errors => {
|
||||
uni.$u.toast('您的资料还未补充完整')
|
||||
return
|
||||
})
|
||||
|
||||
if (this.fileList3) {
|
||||
var fl3 = JSON.stringify(this.fileList3.map((v, i) => {
|
||||
return v.url
|
||||
// return v.thumb
|
||||
}))
|
||||
} else {
|
||||
var fl3 = '[]'
|
||||
|
@ -783,6 +742,7 @@
|
|||
if (this.fileList4) {
|
||||
var fl4 = JSON.stringify(this.fileList4.map((v, i) => {
|
||||
return v.url
|
||||
// return v.thumb
|
||||
}))
|
||||
} else {
|
||||
var fl4 = '[]'
|
||||
|
@ -791,6 +751,7 @@
|
|||
if (this.fileList1) {
|
||||
var fl1 = JSON.stringify(this.fileList1.map((v, i) => {
|
||||
return v.url
|
||||
// return v.thumb
|
||||
}))
|
||||
} else {
|
||||
var fl1 = '[]'
|
||||
|
@ -804,11 +765,12 @@
|
|||
name: this.StandradList[i],
|
||||
value: this.fileList2[i].map((v, num) => {
|
||||
return v.url
|
||||
// return v.thumb
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
console.log("opsArr====",opsArr);
|
||||
|
||||
|
||||
var yishucj = JSON.stringify(this.artlist)
|
||||
|
@ -841,24 +803,32 @@
|
|||
"timeStart": that.serveTime,
|
||||
"userName": that.name,
|
||||
"userType": this.pageTypeId,
|
||||
"fzr":that.DutyPeopleName
|
||||
}
|
||||
console.log("dataddddddddd", data);
|
||||
this.http.request('/user/init', data, "POST").then(res => {
|
||||
if (res.code == 200) {
|
||||
/* uni.navigateTo({
|
||||
url: '/pages/pageHome/pageHome'
|
||||
}) */
|
||||
this.$refs.form1.validate().then(res => {
|
||||
uni.$u.toast('Thanks your helping')
|
||||
this.http.request('/auth/init', data, "POST").then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/pageHome/pageHome'
|
||||
})
|
||||
uni.showToast({
|
||||
title: "成功了",
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
}).catch(e => {
|
||||
uni.showToast({
|
||||
title: "成功了",
|
||||
title: e.data.message,
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
}).catch(e => {
|
||||
uni.showToast({
|
||||
title: e.data.message,
|
||||
icon: "none",
|
||||
});
|
||||
})
|
||||
}).catch(errors => {
|
||||
uni.$u.toast('您的资料还未补充完整')
|
||||
return
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -885,9 +855,6 @@
|
|||
}
|
||||
|
||||
.WenYiUpload {
|
||||
|
||||
// padding: 32rpx;
|
||||
// background-color: #F8F8F8;
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
|
||||
|
@ -936,6 +903,9 @@
|
|||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
.xie{
|
||||
display: flex;justify-content: space-between; align-items: center;margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue