lx 5 anos atrás
pai
commit
3060289699
2 arquivos alterados com 7 adições e 5 exclusões
  1. 5 3
      pages/index/index.js
  2. 2 2
      pages/index/index.wxml

+ 5 - 3
pages/index/index.js

@@ -103,7 +103,7 @@ Page({
         reward: "Reuters.美股异动|波音(BA.US)737MAX客...",
         time:"5天前"
       },
-      
+
  
     ],
 
@@ -122,7 +122,7 @@ Page({
     // }).exec();
 },
   onLoad: function () {
-    this.computeScrollViewHeight();
+    // this.computeScrollViewHeight();
     // if (app.globalData.userInfo) {
     //   this.setData({
     //     userInfo: app.globalData.userInfo,
@@ -164,7 +164,7 @@ Page({
       let windowWidth = wx.getSystemInfoSync().windowWidth
       let height = windowHeight - topHeight - searchHeight - titleHeight
       let ratio = 750 / windowWidth
-      let scrollHeight = height * ratio - 50
+      let scrollHeight = height * ratio + 20
       that.setData({ scrollHeight: scrollHeight})
     })
   },
@@ -174,6 +174,7 @@ Page({
      imagewidth: imageSize.imageWidth, 
      imageheight: imageSize.imageHeight 
     }) 
+    this.computeScrollViewHeight();
    },
   getUserInfo: function(e) {
     console.log(e)
@@ -182,6 +183,7 @@ Page({
       userInfo: e.detail.userInfo,
       hasUserInfo: true
     })
+   
   }
 
 })

+ 2 - 2
pages/index/index.wxml

@@ -7,7 +7,7 @@
       <text class="userinfo-nickname">{{userInfo.nickName}}</text>
     </block> -->
     <!-- <image class="imageSize" src="{{url}}" mode="widthFix"></image> -->
-    <image style="width: {{imagewidth}}px; height: {{imageheight}}px;" src="{{url}}" bindload="imageLoad"></image> 
+    <image class="image" style="width: {{imagewidth}}px; height: {{imageheight}}px;" src="{{url}}" bindload="imageLoad"></image> 
   </view>
   <view class="search">
     <input class="weui-input" placeholder="请输入板块代码"/>
@@ -36,7 +36,7 @@
     <!-- <scroll-view scroll-y style='height:500rpx' class="tab"> -->
     <scroll-view scroll-y="true"  style='height: {{scrollHeight}}rpx' class="tab">
             <block wx:for-index="idx" wx:for='{{aa}}' wx:key="key">
-            <view class='content-item'>
+            <view class='content-item' >
               <text class='from' >{{item.from}}</text>
               <text class='name'>{{item.nickName}}</text>
               <text class='wawa'>{{item.reward}}</text>