修改分页效果显示

master
于肖磊 2026-02-26 16:05:10 +08:00
parent 65fe63f1b5
commit 59b26a3640
2 changed files with 12 additions and 5 deletions

View File

@ -147,7 +147,7 @@ export default {
menu_button_info: menu_button_info
});
//
this.search_history = uni.getStorageSync('search_history_key') || [];
this.search_history = uni.getStorageSync('cache_plugins_video_search_history_key') || [];
if (this.search_history.length > 0) {
this.show_search_history = this.search_history.filter((item, index) => index < 5);
} else {
@ -193,7 +193,7 @@ export default {
//
if (!isEmpty(e) && !this.search_history.includes(e)) {
this.search_history.push(e);
uni.setStorageSync('search_history_key', this.search_history);
uni.setStorageSync('cache_plugins_video_search_history_key', this.search_history);
}
this.search_query = e;
//
@ -212,7 +212,7 @@ export default {
this.search_history.splice(newIndex, 1);
}
this.show_search_history.splice(index, 1);
uni.setStorageSync('search_history_key', this.search_history);
uni.setStorageSync('cache_plugins_video_search_history_key', this.search_history);
},
perform_url(e) {
const url = e?.currentTarget?.dataset?.url || '';
@ -235,7 +235,7 @@ export default {
});
},
clear_history() {
uni.setStorageSync('search_history_key', []);
uni.setStorageSync('cache_plugins_video_search_history_key', []);
this.setData({
search_history: [],
show_search_history: [],

View File

@ -154,7 +154,8 @@ export default {
data_tabs_loding_status: 1,
data_tabs_loding_msg: '',
data_list_loding_status: 1,
data_list_loding_msg: ''
data_list_loding_msg: '',
search_history: [],
};
},
onLoad(params) {
@ -207,6 +208,8 @@ export default {
})
.exec(); //
}, 500);
this.search_history = uni.getStorageSync('cache_plugins_video_search_history_key') || [];
//
this.init_data();
},
@ -263,6 +266,10 @@ export default {
data_list_loding_status: 1,
recommend_videos: []
})
if (!isEmpty(e) && !this.search_history.includes(e)) {
this.search_history.push(e);
uni.setStorageSync('cache_plugins_video_search_history_key', this.search_history);
}
//
this.load_recommend_videos();
},