zhashaonan 6 years atrás
parent
commit
ae718b5f93

+ 3 - 0
pages/components/blockItem/blockItem.wxml

@@ -1,6 +1,9 @@
 <block wx:if="{{item_data.show_type == 'image' || item_data.type == 'image'}}">
   <image bindtap="navigator" data-title="{{item_data.title}}" data-target="{{item_data.data}}" data-type="{{item_data.type}}" mode="{{block_type == 'home3'?'scaleToFill':'widthFix'}}" src="{{item_data.image}}" style="width:{{block_type == 'home3'?(item_data.width/1080*750)+'rpx':''}}; height:{{block_type == 'home3'?(item_data.height/1080*750)+'rpx':''}};flex:1;" lazy-load="true" class='{{imgShow? "show" : "hide"}}' bindload='load'></image>
 </block>
+<block wx:elif="{{item_data.show_type == 'goods_simple' || item_data.type == 'goods_simple'}}">
+    <image bindtap="navigator" data-title="{{item_data.title}}" data-target="{{item_data.data}}" data-type="{{item_data.type}}" mode="{{block_type == 'home3'?'scaleToFill':'widthFix'}}" src="{{item_data.image}}" style="width:{{block_type == 'home3'?(item_data.width/1080*750)+'rpx':''}}; height:{{block_type == 'home3'?(item_data.height/1080*750)+'rpx':''}};flex:1;" lazy-load="true" class='{{imgShow? "show" : "hide"}}' bindload='load'></image>
+  </block>
 
 <block wx:elif="{{item_data.show_type == 'brand'|| item_data.type == 'brand'}}">
     <image src="{{item_data.image}}" bindload='load' class='{{imgShow? "show" : "hide"}}' lazy-load="true" mode='widthFix' style='min-height:250rpx;' data-title="{{item_data.title}}"></image>

+ 2 - 0
pages/components/blocks/horizon/horizon.js

@@ -13,6 +13,8 @@ Component({
   },
 
   attached() {
+    console.log('specialData.item_type :', this.properties.specialData);
+    console.log('items :', this.properties.items);
     let has_margin = this.properties.specialData.has_margin;
     let sub_items_length = this.properties.specialData.items.length;
     let firstSubWidth = this.properties.specialData.items[0].width;

+ 4 - 1
pages/components/blocks/horizon/horizon.wxml

@@ -1,7 +1,10 @@
 <view style="background-image:url('{{specialData.bg_data?specialData.bg_data:''}}');background-size:100% 100%;">
     <scroll-view scroll-x="true" style="white-space: nowrap; display: flex;justify-content:space-between;margin-left:10rpx;margin-right:10rpx;">
         <block wx:key="{{item}}" wx:for="{{items}}">
-            <view style="display:inline-block;margin-left:10rpx;margin-right:10rpx;;width:{{(item.width/1080*750)+'rpx'}}; height:{{(item.height/1080*750)+'rpx'}}">
+            <view wx:if="{{specialData.item_type == 'horizon_goods'}}" style="display:inline-block;margin-left:10rpx;margin-right:10rpx;;width:{{(item.width/1080*750) /specialData.scale +'rpx'}}; height:{{(item.height/1080*750) / specialData.scale+'rpx'}}">
+              <blockItem item_data="{{item}}"></blockItem>
+            </view>
+            <view wx:else style="display:inline-block;margin-left:10rpx;margin-right:10rpx;;width:{{(item.width/1080*750)+'rpx'}}; height:{{(item.height/1080*750)+'rpx'}}">
               <blockItem item_data="{{item}}"></blockItem>
             </view>
         </block>

+ 2 - 0
pages/details/details.wxss

@@ -177,9 +177,11 @@
   padding: 30rpx 30rpx 0;
 }
 .comments_box.view_img image {
+  display: block;
   width: 100%!important;
 }
 .comments_box.view_img image.desc_anchor {
+  display: block;
   width: 1px!important;
 }
 .comments_header {

+ 2 - 9
pages/shareBonus/shareBonus.js

@@ -21,7 +21,7 @@ Page({
     input_msg: '',
     result_msg: '留言',
     summarys: false,
-    userInfo: null,
+    userInfo: app.globalData.userInfo,
     options: ''
   },
 
@@ -33,14 +33,7 @@ Page({
     this.setData({
       options
     })
-    app.userInfoReadyCallback = res => {
-      if (app.globalData.userInfo) {
-        self.init(options)
-        self.setData({
-          userInfo: app.globalData.userInfo
-        })
-      }
-    }
+
     if (app.globalData.userInfo) {
       self.init(options)
       self.setData({