From fdd656b241a8b5d38ed493c0c366ce6737fe111f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com> Date: Fri, 21 Oct 2022 17:44:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A4=E7=90=86=E7=AB=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/appointmenttime/appointmenttime.js | 4 +- api/nursestation/nursestation.js | 12 +- api/request.js | 2 +- pages/appointmenttime/appointmenttime.vue | 111 ++++++---------- pages/detail/detail.vue | 114 ++++++++-------- pages/nursestation/nursestation.vue | 155 ++++++++++++---------- 6 files changed, 186 insertions(+), 212 deletions(-) diff --git a/api/appointmenttime/appointmenttime.js b/api/appointmenttime/appointmenttime.js index a2012b3..1355ecb 100644 --- a/api/appointmenttime/appointmenttime.js +++ b/api/appointmenttime/appointmenttime.js @@ -15,9 +15,9 @@ export function getAppStationItemInfo(stationId, stationItemId, stationItemPrice method: 'GET' }) } -export function appointment(data) { +export function submitAppointment(data) { return request({ - url: `/nurseApplet/login/appointment`, + url: `/nurseApp/login/submitAppointment`, method: 'post', data }) diff --git a/api/nursestation/nursestation.js b/api/nursestation/nursestation.js index d6b43bd..6384d8a 100644 --- a/api/nursestation/nursestation.js +++ b/api/nursestation/nursestation.js @@ -10,12 +10,12 @@ export function introductionList(id) { -export function getPatientInfo(id) { - return request({ - url: `/nurseApplet/login/getPatientInfo?openId=${id}`, - method: 'GET' - }) -} +// export function getAppStationItemInfo(id) { +// return request({ +// url: `/nurseApp/login/getAppStationItemInfo?patientId=${id}`, +// method: 'GET' +// }) +// } export function itemList(id,pageSize,pageNum) { return request({ diff --git a/api/request.js b/api/request.js index 50765d6..5638e9d 100644 --- a/api/request.js +++ b/api/request.js @@ -9,7 +9,7 @@ var request = function(config) { url: baseurl + config.url, data: config.data, method: config.method, - timeout: 5000, + timeout: 10000, // header: { // token: uni.getStorageSync('token') // }, diff --git a/pages/appointmenttime/appointmenttime.vue b/pages/appointmenttime/appointmenttime.vue index c9e511f..51d5516 100644 --- a/pages/appointmenttime/appointmenttime.vue +++ b/pages/appointmenttime/appointmenttime.vue @@ -16,8 +16,8 @@ 时间: - 请选择时间 - {{usertime}} + 请选择时间 + {{usertime}} @@ -55,12 +55,6 @@ 确认预约 - @@ -71,7 +65,7 @@ submitAppointment } from '@/api/appointmenttime/appointmenttime.js' import baseurl from '@/api/baseurl.js' - import upicker from '../u-picker/u-picker.vue' + import upicker from '../picker/picker.vue' export default { components: { upicker @@ -88,9 +82,6 @@ endminute: true, }, timeshow: false, - timeshow2: false, - timeshow3: false, - timeshow4: false, maskshow: false, orderlist: { "patientId": '', @@ -112,29 +103,25 @@ }, maskshow: false, userlist: [], - userid: '', patientId: 46, phone: '', patientName: '', address: '', usertime: '', - maskshow: false, radio1: 1, stationId: 2, stationItemId: 2, stationItemPriceId: 3, - getinfolist: {}, //服务时长 - listInfo: [], username: "", - userAddress: "", - userphoneList: [], - useraddressList: [], personInfo: [], } }, onLoad(options) { console.log(options) + this.getInfo() + this.getPatientInfo() //获取护理站id等信息 + this.personInfo.patientId = options.patientId this.orderlist.stationId = options.stationId this.orderlist.stationItemId = options.stationItemId this.orderlist.stationItemPriceId = options.stationItemPriceId @@ -143,26 +130,28 @@ }, methods: { //获取时间 - timeconfirm(e){ + timeconfirm(e) { console.log(e) + this.orderlist.serviceDate = e.year + '-' + e.month + '-' + e.day + this.orderlist.serviceStartTime = e.hour + ":" + e.minute + this.orderlist.serviceEndTime = e.endhour + ":" + e.endminute + this.usertime = e.year + '年' + e.month + '月' + e.day + '日' + e.hour + ":" + e.minute + '至' +e.endhour + ":" + e.endminute + console.log(this.orderlist,this.usertime) }, getInfo() { //被护理人信息 getAppPatientList(this.patientId).then(res => { this.personInfo = res.data[0] console.log("this.personInfo", this.personInfo); - this.orderlist.patientId = res.data[0].patientId - this.orderlist.serviceAddress = res.data[0].address - }) }, //获取耗材包详情 getPatientInfo(stationId, stationItemId, stationItemPriceId) { - getAppStationItemInfo(stationId, stationItemId, stationItemPriceId).then(res => { + getAppStationItemInfo(this.stationId, this.stationItemId, this.stationItemPriceId).then(res => { console.log(res) this.orderlist = res.data //被护理人信息 - this.getInfo() + }) }, //确认预约 @@ -175,44 +164,11 @@ ) }, - confirm2(e) { - console.log(e); - this.timeshow3 = true; - this.orderlist.serviceDate = e.year + '-' + e.month + '-' + e.day - this.usertime = e.year + '年' + e.month + '月' + e.day + '日' - }, - confirm4(e) { - console.log(e) - this.usertime = this.usertime + e.hour + ":" + e.minute - this.orderlist.serviceEndTime = e.hour + ":" + e.minute - }, - confirm3(e) { - console.log(e) - var sep = '\xa0 \xa0'; - this.usertime = this.usertime + sep + e.hour + ":" + e.minute + '至' - console.log(this.orderlist) - this.orderlist.serviceStartTime = e.hour + ":" + e.minute - console.log(this.orderlist) - this.timeshow4 = true; - }, - - - changeRadio2() { this.radio1 = 2; // console.log("个人") }, - // changeRadio2() { - // this.radio1 = 2; - // // console.log("个人") - // this.maskshow = true; - // }, - timeconfirm(e) { - console.log(e); - // this.orderlist.serviceDate = e.year + '-' + e.month + '-' + e.day - // this.usertime = e.year + '年' + e.month + '月' + e.day + '日' - }, } } @@ -270,6 +226,11 @@ background: #FFFFFF; border-radius: 20rpx; margin-top: 3%; + + input { + margin-top: -6%; + margin-left: 15%; + } } .priceback { @@ -318,14 +279,6 @@ line-height: 2rpx; font-size: 34rpx; - .radio { - width: 34rpx; - height: 34rpx; - border-radius: 70%; - border: 2rpx solid #178ffb; - margin: 6px 25px -10px -10px; - } - .agreement { font-size: 34rpx; color: #878987; @@ -335,17 +288,27 @@ .radio-right { margin-left: 66rpx; - /* 同意协议 */ - .radio-active { - width: 16rpx; - height: 16rpx; - border-radius: 50%; - background-color: #178ffb; - } - .radio-default { border: 2rpx solid #0fbda6; } + + .radio { + width: 34rpx; + height: 34rpx; + border-radius: 70%; + border: 2rpx solid #178ffb; + margin: 6px 25px -10px -10px; + + .radio-active { + width: 16rpx; + height: 16rpx; + border-radius: 50%; + background-color: #178ffb; + margin-left: 20%; + margin-top: 20%; + // margin: 0 auto; + } + } } } diff --git a/pages/detail/detail.vue b/pages/detail/detail.vue index 7c79501..584ae75 100644 --- a/pages/detail/detail.vue +++ b/pages/detail/detail.vue @@ -1,18 +1,17 @@