init version kelfy-mini for new gitea
This commit is contained in:
142
pages/addUserMessage/addUserMessage.js
Normal file
142
pages/addUserMessage/addUserMessage.js
Normal file
@@ -0,0 +1,142 @@
|
||||
// pages/addUserMessage/addUserMessage.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
trueName:'',
|
||||
carNum:'',
|
||||
phoneNumber:""
|
||||
},
|
||||
getname(e) {
|
||||
this.setData({
|
||||
trueName: e.detail.value
|
||||
})
|
||||
},
|
||||
getnum(e) {
|
||||
this.setData({
|
||||
carNum: e.detail.value
|
||||
})
|
||||
},
|
||||
getnumber(e) {
|
||||
this.setData({
|
||||
phoneNumber: e.detail.value
|
||||
})
|
||||
},
|
||||
saveUserMessage(){
|
||||
if(this.data.trueName ==''||this.data.carNum ==''||this.data.phoneNumber ==''){
|
||||
wx.showModal({
|
||||
content: '请填写完整信息',
|
||||
showCancel: false,
|
||||
})
|
||||
}else{
|
||||
let reg =/^(((13[0-9]{1})|(14[0-9]{1})|(17[0-9]{1})|(15[0-3]{1})|(15[4-9]{1})|(18[0-9]{1})|(199))+\d{8})$/;;
|
||||
let reg2 = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
|
||||
if(!reg.test(this.data.phoneNumber)){
|
||||
wx.showToast({
|
||||
title: '请输入正确的手机号!',
|
||||
icon:'none'
|
||||
})
|
||||
}else if(!reg2.test(this.data.carNum)){
|
||||
wx.showToast({
|
||||
title: '请输入正确的身份证号码!',
|
||||
icon:'none'
|
||||
})
|
||||
}else{
|
||||
wx.request({
|
||||
url:'https://fy.btlsoln.com:8443/his/addUser?hzxm&sfzh',
|
||||
method:"GET",
|
||||
data:{
|
||||
hzxm:this.data.trueName,
|
||||
sfzh:this.data.carNum,
|
||||
lxdh:this.data.phoneNumber
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/json'
|
||||
},
|
||||
success: (res)=> {
|
||||
if(res.data.errCode ==0){
|
||||
wx.showToast({
|
||||
title: '建档成功',
|
||||
icon:'success'
|
||||
})
|
||||
setTimeout(item => {
|
||||
wx.navigateBack({
|
||||
delta: 1 //返回上一级页面
|
||||
})
|
||||
},1000)
|
||||
}else{
|
||||
wx.showToast({
|
||||
title: res.data.errMsg,
|
||||
icon:'error'
|
||||
})
|
||||
setTimeout(item => {
|
||||
wx.navigateBack({
|
||||
delta: 1 //返回上一级页面
|
||||
})
|
||||
},1000)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
wx.setNavigationBarTitle({
|
||||
title: '建立档案',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
3
pages/addUserMessage/addUserMessage.json
Normal file
3
pages/addUserMessage/addUserMessage.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
34
pages/addUserMessage/addUserMessage.wxml
Normal file
34
pages/addUserMessage/addUserMessage.wxml
Normal file
@@ -0,0 +1,34 @@
|
||||
<!--pages/userMsgDel/userMsgDel.wxml-->
|
||||
<view class="main">
|
||||
<view class="content">
|
||||
<view class="title">请认真填写档案信息信息</view>
|
||||
<view class="form">
|
||||
<view class="item" >
|
||||
<view class="left">姓名</view>
|
||||
<view class="input">
|
||||
<input class="sr" bindinput="getname" value="{{ trueName }}" placeholder-class="placeholder" placeholder="请输入真实姓名"></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item" >
|
||||
<view class="left">手机号</view>
|
||||
<view class="input">
|
||||
<input class="sr" bindinput="getnumber" value="{{ phoneNumber }}" placeholder-class="placeholder" placeholder="请输入手机号码"></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item" >
|
||||
<view class="left">身份证</view>
|
||||
<view class="input">
|
||||
<input class="sr" bindinput="getnum" value="{{ carNum }}" placeholder-class="placeholder" placeholder="请输入身份证号码"></input>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="item">
|
||||
<view class="left1">设为默认就诊人 </view>
|
||||
<view class="switch">
|
||||
<van-switch class="sw" checked="{{ checked }}" bind:change="onChange" size="25px" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="msgDes">初次添加就诊人请绑定本院就诊卡号,未持有本院就诊卡的患者需到本院自助机或窗口办理就诊卡后方可进行添加。</view> -->
|
||||
<view class="btn" bindtap="saveUserMessage">保存</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
172
pages/addUserMessage/addUserMessage.wxss
Normal file
172
pages/addUserMessage/addUserMessage.wxss
Normal file
@@ -0,0 +1,172 @@
|
||||
/* pages/addUserMessage/addUserMessage.wxss *//* pages/userMsgDel/userMsgDel.wxss */
|
||||
.main{
|
||||
margin: 30rpx 0;
|
||||
width: 750rpx;
|
||||
}
|
||||
.content{
|
||||
height: 100%;
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.title{
|
||||
height: 120rpx;
|
||||
width: 100%;
|
||||
font-size: 33rpx;
|
||||
color: #666;
|
||||
line-height: 120rpx;
|
||||
border-bottom: 1rpx solid #f8f8f8;
|
||||
}
|
||||
.item{
|
||||
height: 120rpx;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1rpx solid #f8f8f8;
|
||||
}
|
||||
.left{
|
||||
height: 100%;
|
||||
width: 180rpx;
|
||||
font-size: 35rpx;
|
||||
color: #333;
|
||||
line-height: 120rpx;
|
||||
}
|
||||
.input{
|
||||
flex: 1;
|
||||
font-size: 35rpx;
|
||||
color: #333;
|
||||
line-height: 120rpx;
|
||||
}
|
||||
.input2{
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
font-size: 30rpx;
|
||||
color: #666;
|
||||
line-height: 120rpx;
|
||||
}
|
||||
.input3{
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
font-size: 35rpx;
|
||||
color: #333;
|
||||
line-height: 120rpx;
|
||||
}
|
||||
.sr{
|
||||
border: 0;
|
||||
}
|
||||
.placeholder{
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.popWrap{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
padding: 10rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.popWrap :last-child{
|
||||
border: none;
|
||||
}
|
||||
.title1{
|
||||
height: 80rpx;
|
||||
width: 100%;
|
||||
font-size: 33rpx;
|
||||
color: #666;
|
||||
line-height: 80rpx;
|
||||
text-align: center
|
||||
}
|
||||
.msgItem1{
|
||||
height: 160rpx;
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
border-bottom: 1rpx solid #f8f8f8;
|
||||
}
|
||||
.kUp{
|
||||
height: 80rpx;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
.k1{
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
font-size: 35rpx;
|
||||
color: #333;
|
||||
}
|
||||
.k2{
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
font-size: 35rpx;
|
||||
color: #666;
|
||||
margin-left: 50rpx;
|
||||
}
|
||||
.KDown{
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
font-size: 35rpx;
|
||||
color: #666;
|
||||
}
|
||||
.msgItem{
|
||||
height: 80rpx;
|
||||
width: 100%;
|
||||
font-size: 35rpx;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
border-bottom: 1rpx solid #f8f8f8;
|
||||
}
|
||||
.left1{
|
||||
height: 100%;
|
||||
width: 300rpx;
|
||||
font-size: 35rpx;
|
||||
color: #333;
|
||||
line-height: 120rpx;
|
||||
}
|
||||
.left1{
|
||||
height: 100%;
|
||||
width: 400rpx;
|
||||
}
|
||||
.switch{
|
||||
height: 100%;
|
||||
width: 100rpx;
|
||||
display:flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.msgDes{
|
||||
height: 180rpx;
|
||||
width: 100%;
|
||||
padding: 20rpx 15rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 10rpx;
|
||||
margin-top: 10rpx;
|
||||
background: rgba(247,247,248);
|
||||
font-size: 30rpx;
|
||||
color: #666;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
.btn{
|
||||
height: 100rpx;
|
||||
margin-top: 50rpx;
|
||||
width: 100%;
|
||||
background: rgba(0,110,255);
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 35rpx;
|
||||
letter-spacing: 5rpx;
|
||||
}
|
||||
.btn2{
|
||||
height: 100rpx;
|
||||
margin-top: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
width: 100%;
|
||||
background: rgba(228,240,255);
|
||||
color: rgba(3,112,255);
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 35rpx;
|
||||
letter-spacing: 5rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user