Commit 38d1e3e7e27fed1c8c5629574b17e64f3590a24e
Exists in
master
and in
2 other branches
Merge branch 'master' of https://git.healthbaby.com.cn/luoye/littleapp_child
* 'master' of https://git.healthbaby.com.cn/luoye/littleapp_child: 医院列表医院详情 # Conflicts: # littleApp_child/app.json
Showing 15 changed files
- littleApp_child/app.json
- littleApp_child/pages/doctor_detail/doctor_detail.js
- littleApp_child/pages/doctor_detail/doctor_detail.json
- littleApp_child/pages/doctor_detail/doctor_detail.wxml
- littleApp_child/pages/doctor_detail/doctor_detail.wxss
- littleApp_child/pages/hospitalList/hospitalList.js
- littleApp_child/pages/hospitalList/hospitalList.json
- littleApp_child/pages/hospitalList/hospitalList.wxml
- littleApp_child/pages/hospitalList/hospitalList.wxss
- littleApp_child/pages/hospital_detail/hospital_detail.js
- littleApp_child/pages/hospital_detail/hospital_detail.json
- littleApp_child/pages/hospital_detail/hospital_detail.wxml
- littleApp_child/pages/hospital_detail/hospital_detail.wxss
- littleApp_child/pages/vipService/vipService.wxss
- littleApp_child/source/hospital_introduce.jpg
littleApp_child/app.json
View file @
38d1e3e
... | ... | @@ -12,7 +12,9 @@ |
12 | 12 | "pages/login/login", |
13 | 13 | "pages/inspectionReport/inspectionReport", |
14 | 14 | "pages/doctorList/doctorList", |
15 | + "pages/hospital_detail/hospital_detail", | |
15 | 16 | "pages/doctor/doctor", |
17 | + "pages/hospitalList/hospitalList", | |
16 | 18 | "pages/chatroom/chatroom", |
17 | 19 | "pages/chat/chat", |
18 | 20 | "pages/childcare_knowledge_detail/childcare_knowledge_detail", |
littleApp_child/pages/doctor_detail/doctor_detail.js
View file @
38d1e3e
1 | +//articleLists.js 文章列表 | |
2 | +// 网络请求工具类 | |
3 | +var networkUtil = require('../../utils/network_util.js') | |
4 | +var api = require('../../utils/apiFile.js') | |
5 | +// 事件监听 | |
6 | +var event = require('../../utils/event.js') | |
7 | +var util = require('../../utils/util.js') | |
8 | + | |
9 | + | |
10 | +Page({ | |
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: '' | |
27 | + }, | |
28 | + onLoad: function (options) { | |
29 | + var id = options.id | |
30 | + this.setData({ | |
31 | + hospitalId: id | |
32 | + }) | |
33 | + console.log(this.data.hospitalId) | |
34 | + // this.requestData(options.id) | |
35 | + }, | |
36 | + onUnload: function () { | |
37 | + | |
38 | + }, | |
39 | + | |
40 | + /*---------自定义函数--------*/ | |
41 | + requestData(id) { | |
42 | + var self = this | |
43 | + networkUtil.showLoading() | |
44 | + // var param = { page: page, limit: 15, type: 2, categoryId: self.data.id } | |
45 | + networkUtil._get(api.articles + '/' + id, {}, function (res) { | |
46 | + 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 | + }) | |
54 | + }, function (res) { | |
55 | + | |
56 | + }) | |
57 | + }, | |
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 | + } | |
70 | + | |
71 | +}) |
littleApp_child/pages/doctor_detail/doctor_detail.json
View file @
38d1e3e
littleApp_child/pages/doctor_detail/doctor_detail.wxml
View file @
38d1e3e
1 | +<view class="main"> | |
2 | + <image class="hospital_image" src="../../source/hospital_introduce.jpg"></image> | |
3 | + | |
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> | |
14 | + | |
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 | + | |
38 | + </view> | |
39 | + </view> | |
40 | + | |
41 | + </view> | |
42 | + | |
43 | +</view> |
littleApp_child/pages/doctor_detail/doctor_detail.wxss
View file @
38d1e3e
1 | +.main { | |
2 | + background: #fff; | |
3 | + width: 100%; | |
4 | +} | |
5 | + | |
6 | +.hospital_image { | |
7 | + width: 100%; | |
8 | + height: 160px; | |
9 | +} | |
10 | + | |
11 | +.name_view { | |
12 | + display: flex; | |
13 | + margin: 10px; | |
14 | +} | |
15 | + | |
16 | +.line { | |
17 | + background: #48c17b; | |
18 | + width: 2px; | |
19 | + height: 14px; | |
20 | + margin-top: 3px; | |
21 | +} | |
22 | + | |
23 | +.title_text { | |
24 | + font-size: 14px; | |
25 | + color: #222; | |
26 | + margin-left: 5px; | |
27 | +} | |
28 | + | |
29 | +.showAll { | |
30 | + font-size: 13px; | |
31 | + color: #48c17b; | |
32 | + position: absolute; | |
33 | + right: 10px; | |
34 | +} | |
35 | + | |
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; | |
46 | +} | |
47 | + | |
48 | +.hospital_introduce_All { | |
49 | + font-size: 13px; | |
50 | + color: #666; | |
51 | + margin-left: 10px; | |
52 | + margin-right: 10px; | |
53 | +} | |
54 | + | |
55 | +.divider10 { | |
56 | + height: 10px; | |
57 | + background: #eee; | |
58 | + margin-top: 10px; | |
59 | +} | |
60 | + | |
61 | +.departname_view { | |
62 | + display: flex; | |
63 | + margin-left: 10px; | |
64 | + margin-top: 10px; | |
65 | +} | |
66 | + | |
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; | |
84 | + margin-top: 3px; | |
85 | + margin-left: 10px; | |
86 | +} | |
87 | + | |
88 | +.name_text { | |
89 | + font-size: 14px; | |
90 | + color: #222; | |
91 | +} | |
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; | |
103 | +} |
littleApp_child/pages/hospitalList/hospitalList.js
View file @
38d1e3e
1 | +// 医生列表 | |
2 | + | |
3 | +// 网络请求工具类 | |
4 | +var networkUtil = require('../../utils/network_util.js') | |
5 | +var api = require('../../utils/apiFile.js') | |
6 | + | |
7 | + | |
8 | +Page({ | |
9 | + data: { | |
10 | + hospitalList: [{ | |
11 | + "areaName": "成都", list: [{ "id": "1", "icon": "https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=2845876344,2547149135&fm=173&s=CB50DFA600825BEF16B8A43403001073&w=550&h=334&img.JPEG", "name": "犯得上发射点发司法所让我去误认为亲热万人更大", "distance": "100km" }, { | |
12 | + "id": "2", | |
13 | + "icon": "https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=2845876344,2547149135&fm=173&s=CB50DFA600825BEF16B8A43403001073&w=550&h=334&img.JPEG", "name": "name1", "distance": "100km" | |
14 | + }, { "id": "3", "icon": "https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=2845876344,2547149135&fm=173&s=CB50DFA600825BEF16B8A43403001073&w=550&h=334&img.JPEG", "name": "name1", "distance": "100km" },] | |
15 | + }, | |
16 | + { | |
17 | + "areaName": "成都2", list: [{ "id": "31", "icon": "https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=2845876344,2547149135&fm=173&s=CB50DFA600825BEF16B8A43403001073&w=550&h=334&img.JPEG", "name": "name4", "distance": "100km" }, { | |
18 | + "id": "12", | |
19 | + "icon": "https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=2845876344,2547149135&fm=173&s=CB50DFA600825BEF16B8A43403001073&w=550&h=334&img.JPEG", "name": "name51", "distance": "100km" | |
20 | + }, { "id": "11", "icon": "https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=2845876344,2547149135&fm=173&s=CB50DFA600825BEF16B8A43403001073&w=550&h=334&img.JPEG", "name": "name17", "distance": "100km" },] | |
21 | + }], | |
22 | + }, | |
23 | + /*---------生命周期--------*/ | |
24 | + onLoad: function (options) { | |
25 | + networkUtil.showLoading() | |
26 | + this.requestData() | |
27 | + }, | |
28 | + | |
29 | + /*---------自定义函数--------*/ | |
30 | + requestData() { | |
31 | + var self = this | |
32 | + networkUtil._get(api.doctorList, {}, function (res) { | |
33 | + console.log(res) | |
34 | + self.setData({ | |
35 | + doctorList: res.data.data, | |
36 | + }) | |
37 | + | |
38 | + }, function (res) { | |
39 | + | |
40 | + }) | |
41 | + }, | |
42 | + toHospitalDetail: function (e) { | |
43 | + var id = e.currentTarget.dataset.id | |
44 | + console.log(e) | |
45 | + wx.navigateTo({ | |
46 | + // url: '../doctor/doctor?doctorInfo='+JSON.stringify(this.data.doctorList[e.currentTarget.dataset.myid]), 这个url长度有限,参数太多会被剪切 | |
47 | + url: "../hospital_detail/hospital_detail?id="+id | |
48 | + }) | |
49 | + } | |
50 | +}) |
littleApp_child/pages/hospitalList/hospitalList.json
View file @
38d1e3e
littleApp_child/pages/hospitalList/hospitalList.wxml
View file @
38d1e3e
1 | +<!-- 医院列表--> | |
2 | +<scroll-view scroll-y="true" style="background:white" bindscrolltolower="loadMore"> | |
3 | + <!--list的item--> | |
4 | + <block wx:for="{{hospitalList}}" wx:key="index"> | |
5 | + <view class='area_name'>{{item.areaName}}</view> | |
6 | + <view wx:for="{{item.list}}" wx:for-index="sectionIndex" wx:for-item="sectionItem" > | |
7 | + <view class='hospital_item' bindtap='toHospitalDetail' data-id="{{sectionItem.id}}"> | |
8 | + <image class='icon' src='{{sectionItem.icon}}'></image> | |
9 | + <view class='hospital_name'>{{sectionItem.name}}</view> | |
10 | + <view class='distance' >{{sectionItem.distance}} </view> | |
11 | + </view> | |
12 | + <view class='divider' wx:if="{{sectionIndex==item.list.length-1?false:true}}"></view> | |
13 | + </view> | |
14 | + | |
15 | + </block> | |
16 | +</scroll-view> |
littleApp_child/pages/hospitalList/hospitalList.wxss
View file @
38d1e3e
1 | +.area_name { | |
2 | + font-size: 12px; | |
3 | + color: #999; | |
4 | + width: 100%; | |
5 | + padding-top: 3px; | |
6 | + padding-bottom: 2px; | |
7 | + padding-left: 10px; | |
8 | + background: #eee; | |
9 | +} | |
10 | + | |
11 | +.hospital_item { | |
12 | + display: flex; | |
13 | + background: #fff; | |
14 | + height: 58px; | |
15 | + line-height: 58px; | |
16 | +} | |
17 | + | |
18 | +.icon { | |
19 | + height: 36px; | |
20 | + width: 36px; | |
21 | + margin-left: 10px; | |
22 | + margin-top: 12px; | |
23 | +} | |
24 | + | |
25 | +.hospital_name { | |
26 | + font-size: 14px; | |
27 | + color: #333; | |
28 | + margin-left: 10px; | |
29 | + left: 51px; | |
30 | + position: absolute; | |
31 | + overflow: hidden; | |
32 | + text-overflow: ellipsis; | |
33 | + display: -webkit-box; | |
34 | + -webkit-box-orient: vertical; | |
35 | + -webkit-line-clamp: 1; | |
36 | + right: 60px; | |
37 | +} | |
38 | + | |
39 | +.distance { | |
40 | + font-size: 14px; | |
41 | + color: #666; | |
42 | + right: 10px; | |
43 | + position: absolute; | |
44 | +} | |
45 | + | |
46 | +.divider { | |
47 | + height: 1px; | |
48 | + background: #e6e6e6; | |
49 | +} |
littleApp_child/pages/hospital_detail/hospital_detail.js
View file @
38d1e3e
1 | +//articleLists.js 文章列表 | |
2 | +// 网络请求工具类 | |
3 | +var networkUtil = require('../../utils/network_util.js') | |
4 | +var api = require('../../utils/apiFile.js') | |
5 | +// 事件监听 | |
6 | +var event = require('../../utils/event.js') | |
7 | +var util = require('../../utils/util.js') | |
8 | + | |
9 | + | |
10 | +Page({ | |
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: '' | |
27 | + }, | |
28 | + onLoad: function (options) { | |
29 | + var id = options.id | |
30 | + this.setData({ | |
31 | + hospitalId: id | |
32 | + }) | |
33 | + console.log(this.data.hospitalId) | |
34 | + // this.requestData(options.id) | |
35 | + }, | |
36 | + onUnload: function () { | |
37 | + | |
38 | + }, | |
39 | + | |
40 | + /*---------自定义函数--------*/ | |
41 | + requestData(id) { | |
42 | + var self = this | |
43 | + networkUtil.showLoading() | |
44 | + // var param = { page: page, limit: 15, type: 2, categoryId: self.data.id } | |
45 | + networkUtil._get(api.articles + '/' + id, {}, function (res) { | |
46 | + 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 | + }) | |
54 | + }, function (res) { | |
55 | + | |
56 | + }) | |
57 | + }, | |
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 | + } | |
70 | + | |
71 | +}) |
littleApp_child/pages/hospital_detail/hospital_detail.json
View file @
38d1e3e
littleApp_child/pages/hospital_detail/hospital_detail.wxml
View file @
38d1e3e
1 | +<view class="main"> | |
2 | + <image class="hospital_image" src="../../source/hospital_introduce.jpg"></image> | |
3 | + | |
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 > | |
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> | |
14 | + | |
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 | + | |
38 | + </view> | |
39 | + </view> | |
40 | + | |
41 | + </view> | |
42 | + | |
43 | +</view> |
littleApp_child/pages/hospital_detail/hospital_detail.wxss
View file @
38d1e3e
1 | +.main { | |
2 | + background: #fff; | |
3 | + width: 100%; | |
4 | +} | |
5 | + | |
6 | +.hospital_image { | |
7 | + width: 100%; | |
8 | + height: 160px; | |
9 | +} | |
10 | + | |
11 | +.name_view { | |
12 | + display: flex; | |
13 | + margin: 10px; | |
14 | +} | |
15 | + | |
16 | +.line { | |
17 | + background: #48c17b; | |
18 | + width: 2px; | |
19 | + height: 14px; | |
20 | + margin-top: 3px; | |
21 | +} | |
22 | + | |
23 | +.title_text { | |
24 | + font-size: 14px; | |
25 | + color: #222; | |
26 | + margin-left: 5px; | |
27 | +} | |
28 | + | |
29 | +.showAll { | |
30 | + font-size: 13px; | |
31 | + color: #48c17b; | |
32 | + position: absolute; | |
33 | + right: 10px; | |
34 | +} | |
35 | + | |
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; | |
46 | +} | |
47 | + | |
48 | +.hospital_introduce_All { | |
49 | + font-size: 13px; | |
50 | + color: #666; | |
51 | + margin-left: 10px; | |
52 | + margin-right: 10px; | |
53 | +} | |
54 | + | |
55 | +.divider10 { | |
56 | + height: 10px; | |
57 | + background: #eee; | |
58 | + margin-top: 10px; | |
59 | +} | |
60 | + | |
61 | +.departname_view { | |
62 | + display: flex; | |
63 | + margin-left: 10px; | |
64 | + margin-top: 10px; | |
65 | +} | |
66 | + | |
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; | |
84 | + margin-top: 3px; | |
85 | + margin-left: 10px; | |
86 | +} | |
87 | + | |
88 | +.name_text { | |
89 | + font-size: 14px; | |
90 | + color: #222; | |
91 | +} | |
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; | |
103 | +} |
littleApp_child/pages/vipService/vipService.wxss
View file @
38d1e3e
littleApp_child/source/hospital_introduce.jpg
View file @
38d1e3e
150 KB