Commit d92ef82f62617a369873c9104201866d35da0939
1 parent
0a8a18a11e
Exists in
master
专家详情
Showing 5 changed files with 105 additions and 245 deletions
woman/pages/doctor/doctor.js
View file @
d92ef82
| ... | ... | @@ -11,7 +11,29 @@ |
| 11 | 11 | data: { |
| 12 | 12 | starsM: '../../source/imageSource/icon_star.png', |
| 13 | 13 | hideStar: '../../source/imageSource/icon_star_light.png', |
| 14 | - doctorInfo: {}, | |
| 14 | + doctorInfo: { | |
| 15 | + "account": "zcf", | |
| 16 | + "areaId": "13", | |
| 17 | + "chartroomId": "212756700659718", | |
| 18 | + "cityId": "14", | |
| 19 | + "dept": "产科", | |
| 20 | + "description": "张春芳:副主任医师,从事医疗保健专业近30年,对于不同人群、各种疾病的营养能给予正确的指导,尤其对儿童、孕产妇的营养指导具有丰富的临床经验,擅长妊娠期糖尿病,围产期营养指导,产妇保健等。获省、市级科技进步奖2项,发表国家级、省级论文20篇。", | |
| 21 | + "hospitalId": "216", | |
| 22 | + "hospitalName": "秦皇岛市妇幼保健院", | |
| 23 | + "hxName": "mommydoctorwx20004", | |
| 24 | + "id": 20004, | |
| 25 | + "lastLoginTime": "2020-10-11 17:25:06", | |
| 26 | + "name": "张春芳", | |
| 27 | + "openId": "", | |
| 28 | + "parentId": 1000, | |
| 29 | + "phone": "", | |
| 30 | + "positional": "副主任医师", | |
| 31 | + "price": 20, | |
| 32 | + "provinceId": "1", | |
| 33 | + "pwd": "E10ADC3949BA59ABBE56E057F20F883E", | |
| 34 | + "status": 0, | |
| 35 | + "type": 1 | |
| 36 | + }, | |
| 15 | 37 | hospitalName: '', |
| 16 | 38 | doctorLevel: '', |
| 17 | 39 | deptName: '', |
| ... | ... | @@ -22,8 +44,9 @@ |
| 22 | 44 | onLoad: function (options) { |
| 23 | 45 | console.log(options) |
| 24 | 46 | // networkUtil.showLoading() |
| 25 | - // options.hospitalId = 177 | |
| 26 | - // options.doctorId = 473 | |
| 47 | + // 测试数据 | |
| 48 | + options.hospitalId = 177 | |
| 49 | + options.doctorId = 473 | |
| 27 | 50 | this.requestData(options.hospitalId, options.doctorId) |
| 28 | 51 | }, |
| 29 | 52 | chatWithDoctor() { |
woman/pages/doctor/doctor.json
View file @
d92ef82
woman/pages/doctor/doctor.wxml
View file @
d92ef82
| 1 | 1 | <scroll-view scroll-y="true" style="height: 100%;"> |
| 2 | - <view class="above-bg-view"> | |
| 3 | - <image class="above-avatar" src="{{doctorInfo.avatar ? doctorInfo.avatar : '../../source/imageSource/doctorIcon.png'}}"></image> | |
| 4 | - <image class="above-pushpins" src="../../source/imageSource/pushpins.png"></image> | |
| 5 | - <view class="above-name"> | |
| 6 | - <text>{{doctorInfo.username}}</text> | |
| 7 | - <!-- <view class='star-bar'> | |
| 8 | - <view class="star-bar-content"> | |
| 9 | - <image class='star' data-score='{{index}}' src="{{5>=index+1? starsM: hideStar}}" bindtap="clickCourseStar" wx:for="{{[1,2,3,4,5]}}" wx:key="{{index}}"></image> | |
| 10 | - </view> | |
| 11 | - </view> --> | |
| 12 | - </view> | |
| 13 | - <!-- <view class='above-intro'>{{doctorInfo.goodAt}}</view> --> | |
| 14 | - <view class="above-hospital">{{hospitalName}}</view> | |
| 15 | - <view class="above-bg-job-title"> | |
| 16 | - <view class="above-bg-job-title-item" style="margin-right:5px">{{deptName}}</view> | |
| 17 | - <view class="above-bg-job-title-item">{{doctorLevel}}</view> | |
| 18 | - </view> | |
| 19 | - <view class='above-labels'> | |
| 20 | - <view wx:if="{{hospitalLevel}}"> | |
| 21 | - <text>● </text>{{hospitalName=='隆化县妇幼保健院'?'二级医院':hospitalLevel}}</view> | |
| 22 | - <view> | |
| 23 | - <text>● </text>快速响应</view> | |
| 24 | - <view> | |
| 25 | - <text>● </text>优质服务</view> | |
| 26 | - </view> | |
| 27 | - <view style='height:10px;'></view> | |
| 28 | - </view> | |
| 2 | + <view class=" margin-lr40 margin-tb30 i-row i-align-center" > | |
| 3 | + <view class=""> | |
| 4 | + <image class="doctor_avatar margin-tb30 margin-l30" src="{{doctorInfo.doctorImage ? item.doctorImage :'../../source/imageSource/doctorIcon.png'}}" mode="aspectFill"></image> | |
| 5 | + </view> | |
| 6 | + <view class=" margin-l28"> | |
| 7 | + <view class="i-row i-align-center"> | |
| 8 | + <view class="font-333-30 font-weight-bold">{{doctorInfo.username}}</view> | |
| 9 | + <view class="specialty_text margin-l20 font-weight-bold">{{doctorLevel}}</view> | |
| 10 | + </view> | |
| 11 | + <view class="i-row i-align-center margin-t20"> | |
| 12 | + <view class="font-BDBDBD-28 font-weight-500">{{deptName}}</view> | |
| 13 | + <view class="specialty_tip margin-l13">{{hospitalLevel}}</view> | |
| 14 | + <view class="specialty_tip margin-l13">快速响应</view> | |
| 15 | + <view class="specialty_tip margin-l13">优质服务</view> | |
| 16 | + </view> | |
| 17 | + </view> | |
| 18 | + </view> | |
| 29 | 19 | |
| 30 | - <view class="below-bg-view"> | |
| 31 | - <view class="below-title">个人简介</view> | |
| 32 | - <view class='below-content'>{{doctorInfo.description}}</view> | |
| 33 | - <view class="below-title">擅长案例</view> | |
| 34 | - <view class='below-content'>{{doctorInfo.goodAt}}</view> | |
| 35 | - <view class="below-title">经典案例</view> | |
| 36 | - <view class='below-content'>{{doctorInfo.expertCase}}</view> | |
| 20 | + <view class=""> | |
| 21 | + <view class="below_title">个人简介</view> | |
| 22 | + <view class='below_text'>{{doctorInfo.description}}</view> | |
| 23 | + <view class="below_title">擅长案例</view> | |
| 24 | + <view class='below_text'>{{doctorInfo.goodAt}}</view> | |
| 25 | + <view class="below_title">经典案例</view> | |
| 26 | + <view class='below_text'>{{doctorInfo.expertCase}}</view> | |
| 37 | 27 | </view> |
| 38 | 28 | </scroll-view> |
| 39 | 29 | <!-- <view class='chatView' bindtap='chatWithDoctor'>孕期咨询</view> --> |
woman/pages/doctor/doctor.wxss
View file @
d92ef82
| 1 | 1 | page { |
| 2 | - background-color: white; | |
| 2 | + background-color: white; | |
| 3 | 3 | } |
| 4 | 4 | |
| 5 | -.above-lineview { | |
| 6 | - background: #d8dbd4; | |
| 7 | - height: 0.5px; | |
| 8 | - width: 80%; | |
| 9 | - margin-top: 10px; | |
| 5 | +/* 上部分 */ | |
| 6 | +.specialty_text { | |
| 7 | + font-size: 20rpx; | |
| 8 | + font-weight: 500; | |
| 9 | + line-height: 22rpx; | |
| 10 | + background: linear-gradient(135deg, #FFB4B4 0%, #FF8EA9 100%); | |
| 11 | + -webkit-background-clip: text; | |
| 12 | + -webkit-text-fill-color: transparent; | |
| 13 | + display: flex; | |
| 14 | + flex-direction: row; | |
| 10 | 15 | } |
| 11 | 16 | |
| 12 | -.above-bg-view { | |
| 13 | - background: white; | |
| 14 | - display: flex; | |
| 15 | - flex-direction: column; | |
| 16 | - align-items: center; | |
| 17 | - justify-content: space-between; | |
| 18 | - margin-left: 15px; | |
| 19 | - margin-right: 15px; | |
| 20 | - box-shadow: 0px 2px 12px 4px rgba(34, 23, 20, 0.1); | |
| 21 | - border-radius: 8px; | |
| 22 | - padding-left: 10px; | |
| 23 | - padding-right: 10px; | |
| 24 | - margin-top: 10px; | |
| 17 | +.specialty_tip { | |
| 18 | + width: 94rpx; | |
| 19 | + height: 32rpx; | |
| 20 | + border-radius: 10rpx 10rpx 10rpx 10rpx; | |
| 21 | + opacity: 1; | |
| 22 | + border: 2rpx solid #ff8ea9; | |
| 23 | + font-weight: 500; | |
| 24 | + line-height: 32rpx; | |
| 25 | + color: #ff8ea9; | |
| 26 | + text-align: center; | |
| 27 | + font-size: 18rpx; | |
| 25 | 28 | } |
| 26 | 29 | |
| 27 | -.above-labels { | |
| 28 | - min-width: 65px; | |
| 29 | - min-height: 50px; | |
| 30 | - position: absolute; | |
| 31 | - top: 25px; | |
| 32 | - left: 12px; | |
| 33 | - font-size: 11px; | |
| 34 | - font-family: PingFangSC-Regular; | |
| 35 | - font-weight: 400; | |
| 36 | - color: rgba(51, 51, 51, 1); | |
| 37 | - line-height: 16px; | |
| 30 | +.doctor_avatar { | |
| 31 | + width: 70px; | |
| 32 | + height: 70px; | |
| 33 | + margin-top: 15px; | |
| 34 | + background-color: lightgray; | |
| 35 | + border-radius: 50%; | |
| 38 | 36 | } |
| 39 | 37 | |
| 40 | -.above-labels text { | |
| 41 | - font-size: 8px; | |
| 42 | - transform: translateY(-5px); | |
| 43 | - color: rgba(0, 153, 68, 1); | |
| 44 | -} | |
| 45 | 38 | |
| 46 | -.above-labels view { | |
| 47 | - height: 16px; | |
| 48 | - margin-left: 3px; | |
| 49 | - background: rgba(229, 229, 229, 1); | |
| 50 | - border-bottom-right-radius: 8px; | |
| 51 | - border-top-right-radius: 8px; | |
| 52 | - margin-top: 4px; | |
| 53 | - padding-left: 4px; | |
| 54 | -} | |
| 55 | 39 | |
| 56 | -.above-avatar { | |
| 57 | - width: 70px; | |
| 58 | - height: 70px; | |
| 59 | - margin-top: 15px; | |
| 60 | - background-color: lightgray; | |
| 61 | - border-radius: 50%; | |
| 62 | -} | |
| 63 | - | |
| 64 | -.above-intro { | |
| 65 | - font-size: 10px; | |
| 66 | - color: rgba(51, 51, 51, 1); | |
| 67 | - margin-top: 10px; | |
| 68 | - font-weight:400; | |
| 69 | -} | |
| 70 | - | |
| 71 | -.above-pushpins { | |
| 72 | - width: 25px; | |
| 73 | - height: 25px; | |
| 74 | - position: absolute; | |
| 75 | - top: 5px; | |
| 76 | - right: 10px; | |
| 77 | -} | |
| 78 | - | |
| 79 | -.above-name { | |
| 80 | - margin-top: 10px; | |
| 81 | - color:rgba(51,51,51,1); | |
| 82 | - font: medium; | |
| 83 | - font-size: 16px; | |
| 84 | - display: flex; | |
| 85 | - justify-content: center; | |
| 86 | - font-weight:bold; | |
| 87 | -} | |
| 88 | - | |
| 89 | -.above-hospital { | |
| 90 | - margin-top: 8px; | |
| 91 | - color: #5e5e5e; | |
| 92 | - font: normal; | |
| 93 | - font-size: 12px; | |
| 94 | -} | |
| 95 | - | |
| 96 | -.above-bg-job-title { | |
| 97 | - font-size: 11px; | |
| 98 | - display: flex; | |
| 99 | - align-items: center; | |
| 100 | - justify-content: space-between; | |
| 101 | -} | |
| 102 | - | |
| 103 | -.above-bg-job-title-item { | |
| 104 | - color: #ee7289; | |
| 105 | - font: normal; | |
| 106 | - display: inline-block; | |
| 107 | -} | |
| 108 | - | |
| 109 | -.above-specialty { | |
| 110 | - margin-top: 10px; | |
| 111 | - margin-bottom: 10px; | |
| 112 | - width: 95%; | |
| 113 | - line-height: 15px; | |
| 114 | - color: #5e5e5e; | |
| 115 | - font-size: 11px; | |
| 116 | - /*overflow: hidden; | |
| 117 | - text-overflow: ellipsis; | |
| 118 | - display: -webkit-box; | |
| 119 | - -webkit-box-orient: vertical; | |
| 120 | - -webkit-line-clamp: 1 ;*/ | |
| 121 | -} | |
| 122 | - | |
| 123 | 40 | /*下部分*/ |
| 124 | 41 | |
| 125 | -.below-bg-view { | |
| 126 | - background-color: white; | |
| 127 | - margin-top: 10px; | |
| 128 | - padding: 15px; | |
| 129 | -} | |
| 130 | 42 | |
| 131 | -.below-bar-view { | |
| 132 | - height: 40px; | |
| 133 | - display: flex; | |
| 134 | - flex-direction: row; | |
| 135 | - align-items: center; | |
| 136 | -} | |
| 137 | 43 | |
| 138 | -.below-doctor-icon { | |
| 139 | - height: 15px; | |
| 140 | - width: 15px; | |
| 141 | - margin-left: 15px; | |
| 44 | +.below_title { | |
| 45 | + font: mediuml; | |
| 46 | + width: 128rpx; | |
| 47 | + height: 45rpx; | |
| 48 | + font-size: 32rpx; | |
| 49 | + font-weight: 500; | |
| 50 | + line-height: 38rpx; | |
| 51 | + background: linear-gradient(135deg, #FFB4B4 0%, #FF8EA9 100%); | |
| 52 | + -webkit-background-clip: text; | |
| 53 | + -webkit-text-fill-color: transparent; | |
| 54 | + margin: 30rpx; | |
| 142 | 55 | } |
| 143 | 56 | |
| 144 | -.below-doctor-title { | |
| 145 | - font-size: 14px; | |
| 146 | - color: #ee7289; | |
| 147 | - font: mediuml; | |
| 148 | - margin-left: 5px; | |
| 149 | -} | |
| 57 | +.below_text { | |
| 58 | + width: 670rpx; | |
| 59 | + font-size: 26rpx; | |
| 60 | + font-weight: 400; | |
| 61 | + color: #828282; | |
| 62 | + line-height: 30rpx; | |
| 63 | + margin: 30rpx; | |
| 150 | 64 | |
| 151 | -.below-lineview { | |
| 152 | - background: #d8dbd4; | |
| 153 | - height: 0.5px; | |
| 154 | - margin-left: 15px; | |
| 155 | - margin-right: 15px; | |
| 156 | -} | |
| 157 | - | |
| 158 | -.below-introduction { | |
| 159 | - margin: 15px 15px 0px 15px; | |
| 160 | - font-size: 12px; | |
| 161 | - color: #5e5e5e; | |
| 162 | - line-height: 17px; | |
| 163 | - font: lighter; | |
| 164 | -} | |
| 165 | - | |
| 166 | -.chatView { | |
| 167 | - background: white; | |
| 168 | - font-size: 18px; | |
| 169 | - color: #ee7289; | |
| 170 | - width: 100%; | |
| 171 | - height: 55px; | |
| 172 | - line-height: 55px; | |
| 173 | - border-top: solid 0.5px #efefef; | |
| 174 | - text-align: center; | |
| 175 | - position: absolute; | |
| 176 | - bottom: 0px; | |
| 177 | - left: 0px; | |
| 178 | - right: 0px; | |
| 179 | -} | |
| 180 | - | |
| 181 | -.star-bar { | |
| 182 | - display: flex; | |
| 183 | - flex-direction: row; | |
| 184 | - /* margin-top: 5px; *//* height: 30px; *//* width: 300px; */ | |
| 185 | -} | |
| 186 | - | |
| 187 | -.star-bar-title { | |
| 188 | - font-size: 14px; | |
| 189 | - color: #888; | |
| 190 | - line-height: 45px; | |
| 191 | -} | |
| 192 | - | |
| 193 | -.star-bar-content { | |
| 194 | - width: clac(100%-70px); | |
| 195 | -} | |
| 196 | - | |
| 197 | -.star { | |
| 198 | - width: 10px; | |
| 199 | - height: 10px; | |
| 200 | - margin-left: 8px; | |
| 201 | -} | |
| 202 | - | |
| 203 | -.below-title { | |
| 204 | - font-size: 14px; | |
| 205 | - height: 20px; | |
| 206 | - border-radius: 10px; | |
| 207 | - width: 65px; | |
| 208 | - line-height: 20px; | |
| 209 | - text-align: center; | |
| 210 | - color: rgba(255, 255, 255, 1); | |
| 211 | - background: rgba(229, 140, 155, 1); | |
| 212 | -} | |
| 213 | - | |
| 214 | -.below-content { | |
| 215 | - font-size: 13px; | |
| 216 | - font-weight: 400; | |
| 217 | - color: rgba(51, 51, 51, 1); | |
| 218 | - margin-top: 10px; | |
| 219 | - margin-bottom: 10px; | |
| 220 | 65 | } |
woman/pages/doctorList/doctorList.js
View file @
d92ef82
| ... | ... | @@ -41,7 +41,7 @@ |
| 41 | 41 | "hospitalId": "216", |
| 42 | 42 | "hospitalName": "秦皇岛市妇幼保健院", |
| 43 | 43 | "hxName": "mommydoctorwx20004", |
| 44 | - "id": 20004, | |
| 44 | + "id": 99, | |
| 45 | 45 | "lastLoginTime": "2020-10-11 17:25:06", |
| 46 | 46 | "name": "李琦", |
| 47 | 47 | "openId": "", |
| 48 | 48 | |
| ... | ... | @@ -64,11 +64,11 @@ |
| 64 | 64 | if (!!options.isAdvertisingPage) { |
| 65 | 65 | |
| 66 | 66 | } else { |
| 67 | - //this.requestData() | |
| 67 | + // this.requestData() | |
| 68 | 68 | } |
| 69 | 69 | }, |
| 70 | 70 | toDoctorDetail: function(e) { |
| 71 | - console.log(e.currentTarget.dataset.myid) | |
| 71 | + console.log(e.currentTarget.dataset.myid,e) | |
| 72 | 72 | wx.navigateTo({ |
| 73 | 73 | // url: '../doctor/doctor?doctorInfo='+JSON.stringify(this.data.doctorList[e.currentTarget.dataset.myid]), 这个url长度有限,参数太多会被剪切 |
| 74 | 74 | url: '../doctor/doctor?doctorId=' + this.data.doctorList[e.currentTarget.dataset.myid] |
| ... | ... | @@ -79,7 +79,9 @@ |
| 79 | 79 | /*---------自定义函数--------*/ |
| 80 | 80 | requestData() { |
| 81 | 81 | var self = this |
| 82 | - networkUtil._get(api.doctorList, {}, function(res) { | |
| 82 | + networkUtil._get(api.doctorList, { | |
| 83 | + | |
| 84 | + }, function(res) { | |
| 83 | 85 | console.log(res) |
| 84 | 86 | self.setData({ |
| 85 | 87 | doctorList: res.data.data, |