bayi %!s(int64=2) %!d(string=hai) anos
pai
achega
6509a85f9b

+ 6 - 2
pages/childClassify/index.js

@@ -21,7 +21,8 @@ Page({
     scrollTop: 0,
     text: '',
     currentId: '',
-    navBarTitle: ''
+    navBarTitle: '',
+    historySearch: wx.getStorageSync('search')
   },
   /**
    * 生命周期函数--监听页面加载
@@ -92,9 +93,12 @@ Page({
       title: this.data.text,
       grade: this.data.userInfo.grade
     })
+    console.log(list);
     this.setData({
-      list
+      list,
+      historySearch: [...this.data.historySearch, this.data.text]
     })
+    wx.setStorageSync('search', this.data.historySearch)
   },
   goRead({
     currentTarget

+ 11 - 0
pages/childClassify/index.less

@@ -166,6 +166,17 @@
       }
     }
   }
+
+  .historyList {
+    .notes {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      .clock{
+        
+      }
+    }
+  }
 }
 
 .empty {

+ 12 - 1
pages/childClassify/index.wxml

@@ -13,6 +13,17 @@
       <image src="/static/search-2.png" class="img" />
     </view>
   </view>
+  <view class="historyList">
+    <view class="notes">
+      <view class="left">
+        <image src="/static/clock.png" class="clock" />
+        哈哈啊污染哇额哇
+      </view>
+      <view class="delete">
+        ×
+      </view>
+    </view>
+  </view>
   <!-- 内容区域 -->
   <scroll-view wx:if="{{list.length>0}}" class="worksList" style="{{childType?'padding-top:10rpx':''}}" scroll-y="true"
     enhanced show-scrollbar="{{false}}" scroll-top="{{scrollTop}}" bindscrolltolower='loadMore'>
@@ -41,5 +52,5 @@
       <view class="goRead">去朗读</view>
     </view>
   </scroll-view>
-  <emptyBg wx:if="{{type=='search'&&list.length==0}}" message="没有找到想要的内容~"></emptyBg>
+  <!-- <emptyBg wx:if="{{type=='search'&&list.length==0}}" message="没有找到想要的内容~"></emptyBg> -->
 </view>

+ 5 - 0
pages/childClassify/index.wxss

@@ -145,6 +145,11 @@
   box-shadow: 0 4rpx 10rpx 0 rgba(50, 197, 255, 0.46);
   border-radius: 50rpx;
 }
+.classBox .historyList .notes {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
 .empty {
   margin-top: 300rpx;
 }

BIN=BIN
static/clock.png