注册
This commit is contained in:
parent
cb37429c4f
commit
f8fc65fd0f
@ -469,12 +469,12 @@
|
||||
}
|
||||
,{
|
||||
"path" : "seekadvicefrom/seekadvicefrom",
|
||||
"style" :
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "咨询医生",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
]
|
||||
}],
|
||||
@ -525,4 +525,4 @@
|
||||
// }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,31 +1,139 @@
|
||||
<template>
|
||||
<view class="register">
|
||||
<view class="head">
|
||||
<view class="head" @tap="Face">
|
||||
<image class="Facecollection" src="../../static/pages/Facecollection.png"></image>
|
||||
<span>人脸采集</span>
|
||||
</view>
|
||||
<view class="form">
|
||||
<u-form :model="form" ref="uForm">
|
||||
<span>姓名</span>
|
||||
<u-form-item prop="name">
|
||||
<u-input v-model="form.name" border='true' placeholder="请输入姓名" />
|
||||
<u-form-item prop="name" :border-bottom="false">
|
||||
<u-input v-model="form.name" placeholder="请输入姓名" />
|
||||
</u-form-item>
|
||||
<view class="name">
|
||||
性别
|
||||
<view class="sex">
|
||||
<u-radio-group v-model="query.sex" size='30'>
|
||||
<u-radio @change='sexchange' v-for="(item, index) in sexlist" :key="index" :name="item.name" active-color="#26A888"
|
||||
:disabled="item.disabled">
|
||||
{{item.name}}
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="name">
|
||||
出生日期
|
||||
<view class="select" @tap='timeshow=true'>
|
||||
<text>请选择出生日期</text>
|
||||
<image src="../../static/huijiantou.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<span>手机号</span>
|
||||
<u-form-item prop="phone">
|
||||
<u-input v-model="form.phone" border='true' placeholder="请输入手机号" />
|
||||
<u-form-item prop="phone" :border-bottom="false">
|
||||
<u-input v-model="form.phone" placeholder="请输入手机号" />
|
||||
</u-form-item>
|
||||
<span>身份证号</span>
|
||||
<u-form-item prop="indent">
|
||||
<u-input v-model="form.indent" border='true' placeholder="请输入身份证号" />
|
||||
<u-form-item prop="indent" :border-bottom="false">
|
||||
<u-input v-model="form.indent" placeholder="请输入身份证号" />
|
||||
</u-form-item>
|
||||
<view class="name">
|
||||
所属区域
|
||||
<view class="select">
|
||||
<text>请选择所属区域</text>
|
||||
<!-- <text>{{address}}</text> -->
|
||||
<!-- <image src="../../static/huijiantou.png" mode=""></image> -->
|
||||
</view>
|
||||
</view>
|
||||
<span>详细地址</span>
|
||||
<u-form-item prop="address" :border-bottom="false">
|
||||
<u-input :clearable='false' v-model="query.address" type="text" placeholder='小区、单元、门牌号'
|
||||
maxlength='40' />
|
||||
</u-form-item>
|
||||
<!-- <view class="name">
|
||||
详细地址
|
||||
<u-input :clearable='false' v-model="query.address" type="text" placeholder='小区、单元、门牌号'
|
||||
maxlength='40' />
|
||||
|
||||
</view> -->
|
||||
<view class="name">
|
||||
所在位置
|
||||
<view class="select" @tap='getAddress()'>
|
||||
<text>请选择所在位置</text>
|
||||
<!-- <text>{{query.locationName}}</text> -->
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="name">
|
||||
基础疾病
|
||||
<view class="select" @tap="godisease">
|
||||
<text>请选择基础疾病</text>
|
||||
<!-- <text v-for="(item,index) in query.diseaseInfoList">{{item.diseaseName}}</text> -->
|
||||
<image src="../../static/huijiantou.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</u-form>
|
||||
</view>
|
||||
<view class="btn" @click="submit">提交</view>
|
||||
<view class="bottom">
|
||||
<view class="radio">
|
||||
<u-radio-group style="display: inline-block;position: relative;top: 5rpx;left: 26rpx;" size='20' @change="onChange" v-model="selected">
|
||||
<u-radio shape="circle" active-color="#26A888" name="1"/>
|
||||
<!-- <radio value="1" active-color="#26A888"></radio> -->
|
||||
</u-radio-group>
|
||||
|
||||
<view class="agreement">我已阅读并同意<text @tap='maskshow=true'
|
||||
>《用户协议》</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="sbumit" @tap="informationinfo">
|
||||
|
||||
提交
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<u-toast ref="uToast" />
|
||||
|
||||
<u-mask :show="maskshow" class='mask' @click='maskshow=false'>
|
||||
<view class="Agreement">
|
||||
<view class="title">
|
||||
用户协议与隐私政策
|
||||
</view>
|
||||
<scroll-view scroll-y="true" class="scroll-Y" style="">
|
||||
<contenttext></contenttext>
|
||||
</scroll-view>
|
||||
<view class="cancel" @tap='maskshow=false'>
|
||||
取消
|
||||
</view>
|
||||
<view class="determine" @tap='tapradio'>
|
||||
确定并同意
|
||||
</view>
|
||||
</view>
|
||||
</u-mask>
|
||||
<u-picker mode="time" v-model="timeshow" :params="params" @confirm='timechange' @canel='timeshow=false'>
|
||||
</u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
AppIdentification
|
||||
} from '@/api/pagesB/AppIdentification/index.js'
|
||||
import {
|
||||
getRegionAndStreetInfo,
|
||||
getNurseType,
|
||||
information
|
||||
} from '@/api/pagesB/information/index.js'
|
||||
import contenttext from '../../components/text.vue'
|
||||
import {
|
||||
getSubordinateRegions,
|
||||
} from '@/api/pagesB/modifyAddress/modifyAddress.js';
|
||||
import gkcity from "../../components/m-city/m-city.vue";
|
||||
export default {
|
||||
components: {
|
||||
contenttext,
|
||||
"m-city": gkcity},
|
||||
onReady() {
|
||||
this.$refs.uForm.setRules(this.rules);
|
||||
},
|
||||
@ -37,6 +145,60 @@
|
||||
phone: '',
|
||||
indent: ''
|
||||
},
|
||||
timeshow: false, //出生日期
|
||||
params: {
|
||||
year: true,
|
||||
month: true,
|
||||
day: true,
|
||||
hour: false,
|
||||
minute: false,
|
||||
second: false
|
||||
},
|
||||
sexlist: [{
|
||||
name: '男',
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
name: '女',
|
||||
disabled: false
|
||||
}
|
||||
],
|
||||
// radio: 1,
|
||||
radio:false,
|
||||
selected:'',
|
||||
|
||||
// checked:false,
|
||||
// chooseLocation: '', //地图选址
|
||||
arealist: [], //区街道list
|
||||
list: [{
|
||||
id: "",
|
||||
localName: "请选择",
|
||||
children: [],
|
||||
}, ],
|
||||
areashow: false, //经纬度开关
|
||||
maskshow: false, //用户协议
|
||||
getNurseTypelist: [], //护理类型数组
|
||||
medicalcarelist: [], //医疗护理数组
|
||||
address: '', //页面所属区域
|
||||
query: { //信息请求数组
|
||||
couponId: null,
|
||||
patientName: "",
|
||||
cardNo: "",
|
||||
phone: "",
|
||||
address: "",
|
||||
areaCode: "",
|
||||
homeLongitude: null,
|
||||
homeLatitude: null,
|
||||
nurseTypeIdList: [],
|
||||
diseaseInfoList: [],
|
||||
patientId: '',
|
||||
locationName: '',
|
||||
sex: '',
|
||||
birthDate: '',
|
||||
},
|
||||
timer: null,
|
||||
addresslength: null,
|
||||
patientDiseaseInfoList: [], //获取个人信息
|
||||
rules: {
|
||||
name: [{
|
||||
required: true,
|
||||
@ -71,17 +233,271 @@
|
||||
onLoad() {
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
this.$refs.uForm.validate(valid => {
|
||||
if (valid) {
|
||||
console.log('验证通过');
|
||||
} else {
|
||||
console.log('验证失败');
|
||||
onChange(e) {
|
||||
console.log(e)
|
||||
// this.allChecked = !this.allChecked;
|
||||
// this.selected = e.detail.value;
|
||||
},
|
||||
submit() {
|
||||
uni.navigateTo({
|
||||
url:'/pagesB/information/information'
|
||||
})
|
||||
|
||||
// this.$refs.uForm.validate(valid => {
|
||||
// if (valid) {
|
||||
// console.log('验证通过');
|
||||
// } else {
|
||||
// console.log('验证失败');
|
||||
// }
|
||||
// });
|
||||
},
|
||||
// 性别
|
||||
sexchange(e) {
|
||||
if (e == '男') {
|
||||
this.query.sex = 'MALE';
|
||||
} else if (e == '女') {
|
||||
this.query.sex = 'FEMALE';
|
||||
}
|
||||
},
|
||||
// 人脸采集
|
||||
Face(){
|
||||
uni.navigateTo({
|
||||
url:'/pages/facecollection/facecollection'
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
|
||||
//提交信息
|
||||
informationinfo() {
|
||||
var that = this
|
||||
if (that.query.sex == '男') {
|
||||
that.query.sex = 'MALE';
|
||||
} else if (that.query.sex == '女') {
|
||||
that.query.sex = 'FEMALE';
|
||||
}
|
||||
});
|
||||
}
|
||||
if (this.addresslength) {
|
||||
if (this.addresslength.length > 2) {
|
||||
const value = uni.getStorageSync('phone');
|
||||
if (value) {
|
||||
that.query.phone = value
|
||||
if (that.radio == 1) {
|
||||
that.$refs.uToast.show({
|
||||
title: '请审核并同意用户协议',
|
||||
type: 'error'
|
||||
})
|
||||
} else {
|
||||
const patientId = uni.getStorageSync('patientId');
|
||||
AppIdentification(patientId).then(resp => {
|
||||
if (resp.code == 200) {
|
||||
if (resp.data.loginFlag) {
|
||||
that.$refs.uToast.show({
|
||||
title: '您已完善',
|
||||
type: 'success',
|
||||
})
|
||||
if (that.timer) {
|
||||
clearTimeout(that.timer)
|
||||
}
|
||||
that.timer = setTimeout(e => {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}, 1500)
|
||||
} else {
|
||||
information(that.query).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.removeStorageSync('invitationPatientId');
|
||||
that.$refs.uToast.show({
|
||||
title: '完善信息成功',
|
||||
type: 'success',
|
||||
duration: '1500'
|
||||
})
|
||||
if (that.timer) {
|
||||
clearTimeout(that.timer)
|
||||
}
|
||||
that.timer = setTimeout(e => {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}, 1500)
|
||||
} else if (res.code == 500) {
|
||||
that.$refs.uToast.show({
|
||||
title: res.msg,
|
||||
type: 'error',
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: '所属区域应选择所在的区或街道,请重新选择!',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: '所属区域应选择所在的区或街道,请重新选择!',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
},
|
||||
//性别
|
||||
sexchange(e) {
|
||||
if (e == '男') {
|
||||
this.query.sex = 'MALE';
|
||||
} else if (e == '女') {
|
||||
this.query.sex = 'FEMALE';
|
||||
}
|
||||
},
|
||||
//选择出生日期
|
||||
timechange(e) {
|
||||
this.query.birthDate = e.year + '-' + e.month + '-' + e.day
|
||||
},
|
||||
//获取所在位置
|
||||
getAddress() {
|
||||
var that = this;
|
||||
uni.chooseLocation({
|
||||
success: function(location) {
|
||||
that.query.locationName = location.address
|
||||
that.query.homeLongitude = location.longitude;
|
||||
that.query.homeLatitude = location.latitude;
|
||||
}
|
||||
});
|
||||
},
|
||||
// getAddress() {
|
||||
// uni.getLocation({
|
||||
// type: 'wgs84',
|
||||
// success: function(res) {
|
||||
// const key = '3VABZ-6LZWK-YPAJ3-AMQED-D7RUK-VPB37'; //使用在腾讯位置服务申请的key
|
||||
// const referer = '新医路健康服务平台'; //调用插件的app的名称
|
||||
// const location = JSON.stringify({
|
||||
// latitude: 39.89631551,
|
||||
// longitude: 116.323459711
|
||||
// });
|
||||
// wx.navigateTo({
|
||||
// url: 'plugin://chooseLocation/index?key=' + key + '&referer=' + referer
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
//护理类型请求
|
||||
getNurseTypeInfo() {
|
||||
getNurseType().then(res => {
|
||||
this.medicalcarelist = res.data.filter(e => e.nurseTypeName == '医疗护理')
|
||||
this.getNurseTypelist = res.data.filter(e => e.nurseTypeName != '医疗护理')
|
||||
})
|
||||
},
|
||||
//区街道
|
||||
areaInfo() {
|
||||
getSubordinateRegions().then(res => {
|
||||
this.list = res.data;
|
||||
})
|
||||
},
|
||||
// 三级地址联动回调
|
||||
getpickerParentValue(e) {
|
||||
e = e.filter(ele => ele.localName != '暂不选择')
|
||||
e = e.filter(ele => ele.localName != '暂无需选择')
|
||||
this.addresslength = e
|
||||
this.address = ''
|
||||
this.query.areaCode = ''
|
||||
if (e && e.length >= 1) {
|
||||
e.forEach(el => {
|
||||
this.address = this.address + el.localName
|
||||
})
|
||||
this.query.areaCode = e[e.length - 1].id
|
||||
} else {
|
||||
this.address = ''
|
||||
this.query.areaCode = ''
|
||||
}
|
||||
},
|
||||
// 显示三级地址联动
|
||||
showPicker() {
|
||||
this.areashow = true
|
||||
this.$refs.cityPicker.show();
|
||||
},
|
||||
//点击所需服务
|
||||
addnurseType(item) {
|
||||
if (this.query.nurseTypeIdList.findIndex(e => e == item.id) == -1) {
|
||||
this.query.nurseTypeIdList.push(item.id)
|
||||
} else {
|
||||
this.query.nurseTypeIdList = this.query.nurseTypeIdList.filter(e => e != item.id)
|
||||
}
|
||||
},
|
||||
godisease(item) {
|
||||
uni.navigateTo({
|
||||
url: `/pagesB/disease/disease?diseaseInfoList=${JSON.stringify(this.query.diseaseInfoList)}`
|
||||
})
|
||||
},
|
||||
changeRadio() {
|
||||
if (this.radio == 1) {
|
||||
this.radio = 2;
|
||||
} else {
|
||||
this.radio = 1;
|
||||
}
|
||||
},
|
||||
tapradio() {
|
||||
this.radio = 2;
|
||||
this.maskshow = false;
|
||||
},
|
||||
},
|
||||
//进入界面加载
|
||||
onLoad(options) {
|
||||
let that = this
|
||||
this.query.couponId = Number(options.couponId)
|
||||
const value = uni.getStorageSync('patientId');
|
||||
if (value) {
|
||||
that.query.patientId = value
|
||||
}
|
||||
this.areaInfo()
|
||||
this.getNurseTypeInfo();
|
||||
},
|
||||
//带参返回
|
||||
// 从地图选点插件返回后,在页面的onShow生命周期函数中能够调用插件接口,取得选点结果对象
|
||||
onShow() {
|
||||
var that = this
|
||||
const invitationPatientId = uni.getStorageSync('invitationPatientId')
|
||||
if (invitationPatientId) {
|
||||
that.query.source = 'FRIEND_INVITATION'
|
||||
that.query.invitationPatientId = Number(invitationPatientId)
|
||||
} else {
|
||||
that.query.source = 'REGISTER_YOURSELF'
|
||||
that.query.invitationPatientId = null
|
||||
}
|
||||
// const chooseLocation = requirePlugin('chooseLocation');
|
||||
// const location = chooseLocation.getLocation(); // 如果点击确认选点按钮,则返回选点结果对象,否则返回null
|
||||
// if (location) {
|
||||
// that.query.locationName = location.address
|
||||
// that.chooseLocation = location.address
|
||||
// that.query.homeLongitude = location.longitude;
|
||||
// that.query.homeLatitude = location.latitude;
|
||||
// }
|
||||
uni.$on('disease', function(data) {
|
||||
that.query.diseaseInfoList = JSON.parse(data.disease)
|
||||
if (that.query.diseaseInfoList.length > 0) {
|
||||
that.medicalcarelist.forEach(e => {
|
||||
if (that.query.nurseTypeIdList.findIndex(el => el == e.id) == -1) {
|
||||
that.query.nurseTypeIdList.push(e.id)
|
||||
} else {}
|
||||
})
|
||||
} else {
|
||||
that.medicalcarelist.forEach(e => {
|
||||
that.query.nurseTypeIdList = that.query.nurseTypeIdList.filter(el => el != e.id)
|
||||
})
|
||||
}
|
||||
uni.$off('disease')
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@ -104,6 +520,100 @@
|
||||
|
||||
.form {
|
||||
margin-top: 106rpx;
|
||||
::v-deep .u-input {
|
||||
width: 630rpx;
|
||||
height: 63rpx;
|
||||
background: #F6F6F6;
|
||||
color: #8E8E8E;
|
||||
// border: 1rpx solid red;
|
||||
// margin: 12rpx auto;
|
||||
border: none;
|
||||
border-radius: 5rpx;
|
||||
.u-input__input{
|
||||
font-size: 26rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #000000 !important;
|
||||
padding-left: 20rpx;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
::v-deep.input-placeholder{
|
||||
color: #8E8E8E !important;
|
||||
font-size: 20rpx;
|
||||
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
}
|
||||
::v-deep.uni-input-placeholder{
|
||||
color: #8E8E8E !important;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
.name {
|
||||
// padding: 25rpx 30rpx 0 30rpx;
|
||||
font-size: 30rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
line-height: 38rpx;
|
||||
|
||||
|
||||
.sex{
|
||||
width: 630rpx;
|
||||
height: 63rpx;
|
||||
background: #F6F6F6;
|
||||
margin: 12rpx 0 12rpx 0;
|
||||
border: none;
|
||||
border-radius: 5rpx;
|
||||
|
||||
}
|
||||
|
||||
::v-deep .u-radio.data-v-643b3322{
|
||||
margin-top: 8rpx;
|
||||
margin-left: 30rpx;
|
||||
|
||||
}
|
||||
|
||||
::v-deep .u-input {
|
||||
width: 630rpx;
|
||||
height: 63rpx;
|
||||
background: #F6F6F6;
|
||||
margin: 12rpx auto;
|
||||
border: none;
|
||||
border-radius: 5rpx;
|
||||
}
|
||||
|
||||
.select {
|
||||
width: 630rpx;
|
||||
height: 63rpx;
|
||||
background: #F6F6F6;
|
||||
margin: 12rpx 0 12rpx 0;
|
||||
// border: 1rpx solid #F6F6F6;
|
||||
border-radius: 5rpx;
|
||||
display: flex;
|
||||
position: relative;
|
||||
|
||||
text {
|
||||
padding-left: 20rpx;
|
||||
line-height: 63rpx;
|
||||
font-size: 20rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #8E8E8E;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 9rpx;
|
||||
height: 17rpx;
|
||||
position: absolute;
|
||||
right: 40rpx;
|
||||
top: 50%;
|
||||
-webkit-transform: translateY(-50%);
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .u-input--border {
|
||||
margin: 0 0 12rpx 0;
|
||||
@ -123,19 +633,64 @@
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
.bottom{
|
||||
position: relative;
|
||||
width: 100%;
|
||||
.radio{
|
||||
position: relative;
|
||||
width: 44%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
margin-top: 10%;
|
||||
bottom: 20rpx;
|
||||
|
||||
|
||||
.agreement{
|
||||
// width: 225rpx;
|
||||
// height: 17rpx;
|
||||
font-size: 18rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #26A888;
|
||||
// line-height: 38rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
.sbumit{
|
||||
width: 496rpx;
|
||||
height: 61rpx;
|
||||
line-height: 61rpx;
|
||||
text-align: center;
|
||||
background: #26A888;
|
||||
border-radius: 5rpx;
|
||||
font-size: 31rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
left: 50%;
|
||||
position: relative;
|
||||
margin-top: 20rpx;
|
||||
// -webkit-transform: translateY(-50%);
|
||||
transform: translateX(-50%);
|
||||
bottom: 20rpx;
|
||||
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 496rpx;
|
||||
height: 61rpx;
|
||||
background: #26A888;
|
||||
border-radius: 5rpx;
|
||||
font-size: 31rpx;
|
||||
color: #FFFFFF;
|
||||
line-height: 61rpx;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
bottom: 72rpx;
|
||||
}
|
||||
|
||||
|
||||
// .btn {
|
||||
// width: 496rpx;
|
||||
// height: 61rpx;
|
||||
// background: #26A888;
|
||||
// border-radius: 5rpx;
|
||||
// font-size: 31rpx;
|
||||
// color: #FFFFFF;
|
||||
// line-height: 61rpx;
|
||||
// text-align: center;
|
||||
// position: absolute;
|
||||
// bottom: 72rpx;
|
||||
// }
|
||||
}
|
||||
|
||||
.Facecollection {
|
||||
@ -146,4 +701,4 @@
|
||||
/deep/ .u-form-item__message {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user