From b4d06c6850edea53cd6470c0c93648a82e6bf227 Mon Sep 17 00:00:00 2001 From: xianghenggang Date: Fri, 8 Sep 2017 15:47:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BB=E7=94=9F=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- littleApp_child/app.json | 3 +- littleApp_child/pages/doctor/home.js | 66 +++++++++++++ littleApp_child/pages/doctor/home.json | 1 + littleApp_child/pages/doctor/home.wxml | 2 + littleApp_child/pages/doctor/home.wxss | 1 + .../pages/doctor_detail/doctor_detail.js | 42 +------- .../pages/doctor_detail/doctor_detail.json | 2 +- .../pages/doctor_detail/doctor_detail.wxml | 53 ++++------ .../pages/doctor_detail/doctor_detail.wxss | 107 +++++++-------------- .../pages/hospital_detail/hospital_detail.js | 7 ++ .../pages/hospital_detail/hospital_detail.json | 2 +- .../pages/hospital_detail/hospital_detail.wxml | 7 +- 12 files changed, 140 insertions(+), 153 deletions(-) create mode 100644 littleApp_child/pages/doctor/home.js create mode 100644 littleApp_child/pages/doctor/home.json create mode 100644 littleApp_child/pages/doctor/home.wxml create mode 100644 littleApp_child/pages/doctor/home.wxss diff --git a/littleApp_child/app.json b/littleApp_child/app.json index 158d279..025764b 100644 --- a/littleApp_child/app.json +++ b/littleApp_child/app.json @@ -1,5 +1,6 @@ { "pages": [ + "pages/home/home", "pages/Setting/Setting", "pages/PersonalInfo/PersonalInfo", @@ -13,7 +14,7 @@ "pages/SearchPage/SearchPage", "pages/login/login", "pages/inspectionReport/inspectionReport", - + "pages/doctor_detail/doctor_detail", "pages/doctorList/doctorList", "pages/hospital_detail/hospital_detail", "pages/doctor/doctor", diff --git a/littleApp_child/pages/doctor/home.js b/littleApp_child/pages/doctor/home.js new file mode 100644 index 0000000..f453c86 --- /dev/null +++ b/littleApp_child/pages/doctor/home.js @@ -0,0 +1,66 @@ +// pages/doctor/home.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/littleApp_child/pages/doctor/home.json b/littleApp_child/pages/doctor/home.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/littleApp_child/pages/doctor/home.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/littleApp_child/pages/doctor/home.wxml b/littleApp_child/pages/doctor/home.wxml new file mode 100644 index 0000000..d939a45 --- /dev/null +++ b/littleApp_child/pages/doctor/home.wxml @@ -0,0 +1,2 @@ + +{{page}}.wxml diff --git a/littleApp_child/pages/doctor/home.wxss b/littleApp_child/pages/doctor/home.wxss new file mode 100644 index 0000000..59ee071 --- /dev/null +++ b/littleApp_child/pages/doctor/home.wxss @@ -0,0 +1 @@ +/* pages/doctor/home.wxss */ \ No newline at end of file diff --git a/littleApp_child/pages/doctor_detail/doctor_detail.js b/littleApp_child/pages/doctor_detail/doctor_detail.js index 7eb522a..109ec44 100644 --- a/littleApp_child/pages/doctor_detail/doctor_detail.js +++ b/littleApp_child/pages/doctor_detail/doctor_detail.js @@ -9,21 +9,8 @@ var util = require('../../utils/util.js') Page({ data: { - showAllIntro: false, - departmentList: [{ - "departName": "name1", "list": [{ "icon": "https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=2845876344,2547149135&fm=173&s=CB50DFA600825BEF16B8A43403001073&w=550&h=334&img.JPEG", "duty": "职务", "name": "wqw", "good": "dsadawdas" }, { "icon": "https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=2845876344,2547149135&fm=173&s=CB50DFA600825BEF16B8A43403001073&w=550&h=334&img.JPEG", "duty": "职务", "name": "wqw", "good": "dsadawdas" }, - { "icon": "https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=2845876344,2547149135&fm=173&s=CB50DFA600825BEF16B8A43403001073&w=550&h=334&img.JPEG", "duty": "职务", "name": "wqw", "good": "介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍" }] - }, - { - "departName": "name1", "list": [{ "icon": "https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=2845876344,2547149135&fm=173&s=CB50DFA600825BEF16B8A43403001073&w=550&h=334&img.JPEG", "duty": "职务", "name": "wqw", "good": "dsadawdas" }, { "icon": "https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=2845876344,2547149135&fm=173&s=CB50DFA600825BEF16B8A43403001073&w=550&h=334&img.JPEG", "duty": "职务", "name": "wqw", "good": "dsadawdas" }, - { "icon": "https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=2845876344,2547149135&fm=173&s=CB50DFA600825BEF16B8A43403001073&w=550&h=334&img.JPEG", "duty": "职务", "name": "wqw", "good": "dsadawdas" }] - }, - { - "departName": "name1", "list": [{ "icon": "https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=2845876344,2547149135&fm=173&s=CB50DFA600825BEF16B8A43403001073&w=550&h=334&img.JPEG", "duty": "职务", "name": "wqw", "good": "dsadawdas" }, { "icon": "https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=2845876344,2547149135&fm=173&s=CB50DFA600825BEF16B8A43403001073&w=550&h=334&img.JPEG", "duty": "职务", "name": "wqw", "good": "dsadawdas" }, - { "icon": "https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=2845876344,2547149135&fm=173&s=CB50DFA600825BEF16B8A43403001073&w=550&h=334&img.JPEG", "duty": "职务", "name": "wqw", "good": "dsadawdas" }] - }, - ], - hospitalId: '' + + }, onLoad: function (options) { var id = options.id @@ -33,10 +20,6 @@ Page({ console.log(this.data.hospitalId) // this.requestData(options.id) }, - onUnload: function () { - - }, - /*---------自定义函数--------*/ requestData(id) { var self = this @@ -44,28 +27,11 @@ Page({ // var param = { page: page, limit: 15, type: 2, categoryId: self.data.id } networkUtil._get(api.articles + '/' + id, {}, function (res) { console.log('数据-----', res) - res.data.content = util.convertHtmlToText(res.data.content) - var date = new Date(res.data.created * 1000) - res.data.time = date.getFullYear() + '年' + (date.getMonth() + 1) + '月' + date.getDate() + '日 ' + date.getHours() + ':' + date.getMinutes() - self.setData({ - knowledge: res.data, - swiperHeight: wx.getSystemInfoSync().windowWidth * 0.55 - }) + }, function (res) { }) }, - showAllIntroduce: function () { - var self = this - var showAllIntro = !self.data.showAllIntro - this.setData({ - showAllIntro: showAllIntro - }) - }, - showOtherHospital: function () { - wx.navigateTo({ - url: '../hospitalList/hospitalList', - }) - } + }) diff --git a/littleApp_child/pages/doctor_detail/doctor_detail.json b/littleApp_child/pages/doctor_detail/doctor_detail.json index 5db722d..c2bd8af 100644 --- a/littleApp_child/pages/doctor_detail/doctor_detail.json +++ b/littleApp_child/pages/doctor_detail/doctor_detail.json @@ -1,6 +1,6 @@ { "navigationBarBackgroundColor": "#48C17B", - "navigationBarTitleText": "医院详情", + "navigationBarTitleText": "专家介绍", "navigationBarTextStyle": "white", "backgroundColor": "white" } \ No newline at end of file diff --git a/littleApp_child/pages/doctor_detail/doctor_detail.wxml b/littleApp_child/pages/doctor_detail/doctor_detail.wxml index c09f739..bda2729 100644 --- a/littleApp_child/pages/doctor_detail/doctor_detail.wxml +++ b/littleApp_child/pages/doctor_detail/doctor_detail.wxml @@ -1,43 +1,24 @@ - - - - - 房贷首付多少 - 其他医院 - - - 介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介介绍 - - 展开 - - - - - - - - - - {{item.departName}} - - - - - - - {{sectionItem.duty}} {{sectionItem.name}} - {{sectionItem.good}} - - + + + + + 名字 + 主治医生 + dsadsad - - + + + 专家介绍 + + 服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒 + + + 专项特长 + + 服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒 \ No newline at end of file diff --git a/littleApp_child/pages/doctor_detail/doctor_detail.wxss b/littleApp_child/pages/doctor_detail/doctor_detail.wxss index d647a08..60f582a 100644 --- a/littleApp_child/pages/doctor_detail/doctor_detail.wxss +++ b/littleApp_child/pages/doctor_detail/doctor_detail.wxss @@ -1,103 +1,66 @@ .main { background: #fff; width: 100%; + height: 100%; } -.hospital_image { - width: 100%; - height: 160px; -} - -.name_view { +.icon_name_view { + padding-top: 10px; + margin-left: 10px; display: flex; - margin: 10px; } -.line { - background: #48c17b; - width: 2px; - height: 14px; - margin-top: 3px; +.doctor_icon { + width: 66px; + height: 66px; + border-radius: 50%; + border: 3px solid white; } -.title_text { - font-size: 14px; - color: #222; - margin-left: 5px; +.content_view { + margin-left: 10px; } -.showAll { - font-size: 13px; - color: #48c17b; - position: absolute; - right: 10px; +.name_view { + display: flex; + margin-top: 3px; } -.hospital_introduce1 { - font-size: 13px; - color: #666; - margin-left: 10px; - margin-right: 10px; - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 4; +.name { + font-size: 20px; + color: #222; } -.hospital_introduce_All { - font-size: 13px; - color: #666; +.depart { + font-size: 14px; + color: #888; + margin-top: 8px; margin-left: 10px; - margin-right: 10px; } -.divider10 { - height: 10px; - background: #eee; - margin-top: 10px; +.doctor_other { + font-size: 14px; + color: #888; } - .departname_view { display: flex; margin-left: 10px; margin-top: 10px; } -.doctor_view { - display: flex; - margin-top: 5px; -} - -.doctor_icon { - width: 55px; - height: 55px; - margin-left: 10px; - border-radius: 50%; - border: 3px solid white; -} - -.content_view { - left: 65px; - right: 10px; - position: absolute; +.line { + background: #48c17b; + width: 2px; + height: 14px; margin-top: 3px; - margin-left: 10px; } - -.name_text { +.title_text { font-size: 14px; color: #222; + margin-left: 5px; } - -.doctor_intro { - font-size: 11px; - color: #888; - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - right: 20px; - left: 75px; -} +.doctor_intro{ + font-size: 13px; +color: #888888; +margin: 10px; +} \ No newline at end of file diff --git a/littleApp_child/pages/hospital_detail/hospital_detail.js b/littleApp_child/pages/hospital_detail/hospital_detail.js index 7eb522a..8c266b4 100644 --- a/littleApp_child/pages/hospital_detail/hospital_detail.js +++ b/littleApp_child/pages/hospital_detail/hospital_detail.js @@ -66,6 +66,13 @@ Page({ wx.navigateTo({ url: '../hospitalList/hospitalList', }) + }, + toDocotrDetail:function(e){ + var id = e.currentTarget.dataset.id + console.log(e) + wx.navigateTo({ + url: '../doctor_detail/doctor_detail', + }) } }) diff --git a/littleApp_child/pages/hospital_detail/hospital_detail.json b/littleApp_child/pages/hospital_detail/hospital_detail.json index 5db722d..9df48cc 100644 --- a/littleApp_child/pages/hospital_detail/hospital_detail.json +++ b/littleApp_child/pages/hospital_detail/hospital_detail.json @@ -1,6 +1,6 @@ { "navigationBarBackgroundColor": "#48C17B", - "navigationBarTitleText": "医院详情", + "navigationBarTitleText": "医院介绍", "navigationBarTextStyle": "white", "backgroundColor": "white" } \ No newline at end of file diff --git a/littleApp_child/pages/hospital_detail/hospital_detail.wxml b/littleApp_child/pages/hospital_detail/hospital_detail.wxml index e3ef0e9..77d71dd 100644 --- a/littleApp_child/pages/hospital_detail/hospital_detail.wxml +++ b/littleApp_child/pages/hospital_detail/hospital_detail.wxml @@ -3,16 +3,15 @@ - 房贷首付多少 + 医院名称 其他医院 - + 介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介介绍 介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍 -