Commit 56a80ac9e5f7bb61b59ec15fc3d0aec59ceddcc0
1 parent
9c34ad362a
Exists in
master
and in
2 other branches
nonon
Showing 7 changed files with 35 additions and 12 deletions
littleApp_child/pages/CheckReport/CheckReport.js
View file @
56a80ac
... | ... | @@ -27,7 +27,8 @@ |
27 | 27 | subscribeDetails:'' |
28 | 28 | }, |
29 | 29 | onLoad: function (option) { |
30 | - | |
30 | + var date1 = new Date('2017-1-8') | |
31 | + console.log('date1', date1) | |
31 | 32 | this.setData({ |
32 | 33 | userData: getApp().globalData.userInfo |
33 | 34 | }) |
... | ... | @@ -36,7 +37,6 @@ |
36 | 37 | }, |
37 | 38 | isShowMore: function (e) { |
38 | 39 | var self = this |
39 | - console.log(e) | |
40 | 40 | var index = e.currentTarget.dataset.index |
41 | 41 | console.log(index) |
42 | 42 | if (index == 1) { |
littleApp_child/pages/CheckReport/CheckReport.wxml
View file @
56a80ac
... | ... | @@ -37,7 +37,7 @@ |
37 | 37 | <!--下方黑色横条--> |
38 | 38 | </view> |
39 | 39 | <!--医院名称横条--> |
40 | - <view class="hospitalName" wx:if="{{userData.checkhospital}}">{{userData.checkhospital}}</view> | |
40 | + <view class="hospitalName" wx:if="{{todayInfo.checkhospital}}">{{todayInfo.checkhospital}}</view> | |
41 | 41 | |
42 | 42 | <view class="title_banner">检查项目</view> |
43 | 43 | <view class="report_list_bg"> |
littleApp_child/pages/articleLists/articleLists.wxml
View file @
56a80ac
... | ... | @@ -20,7 +20,7 @@ |
20 | 20 | <view class="content_item"> |
21 | 21 | <view style="margin-left:15px;margin-right:75px;"> |
22 | 22 | <view class="content_title">{{item.title}}</view> |
23 | - <view class="content_content">sdfkjshdkfjhsdkjfhsdkfhksdjhfksdhfkjsdhk1111111</view> | |
23 | + <view class="content_content">{{item.introduction}}</view> | |
24 | 24 | <view class="zar_box"> |
25 | 25 | <image class="zar_img" src="../../source/zar.png"></image> |
26 | 26 | <view class="content_zar">{{item.likeCount ? item.likeCount : 0}}</view> |
littleApp_child/pages/home/home.js
View file @
56a80ac
... | ... | @@ -64,8 +64,8 @@ |
64 | 64 | } |
65 | 65 | }, |
66 | 66 | onUnload: function () { |
67 | - // 移除监听 | |
68 | - event.remove('likeChanged', this); | |
67 | + // 移除监听 | |
68 | + event.remove('likeChanged', this); | |
69 | 69 | }, |
70 | 70 | /*---------交互--------*/ |
71 | 71 | // 下拉刷新回调接口 |
72 | 72 | |
... | ... | @@ -167,12 +167,33 @@ |
167 | 167 | wx.stopPullDownRefresh() |
168 | 168 | }) |
169 | 169 | }, |
170 | - // 设置UI数据 | |
171 | - setUserInfo(data) { | |
172 | - | |
170 | + // 文章点赞 | |
171 | + articleLike() { | |
172 | + var self = this | |
173 | + // 已经点赞 | |
174 | + if (self.data.articleDetail.isLike == 1) { | |
175 | + networkUtil.showErrorToast('您已经点过赞啦') | |
176 | + return; | |
177 | + } | |
178 | + networkUtil._post(api.articleLike, { id: articleId }, function (res) { | |
179 | + console.log(res) | |
180 | + var art = self.data.articleDetail | |
181 | + art.likeCount++ | |
182 | + art.isLike = 1 | |
183 | + self.setData({ | |
184 | + articleDetail: art | |
185 | + }) | |
186 | + if (categoryIndex) { | |
187 | + // 更新首页数据 | |
188 | + event.emit('likeChanged', { categoryIndex: categoryIndex, articleIdIndex: articleIdIndex }); | |
189 | + } else { | |
190 | + event.emit('listLikeChanged', { categoryIndex: categoryIndex, articleIdIndex: articleIdIndex }); | |
191 | + } | |
192 | + }, function (res) { | |
193 | + console.log(res) | |
194 | + }) | |
173 | 195 | }, |
174 | 196 | /*---------------欢迎介绍页面---------------*/ |
175 | - | |
176 | 197 | // 获取验证码 |
177 | 198 | getVerifyCode: function (e) { |
178 | 199 | console.log("name:" + name) |
littleApp_child/pages/home/home.wxml
View file @
56a80ac
... | ... | @@ -36,7 +36,7 @@ |
36 | 36 | <view class="foundation_BG" style="{{item_big_height}}"> |
37 | 37 | <navigator class="foundation_item_small" url="../CheckReport/CheckReport"> |
38 | 38 | <image src="../../source/jianchajilu.png" style="{{item_small}}" class="foundation_item_small_image"></image> |
39 | - <view class="foundation_item_small_text">儿保检查记录</view> | |
39 | + <view class="foundation_item_small_text">检查记录</view> | |
40 | 40 | </navigator> |
41 | 41 | <navigator class="foundation_item_small" url="../childcare_knowledge/childcare_knowledge"> |
42 | 42 | <image src="../../source/yuerzhishi.png" style="{{item_small}}" class="foundation_item_small_image"></image> |
... | ... | @@ -71,7 +71,7 @@ |
71 | 71 | <view class="article_content_bottomBar util_bottom_line"> |
72 | 72 | <!-- <view class="article_content_bottomBar_labels"> |
73 | 73 | </view> --> |
74 | - <view class="article_content_bottomBar_likes"> | |
74 | + <view class="article_content_bottomBar_likes" bindtap="articleLike" data-categaryIndex="{{sectionIndex}}" data-artIndex="{{index}}"> | |
75 | 75 | <image class="article_content_bottomBar_likes_icon" src="../../source/like.png"></image> |
76 | 76 | <label class="article_content_bottomBar_likes_text">{{item.likeCount ? item.likeCount : 0}}</label> |
77 | 77 | </view> |
littleApp_child/source/except.png
View file @
56a80ac