This commit is contained in:
2025-07-16 16:01:40 +08:00
parent 9b845f1532
commit a6c5bacd07
4 changed files with 741 additions and 300 deletions

View File

@ -162,7 +162,7 @@
.item {
width: 97%;
border-bottom: 1rpx solid #D8D4D4;
margin-left: 3%;
margin: 0% auto;
.addition {
color: #666666;

View File

@ -25,15 +25,17 @@
<span class='addition'>{{personInfo.birthday}}</span>
</view>
<view class="item">
<span>电子邮箱(用于接收考试通知)</span>
<span>电子邮箱</span>
<span class='addition'>
<u-input type="text" placeholder="请输入电子邮箱" v-model="personInfo.email" />
{{personInfo.email}}
<!-- <u-input type="text" placeholder="请输入电子邮箱" v-model="personInfo.email" /> -->
</span>
</view>
<view class="item">
<span>通讯地址</span>
<span class='addition'>
<u-input type="text" placeholder="请输入通讯地址" v-model="personInfo.address" />
{{personInfo.address}}
<!-- <u-input type="text" placeholder="请输入通讯地址" v-model="personInfo.address" /> -->
</span>
</view>
</view>
@ -44,24 +46,29 @@
<view class="item">
<span>最高学历</span>
<span class='addition'>
<u-radio-group v-model="personInfo.education" @change="">
{{personInfo.education==1?'初中':''}}
{{personInfo.education==2?'高中/中专':''}}
{{personInfo.education==3?'大专及以上':''}}
<!-- <u-radio-group v-model="personInfo.education" @change="">
<u-radio @change="" v-for="(item, index) in educationlist" :key="index" :name="item.label"
style="padding: 0 15rpx;" :disabled="item.checked">
{{item.name}}
</u-radio>
</u-radio-group>
</u-radio-group> -->
</span>
</view>
<view class="item">
<span>毕业院校</span>
<span class='addition'>
<u-input type="text" placeholder="请输入毕业院校" v-model="personInfo.graduateSchool" />
{{personInfo.graduateSchool}}
<!-- <u-input type="text" placeholder="请输入毕业院校" v-model="personInfo.graduateSchool" /> -->
</span>
</view>
<view class="item">
<span>专业(如适用)</span>
<span>专业</span>
<span class='addition'>
<u-input type="text" placeholder="请输入专业" v-model="personInfo.major" />
{{personInfo.major}}
<!-- <u-input type="text" placeholder="请输入专业" v-model="personInfo.major" /> -->
</span>
</view>
</view>
@ -98,34 +105,45 @@
</span>
</view>
<view class="item">
<span>报考类别(可选)</span>
<span>考试类型</span>
<span class='addition' v-if="personInfo.title">
{{personInfo.examType==2?'正式考试':""}}
{{personInfo.examType==3?'补考':""}}
</span>
</view>
<view class="item">
<span>报考类别</span>
<span class='addition'>
<u-radio-group v-model="personInfo.regType" @change="">
{{personInfo.regType == 1?"普通医疗护理员":""}}
{{personInfo.regType == 2?"老年医疗护理员":""}}
{{personInfo.regType == 3?"孕产妇和新生儿医疗护理员":""}}
<!-- <u-radio-group v-model="personInfo.regType" @change="">
<u-radio @change="" v-for="(item, index) in regTypelist" :key="index" :name="item.label"
style="padding: 15rpx;" :disabled="item.checked">
{{item.name}}
</u-radio>
</u-radio-group>
</u-radio-group> -->
</span>
</view>
<view class="item">
<span>培训经历(如有)</span>
<span>培训经历</span>
<span class='addition'>
<view class="item" style="padding: 10rpx 0;">
<view class="item" style="height:60rpx;line-height: 60rpx;">
<span>机构名称</span>
<span class='addition'>
<u-input type="text" placeholder="请输入机构名称" v-model="personInfo.trainInstitution" />
{{personInfo.trainInstitution}}
<!-- <u-input type="text" placeholder="请输入机构名称" v-model="personInfo.trainInstitution" /> -->
</span>
</view>
<view class="item" style="padding: 10rpx 0;">
<view class="item" style="height:60rpx;line-height: 60rpx;">
<span>培训时间</span>
<span class='addition' @click="trainDateshow=true"
<!-- <span class='addition' @click="trainDateshow=true"
style="margin-left:50rpx;display: inline-block;padding: 10rpx;background-color: #4C7BC9;border-radius: 10rpx;color: #fff;">
选择时间区间
</span>
<view class="" v-if="personInfo.trainStartDate" style="padding: 16rpx 0;">
</span> -->
<span class='addition'>
{{personInfo.trainStartDate+'至'}}{{personInfo.trainEndDate}}
</view>
</span>
</view>
</span>
</view>
@ -137,33 +155,37 @@
<view class="item">
<span>身份证正面</span>
<span class='addition'>
<u-upload :action="action" :form-data="{
<u-image width="100%" height="300rpx" :src="personInfo.cardFront"></u-image>
<!-- <u-upload :action="action" :form-data="{
type:'cardFrontUrl'
}" :header="header" :file-list="fileList" :max-count="1" @on-uploaded="uploadedcardFront"></u-upload>
}" :header="header" :file-list="fileList" :max-count="1" @on-uploaded="uploadedcardFront"></u-upload> -->
</span>
</view>
<view class="item">
<span>身份证反面</span>
<span class='addition'>
<u-upload :action="action" :form-data="{
<u-image width="100%" height="300rpx" :src="personInfo.cardBack"></u-image>
<!-- <u-upload :action="action" :form-data="{
type:'cardBackUrl'
}" :header="header" :file-list="fileList" :max-count="1" @on-uploaded="uploadedcardBack"></u-upload>
}" :header="header" :file-list="fileList" :max-count="1" @on-uploaded="uploadedcardBack"></u-upload> -->
</span>
</view>
<view class="item" style="line-height: 50rpx;">
<span>近期白底免冠证件照(1,JPG格式,&lt;20KB)</span>
<view class="item">
<span>近期白底免冠证件照</span>
<span class='addition'>
<u-upload :action="action" :form-data="{
<u-image width="100%" height="300rpx" :src="personInfo.photo"></u-image>
<!-- <u-upload :action="action" :form-data="{
type:'photoUrl'
}" :header="header" :file-list="fileList" :max-count="1" @on-uploaded="uploadedphoto"></u-upload>
}" :header="header" :file-list="fileList" :max-count="1" @on-uploaded="uploadedphoto"></u-upload> -->
</span>
</view>
<view class="item" style="line-height: 50rpx;">
<span>学历证明(毕业证或学信网截图)</span>
<view class="item">
<span>学历证明</span>
<span class='addition'>
<u-upload :action="action" :form-data="{
<u-image width="100%" height="300rpx" :src="personInfo.certificate"></u-image>
<!-- <u-upload :action="action" :form-data="{
type:'certificateUrl'
}" :header="header" :file-list="fileList" :max-count="1" @on-uploaded="uploadedcertificate"></u-upload>
}" :header="header" :file-list="fileList" :max-count="1" @on-uploaded="uploadedcertificate"></u-upload> -->
</span>
</view>
</view>
@ -269,36 +291,7 @@
token: uni.getStorageSync('examh5token')
},
fileList: [],
personInfo: {
"address": "",
"cardBack": "",
"cardCopy": "", //
"cardFront": "",
"certificate": "",
"education": 0,
"email": "",
"examId": "",
startTime: undefined,
endTime: undefined,
startDate: undefined,
endDate: undefined,
"graduateSchool": "",
"major": "",
"phone": "",
"photo": "",
"physicalReport": "", //
"realName": "",
"regTime": "",
"regType": 0,
"signPicture": "",
"title": "",
"trainEndDate": "",
"trainInstitution": "",
"trainStartDate": "",
"userId": "",
"userName": "",
examFee: undefined,
},
personInfo: {},
}
},
onShow() {},
@ -328,6 +321,7 @@
this.personInfo.startDate = obj[0].startDate
this.personInfo.endDate = obj[0].endDate
this.personInfo.examFee = obj[0].examFee
this.personInfo.examType = obj[0].examType
},
trainDatechange(e) {
this.personInfo.trainEndDate = e.endDate
@ -354,6 +348,7 @@
},
//
updata() {
this.$delete(this.personInfo, 'id');
save(this.personInfo).then(res => {
if (res.code == 0) {
this.$refs.uToast.show({
@ -377,11 +372,12 @@
name: res.data.realName,
cardNo: res.data.userName
})
this.personInfo.realName = res.data.realName
this.personInfo.userId = res.data.id
this.personInfo.phone = res.data.phone
this.personInfo.userName = res.data.userName
this.personInfo = {
...res.data,
...this.personInfo
}
this.personInfo.sex = this.getsex(res.data.userName)
this.personInfo.userId = res.data.id
this.personInfo.birthday = this.getbirthday(res.data.userName)
}
})
@ -435,66 +431,6 @@
}
return '身份证号码长度不正确';
},
argAdd(arg1, arg2) {
//
var _this = this,
r1 = 0,
r2 = 0,
m = 0;
try {
r1 = arg1.toString().split(".")[1].length
} catch (e) {}
try {
r2 = arg2.toString().split(".")[1].length
} catch (e) {}
m = Math.pow(10, Math.max(r1, r2))
return _this.argDiv((_this.argMul(arg1, m) + _this.argMul(arg2, m)), m)
},
argSubtr(arg1, arg2) {
//
var _this = this,
r1 = 0,
r2 = 0,
m = 0;
try {
r1 = arg1.toString().split(".")[1].length
} catch (e) {}
try {
r2 = arg2.toString().split(".")[1].length
} catch (e) {}
m = Math.pow(10, Math.max(r1, r2));
return _this.argDiv((_this.argMul(arg1, m) - _this.argMul(arg2, m)), m)
},
argMul(arg1, arg2) {
//
var _this = this,
m = 0,
s1 = arg1.toString(),
s2 = arg2.toString();
try {
m += s1.split(".")[1].length
} catch (e) {}
try {
m += s2.split(".")[1].length
} catch (e) {}
return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m)
},
argDiv(arg1, arg2) {
//
var _this = this,
t1 = 0,
t2 = 0,
r1, r2;
try {
t1 = arg1.toString().split(".")[1].length
} catch (e) {}
try {
t2 = arg2.toString().split(".")[1].length
} catch (e) {}
r1 = Number(arg1.toString().replace(".", ""))
r2 = Number(arg2.toString().replace(".", ""))
return _this.argMul((r1 / r2), Math.pow(10, t2 - t1));
},
}
}
</script>

