Commit cd919035ff2f4c3509493097cfbdf195840ff8f8
Exists in
master
and in
2 other branches
Merge branch 'master' of https://git.healthbaby.com.cn/luoye/littleapp_child
Showing 14 changed files
- littleApp_child/pages/CheckReport/CheckReport.wxml
- littleApp_child/pages/CheckReport/CheckReport.wxss
- littleApp_child/pages/PersonalInfo/PersonalInfo.js
- littleApp_child/pages/PersonalInfo/PersonalInfo.json
- littleApp_child/pages/PersonalInfo/PersonalInfo.wxml
- littleApp_child/pages/Setting/Setting.js
- littleApp_child/pages/Setting/Setting.wxml
- littleApp_child/pages/home/home.js
- littleApp_child/pages/home/home.wxml
- littleApp_child/pages/home/home.wxss
- littleApp_child/pages/mySaved/mySaved.json
- littleApp_child/pages/mySaved/mySaved.wxml
- littleApp_child/source/checkBox_no.png
- littleApp_child/source/checkBox_yes.png
littleApp_child/pages/CheckReport/CheckReport.wxml
View file @
cd91903
| ... | ... | @@ -82,12 +82,21 @@ |
| 82 | 82 | <view style="display:flex;width:100%" bindtap="isShowMore" data-index="1"> |
| 83 | 83 | <label class="check_diagnosis_name">检查诊断</label> |
| 84 | 84 | <image class="icon_more" src="{{isShowOne==false ? '../../source/more_bottom.png': '../../source/more_top.png'}}"></image> |
| 85 | + </view> | |
| 86 | + <view class="check_diagnosis_high_risk"> | |
| 87 | + <view style='display:inline-block'>高危因素:</view> | |
| 88 | + <view class="high_risk_bg">高危</view> | |
| 89 | + <view class="high_risk_bg">高危</view> | |
| 90 | + <view class="high_risk_bg">高危高危高危</view> | |
| 91 | + <view class="high_risk_bg">高危</view> | |
| 92 | + <view class="high_risk_bg">高危</view> | |
| 93 | + <view class="high_risk_bg">高危</view> | |
| 94 | + <view class="high_risk_bg">高危</view> | |
| 85 | 95 | </view> |
| 86 | - <label wx:if="{{wzInfo.highRisk == 1}}" class="high_risk_bg">高危</label> | |
| 87 | 96 | <view class="check_diagnosis_bg"> |
| 88 | - <label wx:if="{{!isShowOne}}" class="check_diagnosis_content_1_line">{{wzInfo.diagnose[0]}}</label> | |
| 97 | + <label wx:if="{{!isShowOne}}" class="check_diagnosis_content_1_line">诊断:{{wzInfo.diagnose[0]}}</label> | |
| 89 | 98 | <view wx:if="{{isShowOne}}" style="display:flex;width:100%"> |
| 90 | - <label class="check_diagnosis_content_lines">{{wzInfo.diagnose}}</label> | |
| 99 | + <label class="check_diagnosis_content_lines">诊断:{{wzInfo.diagnose}}</label> | |
| 91 | 100 | </view> |
| 92 | 101 | </view> |
| 93 | 102 | </view> |
littleApp_child/pages/CheckReport/CheckReport.wxss
View file @
cd91903
| ... | ... | @@ -274,6 +274,8 @@ |
| 274 | 274 | .check_diagnosis_bg { |
| 275 | 275 | margin-right: 55px; |
| 276 | 276 | min-height: 25px; |
| 277 | + margin-top: 5px; | |
| 278 | + width: 100%; | |
| 277 | 279 | } |
| 278 | 280 | |
| 279 | 281 | .check_diagnosis_content_1_line { |
| ... | ... | @@ -291,8 +293,7 @@ |
| 291 | 293 | -webkit-box-orient: vertical; |
| 292 | 294 | } |
| 293 | 295 | |
| 294 | -.check_diagnosis_content_lines{ | |
| 295 | - font-family: PingFangSC-Regular; | |
| 296 | +.check_diagnosis_content_lines { | |
| 296 | 297 | font-size: 12px; |
| 297 | 298 | color: #666; |
| 298 | 299 | margin-left: 10px; |
| ... | ... | @@ -300,6 +301,12 @@ |
| 300 | 301 | width: calc(100% - 20px); |
| 301 | 302 | } |
| 302 | 303 | |
| 304 | +.check_diagnosis_high_risk { | |
| 305 | + font-size: 12px; | |
| 306 | + color: #666; | |
| 307 | + margin-left: 10px; | |
| 308 | +} | |
| 309 | + | |
| 303 | 310 | .high_risk_bg { |
| 304 | 311 | background: #e36767; |
| 305 | 312 | border-radius: 4px; |
| 306 | 313 | |
| ... | ... | @@ -308,8 +315,9 @@ |
| 308 | 315 | color: #fff; |
| 309 | 316 | text-align: center; |
| 310 | 317 | margin-right: 10px; |
| 311 | - width: 40px; | |
| 312 | 318 | height: 20px; |
| 313 | - float: right; | |
| 319 | + padding: 2px 4px 2px 4px; | |
| 320 | + display: inline-block; | |
| 321 | + margin-top: 2px; | |
| 314 | 322 | } |
littleApp_child/pages/PersonalInfo/PersonalInfo.js
View file @
cd91903
littleApp_child/pages/PersonalInfo/PersonalInfo.json
View file @
cd91903
littleApp_child/pages/PersonalInfo/PersonalInfo.wxml
View file @
cd91903
| ... | ... | @@ -3,7 +3,7 @@ |
| 3 | 3 | <image class="avatar" bindtap="tapAvatar" src="{{userData.avatar.medium ? userData.avatar.medium : ''}}" background-size="cover"></image> |
| 4 | 4 | <!--用户名--> |
| 5 | 5 | <view class="top_name"> |
| 6 | - <view class="userName">{{userData.username}}么么么</view> | |
| 6 | + <view class="userName">{{userData.username}}</view> | |
| 7 | 7 | </view> |
| 8 | 8 | </view> |
| 9 | 9 | <view class="infoBar_title">分娩信息</view> |
littleApp_child/pages/Setting/Setting.js
View file @
cd91903
| ... | ... | @@ -17,9 +17,10 @@ |
| 17 | 17 | isShowOne: false, |
| 18 | 18 | isShowTwo: false, |
| 19 | 19 | isShowThree: false, |
| 20 | + userData:'' | |
| 20 | 21 | }, |
| 21 | 22 | onLoad: function (option) { |
| 22 | - | |
| 23 | + this.setData({ userData: getApp().globalData.userInfo}) | |
| 23 | 24 | }, |
| 24 | 25 | selectPhoto(){ |
| 25 | 26 | var that = this |
| ... | ... | @@ -38,7 +39,7 @@ |
| 38 | 39 | sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 |
| 39 | 40 | sourceType: [imgType], // 可以指定来源是相册还是相机,默认二者都有 |
| 40 | 41 | success: function (res) { |
| 41 | - // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片 | |
| 42 | + // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片 | |
| 42 | 43 | console.log('图片',res) |
| 43 | 44 | that.qiniuToken(res.tempFilePaths[0]) |
| 44 | 45 | } |
| 45 | 46 | |
| ... | ... | @@ -67,10 +68,10 @@ |
| 67 | 68 | url = '../PersonalInfo/PersonalInfo' |
| 68 | 69 | break |
| 69 | 70 | case 4: |
| 70 | - url = '../PersonalInfo/PersonalInfo' | |
| 71 | + url = '../mySaved/mySaved' | |
| 71 | 72 | break |
| 72 | 73 | case 5: |
| 73 | - url = '../PersonalInfo/PersonalInfo' | |
| 74 | + url = '../feedback/feedback' | |
| 74 | 75 | break |
| 75 | 76 | case 6: |
| 76 | 77 | |
| ... | ... | @@ -142,6 +143,7 @@ |
| 142 | 143 | networkUtil.showErrorToast(res.errormsg) |
| 143 | 144 | }) |
| 144 | 145 | }, |
| 146 | + // 成功上传头像后 上传服务器 | |
| 145 | 147 | changeUserInfo(image){ |
| 146 | 148 | var that = this; |
| 147 | 149 | networkUtil._put(api.kApiModifyMyInfo, {}, function (res) { |
littleApp_child/pages/Setting/Setting.wxml
View file @
cd91903
| ... | ... | @@ -4,8 +4,8 @@ |
| 4 | 4 | <!--头像--> |
| 5 | 5 | <image class="top_baseInfo_avatar" src="{{userData.avatar.medium ? userData.avatar.medium : ''}}" background-size="cover"></image> |
| 6 | 6 | <view class="top_baseInfo_userName"> |
| 7 | - <view class="name">{{userData.username}}胡子涵</view> | |
| 8 | - <view class="phone">{{userData.username}}18787231231</view> | |
| 7 | + <view class="name">{{userData.username}}</view> | |
| 8 | + <view class="phone">{{userData.id}}</view> | |
| 9 | 9 | </view> |
| 10 | 10 | <image class="indicator" mode="aspectFit" src="../../source/gengduo.png"></image> |
| 11 | 11 | </view> |
| 12 | 12 | |
| 13 | 13 | |
| 14 | 14 | |
| ... | ... | @@ -13,19 +13,19 @@ |
| 13 | 13 | <view class="infoBar"> |
| 14 | 14 | <view class="infoView"> |
| 15 | 15 | <view class="titleText">月龄</view> |
| 16 | - <view class="timeText">{{userData.birth}}122</view> | |
| 16 | + <view class="timeText">{{userData.monthage}}</view> | |
| 17 | 17 | </view> |
| 18 | 18 | <view class="infoView"> |
| 19 | 19 | <view class="titleText">出生日期</view> |
| 20 | - <view class="timeText">{{userData.birth}}122</view> | |
| 20 | + <view class="timeText">{{userData.birth}}</view> | |
| 21 | 21 | </view> |
| 22 | 22 | <view class="infoView"> |
| 23 | 23 | <view class="titleText">出生时间</view> |
| 24 | - <view class="timeText">{{userData.birth}}122</view> | |
| 24 | + <view class="timeText">{{userData.birth}}</view> | |
| 25 | 25 | </view> |
| 26 | 26 | <view class="infoView"> |
| 27 | 27 | <view class="titleText">分娩方式</view> |
| 28 | - <view class="timeText">{{userData.birth}}122</view> | |
| 28 | + <view class="timeText">{{userData.birth}}</view> | |
| 29 | 29 | </view> |
| 30 | 30 | </view> |
| 31 | 31 | <!--下方黑色横条--> |
| ... | ... | @@ -39,5 +39,5 @@ |
| 39 | 39 | </view> |
| 40 | 40 | <view class="line" wx:if="{{item.margin == 0}}"></view> |
| 41 | 41 | </block> |
| 42 | -<view class="btn">退出登录</view> | |
| 42 | +<view class="btn" bindtap='logout'>退出登录</view> |
littleApp_child/pages/home/home.js
View file @
cd91903
| ... | ... | @@ -29,6 +29,7 @@ |
| 29 | 29 | list:[], |
| 30 | 30 | userInfo:'', |
| 31 | 31 | inputFocus: { nameInput: false, phoneInput: false, codeInput: false }, |
| 32 | + currentBabyIndex:0 | |
| 32 | 33 | }, |
| 33 | 34 | /*---------生命周期--------*/ |
| 34 | 35 | onLoad: function () { |
| ... | ... | @@ -139,6 +140,13 @@ |
| 139 | 140 | inputFocus: inputFocus |
| 140 | 141 | }) |
| 141 | 142 | }, |
| 143 | + // 改变baby | |
| 144 | + changeBaby(e){ | |
| 145 | + | |
| 146 | + this.setData({ | |
| 147 | + currentBabyIndex: e.currentTarget.dataset.index | |
| 148 | + }) | |
| 149 | + }, | |
| 142 | 150 | /*---------自定义函数--------*/ |
| 143 | 151 | homePage() { |
| 144 | 152 | var that = this |
| ... | ... | @@ -230,6 +238,13 @@ |
| 230 | 238 | console.log(res) |
| 231 | 239 | }) |
| 232 | 240 | }, |
| 241 | + // 标签页面 | |
| 242 | + clickLabel(e){ | |
| 243 | + console.log(e) | |
| 244 | + wx.navigateTo({ | |
| 245 | + url: '../articleLists/articleLists?category=' + e.currentTarget.dataset.categary, | |
| 246 | + }) | |
| 247 | + }, | |
| 233 | 248 | /*---------------欢迎介绍页面---------------*/ |
| 234 | 249 | // 获取验证码 |
| 235 | 250 | getVerifyCode: function (e) { |
| ... | ... | @@ -258,10 +273,6 @@ |
| 258 | 273 | networkUtil.showErrorToast('请输入正确手机号码和姓名') |
| 259 | 274 | return |
| 260 | 275 | } |
| 261 | - | |
| 262 | - | |
| 263 | - | |
| 264 | - | |
| 265 | 276 | }, |
| 266 | 277 | // 计时器 |
| 267 | 278 | keepTime: function () { |
littleApp_child/pages/home/home.wxml
View file @
cd91903
| ... | ... | @@ -12,9 +12,9 @@ |
| 12 | 12 | <image class="avatar" bindtap="tapAvatar" src="{{userData.avatar.medium ? userData.avatar.medium : ''}}" background-size="cover"></image> |
| 13 | 13 | <!--用户名--> |
| 14 | 14 | <view class="top_name"> |
| 15 | - <view class="userName userName_selected">{{userData.username}}</view> | |
| 15 | + <view class="userName {{currentBabyIndex == 0 ? 'userName_selected' : ''}}" data-index="0" bindtap="changeBaby">{{userData.username}}</view> | |
| 16 | 16 | <view class="top_name_line"></view> |
| 17 | - <view class="userName">{{userData.username}}</view> | |
| 17 | + <view class="userName {{currentBabyIndex == 1 ? 'userName_selected' : ''}}" data-index="1" bindtap="changeBaby">{{userData.username}}</view> | |
| 18 | 18 | </view> |
| 19 | 19 | <!--下方黑色横条--> |
| 20 | 20 | <view class="infoBar"> |
| 21 | 21 | |
| 22 | 22 | |
| ... | ... | @@ -79,11 +79,15 @@ |
| 79 | 79 | <view class="article_content_bottomBar util_bottom_line"> |
| 80 | 80 | <!-- bindtap="articleLike" data-categaryIndex="{{sectionIndex}}" data-artIndex="{{index}}" --> |
| 81 | 81 | <view class="article_content_bottomBar_likes" catchtap="articleLike" data-isLike="{{item.isLike}}" data-artId="{{item.id}}" data-categaryIndex="{{sectionIndex}}" data-artIndex="{{index}}"> |
| 82 | + <!-- 文章点赞 --> | |
| 82 | 83 | <image class="article_content_bottomBar_likes_icon" src="../../source/{{item.isLike == 1 ? 'zanguo.png' : 'like.png'}}"></image> |
| 83 | 84 | <label class="article_content_bottomBar_likes_text">{{item.likeCount ? item.likeCount : 0}}</label> |
| 85 | + <!-- 文章收藏 --> | |
| 86 | + <image class="article_content_bottomBar_likes_icon" src="../../source/{{item.isLike == 1 ? 'save_not.png' : 'save_not.png'}}"></image> | |
| 87 | + <label class="article_content_bottomBar_likes_text">{{item.likeCount ? item.likeCount : 0}}</label> | |
| 84 | 88 | </view> |
| 85 | 89 | <view class="article_content_bottomBar_labels"> |
| 86 | - <view catchtap="" data-isLike="{{item.isLike}}" style="float: right" class="article_label">什么东东</view> | |
| 90 | + <view catchtap="clickLabel" data-categary="lable" style="float: right" class="article_label">什么东东</view> | |
| 87 | 91 | <view class="article_label" style="float: right">什么东东啊</view> |
| 88 | 92 | </view> |
| 89 | 93 | </view> |
| ... | ... | @@ -154,7 +158,6 @@ |
| 154 | 158 | <input class="input" id="code" name="code" maxlength="12" placeholder="请输入验证码" value="" placeholder-class="input-placeholder" bindblur="loseCodeFocus" bindfocus="getCodeFocus" /> |
| 155 | 159 | </view> |
| 156 | 160 | <label class="record-time-text" bindtap="getVerifyCode">{{time == '0s' ? '点击获取' : time}}</label> |
| 157 | - | |
| 158 | 161 | </view> |
| 159 | 162 | |
| 160 | 163 | </view> |
littleApp_child/pages/home/home.wxss
View file @
cd91903
| ... | ... | @@ -214,7 +214,9 @@ |
| 214 | 214 | } |
| 215 | 215 | /* 文章ne内容背景 */ |
| 216 | 216 | .article_content { |
| 217 | - height: 135px; | |
| 217 | + height: 133px; | |
| 218 | + position: relative; | |
| 219 | + width: 100%; | |
| 218 | 220 | } |
| 219 | 221 | /* 内容标题 */ |
| 220 | 222 | .article_content_title { |
| 221 | 223 | |
| ... | ... | @@ -247,11 +249,11 @@ |
| 247 | 249 | } |
| 248 | 250 | /* 内容图 */ |
| 249 | 251 | .article_content_image { |
| 250 | - float: right; | |
| 251 | - margin-right: 11px; | |
| 252 | + position: absolute; | |
| 253 | + right: 11px; | |
| 252 | 254 | width: 74px; |
| 253 | 255 | height: 74px; |
| 254 | - transform: translateY(-74px); | |
| 256 | + top: 11px; | |
| 255 | 257 | } |
| 256 | 258 | /* 点赞 */ |
| 257 | 259 | .article_content_bottomBar { |
| 258 | 260 | |
| ... | ... | @@ -261,9 +263,9 @@ |
| 261 | 263 | } |
| 262 | 264 | |
| 263 | 265 | .article_content_bottomBar_labels { |
| 264 | - float: right; | |
| 266 | + position: absolute; | |
| 267 | + right: 0px; | |
| 265 | 268 | height: 100%; |
| 266 | - transform: translateX(85px); | |
| 267 | 269 | } |
| 268 | 270 | |
| 269 | 271 | .article_content_bottomBar_likes { |
littleApp_child/pages/mySaved/mySaved.json
View file @
cd91903
littleApp_child/pages/mySaved/mySaved.wxml
View file @
cd91903
| ... | ... | @@ -6,7 +6,7 @@ |
| 6 | 6 | <view class=""> |
| 7 | 7 | <view wx:for="{{list}}" style="display: flex"> |
| 8 | 8 | |
| 9 | - <image wx:if="{{isShowCheckbox}}" class="check_image" src="../../source/{{item.checked ? 'like.png' :'save_not.png'}}" bindtap="checkboxChange" data-id="{{item.id}}" data-checked="{{item.checked}}"></image> | |
| 9 | + <image wx:if="{{isShowCheckbox}}" class="check_image" src="../../source/{{item.checked ? 'checkBox_yes.png' :'checkBox_no.png'}}" mode='aspectFit' bindtap="checkboxChange" data-id="{{item.id}}" data-checked="{{item.checked}}"></image> | |
| 10 | 10 | <view class="content_item"> |
| 11 | 11 | <view style="margin-right:90px;"> |
| 12 | 12 | <view class="content_title">{{item.title}}</view> |
littleApp_child/source/checkBox_no.png
View file @
cd91903
1.63 KB
littleApp_child/source/checkBox_yes.png
View file @
cd91903
2.08 KB