Commit 17431775bab3459adc7dc8bcecf1533bea43d5f6

Authored by luoye
1 parent acef4ab642

文章详情图

Showing 2 changed files with 7 additions and 7 deletions

littleApp_child/pages/childcare_knowledge_detail/childcare_knowledge_detail.js View file @ 1743177
... ... @@ -11,14 +11,13 @@
11 11 data: {
12 12  
13 13 knowledge: null,
14   - images: [
15   - 'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg',
16   - ],
  14 + images: [],
17 15 titles: ["日常护理", "营养美食", "疾病护理", "亲子互动", "言传qq"],
18 16 id: 0,
19 17 category: '',
20 18 current_index: 0,
21   - title:''
  19 + title:'',
  20 + swiperHeight:0
22 21 },
23 22 onLoad: function (options) {
24 23 // this.data.id = e.id
... ... @@ -82,7 +81,8 @@
82 81 console.log('数据-----',res)
83 82 res.data.content = util.convertHtmlToText(res.data.content)
84 83 self.setData({
85   - knowledge: res.data
  84 + knowledge: res.data,
  85 + swiperHeight: wx.getSystemInfoSync().windowWidth * 0.55
86 86 })
87 87 }, function (res) {
88 88  
littleApp_child/pages/childcare_knowledge_detail/childcare_knowledge_detail.wxml View file @ 1743177
... ... @@ -9,10 +9,10 @@
9 9 <view class="content_time">{{knowledge.time}}</view>
10 10 </view>
11 11  
12   - <swiper hidden="{{images.length > 0 ? false : true}}" class="swiper" indicator-dots="true" indicator-active-color="#ffffff">
  12 + <swiper style="height:{{swiperHeight}}px" hidden="{{knowledge.image ? false : true}}" class="swiper" indicator-dots="true" indicator-active-color="#ffffff">
13 13 <block wx:for="{{[knowledge.image]}}">
14 14 <swiper-item>
15   - <image src="{{item.medium}}"></image>
  15 + <image src="{{item.real}}" mode="aspectFill"></image>
16 16 </swiper-item>
17 17 </block>
18 18 </swiper>