Commit 02daaf192eb598e1d70329c457d210edaf52d5a5

Authored by luoye
1 parent 2cf6711fa9

产品问题

Showing 13 changed files with 70 additions and 23 deletions

littleApp_child/pages/CheckReport/CheckReport.js View file @ 02daaf1
... ... @@ -24,7 +24,9 @@
24 24 // 问诊信息
25 25 wzInfo:'',
26 26 // 预约详细信息
27   - subscribeDetails:''
  27 + subscribeDetails:'',
  28 + isShowLeft: true,
  29 + isShowRight: false
28 30 },
29 31 onLoad: function (option) {
30 32 var date1 = new Date('2017-1-8')
31 33  
32 34  
33 35  
34 36  
... ... @@ -67,20 +69,46 @@
67 69 toBefore(){
68 70 var index = this.data.dateIndex
69 71 index --
70   - if (index < 0) {
71   - index = this.data.dateList.length - 1
  72 + console.log('index',index)
  73 + var left = true
  74 + var right = true
  75 + if (index == 0) {
  76 + left = false
72 77 }
  78 + this.setData({
  79 + isShowLeft: left,
  80 + isShowRight : right
  81 + })
73 82 this.changeDateWithIndex(index)
74 83 },
75 84 toAfter() {
76 85 var index = this.data.dateIndex
77 86 index++
78   - if (index >= this.data.dateList.length){
79   - index = 0
  87 + console.log('index', index)
  88 + var left = true
  89 + var right = true
  90 + if (index == this.data.dateList.length - 1){
  91 + right = false
80 92 }
  93 + this.setData({
  94 + isShowLeft: left,
  95 + isShowRight: right
  96 + })
81 97 this.changeDateWithIndex(index)
82 98 },
83 99 clickDate(e){
  100 + var left = true
  101 + var right = true
  102 + if (e.detail.value == this.data.dateList.length - 1) {
  103 + right = false
  104 + }
  105 + if (e.detail.value == 0) {
  106 + left = false
  107 + }
  108 + this.setData({
  109 + isShowLeft: left,
  110 + isShowRight: right
  111 + })
84 112 this.changeDateWithIndex(e.detail.value)
85 113 },
86 114 // 查看预约建档
87 115  
88 116  
... ... @@ -107,12 +135,12 @@
107 135 var self = this
108 136 // 列表
109 137 networkUtil._get(api.checkList,{}, function (res) {
110   - // console.log('获取时间信息', res.data.data)
  138 + console.log('获取时间信息', res.data.data)
111 139 if (res.data.data[0].checkTime.length > 0){
112 140 self.setData({
113   - dateList: res.data.data[0].checkTime
  141 + dateList: res.data.data[0].checkTime.reverse()
114 142 })
115   - self.changeDateWithIndex(0)
  143 + self.changeDateWithIndex(res.data.data[0].checkTime.length - 1)
116 144 }
117 145 }, function (res) {
118 146  
littleApp_child/pages/CheckReport/CheckReport.wxml View file @ 02daaf1
... ... @@ -15,8 +15,8 @@
15 15 <picker range="{{dateList}}" bindchange="clickDate">
16 16 <image class="circle_click" src="../../source/more_date.png"></image>
17 17 </picker>
18   - <image class="icon_left" bindtap="toBefore" src="../../source/left.png"></image>
19   - <image class="icon_right" bindtap="toAfter" src="../../source/right.png"></image>
  18 + <image class="icon_left" wx:if="{{isShowLeft}}" bindtap="toBefore" src="../../source/left.png"></image>
  19 + <image class="icon_right" wx:if="{{isShowRight}}" bindtap="toAfter" src="../../source/right.png"></image>
20 20 <image class="subscribe_bg" wx:if="{{subscribe}}" bindtap="lookSubscribe" src="../../source/yuyue.png" mode="aspectFill"></image>
21 21 <!--下方黑色横条-->
22 22 <view class="infoBar">
23 23  
... ... @@ -113,8 +113,8 @@
113 113 <label class="check_diagnosis_content_lines">{{wzInfo.guideSuggest}}</label>
114 114 </view>
115 115 </view>
116   -
117 116 </view>
  117 + <view style="background:white;height:30px;"></view>
118 118 </view>
119 119  
120 120  
littleApp_child/pages/CheckReport/CheckReport.wxss View file @ 02daaf1
... ... @@ -144,6 +144,7 @@
144 144 font: medium;
145 145 text-align: center;
146 146 line-height: 30px;
  147 + margin-top: 1px;
147 148 }
148 149  
149 150 .title_banner {
littleApp_child/pages/SearchPage/SearchPage.wxml View file @ 02daaf1
... ... @@ -34,7 +34,7 @@
34 34 <view class="content_zar">{{item.likeCount ? item.likeCount : 0}}</view>
35 35 </view>
36 36 </view>
37   - <image class="content_image" src="{{item.image.medium}}"></image>
  37 + <image class="content_image" mode="aspectFill" src="{{item.image.medium}}"></image>
38 38 </view>
39 39 <view class="home__list-item__bottom"></view>
40 40 </navigator>
littleApp_child/pages/articleLists/articleLists.js View file @ 02daaf1
... ... @@ -124,7 +124,25 @@
124 124 },function(res){
125 125 isRefresh = false
126 126 })
127   -
128   - }
  127 + },
  128 + // 文章点赞
  129 + articleLike(e) {
  130 + console.log(e)
  131 + var self = this
  132 + // 已经点赞
  133 + if (e.currentTarget.dataset.islike == 1) {
  134 + networkUtil.showErrorToast('您已经点过赞啦')
  135 + return;
  136 + }
  137 + networkUtil._post(api.articleLike, { id: e.currentTarget.dataset.artid }, function (res) {
  138 + var artList = self.data.list
  139 + artList[e.currentTarget.dataset.artindex].likeCount++
  140 + self.setData({
  141 + list: artList
  142 + });
  143 + }, function (res) {
  144 + console.log(res)
  145 + })
  146 + },
129 147 })
littleApp_child/pages/articleLists/articleLists.wxml View file @ 02daaf1
... ... @@ -21,12 +21,12 @@
21 21 <view style="margin-left:15px;margin-right:75px;">
22 22 <view class="content_title">{{item.title}}</view>
23 23 <view class="content_content">{{item.introduction}}</view>
24   - <view class="zar_box">
  24 + <view class="zar_box" catchtap="articleLike" data-isLike="{{item.isLike}}" data-artId="{{item.id}}" data-artIndex="{{index}}">
