Commit 29d0052aae963edfac3516d92f2f0203b48f2e37
1 parent
63dd407b9c
Exists in
master
文章列表
Showing 6 changed files with 243 additions and 10 deletions
woman/logs.wxss
View file @
29d0052
| 1 | +/*tab框切换*/ | |
| 2 | +.nav_tab{ | |
| 3 | + width:100%; | |
| 4 | + height:100rpx; | |
| 5 | + display:flex; | |
| 6 | + flex-direction:row; | |
| 7 | +} | |
| 8 | +.show{ | |
| 9 | + line-height:100rpx; | |
| 10 | + text-align:center; | |
| 11 | + width: 150rpx; | |
| 12 | + color:#BDBDBD; | |
| 13 | + font-size:28rpx; | |
| 14 | + opacity: 0.5; | |
| 15 | + font-weight: 500; | |
| 16 | +} | |
| 17 | +.hidden{ | |
| 18 | + line-height:100rpx; | |
| 19 | + text-align:center; | |
| 20 | + color:#FF8EA9; | |
| 21 | + width: 150rpx; | |
| 22 | + font-size:28rpx; | |
| 23 | + font-weight: 500; | |
| 24 | +} | |
| 25 | +.nav_underline{ | |
| 26 | + background:#FF8EA9; | |
| 27 | + width:54rpx; | |
| 28 | + height:6rpx; | |
| 29 | + margin-top:-10rpx; | |
| 30 | + margin-left:70rpx; | |
| 31 | + border-radius:8rpx; | |
| 32 | +} | |
| 33 | +.item_bg{ | |
| 34 | + width: 670rpx; | |
| 35 | +height: 200rpx; | |
| 36 | +background: #FFFFFF; | |
| 37 | +box-shadow: 0px 2rpx 8rpx 2rpx rgba(245,33,84,0.1); | |
| 38 | +border-radius: 20rpx 20rpx 20rpx 20rpx; | |
| 39 | +opacity: 1; | |
| 40 | + margin: 40rpx; | |
| 41 | + display: flex; | |
| 42 | + flex-direction: row; | |
| 43 | + justify-content: space-between; | |
| 44 | +} | |
| 45 | +.title{ | |
| 46 | + | |
| 47 | + height: 39rpx; | |
| 48 | + font-size: 28rpx; | |
| 49 | + font-family: PingFang SC-Medium, PingFang SC; | |
| 50 | + font-weight: 500; | |
| 51 | + color: #333333; | |
| 52 | + line-height: 33rpx; | |
| 53 | + margin-left: 20rpx; | |
| 54 | + margin-top: 24rpx; | |
| 55 | +} | |
| 56 | +.content{ | |
| 57 | + margin-left: 20rpx; | |
| 58 | + margin-top: 24rpx; | |
| 59 | + width: 436rpx; | |
| 60 | +height: 104rpx; | |
| 61 | +font-size: 24rpx; | |
| 62 | +font-family: PingFang SC-Regular, PingFang SC; | |
| 63 | +font-weight: 400; | |
| 64 | +color: #828282; | |
| 65 | +line-height: 28rpx; | |
| 66 | + | |
| 67 | +} | |
| 68 | +.picture{ | |
| 69 | + width: 160rpx; | |
| 70 | + height: 160rpx; | |
| 71 | + border-radius: 10rpx; | |
| 72 | + margin: 20rpx; | |
| 73 | +} |
woman/pages/articleDetail/articleDetail.js
View file @
29d0052
| ... | ... | @@ -12,7 +12,26 @@ |
| 12 | 12 | |
| 13 | 13 | Page({ |
| 14 | 14 | data: { |
| 15 | - articleDetail: '', | |
| 15 | + articleDetail: { | |
| 16 | + | |
| 17 | + content: "先来看看孕早期感冒对胎宝贝的影响。如果孕妈患普通感冒,基本对胎宝贝影响不大,但如果体温长时间高烧不退或是患流行性感冒会影响到胎宝贝的健康。特别是孕早期,孕5-12周的阶段是胎宝贝各器官形成的关键时期,流感可引发胎宝贝畸形,而且高热和病毒的毒性作用也会刺激子宫收缩,可引起流产。 感冒有这么严重的影响,当然预防是关键,不过今天小编不讲预防,一起来看感冒后孕妈要怎么办? ◆区分感冒类型一般的普通感冒,症状较轻,如流鼻涕、打喷嚏,可不必服药,多喝水,注意休息,过几天就会好。流行性感冒,且症状较重时,需要及时就医。医生会权衡利弊,究竟是疾病本身对孕妈和胎宝贝的影响大还是治疗用药的影响大,只要在医生指导下,合理用药是没有问题的。所以,不区分感冒类型和症状,都采取不用药的方式是不可取的。患病后还是需要及时就医,请医生做出诊断,再遵医嘱是否用药并做好日常护理。 ◆初发普通感冒怎么办?——先看医生,确定为普通感冒且无需用药。①往杯子里倒开水,对着热气做深呼吸,直到杯中水不再冒热气为止。坚持每天做5-8次,改善鼻塞症状。②每天冷水洗脸,早晚及餐后用淡盐水漱口清除口腔病菌。③比平日多饮用一些白开水,注意休息。 ◆重症或流行性感冒怎么办?①增加营养。②注意休息。③遵医嘱用药,改善症状,控制病情,防治继发疾病。", | |
| 18 | + image:{ | |
| 19 | + real: "https://img1.healthbaby.com.cn/FtQPrMwgEk9PNgK7abwSoH4TdBaD" | |
| 20 | + | |
| 21 | + }, | |
| 22 | + created: 1448270322, | |
| 23 | + modified: 1452158562, | |
| 24 | + title: "孕早期感冒了怎么办?", | |
| 25 | + shareUrl: "http://m.healthbaby.com.cn/articles/index.html?id=614", | |
| 26 | + id: 614, | |
| 27 | + introduction: "先来看看孕早期感冒对胎宝贝的影响。如果孕妈患普通感冒,基本对胎宝贝影响不大,但如果体温长时间高烧不退或是患流行性感冒会影响到胎宝贝的健康。特别是孕早期,孕5-12周的阶段是胎宝贝各器官形成的关键时期,流感可引发胎宝贝畸形,而且高热和病毒的毒性作用也会刺激子宫收缩,可引起流产。", | |
| 28 | + isLike: 2, | |
| 29 | + likeCount: 28, | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + }, | |
| 16 | 35 | category:'', |
| 17 | 36 | pageType:'1' // 1是文章 2是高危 |
| 18 | 37 | }, |
| ... | ... | @@ -30,7 +49,7 @@ |
| 30 | 49 | } |
| 31 | 50 | }) */ |
| 32 | 51 | // networkUtil.showLoading() |
| 33 | - if(category == '健康评级') { | |
| 52 | + /* if(category == '健康评级') { | |
| 34 | 53 | this.requestRiskData(options.id) |
| 35 | 54 | } else { |
| 36 | 55 | this.requestData(options.id) |
| ... | ... | @@ -38,7 +57,7 @@ |
| 38 | 57 | if (options.doctorId){ |
| 39 | 58 | this.requestDoctor(options.hospitalId, options.doctorId) |
| 40 | 59 | this.setData({showDoc:true}) |
| 41 | - } | |
| 60 | + } */ | |
| 42 | 61 | }, |
| 43 | 62 | /*---------自定义函数--------*/ |
| 44 | 63 | requestData(articleId){ |
woman/pages/home/home.js
View file @
29d0052
| ... | ... | @@ -31,7 +31,6 @@ |
| 31 | 31 | hospitalName: '-', |
| 32 | 32 | docList:[], |
| 33 | 33 | // 文章列表 |
| 34 | - articleList: [], | |
| 35 | 34 | // 主机类型 |
| 36 | 35 | HOSTTypeText: ['测试环境', '', '演示环境', ''][networkUtil.Builing_Release_AppStore], |
| 37 | 36 | HOSTType: networkUtil.Builing_Release_AppStore, |
| ... | ... | @@ -68,7 +67,22 @@ |
| 68 | 67 | username: '李芳芳', |
| 69 | 68 | newPatientId: "12312341234", |
| 70 | 69 | |
| 71 | - } | |
| 70 | + }, | |
| 71 | + | |
| 72 | + //tab框 | |
| 73 | + selected: 0, | |
| 74 | + list: ['婚前检查','孕前优生','两癌筛查'], | |
| 75 | + articleList: [ | |
| 76 | + { | |
| 77 | + title: "文章标题文章标题文章标题", | |
| 78 | + content:"文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文容。。。" | |
| 79 | + }, | |
| 80 | + { | |
| 81 | + title: "文章标题文章标题文章标题", | |
| 82 | + content:"文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文容。。。" | |
| 83 | + } | |
| 84 | + ] , | |
| 85 | + | |
| 72 | 86 | }, |
| 73 | 87 | |
| 74 | 88 | |
| ... | ... | @@ -113,7 +127,7 @@ |
| 113 | 127 | this.homePage() |
| 114 | 128 | |
| 115 | 129 | // 监听事件 |
| 116 | - event.on('likeChanged', this, function(data) { | |
| 130 | + /* event.on('likeChanged', this, function(data) { | |
| 117 | 131 | if (data.categoryIndex == -1) { |
| 118 | 132 | var artList = this.data.crisisCategorie |
| 119 | 133 | artList[data.articleIdIndex].likeCount++ |
| ... | ... | @@ -127,7 +141,7 @@ |
| 127 | 141 | articleList: artList |
| 128 | 142 | }); |
| 129 | 143 | } |
| 130 | - }) | |
| 144 | + }) */ | |
| 131 | 145 | |
| 132 | 146 | event.on('refreshVip', this, function(data) { |
| 133 | 147 | console.log('重新刷新vip') |
| ... | ... | @@ -977,6 +991,35 @@ |
| 977 | 991 | wx.navigateTo({ |
| 978 | 992 | url: '../doctorList/doctorList', |
| 979 | 993 | }) |
| 994 | + }, | |
| 995 | + goArticleDetail(e) { | |
| 996 | + wx.navigateTo({ | |
| 997 | + url: '../articleDetail/articleDetail', | |
| 998 | + }) | |
| 999 | + }, | |
| 1000 | + //tab框 | |
| 1001 | + selected: function (e) { | |
| 1002 | + console.log(e) | |
| 1003 | + let that= this | |
| 1004 | + let index = e.currentTarget.dataset.index | |
| 1005 | + console.log(index) | |
| 1006 | + if( index == 0){ | |
| 1007 | + that.setData({ | |
| 1008 | + selected: 0 | |
| 1009 | + }) | |
| 1010 | + }else if( index == 1) { | |
| 1011 | + that.setData({ | |
| 1012 | + selected: 1 | |
| 1013 | + }) | |
| 1014 | + }else if(index == 2 ){ | |
| 1015 | + that.setData({ | |
| 1016 | + selected: 2 | |
| 1017 | + }) | |
| 1018 | + }else{ | |
| 1019 | + that.setData({ | |
| 1020 | + selected: 3 | |
| 1021 | + }) | |
| 1022 | + } | |
| 980 | 1023 | }, |
| 981 | 1024 | }) |
woman/pages/home/home.wxml
View file @
29d0052
| ... | ... | @@ -62,15 +62,40 @@ |
| 62 | 62 | <view class="font-333-34 menu_title_text" style="font-weight: ;" >推荐文章</view> |
| 63 | 63 | </view> |
| 64 | 64 | |
| 65 | + <view class="nav_title" > | |
| 66 | + <view class="nav_tab" style="margin-left: 20rpx;"> | |
| 67 | + <view wx:for="{{list}}" class="{{selected==index?'hidden':'show'}}" data-index='{{index}}' bindtap="selected" wx:key="index">{{item}} | |
| 68 | + <!-- <view class="{{selected==index?'nav_underline':''}}"></view> --> | |
| 69 | + </view> | |
| 70 | + </view> | |
| 71 | + <!-- tab框显示内容 --> | |
| 72 | + <view wx:if="{{selected == 0}}"> | |
| 73 | + | |
| 74 | + <view wx:for="{{articleList}}" wx:key="index" class="item_bg" wx:for-item="item" bindtap="goArticleDetail"> | |
| 75 | + | |
| 76 | + <view> | |
| 77 | + <view class="title">{{item.title}} </view> | |
| 78 | + <view class="content">{{item.content}} </view> | |
| 79 | + </view> | |
| 80 | + <image class="picture" src="../../source/p.png"></image> | |
| 81 | + | |
| 82 | + </view> | |
| 83 | + </view> | |
| 84 | + <view wx:if="{{selected == 1}}"></view> | |
| 85 | + <view wx:if="{{selected == 2}}"></view> | |
| 86 | + | |
| 87 | + </view> | |
| 88 | + | |
| 65 | 89 | <!-- 列表 --> |
| 66 | - <block wx:for="{{articleList}}" wx:key="index" wx:for-index="index"> | |
| 90 | + <!--category是栏目序号与名字(没有文章的栏目要删掉,所以做判断) artIndex是栏目下文章序号 有图片就显示这种--> | |
| 91 | + <!-- <block wx:for="{{articleList}}" wx:key="index" wx:for-index="index"> | |
| 67 | 92 | <view class="home__list" wx:if="{{item.article.length > 0}}"> |
| 68 | 93 | <navigator url="../articleLists/articleLists?id={{item.id}}&category={{item.title}}" class="categoryTitleCell" hover-class="weui-cell_active"> |
| 69 | 94 | <view class="categoryTitleCell-topitem-text">{{item.title}}</view><text class="titleText1">更多></text> |
| 70 | 95 | </navigator>. |
| 71 | 96 | |
| 72 | 97 | <block wx:for="{{item.article}}" wx:key="index" wx:for-item="art" wx:for-index="artIdx"> |
| 73 | - <!--category是栏目序号与名字(没有文章的栏目要删掉,所以做判断) artIndex是栏目下文章序号 有图片就显示这种--> | |
| 98 | + | |
| 74 | 99 | <navigator url="../articleDetail/articleDetail?artIndex={{artIdx}}&categoryIndex={{index}}&id={{art.id}}&category={{item.title}}" class="weui-media-box weui-media-box_appmsg home__list-item" hover-class="weui-cell_active" wx:if="{{art.image.medium}}"> |
| 75 | 100 | <view class="weui-media-box__hd weui-media-box__hd_in-appmsg"> |
| 76 | 101 | <image class="home__list__img" src="{{art.image.medium}}" mode="aspectFill" /> |
| ... | ... | @@ -103,7 +128,7 @@ |
| 103 | 128 | </navigator> |
| 104 | 129 | </block> |
| 105 | 130 | </view> |
| 106 | - </block> | |
| 131 | + </block> --> | |
| 107 | 132 | |
| 108 | 133 | </view> |
| 109 | 134 | </view> |
woman/pages/home/home.wxss
View file @
29d0052
| ... | ... | @@ -188,4 +188,77 @@ |
| 188 | 188 | width: 100%; |
| 189 | 189 | height:100%; |
| 190 | 190 | } |
| 191 | +/*tab框切换*/ | |
| 192 | +.nav_tab{ | |
| 193 | + width:100%; | |
| 194 | + height:100rpx; | |
| 195 | + display:flex; | |
| 196 | + flex-direction:row; | |
| 197 | +} | |
| 198 | +.show{ | |
| 199 | + line-height:100rpx; | |
| 200 | + text-align:center; | |
| 201 | + width: 150rpx; | |
| 202 | + color:#BDBDBD; | |
| 203 | + font-size:28rpx; | |
| 204 | + opacity: 0.5; | |
| 205 | + font-weight: 500; | |
| 206 | +} | |
| 207 | +.hidden{ | |
| 208 | + line-height:100rpx; | |
| 209 | + text-align:center; | |
| 210 | + color:#FF8EA9; | |
| 211 | + width: 150rpx; | |
| 212 | + font-size:28rpx; | |
| 213 | + font-weight: 500; | |
| 214 | +} | |
| 215 | +.nav_underline{ | |
| 216 | + background:#FF8EA9; | |
| 217 | + width:54rpx; | |
| 218 | + height:6rpx; | |
| 219 | + margin-top:-10rpx; | |
| 220 | + margin-left:70rpx; | |
| 221 | + border-radius:8rpx; | |
| 222 | +} | |
| 223 | +.item_bg{ | |
| 224 | + width: 670rpx; | |
| 225 | +height: 200rpx; | |
| 226 | +background: #FFFFFF; | |
| 227 | +box-shadow: 0px 2rpx 8rpx 2rpx rgba(245,33,84,0.1); | |
| 228 | +border-radius: 20rpx 20rpx 20rpx 20rpx; | |
| 229 | +opacity: 1; | |
| 230 | + margin: 40rpx; | |
| 231 | + display: flex; | |
| 232 | + flex-direction: row; | |
| 233 | + justify-content: space-between; | |
| 234 | +} | |
| 235 | +.title{ | |
| 236 | + | |
| 237 | + height: 39rpx; | |
| 238 | + font-size: 28rpx; | |
| 239 | + font-family: PingFang SC-Medium, PingFang SC; | |
| 240 | + font-weight: 500; | |
| 241 | + color: #333333; | |
| 242 | + line-height: 33rpx; | |
| 243 | + margin-left: 20rpx; | |
| 244 | + margin-top: 24rpx; | |
| 245 | +} | |
| 246 | +.content{ | |
| 247 | + margin-left: 20rpx; | |
| 248 | + margin-top: 24rpx; | |
| 249 | + width: 436rpx; | |
| 250 | +height: 104rpx; | |
| 251 | +font-size: 24rpx; | |
| 252 | +font-family: PingFang SC-Regular, PingFang SC; | |
| 253 | +font-weight: 400; | |
| 254 | +color: #828282; | |
| 255 | +line-height: 28rpx; | |
| 256 | + | |
| 257 | +} | |
| 258 | +.picture{ | |
| 259 | + width: 160rpx; | |
| 260 | + height: 160rpx; | |
| 261 | + border-radius: 10rpx; | |
| 262 | + margin: 20rpx; | |
| 263 | +} |
woman/source/p.png
View file @
29d0052
32.4 KB