|
@@ -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 || ''}`
|
|
|
});
|
|
|
},
|