init version kelfy-mini for new gitea
This commit is contained in:
130
pages/userMgr/userMgr.js
Normal file
130
pages/userMgr/userMgr.js
Normal file
@@ -0,0 +1,130 @@
|
||||
// pages/userMgr/userMgr.js
|
||||
var app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
list:[],
|
||||
loadingHidden: true,
|
||||
},
|
||||
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)=> {
|
||||
let that = this
|
||||
setTimeout(function(){
|
||||
let data = res.data
|
||||
data.map((item,index)=>{
|
||||
if(item.TYPE == 0){
|
||||
data.unshift(data.splice(index , 1)[0]);
|
||||
}
|
||||
})
|
||||
if(data == ''){
|
||||
that.setData({
|
||||
flag:false
|
||||
})
|
||||
}else{
|
||||
that.setData({
|
||||
flag:true,
|
||||
list:data
|
||||
})
|
||||
}
|
||||
that.setData({
|
||||
loadingHidden: true
|
||||
});
|
||||
console.log(data,"患者")
|
||||
},500)
|
||||
}
|
||||
})
|
||||
},
|
||||
naviToAdd(){
|
||||
let state = 0
|
||||
wx.navigateTo({
|
||||
url: '/pages/userMsgDel/userMsgDel?state='+state,
|
||||
})
|
||||
},
|
||||
naviToDet(e){
|
||||
console.log(e.currentTarget.dataset.item)
|
||||
let item = e.currentTarget.dataset.item
|
||||
let idCard = item.ID_CARD
|
||||
let carNum = item.MEDICAL_CARD
|
||||
let painId = item.PATIENT_ID
|
||||
let relate = item.RELATE
|
||||
let trueName = item.TRUE_NAME
|
||||
let type = item.TYPE
|
||||
let state = 1
|
||||
wx.navigateTo({
|
||||
url: '/pages/userMsgDel/userMsgDel?state='+state+'&idCard='+idCard+'&carNum='+carNum+'&painId='+painId+'&relate='+relate+'&trueName='+trueName+'&type='+type+'&state='+state,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.setData({
|
||||
loadingHidden: false,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
wx.setNavigationBarTitle({
|
||||
title: "管理就诊人"
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
this.getPerList()
|
||||
this.setData({
|
||||
loadingHidden: false,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
5
pages/userMgr/userMgr.json
Normal file
5
pages/userMgr/userMgr.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"van-switch": "@vant/weapp/switch/index"
|
||||
}
|
||||
}
|
||||
32
pages/userMgr/userMgr.wxml
Normal file
32
pages/userMgr/userMgr.wxml
Normal file
@@ -0,0 +1,32 @@
|
||||
<!--pages/userMgr/userMgr.wxml-->
|
||||
<view class="main">
|
||||
<view class="content">
|
||||
<loading hidden="{{loadingHidden}}">加载中...</loading>
|
||||
<view wx:if="{{loadingHidden}}">
|
||||
|
||||
<view wx:if="{{flag == true}}">
|
||||
<view class="item" wx:for="{{list}}" wx:key="item" data-item="{{item}}" bindtap="naviToDet">
|
||||
<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 class="icon" wx:if="{{item.TYPE == 0}}">
|
||||
<view class="mr">默认就诊人</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="down">
|
||||
<view>{{item.MEDICAL_CARD}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:else="{{flag == false}}" class="zw">暂无就诊人信息,请先添加就诊人!</view>
|
||||
<view class="btn" bindtap="naviToAdd">添加就诊人</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
105
pages/userMgr/userMgr.wxss
Normal file
105
pages/userMgr/userMgr.wxss
Normal file
@@ -0,0 +1,105 @@
|
||||
/* pages/userMgr/userMgr.wxss */
|
||||
.main{
|
||||
margin: 30rpx 0;
|
||||
width: 750rpx;
|
||||
}
|
||||
.content{
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.zw{
|
||||
height: 250rpx;
|
||||
width: 100%;
|
||||
border-radius: 5rpx;
|
||||
margin: 40rpx auto;
|
||||
box-shadow:0px 0px 15rpx #e2e2e2;
|
||||
padding:0 30rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 33rpx;
|
||||
color: #666;
|
||||
}
|
||||
.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%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
line-height: 80rpx;
|
||||
font-size: 30rpx;
|
||||
color: #666;
|
||||
}
|
||||
.icon{
|
||||
height: 50rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.mr{
|
||||
font-size: 33rpx;
|
||||
color: #333;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
.sw{
|
||||
margin-top: 5rpx;
|
||||
}
|
||||
.btn{
|
||||
height: 100rpx;
|
||||
margin-top: 150rpx;
|
||||
margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
background: rgba(0,110,255);
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 35rpx;
|
||||
letter-spacing: 5rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user