Commit b4d06c6850edea53cd6470c0c93648a82e6bf227

Authored by xianghenggang
1 parent 0b046f7f05

医生详情

Showing 12 changed files with 140 additions and 153 deletions

littleApp_child/app.json View file @ b4d06c6
1 1 {
2 2 "pages": [
  3 +
3 4 "pages/home/home",
4 5 "pages/Setting/Setting",
5 6 "pages/PersonalInfo/PersonalInfo",
... ... @@ -13,7 +14,7 @@
13 14 "pages/SearchPage/SearchPage",
14 15 "pages/login/login",
15 16 "pages/inspectionReport/inspectionReport",
16   -
  17 + "pages/doctor_detail/doctor_detail",
17 18 "pages/doctorList/doctorList",
18 19 "pages/hospital_detail/hospital_detail",
19 20 "pages/doctor/doctor",
littleApp_child/pages/doctor/home.js View file @ b4d06c6
  1 +// pages/doctor/home.js
  2 +Page({
  3 +
  4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 +
  9 + },
  10 +
  11 + /**
  12 + * 生命周期函数--监听页面加载
  13 + */
  14 + onLoad: function (options) {
  15 +
  16 + },
  17 +
  18 + /**
  19 + * 生命周期函数--监听页面初次渲染完成
  20 + */
  21 + onReady: function () {
  22 +
  23 + },
  24 +
  25 + /**
  26 + * 生命周期函数--监听页面显示
  27 + */
  28 + onShow: function () {
  29 +
  30 + },
  31 +
  32 + /**
  33 + * 生命周期函数--监听页面隐藏
  34 + */
  35 + onHide: function () {
  36 +
  37 + },
  38 +
  39 + /**
  40 + * 生命周期函数--监听页面卸载
  41 + */
  42 + onUnload: function () {
  43 +
  44 + },
  45 +
  46 + /**
  47 + * 页面相关事件处理函数--监听用户下拉动作
  48 + */
  49 + onPullDownRefresh: function () {
  50 +
  51 + },
  52 +
  53 + /**
  54 + * 页面上拉触底事件的处理函数
  55 + */
  56 + onReachBottom: function () {
  57 +
  58 + },
  59 +
  60 + /**
  61 + * 用户点击右上角分享
  62 + */
  63 + onShareAppMessage: function () {
  64 +
  65 + }
  66 +})
littleApp_child/pages/doctor/home.json View file @ b4d06c6
  1 +{}
littleApp_child/pages/doctor/home.wxml View file @ b4d06c6
  1 +<!--pages/doctor/home.wxml-->
  2 +<text>{{page}}.wxml</text>
littleApp_child/pages/doctor/home.wxss View file @ b4d06c6
  1 +/* pages/doctor/home.wxss */
littleApp_child/pages/doctor_detail/doctor_detail.js View file @ b4d06c6
... ... @@ -9,21 +9,8 @@
9 9  
10 10 Page({
11 11 data: {
12   - showAllIntro: false,
13   - departmentList: [{
14   - "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" },
15   - { "icon": "https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=2845876344,2547149135&fm=173&s=CB50DFA600825BEF16B8A43403001073&w=550&h=334&img.JPEG", "duty": "职务", "name": "wqw", "good": "介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍" }]
16   - },
17   - {
18   - "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" },
19   - { "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" }]
20   - },
21   - {
22   - "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" },
23   - { "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" }]
24   - },
25   - ],
26   - hospitalId: ''
  12 +
  13 +
27 14 },
28 15 onLoad: function (options) {
29 16 var id = options.id
... ... @@ -33,10 +20,6 @@
33 20 console.log(this.data.hospitalId)
34 21 // this.requestData(options.id)
35 22 },
36   - onUnload: function () {
37   -
38   - },
39   -
40 23 /*---------自定义函数--------*/
41 24 requestData(id) {
42 25 var self = this
43 26  
... ... @@ -44,29 +27,12 @@
44 27 // var param = { page: page, limit: 15, type: 2, categoryId: self.data.id }
45 28 networkUtil._get(api.articles + '/' + id, {}, function (res) {
46 29 console.log('数据-----', res)
47   - res.data.content = util.convertHtmlToText(res.data.content)
48   - var date = new Date(res.data.created * 1000)
49   - res.data.time = date.getFullYear() + '年' + (date.getMonth() + 1) + '月' + date.getDate() + '日 ' + date.getHours() + ':' + date.getMinutes()
50   - self.setData({
51   - knowledge: res.data,
52   - swiperHeight: wx.getSystemInfoSync().windowWidth * 0.55
53   - })
  30 +
54 31 }, function (res) {
55 32  
56 33 })
57 34 },
58   - showAllIntroduce: function () {
59   - var self = this
60   - var showAllIntro = !self.data.showAllIntro
61   - this.setData({
62   - showAllIntro: showAllIntro
63   - })
64   - },
65   - showOtherHospital: function () {
66   - wx.navigateTo({
67   - url: '../hospitalList/hospitalList',
68   - })
69   - }
  35 +
