Commit b324c6ca270f69976b213dbb98f591009bbcfd86

Authored by luoye
1 parent 03cb8f76bc

bug清理

Showing 15 changed files with 93 additions and 59 deletions

littleApp_child/pages/CheckReport/CheckReport.js View file @ b324c6c
... ... @@ -15,8 +15,8 @@
15 15 userData:{},
16 16 // 时间下标
17 17 dateIndex:0,
18   - monthText:'1月11日',
19   - yearText:'2017',
  18 + monthText:'-',
  19 + yearText:'-',
20 20 todayInfo:'',
21 21 // 是否建档
22 22 subscribe:false,
23 23  
... ... @@ -26,11 +26,11 @@
26 26 // 预约详细信息
27 27 subscribeDetails:'',
28 28 isShowLeft: true,
29   - isShowRight: false
  29 + isShowRight: false,
  30 + // 没数据
  31 + noData: 'no'
30 32 },
31 33 onLoad: function (option) {
32   - var date1 = new Date('2017-1-8')
33   - console.log('date1', date1)
34 34 this.setData({
35 35 userData: getApp().globalData.userInfo
36 36 })
... ... @@ -121,6 +121,9 @@
121 121 },
122 122 // 通过日期列表下标改变日期文字
123 123 changeDateWithIndex(index){
  124 + if (this.data.dateList.length == 0){
  125 + return
  126 + }
124 127 var text = this.data.dateList[index]
125 128 this.setData({
126 129 dateIndex: index,
127 130  
128 131  
... ... @@ -135,12 +138,23 @@
135 138 var self = this
136 139 // 列表
137 140 networkUtil._get(api.checkList,{}, function (res) {
138   - console.log('获取时间信息', res.data.data)
139   - if (res.data.data[0].checkTime.length > 0){
  141 + console.log('获取时间信息', res)
  142 + var showLeft = true
  143 + if (res.data.data.length > 0 && res.data.data[0].checkTime.length > 0){
  144 + // 只有一条数据两个圈圈都不显示
  145 + if (res.data.data[0].checkTime.length == 1){
  146 + showLeft = false
  147 + }
140 148 self.setData({
141   - dateList: res.data.data[0].checkTime.reverse()
  149 + dateList: res.data.data[0].checkTime.reverse(),
  150 + isShowLeft:showLeft,
  151 + noData: false
142 152 })
143 153 self.changeDateWithIndex(res.data.data[0].checkTime.length - 1)
  154 + } else {
  155 + self.setData({
  156 + noData:true
  157 + })
144 158 }
145 159 }, function (res) {
146 160  
littleApp_child/pages/CheckReport/CheckReport.json View file @ b324c6c
1 1 {
2 2 "navigationBarBackgroundColor": "#48C17B",
3   - "navigationBarTitleText": "检查报告",
  3 + "navigationBarTitleText": "检查记录",
4 4 "navigationBarTextStyle": "white",
5 5 "backgroundColor": "#d8dbd4"
6 6 }
littleApp_child/pages/CheckReport/CheckReport.wxml View file @ b324c6c
1 1 <import src="../../utils/util_template.wxml" />
2 2  
3 3  
4   -<view class="backgroundView">
  4 +<view class="backgroundView" wx:if="{{!noData}}">
5 5 <!-- <image class="TopBgImage" src=""></image> -->
6 6 <!--顶部红色有头像等信息的栏目-->
7 7 <view class="TopBar">
8 8  
9 9  
... ... @@ -25,19 +25,19 @@
25 25 <text class="timeText">{{userData.birth}}</text>
26 26 </view>
27 27 <view class="infoView">
28   - <text class="titleText">月龄</text>
29   - <text class="timeText">{{userData.monthage ? userData.monthage : '0'}}</text>
  28 + <text class="titleText">检查月龄</text>
  29 + <text class="timeText">{{todayInfo.monthage ? todayInfo.monthage : '0'}}</text>
30 30 <view class="lineView"></view>
31 31 </view>
32 32 <view class="infoView">
33 33 <text class="titleText">健康状况</text>
34   - <text class="timeText">{{userData.hstatus}}</text>
  34 + <text class="timeText">{{wzInfo.highRisk == 1 ? '高危' : '良好'}}</text>
35 35 </view>
36 36 </view>
37 37 <!--下方黑色横条-->
38 38 </view>
39 39 <!--医院名称横条-->
40   - <view class="hospitalName" wx:if="{{todayInfo.checkhospital}}">{{todayInfo.checkhospital}}</view>
  40 + <view class="hospitalName">{{todayInfo.checkhospital ? todayInfo.checkhospital : '-'}}</view>
41 41 <view class="title_banner" style="margin-top:-12px;">检查项目</view>
42 42 <view class="report_list_bg">
43 43 <scroll-view class="report_list_scroll" scroll-x="true">
44 44  
... ... @@ -129,10 +129,10 @@
129 129 <label>预约时间:</label>
130 130 <label class="mask_subscribe_content_text">{{subscribeDetails.nextcheck}}</label>
131 131 </view>
132   - <view class="mask_subscribe_office">
  132 + <!-- <view class="mask_subscribe_office">
133 133 <label>检查医生:</label>
134 134 <label class="mask_subscribe_content_text">{{todayInfo.doctorname ? todayInfo.doctorname : '-'}}</label>
135   - </view>
  135 + </view> -->
136 136 <view class="mask_subscribe_hospital">
137 137 <label>医院名称:</label>
138 138 <label class="mask_subscribe_content_text">{{subscribeDetails.checkhospital}}</label>
... ... @@ -140,4 +140,10 @@
140 140 <view class="mask_subscribe_content_closeBtn" bindtap="closeMask">知道了</view>
141 141 </view>
142 142 </view>
  143 +
  144 +<view class="backgroundView" wx:if="{{noData == true}}">
  145 + <image class="empty_icon" mode="aspectFit" src="../../source/empty.png"></image>
  146 + <view class="empty_text">亲,您的宝宝还没有做过检查哦!</view>
  147 + <view class="empty_back">返回</view>
  148 +</view>
littleApp_child/pages/CheckReport/CheckReport.wxss View file @ b324c6c
... ... @@ -131,7 +131,7 @@
131 131 width: 100%;
132 132 height: 25px;
133 133 background-color: white;
134   - color: #ee7289;
  134 + color: #48C17B;
135 135 font-size: 11px;
136 136 font: medium;
137 137 text-align: center;
138 138  
... ... @@ -298,12 +298,11 @@
298 298  
299 299 .check_diagnosis_content_lines{
300 300 font-family: PingFangSC-Regular;
301   - font-size: 13px;
  301 + font-size: 12px;
302 302 color: #666;
303 303 margin-left: 10px;
304 304 padding-right: 10px;
305 305 width: calc(100% - 20px);
306   -
307 306 }
308 307  
309 308 .high_risk_bg {
littleApp_child/pages/articleLists/articleLists.js View file @ b324c6c
... ... @@ -77,18 +77,18 @@
77 77 var self = this
78 78 isRefresh = true
79 79 networkUtil.showLoading()
80   - var param = { page: page, limit: 15, type: 2, days: getApp().globalData.days,categoryId:self.data.id}
81   - networkUtil._get(api.articles,param,function(res){
  80 + var param = { page: page, limit: 15, type: 2,categoryId:self.data.id}
  81 + networkUtil._get(api.articleList,param,function(res){
82 82 console.log(res)
83 83 isRefresh = false
84 84 var arr = []
85 85 if(page > 0) {// 加载更多模式
86 86 arr = self.data.list
87 87 }
88   - if(res.data.list.length < 15){
  88 + if (res.data.data.length < 15){
89 89 hasMore = false
90 90 }
91   - arr = arr.concat(res.data.list)
  91 + arr = arr.concat(res.data.data)
92 92 var temp = self.data.category
93 93 self.setData({
94 94 list:arr,
... ... @@ -137,6 +137,7 @@
137 137 networkUtil._post(api.articleLike, { id: e.currentTarget.dataset.artid }, function (res) {
138 138 var artList = self.data.list
139 139 artList[e.currentTarget.dataset.artindex].likeCount++
  140 + artList[e.currentTarget.dataset.artindex].isLike = 1
140 141 self.setData({
141 142 list: artList
142 143 });
littleApp_child/pages/childcare_knowledge/childcare_knowledge.js View file @ b324c6c
... ... @@ -122,21 +122,21 @@
122 122 var self = this
123 123 isRefresh = true
124 124 networkUtil.showLoading()
125   - var param = { page: page, limit: pageLimit, type: 2, days: app.globalData.days, categoryId: self.data.category}
  125 + var param = { page: page, limit: pageLimit, type: 2, categoryId: self.data.category}
126 126 // console.log(param)
127   - networkUtil._get(api.articles,param,function(res){
  127 + networkUtil._get(api.articleList,param,function(res){
128 128 console.log(res)
129 129 isRefresh = false
130 130 var arr = []
131 131 if(page > 1) {// 加载更多模式
132 132 arr = self.data.list
133 133 }
134   - if (res.data.list.length < pageLimit){
  134 + if (res.data.data.length < pageLimit){
135 135 hasMore = false
136 136 }else{
137 137 hasMore = true
138 138 }
139   - arr = arr.concat(res.data.list)
  139 + arr = arr.concat(res.data.data)
140 140 self.setData({
141 141 list:arr,
142 142 hasMore: hasMore
littleApp_child/pages/childcare_knowledge_detail/childcare_knowledge_detail.json View file @ b324c6c
1 1 {
2 2 "navigationBarBackgroundColor": "#48C17B",
3   - "navigationBarTitleText": "文章详情",
  3 + "navigationBarTitleText": "详情",
4 4 "navigationBarTextStyle": "white",
5   - "backgroundColor": "#d8dbd4"
  5 + "backgroundColor": "white"
6 6 }
littleApp_child/pages/home/home.js View file @ b324c6c
... ... @@ -179,6 +179,7 @@
179 179 networkUtil._post(api.articleLike, { id: e.currentTarget.dataset.artid }, function (res) {
180 180 var artList = self.data.list
181 181 artList[e.currentTarget.dataset.categaryindex].article[e.currentTarget.dataset.artindex].likeCount++
  182 + artList[e.currentTarget.dataset.categaryindex].article[e.currentTarget.dataset.artindex].isLike = 1
182 183 self.setData({
183 184 list: artList
184 185 });
... ... @@ -205,7 +206,7 @@
205 206 that.setData({
206 207 time: '0s'
207 208 })
208   - networkUtil.showErrorToast('获取验证码失败,请稍后再试')
  209 + networkUtil.showErrorToast(res.errormsg)
209 210 })
210 211 if (timeCount == 60) {
211 212 this.keepTime()
littleApp_child/pages/home/home.wxss View file @ b324c6c
... ... @@ -102,7 +102,7 @@
102 102 width: 100%;
103 103 height: 30px;
104 104 background-color: white;
105   - color: #ee7289;
  105 + color: #48C17B;
106 106 font-size: 11px;
107 107 font: medium;
108 108 text-align: center;
littleApp_child/pages/inspectionReport/inspectionReport.js View file @ b324c6c
... ... @@ -30,7 +30,6 @@
30 30 self.setData({
31 31 doctorList : res.data.data,
32 32 })
33   -
34 33 },function(res){
35 34  
36 35 })
littleApp_child/pages/login/login.wxml View file @ b324c6c
1   -<view>
2   - <form catchsubmit="formSubmit">
3   -
4   - <view class="record-input-constainer">
5   - <view class="record-input_bg" style="border-color:{{inputFocus.nameInput ? '#f4879b' : '#e8eae5'}}">
6   - <label class="record-input_title">姓名</label>
7   - <input class="input" id = "name" name="name" maxlength="12" placeholder="请输入建档姓名" value="" placeholder-class="input-placeholder" bindfocus="getFocus" />
8   - </view>
9   - <view class="record-input_bg" style="margin-top:15px;border-color:{{inputFocus.phoneInput ? '#f4879b' : '#e8eae5'}}">
10   - <label class="record-input_title">手机号</label>
11   - <input class="input" id="phone" name="phone" type="number" placeholder="请输入建档手机号" maxlength="11" placeholder-class="input-placeholder" bindfocus="getFocus" value="" bindblur="blurInput"/>
12   - </view>
13   -
14   - <view class="record-input_bg" style="margin-top:15px;border-color:{{inputFocus.codeInput ? '#f4879b' : '#e8eae5'}}">
15   - <label class="record-input_title" style="padding-left:20px;padding-right:20px;">验证码</label>
16   - <input class="input" id = "code" name="code" maxlength="12" placeholder="请输入验证码" value="" placeholder-class="input-placeholder" bindfocus="getFocus" />
17   - <label class="record-time-text" bindtap="getVerifyCode">{{time == '0s' ? '点击获取' : time}}</label>
18   - </view>
19   - </view>
20   -
21   -
22   - <button class="record-submit-btn" formType="submit">下一步</button>
23   - </form>
  1 +<view class="backgroundView">
  2 + <image class="empty_icon" mode="aspectFit" src="../../source/empty.png"></image>
  3 + <view class="empty_text">亲,您的宝宝还没有做过检查哦!</view>
  4 + <view class="empty_back">返回</view>
24 5 </view>
littleApp_child/pages/system_notifacations/system_notifacations.json View file @ b324c6c
1 1 {
2 2 "navigationBarBackgroundColor": "#48C17B",
3   - "navigationBarTitleText": "系统通知",
  3 + "navigationBarTitleText": "消息通知",
4 4 "navigationBarTextStyle": "white",
5 5 "backgroundColor": "#d8dbd4"
6 6 }
littleApp_child/source/empty.png View file @ b324c6c

8.26 KB

littleApp_child/utils/apiFile.js View file @ b324c6c
... ... @@ -32,5 +32,7 @@
32 32 checksub: '/baby/check/sub',
33 33 // 文章点赞
34 34 articleLike: 'v1/articleLike',
  35 + // 文章列表
  36 + articleList: 'wx/articles/precise',
35 37 }
littleApp_child/utils/util_UI.wxss View file @ b324c6c
... ... @@ -134,9 +134,40 @@
134 134 border-radius: 100px;
135 135 width: 160px;
136 136 height: 32px;
137   - margin-top: 50px;
  137 + margin-top: 80px;
138 138 text-align: center;
139 139 margin-left: calc(50% - 80px);
140 140 line-height: 32px;
141 141 }
  142 +
  143 +
  144 + /* 无数据页面 */
  145 + .empty_icon {
  146 + width: 100%;
  147 + height: 200px;
  148 + margin-top: 70px;
  149 + }
  150 +
  151 +.empty_text {
  152 + width: 100%;
  153 + height: 20px;
  154 + font-size: 16px;
  155 + color: #333333;
  156 + text-align: center;
  157 + margin-top: 15px;
  158 + }
  159 +
  160 +.empty_back {
  161 + background: #48C17B;
  162 + border-radius: 100px;
  163 + height: 32px;
  164 + width: 160px;
  165 + text-align: center;
  166 + font-size: 14px;
  167 + color: #FFFFFF;
  168 + line-height: 32px;
  169 + margin-top: 35px;
  170 + margin-left: calc(50% - 80px);
  171 +}
  172 +