init version kelfy-mini for new gitea
This commit is contained in:
140
pages/selsecPer/selsecPer.js
Normal file
140
pages/selsecPer/selsecPer.js
Normal file
@@ -0,0 +1,140 @@
|
||||
// pages/selsecPer/selsecPer.js
|
||||
var app = getApp()
|
||||
let common = require('../../config/common.js')
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
list:[]
|
||||
},
|
||||
jiuZhen(e){
|
||||
console.log(e.currentTarget.dataset.item,"选择就诊人")
|
||||
let painId = e.currentTarget.dataset.item.PATIENT_ID
|
||||
let trueName = e.currentTarget.dataset.item.TRUE_NAME
|
||||
let sfId = e.currentTarget.dataset.item.ID_CARD
|
||||
let carNum = e.currentTarget.dataset.item.MEDICAL_CARD
|
||||
wx.setStorageSync('painId', painId)
|
||||
wx.setStorageSync('trueName', trueName)
|
||||
wx.setStorageSync('sfId1', sfId)
|
||||
wx.setStorageSync('cardNo', carNum)
|
||||
wx.navigateTo({
|
||||
url: '/pages/selectDepartment/selectDepartment',
|
||||
// url: '/pages/departmentChoose/departmentChoose',
|
||||
})
|
||||
},
|
||||
getPerList(){
|
||||
wx.request({
|
||||
url:'https://fy.btlsoln.com:8443/getPatientByOpenid?openid',
|
||||
method:"GET",
|
||||
data:{
|
||||
openid:app.globalData.openId
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/json'
|
||||
},
|
||||
success: (res)=> {
|
||||
console.log(res.data,"患者")
|
||||
if(res.data.length > 0){
|
||||
let data1 = res.data
|
||||
data1.map((item,index) => {
|
||||
if(item.TYPE == 0){
|
||||
data1.unshift(data1.splice(index , 1)[0]);
|
||||
}
|
||||
})
|
||||
this.setData({
|
||||
list:data1
|
||||
})
|
||||
}else{
|
||||
wx.showModal({
|
||||
title: '',
|
||||
content: '您还未绑定就诊人,请先绑定就诊人信息!',
|
||||
cancelText:"否",
|
||||
confirmText:'是',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/userMsgDel/userMsgDel?state=0',
|
||||
})
|
||||
}else{
|
||||
wx.switchTab({
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
if(app.globalData.openId == ""||app.globalData.openId==null){
|
||||
common.checkGlobalOpenId().then(res=>{
|
||||
console.log(res)
|
||||
app.globalData.openId = res
|
||||
this.getPerList()
|
||||
},
|
||||
err=>{
|
||||
//初始化失败,弹框提示
|
||||
})
|
||||
}else{
|
||||
this.getPerList()
|
||||
}
|
||||
wx.setNavigationBarTitle({
|
||||
title: '选择就诊人',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
3
pages/selsecPer/selsecPer.json
Normal file
3
pages/selsecPer/selsecPer.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
20
pages/selsecPer/selsecPer.wxml
Normal file
20
pages/selsecPer/selsecPer.wxml
Normal file
@@ -0,0 +1,20 @@
|
||||
<!--pages/selsecPer/selsecPer.wxml-->
|
||||
<view class="main">
|
||||
<view class="content">
|
||||
<view class="title">请选择就诊人</view>
|
||||
<view class="item" bindtap="jiuZhen" data-item="{{item}}" wx:for="{{list}}" wx:key="item">
|
||||
<view class="up">
|
||||
<view class="name">{{item.TRUE_NAME}}</view>
|
||||
<view class="msg">
|
||||
<view wx:if="{{item.RELATE == 0}}" class="t1">本人</view>
|
||||
<view wx:elif="{{item.RELATE == 1}}" class="t1">子女</view>
|
||||
<view wx:elif="{{item.RELATE == 2}}" class="t1">夫妻 </view>
|
||||
<view wx:elif="{{item.RELATE == 3}}" class="t1">父母 </view>
|
||||
<view wx:elif="{{item.RELATE == 4}}" class="t1">朋友 </view>
|
||||
<view wx:if="{{item.TYPE == 0}}" class="mr">默认就诊人</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="down">{{item.MEDICAL_CARD}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
67
pages/selsecPer/selsecPer.wxss
Normal file
67
pages/selsecPer/selsecPer.wxss
Normal file
@@ -0,0 +1,67 @@
|
||||
/* pages/selsecPer/selsecPer.wxss */
|
||||
.main{
|
||||
margin: 30rpx 0;
|
||||
width: 750rpx;
|
||||
}
|
||||
.content{
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.title{
|
||||
height: 60rpx;
|
||||
width: 100%;
|
||||
font-size: 33rpx;
|
||||
}
|
||||
.item{
|
||||
height: 200rpx;
|
||||
width: 100%;
|
||||
border-radius: 5rpx;
|
||||
margin: 40rpx auto;
|
||||
box-shadow:0px 0px 5rpx #e2e2e2;
|
||||
background: rgba(245,249,255);
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.up{
|
||||
height: 80rpx;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.name{
|
||||
font-size: 35rpx;
|
||||
height: 80rpx;
|
||||
padding-right: 30rpx;
|
||||
line-height: 80rpx;
|
||||
color: #333;
|
||||
}
|
||||
.msg{
|
||||
flex: 1;
|
||||
height: 70rpx;
|
||||
line-height: 80rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.t1{
|
||||
height: 50rpx;
|
||||
width: 130rpx;
|
||||
text-align: center;
|
||||
line-height: 50rpx;
|
||||
font-size:33rpx;
|
||||
border-radius: 25rpx;
|
||||
color: rgba(45,135,255);
|
||||
background: rgba(226,237,254);
|
||||
}
|
||||
.mr{
|
||||
font-size: 30rpx;
|
||||
color: #666;
|
||||
}
|
||||
.down{
|
||||
height: 80rpx;
|
||||
width: 100%;
|
||||
line-height: 80rpx;
|
||||
font-size: 30rpx;
|
||||
color: #666;
|
||||
}
|
||||
Reference in New Issue
Block a user