bayi 2 anos atrás
pai
commit
b9824e3b70
2 arquivos alterados com 14 adições e 14 exclusões
  1. 7 7
      pages/childClassify/index.js
  2. 7 7
      pages/searchFriend/index.js

+ 7 - 7
pages/childClassify/index.js

@@ -34,12 +34,12 @@ Page({
       });
       this.resetData();
     }
-    tt.setNavigationBarTitle({
+    wx.setNavigationBarTitle({
       title: options.title || '搜索'
     });
     this.setData({
       type: options.type,
-      historySearch: tt.getStorageSync('search'),
+      historySearch: wx.getStorageSync('search'),
       navBarTitle: options.title
     });
     this.storeBindings = createStoreBindings(this, {
@@ -100,7 +100,7 @@ Page({
       this.setData({
         historySearch: [this.data.text, ...this.data.historySearch].slice(0, 20)
       });
-      tt.setStorageSync('search', this.data.historySearch);
+      wx.setStorageSync('search', this.data.historySearch);
     }
     this.setData({
       list,
@@ -124,10 +124,10 @@ Page({
     this.setData({
       historySearch: newList.slice(0, 20)
     });
-    tt.setStorageSync('search', this.data.historySearch);
+    wx.setStorageSync('search', this.data.historySearch);
   },
   clearHistory() {
-    tt.showModal({
+    wx.showModal({
       title: '温馨提示',
       content: '历史记录清除后无法恢复,是否清除全部记录',
       success: res => {
@@ -135,7 +135,7 @@ Page({
           this.setData({
             historySearch: []
           });
-          tt.setStorageSync('search', this.data.historySearch);
+          wx.setStorageSync('search', this.data.historySearch);
         }
       }
     });
@@ -143,7 +143,7 @@ Page({
   goRead({
     currentTarget
   }) {
-    tt.navigateTo({
+    wx.navigateTo({
       url: `/pages/reading/index?videoId=${currentTarget.dataset.id}&navBarTitle=${this.data.navBarTitle || ''}`
     });
   },

+ 7 - 7
pages/searchFriend/index.js

@@ -8,7 +8,7 @@ Page({
   },
   onShow() {
     this.setData({
-      historySearch: tt.getStorageSync('userSearch')
+      historySearch: wx.getStorageSync('userSearch')
     });
     this.resetData();
   },
@@ -45,7 +45,7 @@ Page({
         historySearch: [this.data.text, ...this.data.historySearch].slice(0, 20)
       });
     }
-    tt.setStorageSync('userSearch', this.data.historySearch);
+    wx.setStorageSync('userSearch', this.data.historySearch);
   },
   deleteHistory({
     currentTarget
@@ -56,10 +56,10 @@ Page({
     this.setData({
       historySearch: newList.slice(0, 20)
     });
-    tt.setStorageSync('userSearch', this.data.historySearch);
+    wx.setStorageSync('userSearch', this.data.historySearch);
   },
   clearHistory() {
-    tt.showModal({
+    wx.showModal({
       title: '温馨提示',
       content: '历史记录清除后无法恢复,是否清除全部记录',
       success: res => {
@@ -67,7 +67,7 @@ Page({
           this.setData({
             historySearch: []
           });
-          tt.setStorageSync('search', this.data.historySearch);
+          wx.setStorageSync('search', this.data.historySearch);
         }
       }
     });
@@ -84,7 +84,7 @@ Page({
     currentTarget
   }) {
     let uid = currentTarget.dataset.uid;
-    tt.navigateTo({
+    wx.navigateTo({
       url: `/pages/personal/index?uid=${uid}`
     });
   },
@@ -104,7 +104,7 @@ Page({
       this.setData({
         list: listCopy
       });
-      tt.showToast({
+      wx.showToast({
         title: '已关注',
         icon: 'none'
       });