diff --git a/woman/pages/doctor/doctor.js b/woman/pages/doctor/doctor.js index 29e0c13..5550378 100644 --- a/woman/pages/doctor/doctor.js +++ b/woman/pages/doctor/doctor.js @@ -11,7 +11,29 @@ Page({ data: { starsM: '../../source/imageSource/icon_star.png', hideStar: '../../source/imageSource/icon_star_light.png', - doctorInfo: {}, + doctorInfo: { + "account": "zcf", + "areaId": "13", + "chartroomId": "212756700659718", + "cityId": "14", + "dept": "产科", + "description": "张春芳:副主任医师,从事医疗保健专业近30年,对于不同人群、各种疾病的营养能给予正确的指导,尤其对儿童、孕产妇的营养指导具有丰富的临床经验,擅长妊娠期糖尿病,围产期营养指导,产妇保健等。获省、市级科技进步奖2项,发表国家级、省级论文20篇。", + "hospitalId": "216", + "hospitalName": "秦皇岛市妇幼保健院", + "hxName": "mommydoctorwx20004", + "id": 20004, + "lastLoginTime": "2020-10-11 17:25:06", + "name": "张春芳", + "openId": "", + "parentId": 1000, + "phone": "", + "positional": "副主任医师", + "price": 20, + "provinceId": "1", + "pwd": "E10ADC3949BA59ABBE56E057F20F883E", + "status": 0, + "type": 1 + }, hospitalName: '', doctorLevel: '', deptName: '', @@ -22,8 +44,9 @@ Page({ onLoad: function (options) { console.log(options) // networkUtil.showLoading() - // options.hospitalId = 177 - // options.doctorId = 473 + // 测试数据 + options.hospitalId = 177 + options.doctorId = 473 this.requestData(options.hospitalId, options.doctorId) }, chatWithDoctor() { diff --git a/woman/pages/doctor/doctor.json b/woman/pages/doctor/doctor.json index 873486c..e36ca31 100644 --- a/woman/pages/doctor/doctor.json +++ b/woman/pages/doctor/doctor.json @@ -1,5 +1,5 @@ { - "navigationBarBackgroundColor": "#f4879b", + "navigationBarBackgroundColor": "#fff", "navigationBarTitleText": "专家介绍", - "navigationBarTextStyle": "white" + "navigationBarTextStyle": "black" } \ No newline at end of file diff --git a/woman/pages/doctor/doctor.wxml b/woman/pages/doctor/doctor.wxml index 65864ac..676df1f 100644 --- a/woman/pages/doctor/doctor.wxml +++ b/woman/pages/doctor/doctor.wxml @@ -1,39 +1,29 @@ - - - - - {{doctorInfo.username}} - - - - {{hospitalName}} - - {{deptName}} - {{doctorLevel}} - - - - {{hospitalName=='隆化县妇幼保健院'?'二级医院':hospitalLevel}} - - 快速响应 - - 优质服务 - - - + + + + + + + {{doctorInfo.username}} + {{doctorLevel}} + + + {{deptName}} + {{hospitalLevel}} + 快速响应 + 优质服务 + + + - - 个人简介 - {{doctorInfo.description}} - 擅长案例 - {{doctorInfo.goodAt}} - 经典案例 - {{doctorInfo.expertCase}} + + 个人简介 + {{doctorInfo.description}} + 擅长案例 + {{doctorInfo.goodAt}} + 经典案例 + {{doctorInfo.expertCase}} \ No newline at end of file diff --git a/woman/pages/doctor/doctor.wxss b/woman/pages/doctor/doctor.wxss index 37d9043..1db2daf 100644 --- a/woman/pages/doctor/doctor.wxss +++ b/woman/pages/doctor/doctor.wxss @@ -1,220 +1,65 @@ page { - background-color: white; + background-color: white; } -.above-lineview { - background: #d8dbd4; - height: 0.5px; - width: 80%; - margin-top: 10px; +/* 上部分 */ +.specialty_text { + font-size: 20rpx; + font-weight: 500; + line-height: 22rpx; + background: linear-gradient(135deg, #FFB4B4 0%, #FF8EA9 100%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + display: flex; + flex-direction: row; } -.above-bg-view { - background: white; - display: flex; - flex-direction: column; - align-items: center; - justify-content: space-between; - margin-left: 15px; - margin-right: 15px; - box-shadow: 0px 2px 12px 4px rgba(34, 23, 20, 0.1); - border-radius: 8px; - padding-left: 10px; - padding-right: 10px; - margin-top: 10px; +.specialty_tip { + width: 94rpx; + height: 32rpx; + border-radius: 10rpx 10rpx 10rpx 10rpx; + opacity: 1; + border: 2rpx solid #ff8ea9; + font-weight: 500; + line-height: 32rpx; + color: #ff8ea9; + text-align: center; + font-size: 18rpx; } -.above-labels { - min-width: 65px; - min-height: 50px; - position: absolute; - top: 25px; - left: 12px; - font-size: 11px; - font-family: PingFangSC-Regular; - font-weight: 400; - color: rgba(51, 51, 51, 1); - line-height: 16px; +.doctor_avatar { + width: 70px; + height: 70px; + margin-top: 15px; + background-color: lightgray; + border-radius: 50%; } -.above-labels text { - font-size: 8px; - transform: translateY(-5px); - color: rgba(0, 153, 68, 1); -} - -.above-labels view { - height: 16px; - margin-left: 3px; - background: rgba(229, 229, 229, 1); - border-bottom-right-radius: 8px; - border-top-right-radius: 8px; - margin-top: 4px; - padding-left: 4px; -} - -.above-avatar { - width: 70px; - height: 70px; - margin-top: 15px; - background-color: lightgray; - border-radius: 50%; -} -.above-intro { - font-size: 10px; - color: rgba(51, 51, 51, 1); - margin-top: 10px; - font-weight:400; -} - -.above-pushpins { - width: 25px; - height: 25px; - position: absolute; - top: 5px; - right: 10px; -} - -.above-name { - margin-top: 10px; - color:rgba(51,51,51,1); - font: medium; - font-size: 16px; - display: flex; - justify-content: center; - font-weight:bold; -} - -.above-hospital { - margin-top: 8px; - color: #5e5e5e; - font: normal; - font-size: 12px; -} - -.above-bg-job-title { - font-size: 11px; - display: flex; - align-items: center; - justify-content: space-between; -} - -.above-bg-job-title-item { - color: #ee7289; - font: normal; - display: inline-block; -} - -.above-specialty { - margin-top: 10px; - margin-bottom: 10px; - width: 95%; - line-height: 15px; - color: #5e5e5e; - font-size: 11px; - /*overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 1 ;*/ -} /*下部分*/ -.below-bg-view { - background-color: white; - margin-top: 10px; - padding: 15px; -} - -.below-bar-view { - height: 40px; - display: flex; - flex-direction: row; - align-items: center; -} - -.below-doctor-icon { - height: 15px; - width: 15px; - margin-left: 15px; -} - -.below-doctor-title { - font-size: 14px; - color: #ee7289; - font: mediuml; - margin-left: 5px; -} -.below-lineview { - background: #d8dbd4; - height: 0.5px; - margin-left: 15px; - margin-right: 15px; -} -.below-introduction { - margin: 15px 15px 0px 15px; - font-size: 12px; - color: #5e5e5e; - line-height: 17px; - font: lighter; +.below_title { + font: mediuml; + width: 128rpx; + height: 45rpx; + font-size: 32rpx; + font-weight: 500; + line-height: 38rpx; + background: linear-gradient(135deg, #FFB4B4 0%, #FF8EA9 100%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + margin: 30rpx; } -.chatView { - background: white; - font-size: 18px; - color: #ee7289; - width: 100%; - height: 55px; - line-height: 55px; - border-top: solid 0.5px #efefef; - text-align: center; - position: absolute; - bottom: 0px; - left: 0px; - right: 0px; -} - -.star-bar { - display: flex; - flex-direction: row; - /* margin-top: 5px; *//* height: 30px; *//* width: 300px; */ -} +.below_text { + width: 670rpx; + font-size: 26rpx; + font-weight: 400; + color: #828282; + line-height: 30rpx; + margin: 30rpx; -.star-bar-title { - font-size: 14px; - color: #888; - line-height: 45px; -} - -.star-bar-content { - width: clac(100%-70px); -} - -.star { - width: 10px; - height: 10px; - margin-left: 8px; -} - -.below-title { - font-size: 14px; - height: 20px; - border-radius: 10px; - width: 65px; - line-height: 20px; - text-align: center; - color: rgba(255, 255, 255, 1); - background: rgba(229, 140, 155, 1); -} - -.below-content { - font-size: 13px; - font-weight: 400; - color: rgba(51, 51, 51, 1); - margin-top: 10px; - margin-bottom: 10px; -} +} \ No newline at end of file diff --git a/woman/pages/doctorList/doctorList.js b/woman/pages/doctorList/doctorList.js index 1ea4bcd..703b406 100644 --- a/woman/pages/doctorList/doctorList.js +++ b/woman/pages/doctorList/doctorList.js @@ -41,7 +41,7 @@ Page({ "hospitalId": "216", "hospitalName": "秦皇岛市妇幼保健院", "hxName": "mommydoctorwx20004", - "id": 20004, + "id": 99, "lastLoginTime": "2020-10-11 17:25:06", "name": "李琦", "openId": "", @@ -64,11 +64,11 @@ onLoad: function(options) { if (!!options.isAdvertisingPage) { } else { - //this.requestData() + // this.requestData() } }, toDoctorDetail: function(e) { - console.log(e.currentTarget.dataset.myid) + console.log(e.currentTarget.dataset.myid,e) wx.navigateTo({ // url: '../doctor/doctor?doctorInfo='+JSON.stringify(this.data.doctorList[e.currentTarget.dataset.myid]), 这个url长度有限,参数太多会被剪切 url: '../doctor/doctor?doctorId=' + this.data.doctorList[e.currentTarget.dataset.myid] @@ -79,7 +79,9 @@ toDoctorDetail: function(e) { /*---------自定义函数--------*/ requestData() { var self = this - networkUtil._get(api.doctorList, {}, function(res) { + networkUtil._get(api.doctorList, { + + }, function(res) { console.log(res) self.setData({ doctorList: res.data.data,