Commit d562bd79d43a8f6f339f55629e3416b813c36ad1
1 parent
ff3425cda4
Exists in
master
and in
2 other branches
知识列表
Showing 4 changed files with 114 additions and 55 deletions
littleApp_child/app.json
View file @
d562bd7
| 1 | 1 | { |
| 2 | 2 | "pages": [ |
| 3 | - | |
| 4 | - "pages/feedback/feedback", | |
| 5 | - "pages/mySaved/mySaved", | |
| 6 | - "pages/home/home", | |
| 3 | + "pages/home/home", | |
| 7 | 4 | |
| 5 | + | |
| 8 | 6 | "pages/checkTabList/checkTabList", |
| 9 | 7 | |
| 10 | 8 | "pages/CheckReport/CheckReport", |
| ... | ... | @@ -24,7 +22,10 @@ |
| 24 | 22 | "pages/chat/chat", |
| 25 | 23 | "pages/childcare_knowledge_detail/childcare_knowledge_detail", |
| 26 | 24 | "pages/system_notifacations/system_notifacations", |
| 27 | - "pages/childcare_knowledge/childcare_knowledge" | |
| 25 | + "pages/childcare_knowledge/childcare_knowledge", | |
| 26 | + "pages/feedback/feedback", | |
| 27 | + "pages/mySaved/mySaved" | |
| 28 | + | |
| 28 | 29 | ], |
| 29 | 30 | "window": { |
| 30 | 31 | "backgroundTextStyle": "light", |
littleApp_child/pages/childcare_knowledge/childcare_knowledge.wxml
View file @
d562bd7
| ... | ... | @@ -24,13 +24,24 @@ |
| 24 | 24 | <view> |
| 25 | 25 | <view bindtap="toDetail" data-id="{{item.id}}" wx:for="{{list}}" wx:key="{{index}}"> |
| 26 | 26 | <view class="content_item"> |
| 27 | - <view style="margin-left:15px;margin-right:75px;"> | |
| 27 | + <view style="margin-left:15px;margin-right:90px;"> | |
| 28 | 28 | <view class="content_title">{{item.title}}</view> |
| 29 | 29 | <view class="content_content">{{item.introduction}}</view> |
| 30 | - <view class="zar_box" catchtap="articleLike" data-id="{{item.id}}" data-index="{{index}}"> | |
| 31 | - <image class="zar_img" src="../../source/{{item.isLike == 1 ? 'zanguo.png' : 'like.png'}}"></image> | |
| 32 | - <view class="content_zar">{{item.likeCount}}</view> | |
| 33 | - </view> | |
| 30 | + <view class="zarparent_box"> | |
| 31 | + | |
| 32 | + <view class="zar_box" catchtap="articleLike" data-id="{{item.id}}" data-index="{{index}}"> | |
| 33 | + <image class="zar_img" src="../../source/{{item.isLike == 1 ? 'zanguo.png' : 'like.png'}}"></image> | |
| 34 | + <view class="content_zar">{{item.likeCount}}</view> | |
| 35 | + </view> | |
| 36 | + <view class="zar_box"> | |
| 37 | + <image class="zar_img" src="../../source/{{item.isLike == 1 ? 'save_not.png' : 'like.png'}}"></image> | |
| 38 | + <view class="content_zar">{{item.likeCount}}</view> | |
| 39 | + </view> | |
| 40 | + <view class="tags_view" > | |
| 41 | + <view class="tags1">新生儿</view> | |
| 42 | + <view class="tags1">健康宝宝</view> | |
| 43 | + </view> | |
| 44 | + </view> | |
| 34 | 45 | |
| 35 | 46 | </view> |
| 36 | 47 | <image class="content_image" mode="aspectFill" src="{{item.image.medium}}"></image> |
littleApp_child/pages/childcare_knowledge/childcare_knowledge.wxss
View file @
d562bd7
| ... | ... | @@ -71,7 +71,7 @@ |
| 71 | 71 | |
| 72 | 72 | .content_item { |
| 73 | 73 | width: 100%; |
| 74 | - height: 85px; | |
| 74 | + height: 120px; | |
| 75 | 75 | right: 75px; |
| 76 | 76 | } |
| 77 | 77 | |
| ... | ... | @@ -92,6 +92,7 @@ |
| 92 | 92 | font-size: 12px; |
| 93 | 93 | color: #888; |
| 94 | 94 | line-height: 18px; |
| 95 | + margin-top: 10px; | |
| 95 | 96 | display: -webkit-box; |
| 96 | 97 | overflow: hidden; |
| 97 | 98 | text-overflow: ellipsis; |
| 98 | 99 | |
| 99 | 100 | |
| 100 | 101 | |
| ... | ... | @@ -101,16 +102,21 @@ |
| 101 | 102 | } |
| 102 | 103 | |
| 103 | 104 | .content_image { |
| 104 | - width: 50px; | |
| 105 | - transform: translateY(-65px); | |
| 105 | + width: 70px; | |
| 106 | + transform: translateY(-105px); | |
| 106 | 107 | float: right; |
| 107 | 108 | margin-right: 15px; |
| 108 | - height: 50px; | |
| 109 | + height: 70px; | |
| 109 | 110 | } |
| 110 | 111 | |
| 112 | +.zarparent_box { | |
| 113 | + display: flex; | |
| 114 | + margin-top: 20px; | |
| 115 | +} | |
| 116 | + | |
| 111 | 117 | .zar_box { |
| 112 | 118 | display: flex; |
| 113 | - margin-left:-5px; | |
| 119 | + margin-left: -5px; | |
| 114 | 120 | width: 50px; |
| 115 | 121 | } |
| 116 | 122 | |
| 117 | 123 | |
| 118 | 124 | |
| ... | ... | @@ -119,14 +125,31 @@ |
| 119 | 125 | height: 25px; |
| 120 | 126 | } |
| 121 | 127 | |
| 128 | +.save_img { | |
| 129 | + width: 25px; | |
| 130 | + height: 25px; | |
| 131 | +} | |
| 122 | 132 | .content_zar { |
| 123 | 133 | font-family: PingFangSC-Regular; |
| 124 | 134 | font-size: 10px; |
| 125 | 135 | margin-left: 3px; |
| 126 | 136 | margin-top: 5px; |
| 127 | - color: #c6c6c6; | |
| 137 | + color: #AFAFAF; | |
| 128 | 138 | } |
| 129 | - | |
| 139 | +.tags_view{ | |
| 140 | + display:flex; | |
| 141 | + float: right; | |
| 142 | + position: absolute; | |
| 143 | + right: 20px; | |
| 144 | +} | |
| 145 | +.tags1 { | |
| 146 | + background: #f2fdf7; | |
| 147 | + border-radius: 2px; | |
| 148 | + font-size: 12px; | |
| 149 | + margin-left: 10px; | |
| 150 | + color: #58a478; | |
| 151 | + margin-top: 5px; | |
| 152 | +} | |
| 130 | 153 | /*item 分割线*/ |
| 131 | 154 | |
| 132 | 155 | .home__list-item__bottom { |
littleApp_child/pages/feedback/feedback.js
View file @
d562bd7
| ... | ... | @@ -13,43 +13,67 @@ |
| 13 | 13 | var hasMore = true |
| 14 | 14 | |
| 15 | 15 | Page({ |
| 16 | - data: { | |
| 17 | - chooseOne: 0, | |
| 18 | - chooseTwo: 0, | |
| 19 | - chooseThree: 0, | |
| 20 | - content: "" | |
| 16 | + data: { | |
| 17 | + chooseOne: 0, | |
| 18 | + chooseTwo: 0, | |
| 19 | + chooseThree: 0, | |
| 20 | + content: "" | |
| 21 | 21 | |
| 22 | - }, | |
| 23 | - chooseOne: function () { | |
| 24 | - this.setData({ | |
| 25 | - chooseOne: 1, | |
| 26 | - chooseTwo: 0, | |
| 27 | - chooseThree: 0, | |
| 28 | - }) | |
| 29 | - }, | |
| 30 | - chooseTwo: function () { | |
| 31 | - this.setData({ | |
| 32 | - chooseOne: 0, | |
| 33 | - chooseTwo: 1, | |
| 34 | - chooseThree: 0, | |
| 35 | - }) | |
| 36 | - }, | |
| 37 | - chooseThree: function () { | |
| 38 | - this.setData({ | |
| 39 | - chooseOne: 0, | |
| 40 | - chooseTwo: 0, | |
| 41 | - chooseThree: 1, | |
| 42 | - }) | |
| 43 | - }, | |
| 44 | - inputOver: function (e) { | |
| 22 | + }, | |
| 23 | + onLoad: function (e) { | |
| 24 | + wx.getSystemInfo({ | |
| 25 | + success: function (res) { | |
| 26 | + console.log(res) | |
| 27 | + var system = res.system | |
| 28 | + var number = system.split(" ")[1] | |
| 29 | + console.log(system.split(" ")[1]) | |
| 30 | + if (system.split(" ")[0] == "Android") { | |
| 45 | 31 | |
| 46 | - var value = e.detail.value | |
| 47 | - this.setData({ | |
| 48 | - content: value | |
| 49 | - }) | |
| 50 | - }, | |
| 51 | - submit: function () { | |
| 52 | - console.log(this.data.content) | |
| 53 | - } | |
| 32 | + if (number.split(".")[0] >= 6) { | |
| 33 | + console.log("beyond") | |
| 34 | + } else { | |
| 35 | + console.log("not beyond") | |
| 36 | + } | |
| 37 | + } else { | |
| 38 | + console.log("ios") | |
| 39 | + } | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + } | |
| 44 | + }) | |
| 45 | + | |
| 46 | + }, | |
| 47 | + chooseOne: function () { | |
| 48 | + this.setData({ | |
| 49 | + chooseOne: 1, | |
| 50 | + chooseTwo: 0, | |
| 51 | + chooseThree: 0, | |
| 52 | + }) | |
| 53 | + }, | |
| 54 | + chooseTwo: function () { | |
| 55 | + this.setData({ | |
| 56 | + chooseOne: 0, | |
| 57 | + chooseTwo: 1, | |
| 58 | + chooseThree: 0, | |
| 59 | + }) | |
| 60 | + }, | |
| 61 | + chooseThree: function () { | |
| 62 | + this.setData({ | |
| 63 | + chooseOne: 0, | |
| 64 | + chooseTwo: 0, | |
| 65 | + chooseThree: 1, | |
| 66 | + }) | |
| 67 | + }, | |
| 68 | + inputOver: function (e) { | |
| 69 | + | |
| 70 | + var value = e.detail.value | |
| 71 | + this.setData({ | |
| 72 | + content: value | |
| 73 | + }) | |
| 74 | + }, | |
| 75 | + submit: function () { | |
| 76 | + console.log(this.data.content) | |
| 77 | + } | |
| 54 | 78 | }) |