init version kelfy-mini for new gitea
This commit is contained in:
135
pages/bookingDetails/bookingDetails.js
Normal file
135
pages/bookingDetails/bookingDetails.js
Normal file
@@ -0,0 +1,135 @@
|
||||
// pages/bookingDetails/bookingDetails.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
showData: {},
|
||||
showDatas: [],
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
console.log(options)
|
||||
this.setData({
|
||||
showData: JSON.parse(options.item)
|
||||
})
|
||||
this.getShowDataPlugs()
|
||||
},
|
||||
getShowDataPlugs() {
|
||||
wx.request({
|
||||
url: 'https://fy.btlsoln.com:8443/booking/getDoctorScheduling?selectDate&selectKmdm',
|
||||
method: "GET",
|
||||
data: {
|
||||
selectDate: this.data.showData.selectDate,
|
||||
selectKmdm: this.data.showData.ysdm
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/json'
|
||||
},
|
||||
success: (res) => {
|
||||
console.log(res, "获取号源")
|
||||
this.setData({
|
||||
showDatas: res.data.list
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
naviToyy(e) { //调用预约接口,成功后跳转到预约成功页面
|
||||
const bookIngDate =e.currentTarget.dataset.item.kssj;
|
||||
let pbmxid = e.currentTarget.dataset.item.pbmxid
|
||||
wx.request({
|
||||
url: 'https://fy.btlsoln.com:8443/his/order?patid&pbmxid&czyh&yyhx&ksmc&ksdm&sjdjl&cardNo&patientName',
|
||||
method: "GET",
|
||||
data: {
|
||||
pbmxid: pbmxid,
|
||||
patid: wx.getStorageSync("painId"),
|
||||
czyh: '01',
|
||||
yyhx: "0",
|
||||
ksmc: this.data.showData.ksmc,
|
||||
ksdm: this.data.showData.ksdm,
|
||||
sjdjl: bookIngDate,
|
||||
jssj: e.currentTarget.dataset.item.jssj,
|
||||
zxrq: e.currentTarget.dataset.item.zxrq,
|
||||
cardNo: wx.getStorageSync('cardNo'),
|
||||
patientName: wx.getStorageSync('trueName'),
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/json'
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.errCode == 0) {
|
||||
wx.setStorageSync('ksmc', this.data.showData.ksmc)
|
||||
wx.setStorageSync('day', e.currentTarget.dataset.item.zxrq)
|
||||
wx.setStorageSync('date', bookIngDate)
|
||||
wx.setStorageSync('sjd', bookIngDate + '-' + e.currentTarget.dataset.item.jssj)
|
||||
wx.setStorageSync('today', bookIngDate)
|
||||
wx.setStorageSync('money', e.currentTarget.dataset.item.ghf)
|
||||
wx.setStorageSync('sfId', wx.getStorageSync('sfId1'))
|
||||
wx.setStorageSync('name', wx.getStorageSync('trueName'))
|
||||
wx.setStorageSync('xh', res.data.list[0].xh)
|
||||
wx.navigateTo({
|
||||
url: '/pages/resInformation/resInformation',
|
||||
})
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: res.data.errMsg,
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
},
|
||||
fail(err) {}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
3
pages/bookingDetails/bookingDetails.json
Normal file
3
pages/bookingDetails/bookingDetails.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
27
pages/bookingDetails/bookingDetails.wxml
Normal file
27
pages/bookingDetails/bookingDetails.wxml
Normal file
@@ -0,0 +1,27 @@
|
||||
<view class="main">
|
||||
<view class="container">
|
||||
<van-cell-group inset class="booking_confirm">
|
||||
<van-cell value="{{showData.doctorzc}}" center>
|
||||
<view slot="title" class="name_title">
|
||||
<van-image width='50' height='60' round src="{{showData.imageUrl}}"></van-image>
|
||||
<view>{{showData.ysmc}}</view>
|
||||
</view>
|
||||
</van-cell>
|
||||
<van-cell title-class="details_class">
|
||||
<view slot="title">
|
||||
<view>{{showData.introduction}}</view>
|
||||
</view>
|
||||
</van-cell>
|
||||
<van-cell title="科室" value="{{showData.ksmc}}" />
|
||||
<!-- <van-cell title="职位" value="{{showData.zcMc}}" /> -->
|
||||
</van-cell-group>
|
||||
<van-cell-group inset class="booking_confirm" wx:for="{{showDatas}}">
|
||||
<van-divider borderColor="#1989fa" />
|
||||
<van-cell title="可预约时间" value="{{item.kssj}}-{{item.jssj}}" />
|
||||
<van-cell title="已预约" value="{{item.yyzs-item.kyys}}" />
|
||||
<van-cell title="剩余号源" value="{{item.kyys}}" />
|
||||
<van-cell title="预约费用" value="{{item.ghf}}" />
|
||||
<van-button type="info" data-item="{{item}}" bindtap="naviToyy">预约</van-button>
|
||||
</van-cell-group>
|
||||
</view>
|
||||
</view>
|
||||
17
pages/bookingDetails/bookingDetails.wxss
Normal file
17
pages/bookingDetails/bookingDetails.wxss
Normal file
@@ -0,0 +1,17 @@
|
||||
/* pages/bookingDetails/bookingDetails.wxss */
|
||||
.booking_confirm .van-button{
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 1vh;
|
||||
}
|
||||
.name_title {
|
||||
width: 35vw;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.details_class{
|
||||
width: 30vw;
|
||||
}
|
||||
Reference in New Issue
Block a user