70 36  
71 37 })
littleApp_child/pages/doctor_detail/doctor_detail.json View file @ b4d06c6
1 1 {
2 2 "navigationBarBackgroundColor": "#48C17B",
3   - "navigationBarTitleText": "医院详情",
  3 + "navigationBarTitleText": "专家介绍",
4 4 "navigationBarTextStyle": "white",
5 5 "backgroundColor": "white"
6 6 }
littleApp_child/pages/doctor_detail/doctor_detail.wxml View file @ b4d06c6
1 1 <view class="main">
2   - <image class="hospital_image" src="../../source/hospital_introduce.jpg"></image>
3 2  
4   - <view class='name_view'>
5   - <view class='line'></view>
6   - <view class="title_text">房贷首付多少</view>
7   - <view class='showAll' bindtap='showOtherHospital'>其他医院</view>
8   - </view>
9   - <view style="position:relative">
10   - <view class="hospital_introduce1" wx:if="{{!showAllIntro}}" bindtap='showAllIntroduce'>介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介介绍</view>
11   - <!-- <view class="hospital_introduce_All" wx:if="{{showAllIntro}}" bindtap='showAllIntroduce'>介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍</view> -->
12   - <view class="hospital_introduce1" style='position:absolute;bottom:0;right:0;background:#fff'>展开</view>
13   - </view>
  3 + <view class='icon_name_view'>
14 4  
15   -
16   - <!-- <div id="a" style="height:100px;width:200px;overflow-y:hidden;">
17   - 测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语
18   - </div>
19   - <view id="show" style="display:block" onclick="document.getElementById('a').style.height='auto';this.style.display='block';document.getElementById('show').style.display='none';">展开</view> -->
20   -
21   - <view class='divider10'></view>
22   - <view wx:for="{{departmentList}}" wx:key="index">
23   - <view class='departname_view'>
24   - <view class='line'></view>
25   - <view class="title_text">{{item.departName}}</view>
26   - </view>
27   - <view>
28   - <view wx:for="{{item.list}}" wx:for-index="sectionIndex" wx:for-item="sectionItem">
29   - <view class="doctor_view">
30   - <image class='doctor_icon' src='{{sectionItem.icon}}'></image>
31   - <view class='content_view'>
32   - <view class='name_text'>{{sectionItem.duty}} {{sectionItem.name}}</view>
33   - <view class='doctor_intro'>{{sectionItem.good}}</view>
34   - </view>
35   - </view>
36   -
37   -
  5 + <image class='doctor_icon' src='https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=2845876344,2547149135&fm=173&s=CB50DFA600825BEF16B8A43403001073&w=550&h=334&img.JPEG'></image>
  6 + <view class='content_view'>
  7 + <view class='name_view'>
  8 + <view class='name'>名字</view>
  9 + <view class='depart'>主治医生</view>
38 10 </view>
  11 + <view class='doctor_other'>dsadsad</view>
39 12 </view>
40   -
41 13 </view>
42   -
  14 + <view class='departname_view'>
  15 + <view class='line'></view>
  16 + <view class="title_text">专家介绍</view>
  17 + </view>
  18 + <view class='doctor_intro'>服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒</view>
  19 + <view class='departname_view'>
  20 + <view class='line'></view>
  21 + <view class="title_text">专项特长</view>
  22 + </view>
  23 + <view class='doctor_intro'>服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒服务收费safe撒</view>
