修改了页面样式。
This commit is contained in:
+11
-11
@@ -8,6 +8,7 @@ Page({
|
||||
pageError: '',
|
||||
totalPrice: '0.00',
|
||||
serviceIcon: 'user-business',
|
||||
activeTab: 'detail',
|
||||
showOrderPopup: false,
|
||||
submitting: false,
|
||||
profiles: [],
|
||||
@@ -32,9 +33,7 @@ Page({
|
||||
requiresAddress: false,
|
||||
gender: '不限',
|
||||
genderIndex: 0,
|
||||
genderOptions: ['不限', '男', '女'],
|
||||
department: '',
|
||||
departments: ['内科', '外科', '妇产科', '儿科', '骨科', '神经科', '心血管内科', '消化内科', '呼吸内科', '内分泌科', '皮肤科', '眼科', '耳鼻喉科', '口腔科', '急诊科', '肿瘤科', '康复医学科', '老年病科', '中医科', '针灸推拿科']
|
||||
genderOptions: ['不限', '男', '女']
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
@@ -86,6 +85,14 @@ Page({
|
||||
this.initializePage()
|
||||
},
|
||||
|
||||
onTabChange(e) {
|
||||
const tab = e.currentTarget.dataset.tab
|
||||
if (!tab || tab === this.data.activeTab) return
|
||||
this.setData({ activeTab: tab })
|
||||
// 两个页签内容高度不同,切换后回到页首,避免停在上一页的滚动位置
|
||||
wx.pageScrollTo({ scrollTop: 0, duration: 0 })
|
||||
},
|
||||
|
||||
applyBookingConfig(service) {
|
||||
const booking = service.booking || {}
|
||||
const sessions = booking.sessions || []
|
||||
@@ -214,10 +221,6 @@ Page({
|
||||
this.setData({ hospital: e.detail.value })
|
||||
},
|
||||
|
||||
onDepartmentChange(e) {
|
||||
this.setData({ department: e.detail.value })
|
||||
},
|
||||
|
||||
onDateChange(e) {
|
||||
this.setData({ appointmentDate: e.detail.value })
|
||||
},
|
||||
@@ -249,7 +252,6 @@ Page({
|
||||
const data = this.data
|
||||
if (!data.selectedProfileId || !data.selectedPatient) return '请选择就诊人'
|
||||
if (!data.hospital.trim()) return '请输入就诊医院'
|
||||
if (!data.department.trim()) return '请输入就诊科室'
|
||||
if (!data.appointmentDate) return '请选择预约日期'
|
||||
if (!data.appointmentTime) return '请选择预约时间'
|
||||
if (data.requiresAddress && !data.shippingAddress.trim()) return '请填写完整收货地址'
|
||||
@@ -278,8 +280,7 @@ Page({
|
||||
},
|
||||
hospital: {
|
||||
province: data.province,
|
||||
name: data.hospital.trim(),
|
||||
department: data.department.trim()
|
||||
name: data.hospital.trim()
|
||||
},
|
||||
schedule: {
|
||||
date: data.appointmentDate,
|
||||
@@ -316,7 +317,6 @@ Page({
|
||||
province: provinces[0] || '',
|
||||
provinceIndex: 0,
|
||||
hospital: '',
|
||||
department: '',
|
||||
appointmentDate: '',
|
||||
appointmentTime: '',
|
||||
sessionIndex: 0,
|
||||
|
||||
Reference in New Issue
Block a user