View File

@ -1,118 +1,254 @@
.app {
height:calc(100vh - 44px);
padding:20rpx 0;
.app {
font-size: 34rpx;
padding-top: 10rpx;
height: 100%;
background: #FFFFFF;
padding-bottom: 200rpx;
.Agreement{
width: 100%;
background-color: #F4F5F7;
text-align: center;
height: 1000rpx;
position: absolute;
top:5%;
font-size: 30rpx;
.title{
height: 100rpx;
line-height: 100rpx;
border-bottom: 1px solid #eeeeee;
font-size: 34rpx;
margin: 0px auto;
width: 100%;
text-align: center;
}
.scroll-Y{
height:830rpx ;
overflow-y:scroll;
text-align: left;
text-indent: 2em;
}
.cancel {
height:70rpx;
line-height: 70rpx;
font-size: 32rpx;
background-color: #F4F5F7;
position: absolute;
border-top: 1rpx solid #000000;
bottom:0;
right:0;
width: 50%;
color: #000000;
}
.determine {
height:70rpx;
line-height: 70rpx;
font-size: 32rpx;
width: 50%;
color: #F4F5F7;
background: #4C7BC9;
position: absolute;
bottom:0;
left:0;
}
}
.item{
font-size: 34rpx;
margin: 0 auto 20rpx;
width: 94%;
height:100rpx;
.title {
height: 100rpx;
line-height: 100rpx;
background-color: #fff;
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0,0,0,0.03);
border-radius: 20rpx;
position: relative;
.lefttext{
position: absolute;
top:50%;
transform: translateY(-50%);
left:3%;
}
.righttext{
position: absolute;
top:50%;
transform: translateY(-50%);
width: 68%;
left:18%;
height:100rpx;
}
.lefttext,.righttext{
::v-deep .uni-input-input{
font-size: 34rpx;
}
::v-deep .uni-input-wrapper{
height:100rpx;
line-height: 100rpx;
}
::v-deep .uni-input-placeholder {
line-height: 100rpx;
font-size: 34rpx;
font-weight: 400;
color: #C3C1C1;
}
}
.obtaincode {
font-size: 34rpx;
margin: 0px auto;
width: 100%;
font-weight: 600;
text-align: center;
}
.mask {
.Agreement {
width: 100%;
background-color: #fff;
text-align: center;
font-size: 36rpx;
color: #4C7BC9;
line-height: 100rpx;
height: 1000rpx;
position: absolute;
right:5%;
top: 0%;
top: 5%;
width: 94%;
left: 3%;
font-size: 30rpx;
.scroll-Y {
width: 98%;
margin: 0 auto;
height: 830rpx;
overflow-y: scroll;
text-align: left;
text-indent: 2em;
}
.cancel {
height: 70rpx;
line-height: 70rpx;
font-size: 32rpx;
background-color: #F4F5F7;
position: absolute;
border-top: 1rpx solid #000000;
bottom: 0;
right: 0;
width: 50%;
color: #000000;
}
.determine {
height: 70rpx;
line-height: 70rpx;
font-size: 32rpx;
width: 50%;
color: #F4F5F7;
background: #4C7BC9;
position: absolute;
bottom: 0;
left: 0;
}
}
}
.addressitem {
width: 97%;
border-bottom: 1rpx solid #D8D4D4;
margin-left: 3%;
height: 100%;
.leftaddress {
width: 15%;
height: 100%;
display: flex;
display: inline-block;
}
.addition {
color: #666666;
display: inline-block;
line-height: 50rpx;
font-size: 28rpx;
}
}
.money {
font-size: 32rpx;
color: #D43953;
position: absolute;
right: 5%;
top: 15%;
}
.user {
width: 100%;
padding: 10rpx;
line-height: 93rpx;
margin-bottom: 10rpx;
.timeyear{
.bottomtext{
-webkit-overflow-scrolling: touch;
width: 96%;
margin: 0 auto;
.items{
display: flex;
justify-content:flex-start;
flex-wrap: wrap;
text-align: center;
.timeitem{
width: 21%;
margin: 0 2% 20rpx;
height: 86rpx;
border-radius: 5rpx;
font-size: 28rpx;
line-height: 86rpx;
border: 2rpx solid #DADADA;
}
.timeitemtap{
width: 21%;
margin: 0 2% 20rpx;
height: 86rpx;
border: 2rpx solid #F44B2F;
border-radius: 5rpx;
font-size: 28rpx;
color: #F44B2F;
line-height: 86rpx;
}
}
}
.toptext{
-webkit-overflow-scrolling: touch;
padding-top: 10rpx;
display: flex;
justify-content:space-around;
height: 50rpx;
color: #000000;
line-height: 27rpx;
margin-bottom: 30rpx;
text-align: center;
.Soonerorlater{
width: 200rpx;
font-size: 36rpx;
height: 50rpx;
}
.Soonerorlaterclass{
font-size: 36rpx;
color: #F44B2F;
width: 200rpx;
height: 50rpx;
}
view:nth-child(2){
width: 4rpx;
height: 27rpx;
background: #C5C3C3;
border-radius: 2rpx;
}
}
}
.item {
width: 97%;
border-bottom: 1rpx solid #D8D4D4;
margin-left: 3%;
.addition {
color: #666666;
line-height: 30rpx;
font-size: 28rpx;
}
}
}
.remarks {
width: 94%;
margin: 10rpx auto;
padding: 3%;
font-size: 34rpx;
height: 96rpx;
background: #FFFFFF;
border-radius: 20rpx;
margin-top: 20rpx;
position: relative;
.span {
display: inline-block;
width: 20%;
// overflow: hidden;
// text-overflow: ellipsis;
// white-space: nowrap;
position: absolute;
top:50%;
transform: translateY(-50%);
}
.input-placeholder{
color: #C5C3C3;
font-size: 30rpx;
}
input {
position: absolute;
top: 50%;
left: 23%;
width: 77%;
transform: translateY(-50%);
}
}
.priceback {
width: 90%;
background: #FFFFFF;
height: 100rpx;
margin: 0 auto;
.queren {
width: 100%;
height: 90rpx;
background: #4C7BC9;
border-radius: 26rpx;
margin: 105rpx 0 30rpx;
line-height: 90rpx;
text-align: center;
color: #ffffff;
}
.switch {
font-size: 26rpx;
text-align: center;
line-height: 60rpx;
color: #46ABD7;
}
}
.radio-content {
margin: 50rpx auto;
width: 70%;
text-align: center;
font-size: 28rpx;
position: relative;
.agreement {
position: absolute;
top:50%;
left:20%;
top: 50%;
left: 20%;
transform: translateY(-50%);
color: #878987;
}
}
.radio-right {
height: 100rpx;
width: 100rpx;
.radio {
display: inline-block;
@ -121,42 +257,130 @@
border-radius: 70%;
border: 2rpx solid #178ffb;
position: absolute;
top:50%;
left:5%;
top: 50%;
left: 5%;
transform: translateY(-50%);
.radio-active {
width: 16rpx;
height: 16rpx;
border-radius: 50%;
background-color: #178ffb;
position: absolute;
top:50%;
left:50%;
transform: translate(-50%,-50%);
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
// margin: 0 auto;
}
}
}
}
.switch {
text-align: center;
line-height: 60rpx;
color: #46ABD7;
position: absolute;
top: 73%;
.Consumablespackage .money {
top: 8%;
}
/* 耗材包 */
.Consumablespackage {
width: 94%;
margin: 10rpx auto;
padding: 3% 0 3% 3%;
font-size: 34rpx;
background: #FFFFFF;
border-radius: 20rpx;
margin-top: 20rpx;
position: relative;
padding-bottom: 40rpx;
::v-deep .u-checkbox__label{
width: 100% !important;
}
.detail {
width: 100%;
line-height: 100rpx;
// padding: 20rpx 0 0 40rpx;
position: relative;
.itemConsumabletitle{
width:55%;
position: absolute;
top:50%;
transform: translateY(-50%);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: inline-block;
font-size: 28rpx;
}
/deep/ .u-checkbox{
margin: 40rpx 0 0;
position: relative;
}
span{
width: 100%;
display: inline-block;
font-size: 28rpx;
color: #D43953;
text-align: right;
position: absolute;
right:5%;
top:50%;
transform: translateY(-50%);
}
}
}
.loginbtn {
width: 70%;
height: 100rpx;
text-align: center;
line-height: 100rpx;
background: #4C7BC9;
border-radius: 51rpx;
font-size: 41rpx;
color: #FFFFFF;
position: absolute;
top: 62%;
left: 15%;
/* 套餐 */
.Package {
width: 97%;
height: 500rpx;
font-size: 34rpx;
background: #FFFFFF;
border-radius: 20rpx;
margin: 20rpx auto 40rpx;
position: relative;
.uppicture {
border: 1rpx dashed #818181;
width: 90%;
height: 400rpx;
margin: 0 auto;
position: relative;
image {
width: 100%;
height: 100%;
}
span {
font-size: 35rpx;
color: #969394;
}
}
.checkboxs{
margin-top: 30rpx;
::v-deep .u-checkbox{
padding-right: 40rpx;
}
}
.detail {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 31rpx;
font-size: 32rpx;
color: #666666;
line-height: 31rpx;
position: absolute;
left: 10%;
top: 60%;
width: 90%;
}
}
.message {
width: 94%;
background: white;
border-radius: 20rpx;
margin: 0 auto;
text-align: center;
line-height: 96rpx;
}
}

View File

@ -1,55 +1,184 @@
<template>
<view class="app">
<view class="item">
<view class="lefttext">
姓名
<view class="user">
<view class="title">
个人信息
</view>
<u-input class="righttext" style="width: 80%;" type="text" placeholder="请输入" maxlength="10"
v-model="realName" />
</view>
<view class="item">
<view class="lefttext">
身份证号
<view class="item">
<span>姓名</span>
<span class='addition'>
<u-input type="text" placeholder="请输入姓名" v-model="personInfo.realName" />
</span>
</view>
<u-input class="righttext" style='left:30%' type="text" placeholder="请输入" maxlength="18"
v-model="patientName" />
</view>
<view class="item">
<view class="lefttext">
手机号
<view class="item">
<span>手机号</span>
<span class='addition'>
<u-input type="text" placeholder="请输入手机号" v-model="personInfo.phone" />
</span>
</view>
<u-input class="righttext" style='left:23%;width: 77%;' type="text" placeholder="请输入" maxlength="11"
v-model="phone" />
</view>
<view class="item">
<view class="lefttext">
输入密码
<view class="item">
<span>身份证号</span>
<span class='addition'>
<u-input type="text" placeholder="请输入身份证号" v-model="personInfo.userName" />
</span>
</view>
<u-input class='righttext' style='left:30%' placeholder="请输入密码" maxlength="20" v-model="password"
type="password" :border="false" :password-icon="true" />
</view>
<view class="item">
<view class="lefttext">
重复密码
<view class="item">
<span>电子邮箱(用于接收考试通知)</span>
<span class='addition'>
<u-input type="text" placeholder="请输入电子邮箱" v-model="personInfo.email" />
</span>
</view>
<u-input class='righttext' style='left:30%' placeholder="请再次输入密码" maxlength="20" v-model="newpassword"
type="password" :border="false" :password-icon="true" />
</view>
<!-- <view class="item">
<view class="lefttext">
验证码
<view class="item">
<span>通讯地址</span>
<span class='addition'>
<u-input type="text" placeholder="请输入通讯地址" v-model="personInfo.address" />
</span>
</view>
<input class="righttext" style='left:23%' type="text" placeholder="" maxlength="6" v-model="verification" />
<view class="obtaincode" :style="{'color':getCodeBtnColor}" @click.stop="getCode()">
{{getCodeText}}
</view>
<view class="user">
<view class="title">
教育背景
</view>
<view class="item">
<span>最高学历</span>
<span class='addition'>
<u-radio-group v-model="personInfo.education" @change="">
<u-radio @change="" v-for="(item, index) in educationlist" :key="index" :name="item.label"
style="padding: 0 15rpx;" :disabled="item.checked">
{{item.name}}
</u-radio>
</u-radio-group>
</span>
</view>
<view class="item">
<span>毕业院校</span>
<span class='addition'>
<u-input type="text" placeholder="请输入毕业院校" v-model="personInfo.graduateSchool" />
</span>
</view>
<view class="item">
<span>专业(如适用)</span>
<span class='addition'>
<u-input type="text" placeholder="请输入专业" v-model="personInfo.major" />
</span>
</view>
</view> -->
<view class="loginbtn" @tap='register'>
注册
</view>
<view class="switch" style="right:5%" @tap='gologin'>
已有账号,去登录
<view class="user">
<view class="title">
报考信息
</view>
<view class="item">
<span>报考类别(可选)</span>
<span class='addition'>
<u-radio-group v-model="personInfo.regType" @change="">
<u-radio @change="" v-for="(item, index) in regTypelist" :key="index" :name="item.label"
style="padding: 15rpx;" :disabled="item.checked">
{{item.name}}
</u-radio>
</u-radio-group>
</span>
</view>
<view class="item">
<span>培训经历(如有)</span>
<span class='addition'>
<view class="item" style="padding: 10rpx 0;">
<span>机构名称</span>
<span class='addition'>
<u-input type="text" placeholder="请输入机构名称" v-model="personInfo.trainInstitution" />
</span>
</view>
<view class="item" style="padding: 10rpx 0;">
<span>培训时间</span>
<span class='addition' @click="trainDateshow=true"
style="margin-left:50rpx;display: inline-block;padding: 10rpx;background-color: #4C7BC9;border-radius: 10rpx;color: #fff;">
选择时间区间
</span>
<view class="" v-if="personInfo.trainStartDate" style="padding: 16rpx 0;">
{{personInfo.trainStartDate+'至'}}{{personInfo.trainEndDate}}
</view>
</view>
</span>
</view>
</view>
<view class="user">
<view class="title">
上传材料
</view>
<view class="item">
<span>身份证正面</span>
<span class='addition'>
<u-upload :action="action" :form-data="{
type:'cardFrontUrl'
}" :file-list="fileList" :max-count="1" @on-uploaded="uploadedcardFront"></u-upload>
</span>
</view>
<view class="item">
<span>身份证反面</span>
<span class='addition'>
<u-upload :action="action" :form-data="{
type:'cardBackUrl'
}" :file-list="fileList" :max-count="1" @on-uploaded="uploadedcardBack"></u-upload>
</span>
</view>
<view class="item" style="line-height: 50rpx;">
<span>近期白底免冠证件照(1,JPG格式,&lt;20KB)</span>
<span class='addition'>
<u-upload :action="action" :form-data="{
type:'photoUrl'
}" :file-list="fileList" :max-count="1" @on-uploaded="uploadedphoto"></u-upload>
</span>
</view>
<view class="item" style="line-height: 50rpx;">
<span>学历证明(毕业证或学信网截图)</span>
<span class='addition'>
<u-upload :action="action" :form-data="{
type:'certificateUrl'
}" :file-list="fileList" :max-count="1" @on-uploaded="uploadedcertificate"></u-upload>
</span>
</view>
</view>
<view class="user">
<view class="title">
密码
</view>
<view class="item">
<span>密码</span>
<span class='addition'>
<u-input placeholder="请输入密码" v-model="personInfo.password" type="password" :password-icon="true" />
</span>
</view>
<view class="item">
<span>重复密码</span>
<span class='addition'>
<u-input placeholder="请再次输入密码" v-model="personInfo.newpassword" type="password"
:password-icon="true" />
</span>
</view>
<!-- <view class="item">
<view class="lefttext">
验证码
</view>
<input class="righttext" style='left:23%' type="text" placeholder="" maxlength="6" v-model="verification" />
<view class="obtaincode" :style="{'color':getCodeBtnColor}" @click.stop="getCode()">
{{getCodeText}}
</view>
</view> -->
</view>
<view class="priceback">
<view class="queren" @tap='register'>注册</view>
<view class="switch" @tap='gologin'>
已有账号,去登录
</view>
</view>
<u-toast ref="uToast" />
<u-mask :show="signatureshow" @click="signatureshow = false">
<view style="position:absolute;bottom:0;height:900rpx;width:100%;background-color: #fff;"
v-if='signatureshow'>
<signature @userSignaturePictureUrl='userSignaturePicture' @click.native.stop
style='background-color: #F4F5F7;width: 100%;height: 900rpx;'></signature>
</view>
</u-mask>
<u-calendar v-model="trainDateshow" mode="range" @change="trainDatechange"></u-calendar>
<u-toast ref="uToast" />
</view>
</template>
@ -57,37 +186,152 @@
import {
reg
} from '@/api/register/index.js'
import {
getExamList,
save
} from '@/api/addexam/index.js'
import baseurl from '@/api/baseurl.js'
import signature from '@/components/signature/signature.vue'
export default {
components: {},
components: {
signature
},
data() {
return {
patientName: '',
realName: "",
phone: '',
password: '',
newpassword: '',
trainDateshow: false,
signatureshow: false,
userSignaturePictureUrl: null,
examlist: [],
educationlist: [{
name: '初中',
label: 1,
checked: false,
},
{
name: '高中/中专',
label: 2,
checked: false,
},
{
name: '大专及以上',
label: 3,
checked: false,
}
],
regTypelist: [{
name: '普通医疗护理员',
label: 1,
checked: false,
},
{
name: '老年医疗护理员',
label: 2,
checked: false,
},
{
name: '孕产妇和新生儿医疗护理员',
label: 3,
checked: false,
}
],
action: baseurl + '/exam/api/file/upload',
fileList: [],
personInfo: {
password: undefined,
newpassword: undefined,
"address": "",
"cardBack": "",
"cardCopy": "", //
"cardFront": "",
"certificate": "",
"education": 0,
"email": "",
"examId": "",
startTime: undefined,
endTime: undefined,
startDate: undefined,
endDate: undefined,
"graduateSchool": "",
"major": "",
"phone": "",
"photo": "",
"physicalReport": "", //
"realName": "",
"regTime": "",
"regType": 0,
"signPicture": "",
"title": "",
"trainEndDate": "",
"trainInstitution": "",
"trainStartDate": "",
"userId": "",
"userName": "",
examFee: undefined,
},
verification: '',
getCodeText: '获取验证码', //
getCodeBtnColor: "#4C7BC9", //color
getCodeisWaiting: false, //
};
},
onLoad() {},
methods: {
uploadedcertificate(res) {
this.personInfo.certificate = res[0].response.data.url
},
uploadedphoto(res) {
this.personInfo.photo = res[0].response.data.url
},
uploadedcardBack(res) {
this.personInfo.cardBack = res[0].response.data.url
},
uploadedcardFront(res) {
this.personInfo.cardFront = res[0].response.data.url
},
trainDatechange(e) {
this.personInfo.trainEndDate = e.endDate
this.personInfo.trainStartDate = e.startDate
},
//
userSignaturePicture(data) {
let that = this
this.userSignaturePictureUrl = data
this.signatureshow = false
uni.uploadFile({
url: baseurl + '/exam/api/file/upload',
filePath: this.userSignaturePictureUrl,
name: 'file',
formData: {
type: 'signPictureUrl'
},
timeout: 5000,
success(res) {
that.personInfo.signPicture = JSON.parse(res.data).data.url
}
})
},
//
register() {
if (this.password !== this.newpassword) {
if (this.personInfo.password !== this.personInfo.newpassword) {
this.$refs.uToast.show({
title: '密码输入不一致,请重新输入',
type: 'error',
duration: '1500'
})
} else if (!this.validateIDCard(this.personInfo.userName)) {
this.$refs.uToast.show({
title: '身份证错误,请重新输入',
type: 'error',
duration: '1500'
})
} else if (!this.validatePhone(this.personInfo.phone)) {
this.$refs.uToast.show({
title: '手机号错误,请重新输入',
type: 'error',
duration: '1500'
})
} else {
reg({
password: this.password,
realName: this.realName,
userName: this.patientName,
phone: this.phone
}).then(res => {
reg(this.personInfo).then(res => {
if (res.code == 0) {
uni.setStorageSync("examh5token", res.data.token)
uni.setStorageSync("examh5user", {
@ -115,6 +359,43 @@
})
}
},
//
validatePhone(phone) {
// 111
const reg = /^1[3-9]\d{9}$/;
return reg.test(phone);
},
//
validateIDCard(idCard) {
// 1518
const reg15 = /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$/;
const reg18 = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
//
if (idCard.length === 15) {
return reg15.test(idCard);
} else if (idCard.length === 18) {
// 18
if (reg18.test(idCard)) {
return this.checkIDCardLastCode(idCard);
}
return false;
}
return false;
},
// 18
checkIDCardLastCode(idCard) {
if (idCard.length !== 18) return false;
//
const weight = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
//
const checkCode = ['1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'];
let sum = 0;
for (let i = 0; i < 17; i++) {
sum += parseInt(idCard[i]) * weight[i];
}
const mod = sum % 11;
return idCard[17].toUpperCase() === checkCode[mod];
},
//
gologin() {
uni.reLaunch({