43 24 </view>
littleApp_child/pages/doctor_detail/doctor_detail.wxss View file @ b4d06c6
1 1 .main {
2 2 background: #fff;
3 3 width: 100%;
  4 + height: 100%;
4 5 }
5 6  
6   -.hospital_image {
7   - width: 100%;
8   - height: 160px;
9   -}
10   -
11   -.name_view {
  7 +.icon_name_view {
  8 + padding-top: 10px;
  9 + margin-left: 10px;
12 10 display: flex;
13   - margin: 10px;
14 11 }
15 12  
16   -.line {
17   - background: #48c17b;
18   - width: 2px;
19   - height: 14px;
20   - margin-top: 3px;
  13 +.doctor_icon {
  14 + width: 66px;
  15 + height: 66px;
  16 + border-radius: 50%;
  17 + border: 3px solid white;
21 18 }
22 19  
23   -.title_text {
24   - font-size: 14px;
25   - color: #222;
26   - margin-left: 5px;
  20 +.content_view {
  21 + margin-left: 10px;
27 22 }
28 23  
29   -.showAll {
30   - font-size: 13px;
31   - color: #48c17b;
32   - position: absolute;
33   - right: 10px;
  24 +.name_view {
  25 + display: flex;
  26 + margin-top: 3px;
34 27 }
35 28  
36   -.hospital_introduce1 {
37   - font-size: 13px;
38   - color: #666;
39   - margin-left: 10px;
40   - margin-right: 10px;
41   - overflow: hidden;
42   - text-overflow: ellipsis;
43   - display: -webkit-box;
44   - -webkit-box-orient: vertical;
45   - -webkit-line-clamp: 4;
  29 +.name {
  30 + font-size: 20px;
  31 + color: #222;
46 32 }
47 33  
48   -.hospital_introduce_All {
49   - font-size: 13px;
50   - color: #666;
  34 +.depart {
  35 + font-size: 14px;
  36 + color: #888;
  37 + margin-top: 8px;
51 38 margin-left: 10px;
52   - margin-right: 10px;
53 39 }
54 40  
55   -.divider10 {
56   - height: 10px;
57   - background: #eee;
58   - margin-top: 10px;
  41 +.doctor_other {
  42 + font-size: 14px;
  43 + color: #888;
59 44 }
60   -
61 45 .departname_view {
62 46 display: flex;
63 47 margin-left: 10px;
64 48 margin-top: 10px;
65 49 }
66 50  
67   -.doctor_view {
68   - display: flex;
69   - margin-top: 5px;
70   -}
71   -
72   -.doctor_icon {
73   - width: 55px;
74   - height: 55px;
75   - margin-left: 10px;
76   - border-radius: 50%;
77   - border: 3px solid white;
78   -}
79   -
80   -.content_view {
81   - left: 65px;
82   - right: 10px;
83   - position: absolute;
  51 +.line {
  52 + background: #48c17b;
  53 + width: 2px;
  54 + height: 14px;
84 55 margin-top: 3px;
85   - margin-left: 10px;
86 56 }
87   -
88   -.name_text {
  57 +.title_text {
89 58 font-size: 14px;
90 59 color: #222;
  60 + margin-left: 5px;
91 61 }
92   -
93   -.doctor_intro {
94   - font-size: 11px;
95   - color: #888;
96   - overflow: hidden;
97   - text-overflow: ellipsis;
98   - display: -webkit-box;
99   - -webkit-box-orient: vertical;
100   - -webkit-line-clamp: 2;
101   - right: 20px;
102   - left: 75px;
  62 +.doctor_intro{
  63 + font-size: 13px;
  64 +color: #888888;
  65 +margin: 10px;
103 66 }
littleApp_child/pages/hospital_detail/hospital_detail.js View file @ b4d06c6
... ... @@ -66,6 +66,13 @@
66 66 wx.navigateTo({
67 67 url: '../hospitalList/hospitalList',
68 68 })
  69 + },
  70 + toDocotrDetail:function(e){
  71 + var id = e.currentTarget.dataset.id
  72 + console.log(e)
  73 + wx.navigateTo({
  74 + url: '../doctor_detail/doctor_detail',
  75 + })
69 76 }
70 77  
71 78 })
littleApp_child/pages/hospital_detail/hospital_detail.json View file @ b4d06c6
1 1 {
2 2 "navigationBarBackgroundColor": "#48C17B",
3   - "navigationBarTitleText": "医院详情",
  3 + "navigationBarTitleText": "医院介绍",
4 4 "navigationBarTextStyle": "white",
5 5 "backgroundColor": "white"
6 6 }
littleApp_child/pages/hospital_detail/hospital_detail.wxml View file @ b4d06c6
... ... @@ -3,16 +3,15 @@
3 3  
4 4 <view class='name_view'>
5 5 <view class='line'></view>
6   - <view class="title_text">房贷首付多少</view>
  6 + <view class="title_text">医院名称</view>
7 7 <view class='showAll' bindtap='showOtherHospital'>其他医院</view>
8   - </view>
  8 + </view>
9 9 <view >
10 10 <view class="hospital_introduce1" wx:if="{{!showAllIntro}}" bindtap='showAllIntroduce'>介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介介绍</view>
11 11 <view class="hospital_introduce_All" wx:if="{{showAllIntro}}" bindtap='showAllIntroduce'>介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍</view>
12 12 <!-- <view class="hospital_introduce1" style='position:absolute;bottom:0;right:0;background:#fff'>展开</view> -->
13 13 </view>
14 14  
15   -
16 15 <!-- <div id="a" style="height:100px;width:200px;overflow-y:hidden;">
17 16 测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语句测试语
18 17 </div>
... ... @@ -26,7 +25,7 @@
26 25 </view>
27 26 <view>
28 27 <view wx:for="{{item.list}}" wx:for-index="sectionIndex" wx:for-item="sectionItem">
29   - <view class="doctor_view">
  28 + <view class="doctor_view" bindtap='toDocotrDetail' data-id='{{sectionItem.id}}'>
30 29 <image class='doctor_icon' src='{{sectionItem.icon}}'></image>
31 30 <view class='content_view'>
32 31 <view class='name_text'>{{sectionItem.duty}} {{sectionItem.name}}</view>