Commit 6fb91172e1bec38597980cdb2930e7e65fbe26d3
1 parent
c605f7b738
Exists in
master
and in
2 other branches
改动
Showing 11 changed files with 72 additions and 41 deletions
- littleApp_child/pages/CheckReport/CheckReport.js
- littleApp_child/pages/CheckReport/CheckReport.wxml
- littleApp_child/pages/CheckReport/CheckReport.wxss
- littleApp_child/pages/SearchPage/SearchPage.js
- littleApp_child/pages/SearchPage/SearchPage.wxml
- littleApp_child/pages/childcare_knowledge/childcare_knowledge.js
- littleApp_child/pages/childcare_knowledge/childcare_knowledge.wxml
- littleApp_child/pages/childcare_knowledge/childcare_knowledge.wxss
- littleApp_child/pages/childcare_knowledge_detail/childcare_knowledge_detail.wxss
- littleApp_child/pages/home/home.wxml
- littleApp_child/source/youerbaojian_banner.png
littleApp_child/pages/CheckReport/CheckReport.js
View file @
6fb9117
| ... | ... | @@ -37,6 +37,7 @@ |
| 37 | 37 | networkUtil.showLoading() |
| 38 | 38 | this.getCheckList() |
| 39 | 39 | }, |
| 40 | + // 是否显示更多诊断信息 | |
| 40 | 41 | isShowMore: function (e) { |
| 41 | 42 | var self = this |
| 42 | 43 | var index = e.currentTarget.dataset.index |
| ... | ... | @@ -66,6 +67,7 @@ |
| 66 | 67 | }) |
| 67 | 68 | } |
| 68 | 69 | }, |
| 70 | + // 跳转上一条 | |
| 69 | 71 | toBefore(){ |
| 70 | 72 | var index = this.data.dateIndex |
| 71 | 73 | index -- |
| ... | ... | @@ -81,6 +83,7 @@ |
| 81 | 83 | }) |
| 82 | 84 | this.changeDateWithIndex(index) |
| 83 | 85 | }, |
| 86 | + // 跳转下一条 | |
| 84 | 87 | toAfter() { |
| 85 | 88 | var index = this.data.dateIndex |
| 86 | 89 | index++ |
| ... | ... | @@ -96,6 +99,11 @@ |
| 96 | 99 | }) |
| 97 | 100 | this.changeDateWithIndex(index) |
| 98 | 101 | }, |
| 102 | + // 返回上个页面 | |
| 103 | + backPage(){ | |
| 104 | + wx.navigateBack({}) | |
| 105 | + }, | |
| 106 | + // 选择检查日期 | |
| 99 | 107 | clickDate(e){ |
| 100 | 108 | var left = true |
| 101 | 109 | var right = true |
| 102 | 110 | |
| 103 | 111 | |
| ... | ... | @@ -113,17 +121,14 @@ |
| 113 | 121 | }, |
| 114 | 122 | // 查看预约建档 |
| 115 | 123 | lookSubscribe(){ |
| 116 | - this.setData({ flag: true }) | |
| 124 | + this.setData({ flag: true}) | |
| 117 | 125 | }, |
| 118 | 126 | // 关闭预约建档 |
| 119 | 127 | closeMask(){ |
| 120 | - this.setData({ flag: false }) | |
| 128 | + this.setData({ flag: false}) | |
| 121 | 129 | }, |
| 122 | 130 | // 通过日期列表下标改变日期文字 |
| 123 | 131 | changeDateWithIndex(index){ |
| 124 | - if (this.data.dateList.length == 0){ | |
| 125 | - return | |
| 126 | - } | |
| 127 | 132 | var text = this.data.dateList[index] |
| 128 | 133 | this.setData({ |
| 129 | 134 | dateIndex: index, |
| ... | ... | @@ -134,6 +139,7 @@ |
| 134 | 139 | this.getCheckDetails() |
| 135 | 140 | this.getWzXinxi() |
| 136 | 141 | }, |
| 142 | + // 获取检查日期列表 | |
| 137 | 143 | getCheckList() { |
| 138 | 144 | var self = this |
| 139 | 145 | // 列表 |
| ... | ... | @@ -160,6 +166,7 @@ |
| 160 | 166 | |
| 161 | 167 | }) |
| 162 | 168 | }, |
| 169 | + // 依据时间获取当天检查信息 | |
| 163 | 170 | getCheckDetails() { |
| 164 | 171 | var self = this |
| 165 | 172 | var params = {} |
| ... | ... | @@ -186,6 +193,7 @@ |
| 186 | 193 | |
| 187 | 194 | }) |
| 188 | 195 | }, |
| 196 | + // 获取问诊信息 | |
| 189 | 197 | getWzXinxi() { |
| 190 | 198 | var self = this |
| 191 | 199 | var params = {} |
| 192 | 200 | |
| ... | ... | @@ -207,9 +215,11 @@ |
| 207 | 215 | |
| 208 | 216 | }) |
| 209 | 217 | }, |
| 218 | + // 设置年文字 | |
| 210 | 219 | setDateYearText(text){ |
| 211 | 220 | return text.substr(0, 5) |
| 212 | 221 | }, |
| 222 | + // 设置月 日文字 | |
| 213 | 223 | setDateMonthText(text) { |
| 214 | 224 | return text.substring(5, text.length) |
| 215 | 225 | } |
littleApp_child/pages/CheckReport/CheckReport.wxml
View file @
6fb9117
| ... | ... | @@ -144,6 +144,6 @@ |
| 144 | 144 | <view class="backgroundView" wx:if="{{noData == true}}"> |
| 145 | 145 | <image class="empty_icon" mode="aspectFit" src="../../source/empty.png"></image> |
| 146 | 146 | <view class="empty_text">亲,您的宝宝还没有做过检查哦!</view> |
| 147 | - <view class="empty_back">返回</view> | |
| 147 | + <view class="empty_back" bindtap="backPage">返回</view> | |
| 148 | 148 | </view> |
littleApp_child/pages/CheckReport/CheckReport.wxss
View file @
6fb9117
| ... | ... | @@ -141,7 +141,7 @@ |
| 141 | 141 | |
| 142 | 142 | .title_banner { |
| 143 | 143 | height: 23px; |
| 144 | - width: 80%; | |
| 144 | + width: 30%; | |
| 145 | 145 | color: #999; |
| 146 | 146 | line-height: 23px; |
| 147 | 147 | font-size: 12px; |
| ... | ... | @@ -215,7 +215,7 @@ |
| 215 | 215 | .check_result_doctoe_line { |
| 216 | 216 | display: flex; |
| 217 | 217 | padding-left: 10px; |
| 218 | - width: 100%; | |
| 218 | + width: 80%; | |
| 219 | 219 | padding-top: 10px; |
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | |
| ... | ... | @@ -272,11 +272,10 @@ |
| 272 | 272 | height: 10px; |
| 273 | 273 | float: right; |
| 274 | 274 | margin-right: 10px; |
| 275 | - margin-top: 13px; | |
| 275 | + margin-top: 8px; | |
| 276 | 276 | } |
| 277 | 277 | |
| 278 | 278 | .check_diagnosis_bg { |
| 279 | - /* background: rebeccapurple; */ | |
| 280 | 279 | margin-right: 55px; |
| 281 | 280 | min-height: 25px; |
| 282 | 281 | } |
littleApp_child/pages/SearchPage/SearchPage.js
View file @
6fb9117
| ... | ... | @@ -20,7 +20,8 @@ |
| 20 | 20 | getSearch: [], |
| 21 | 21 | modalHidden: true, |
| 22 | 22 | searching:false, |
| 23 | - test:'' | |
| 23 | + test:'', | |
| 24 | + noData:'no' | |
| 24 | 25 | }, |
| 25 | 26 | |
| 26 | 27 | onLoad: function () { |
| 27 | 28 | |
| ... | ... | @@ -65,10 +66,15 @@ |
| 65 | 66 | } |
| 66 | 67 | arr = arr.concat(res.data.list) |
| 67 | 68 | var temp = self.data.category |
| 69 | + var haveData = false | |
| 70 | + if(arr.length == 0){ | |
| 71 | + haveData = true | |
| 72 | + } | |
| 68 | 73 | self.setData({ |
| 69 | 74 | list: arr, |
| 70 | 75 | hasMore: hasMore, |
| 71 | - category: temp | |
| 76 | + category: temp, | |
| 77 | + noData:haveData | |
| 72 | 78 | }) |
| 73 | 79 | }, function (res) { |
| 74 | 80 | |
| ... | ... | @@ -85,7 +91,8 @@ |
| 85 | 91 | this.setData({ |
| 86 | 92 | inputValue: '', |
| 87 | 93 | list: [], |
| 88 | - searching: false | |
| 94 | + searching: false, | |
| 95 | + noData: false | |
| 89 | 96 | }) |
| 90 | 97 | }, |
| 91 | 98 | // 输入完成 |
| ... | ... | @@ -124,7 +131,11 @@ |
| 124 | 131 | getSearch: data |
| 125 | 132 | }) |
| 126 | 133 | }, |
| 127 | - bindInput: function (e) { | |
| 134 | + inputText: function (e) { | |
| 135 | + if (e.detail.value == ''){ | |
| 136 | + this.clearInput() | |
| 137 | + return | |
| 138 | + } | |
| 128 | 139 | this.setData({ |
| 129 | 140 | inputValue: e.detail.value |
| 130 | 141 | }) |
littleApp_child/pages/SearchPage/SearchPage.wxml
View file @
6fb9117
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | <view class="searchBar_bg"> |
| 3 | 3 | <view class="searchBar_bar"> |
| 4 | 4 | <image src="../../source/magnifying_glass.png" class="searchBar_icon"></image> |
| 5 | - <input class="searchBar_input" id="search" name="search" placeholder="请输入" value="{{inputValue}}" placeholder-class="input-placeholder" bindfocus="getFocus" confirm-type="搜索" bindconfirm="inputEnd"/> | |
| 5 | + <input class="searchBar_input" id="search" name="search" placeholder="请输入" value="{{inputValue}}" placeholder-class="input-placeholder" bindinput="inputText" confirm-type="搜索" bindconfirm="inputEnd"/> | |
| 6 | 6 | <image src="../../source/clear_input.png" bindtap="clearInput" class="searchBar_clear"></image> |
| 7 | 7 | </view> |
| 8 | 8 | <view class="searchBar_bar_cancle" bindtap="back">取消</view> |
| ... | ... | @@ -23,22 +23,28 @@ |
| 23 | 23 | <!-- <scroll-view scroll-y="true" style="height: 100%;" bindscroll="myScroll"> --> |
| 24 | 24 | |
| 25 | 25 | <view class="search_detail" wx:if="{{searching}}"> |
| 26 | - <navigator url="../childcare_knowledge_detail/childcare_knowledge_detail?{{'id=' + item.id}}" hover-class="weui-cell_active" wx:for="{{list}}" wx:key="{{index}}"> | |
| 27 | - <view class="content_item"> | |
| 28 | - <view style="margin-left:15px;margin-right:75px;"> | |
| 29 | - <view class="content_title">{{item.title}}</view> | |
| 30 | - <view class="content_content">{{item.introduction}}</view> | |
| 31 | - <!-- <view class="content_content">123123,nslkajd;ajsd;jsa;ldjaslkjdlksajdlksjsaklj{{item.content}}</view> --> | |
| 32 | - <view class="zar_box"> | |
| 33 | - <image class="zar_img" src="../../source/{{item.isLike == 1 ? 'zanguo.png' : 'like.png'}}"></image> | |
| 34 | - <view class="content_zar">{{item.likeCount ? item.likeCount : 0}}</view> | |
| 35 | - </view> | |
| 36 | - </view> | |
| 37 | - <image class="content_image" mode="aspectFill" src="{{item.image.medium}}"></image> | |
| 38 | - </view> | |
| 39 | - <view class="home__list-item__bottom"></view> | |
| 40 | - </navigator> | |
| 41 | - <view class="loadMoreView" wx:if="{{hasMore}}">加载更多...</view> | |
| 42 | - </view> | |
| 26 | + <navigator url="../childcare_knowledge_detail/childcare_knowledge_detail?{{'id=' + item.id}}" hover-class="weui-cell_active" wx:for="{{list}}" wx:key="{{index}}"> | |
| 27 | + <view class="content_item"> | |
| 28 | + <view style="margin-left:15px;margin-right:75px;"> | |
| 29 | + <view class="content_title">{{item.title}}</view> | |
| 30 | + <view class="content_content">{{item.introduction}}</view> | |
| 31 | + <!-- <view class="content_content">123123,nslkajd;ajsd;jsa;ldjaslkjdlksajdlksjsaklj{{item.content}}</view> --> | |
| 32 | + <view class="zar_box"> | |
| 33 | + <image class="zar_img" src="../../source/{{item.isLike == 1 ? 'zanguo.png' : 'like.png'}}"></image> | |
| 34 | + <view class="content_zar">{{item.likeCount ? item.likeCount : 0}}</view> | |
| 35 | + </view> | |
| 36 | + </view> | |
| 37 | + <image class="content_image" mode="aspectFill" src="{{item.image.medium}}"></image> | |
| 38 | + </view> | |
| 39 | + <view class="home__list-item__bottom"></view> | |
| 40 | + </navigator> | |
| 41 | + <view class="loadMoreView" wx:if="{{hasMore}}">加载更多...</view> | |
| 42 | + </view> | |
| 43 | + | |
| 44 | + <view wx:if="{{noData == true}}"> | |
| 45 | + <image class="empty_icon" mode="aspectFit" src="../../source/empty.png"></image> | |
| 46 | + <view class="empty_text">亲,没有搜索到您想要的内容哦!</view> | |
| 47 | + <!-- <view class="empty_back">返回</view> --> | |
| 48 | + </view> | |
| 43 | 49 | </view> |
littleApp_child/pages/childcare_knowledge/childcare_knowledge.js
View file @
6fb9117
| ... | ... | @@ -33,6 +33,7 @@ |
| 33 | 33 | titles: [],//"日常护理", "营养美食", "疾病护理", "亲子互动", "言传身教" |
| 34 | 34 | category:'', |
| 35 | 35 | current_index:0, |
| 36 | + swiperHeight:0 | |
| 36 | 37 | }, |
| 37 | 38 | onLoad: function (e) { |
| 38 | 39 | // 数据初始化 |
| ... | ... | @@ -43,7 +44,8 @@ |
| 43 | 44 | this.setData({ |
| 44 | 45 | titles: app.globalData.artList, |
| 45 | 46 | category: app.globalData.artList[self.data.current_index].id, |
| 46 | - images: app.globalData.artList[self.data.current_index].iconimage | |
| 47 | + images: app.globalData.artList[self.data.current_index].iconimage, | |
| 48 | + swiperHeight: wx.getSystemInfoSync().windowWidth * 0.42 | |
| 47 | 49 | }) |
| 48 | 50 | this.requestData() |
| 49 | 51 | |
| ... | ... | @@ -117,6 +119,7 @@ |
| 117 | 119 | url: '../childcare_knowledge_detail/childcare_knowledge_detail?id=' + id + ' & category=' + self.data.category, |
| 118 | 120 | }) |
| 119 | 121 | }, |
| 122 | + | |
| 120 | 123 | /*---------自定义函数--------*/ |
| 121 | 124 | requestData(){ |
| 122 | 125 | var self = this |
| ... | ... | @@ -168,7 +171,6 @@ |
| 168 | 171 | }, function (res) { |
| 169 | 172 | console.log(res) |
| 170 | 173 | }) |
| 171 | - }, | |
| 172 | - | |
| 174 | + } | |
| 173 | 175 | }) |
littleApp_child/pages/childcare_knowledge/childcare_knowledge.wxml
View file @
6fb9117
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | </swiper-item> |
| 21 | 21 | </block> |
| 22 | 22 | </swiper> --> |
| 23 | - <image class="swiper" mode="aspectFill" src="{{images.medium}}"></image> | |
| 23 | + <image class="swiper" style="height:{{swiperHeight}}px" mode="aspectFill" src="{{images.real}}"></image> | |
| 24 | 24 | <view> |
| 25 | 25 | <view bindtap="toDetail" data-id="{{item.id}}" wx:for="{{list}}" wx:key="{{index}}"> |
| 26 | 26 | <view class="content_item"> |
littleApp_child/pages/childcare_knowledge/childcare_knowledge.wxss
View file @
6fb9117
littleApp_child/pages/childcare_knowledge_detail/childcare_knowledge_detail.wxss
View file @
6fb9117
littleApp_child/pages/home/home.wxml
View file @
6fb9117
| ... | ... | @@ -90,7 +90,7 @@ |
| 90 | 90 | <!-- 欢迎页 --> |
| 91 | 91 | |
| 92 | 92 | <view class="backgroundView" style="background: white" wx:if="{{pageType == 3}}"> |
| 93 | - <image class="we_topImg" src="http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg"></image> | |
| 93 | + <image class="we_topImg" mode="aspectFill" src="../../source/youerbaojian_banner.png"></image> | |
| 94 | 94 | <view> |
| 95 | 95 | <view class="we_title_view"> |
| 96 | 96 | <image class="we_icon"></image> |
littleApp_child/source/youerbaojian_banner.png
View file @
6fb9117
280 KB