25 25 <image class="zar_img" src="../../source/{{item.isLike == 1 ? 'zanguo.png' : 'like.png'}}"></image>
26 26 <view class="content_zar">{{item.likeCount ? item.likeCount : 0}}</view>
27 27 </view>
28 28 </view>
29   - <image class="content_image" src="{{item.image.medium}}"></image>
  29 + <image class="content_image" mode="aspectFill" src="{{item.image.medium}}"></image>
30 30 </view>
31 31 <view class="home__list-item__bottom"></view>
32 32 </navigator>
littleApp_child/pages/checkTabList/checkTabList.json View file @ 02daaf1
1 1 {
2   - "navigationBarBackgroundColor": "#48C17B ",
  2 + "navigationBarBackgroundColor": "#48C17B",
3 3 "navigationBarTitleText": "检查项目",
4 4 "navigationBarTextStyle": "white",
5 5 "backgroundColor": "#d8dbd4"
littleApp_child/pages/childcare_knowledge/childcare_knowledge.json View file @ 02daaf1
1 1 {
2   - "navigationBarBackgroundColor": "#48C17B ",
  2 + "navigationBarBackgroundColor": "#48C17B",
3 3 "navigationBarTitleText": "育儿知识",
4 4 "navigationBarTextStyle": "white",
5 5 "backgroundColor": "#d8dbd4"
littleApp_child/pages/childcare_knowledge/childcare_knowledge.wxml View file @ 02daaf1
... ... @@ -33,7 +33,7 @@
33 33 </view>
34 34  
35 35 </view>
36   - <image class="content_image" src="{{item.image.medium}}"></image>
  36 + <image class="content_image" mode="aspectFill" src="{{item.image.medium}}"></image>
37 37 </view>
38 38 <view class="home__list-item__bottom"></view>
39 39 </view>
littleApp_child/pages/childcare_knowledge_detail/childcare_knowledge_detail.js View file @ 02daaf1
... ... @@ -10,7 +10,7 @@
10 10 Page({
11 11 data: {
12 12  
13   - knowledge: { time: "", likeCount: 0, title: "", content: "", image: "http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg" },
  13 + knowledge: null,
14 14 images: [
15 15 'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg',
16 16 ],
littleApp_child/pages/childcare_knowledge_detail/childcare_knowledge_detail.json View file @ 02daaf1
1 1 {
2   - "navigationBarBackgroundColor": "#48C17B ",
  2 + "navigationBarBackgroundColor": "#48C17B",
3 3 "navigationBarTitleText": "文章详情",
4 4 "navigationBarTextStyle": "white",
5 5 "backgroundColor": "#d8dbd4"
littleApp_child/pages/childcare_knowledge_detail/childcare_knowledge_detail.wxml View file @ 02daaf1
1 1 <view class="main">
2 2 <view class="title_text">{{knowledge.title}}</view>
3 3  
4   - <view class="zar_box" style="margin-left:8px;">
  4 + <view class="zar_box" style="margin-left:8px;" wx:if="{{knowledge}}">
5 5 <view class="zar_box" bindtap="articleLike">
6 6 <image class="zar_img" src="../../source/{{knowledge.isLike == 1 ? 'zanguo.png' : 'like.png'}}"></image>
7 7 <view class="content_zar">{{knowledge.likeCount ? knowledge.likeCount : 0}}</view>
littleApp_child/pages/home/home.wxml View file @ 02daaf1
... ... @@ -67,7 +67,7 @@
67 67 <view style="height:6px;width:100%;"></view>
68 68 <view class="article_content_title">{{item.title}}</view>
69 69 <label class="article_content_text">{{item.introduction}}</label>
70   - <image class="article_content_image" src="{{item.image.medium}}"></image>
  70 + <image class="article_content_image" mode="aspectFill" src="{{item.image.medium}}"></image>
71 71 <view class="article_content_bottomBar util_bottom_line">
72 72 <!-- <view class="article_content_bottomBar_labels">
73 73 </view> -->