|
@@ -192,7 +192,12 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
try {
|
|
|
- this.$router.replace(`/search?text=${this.searchQuery.text}`)
|
|
|
+ const currentPath = this.$route.fullPath;
|
|
|
+ const targetPath = `/search?text=${encodeURIComponent(this.searchQuery.text)}`;
|
|
|
+
|
|
|
+ if (currentPath !== targetPath) {
|
|
|
+ this.$router.replace(targetPath);
|
|
|
+ }
|
|
|
} catch (error) {}
|
|
|
},
|
|
|
getSearchState: function (search) {
|
|
@@ -273,7 +278,7 @@ export default {
|
|
|
onPageChange (p) {
|
|
|
this.listState.pageNum = p
|
|
|
this.getList()
|
|
|
- scrollTargetView('.search-result-list')
|
|
|
+ scrollTargetView('.sort-list')
|
|
|
},
|
|
|
onSizeChange (size) {
|
|
|
this.listState.pageSize = size
|