zrug 5 bulan lalu
induk
melakukan
ce4d301c71
2 mengubah file dengan 4 tambahan dan 5 penghapusan
  1. 3 3
      pages/index/index.js
  2. 1 2
      pages/index/index.wxml

+ 3 - 3
pages/index/index.js

@@ -86,10 +86,10 @@ Page({
       .select('.container')
       .boundingClientRect((rect) => {
         if (rect) {
-          const shouldBarandBeMini = rect.top <= -480; // 在container上移到-480px时,品牌栏mini出现
-          if (this.data.isBrandMini !== shouldBarandBeMini) {
+          const shouldBrandBeMini = rect.top <= -480; // 在container上移到-480px时,品牌栏mini出现
+          if (this.data.isBrandMini !== shouldBrandBeMini) {
             this.setData({
-              isBrandMini: shouldBarandBeMini
+              isBrandMini: shouldBrandBeMini
             });
           }
           const shouldCategoryBeMini = rect.top <= -680; // 在container上移到-680px时,分类栏mini出现

+ 1 - 2
pages/index/index.wxml

@@ -29,7 +29,6 @@
     </view>
   </view>
   <view class="brand-bar">
-    brand-bar
     <view wx:for="{{ipInfoList}}" wx:key="index" class="brand-item">
       <image src="{{item.ipUrl}}" data-item="{{item}}" class="brand-image"></image>
       <text class="brand-name">{{item.name}}</text>
@@ -37,7 +36,7 @@
     </view>
   </view>
   <view class="brand-bar mini" style="{{isBrandMini ? 'opacity: 1;' : 'opacity: 0;'}}">
-    brand-bar
+    brand mini
     <view wx:for="{{ipInfoList}}" wx:key="index" class="brand-item">
       <image src="{{item.ipUrl}}" data-item="{{item}}" class="brand-image"></image>
       <text class="brand-name">{{item.name}}</text>