每次点搜索也执行查询

dev
truthhun 11 months ago
parent f2b170d770
commit 635622af73

@ -171,11 +171,10 @@ export default {
onSearch(search) { onSearch(search) {
this.search = { ...this.search, ...search, page: 1 } this.search = { ...this.search, ...search, page: 1 }
if ( if (
location.href.lastIndexOf( location.pathname + location.search ===
this.$router.resolve({ this.$router.resolve({
query: this.search, query: this.search,
}).href }).href
) === 0
) { ) {
this.listArticle() this.listArticle()
} else { } else {

@ -144,11 +144,10 @@ export default {
onSearch(search) { onSearch(search) {
this.search = { ...this.search, ...search, page: 1 } this.search = { ...this.search, ...search, page: 1 }
if ( if (
location.href.lastIndexOf( location.pathname + location.search ===
this.$router.resolve({ this.$router.resolve({
query: this.search, query: this.search,
}).href }).href
) === 0
) { ) {
this.listAttachment() this.listAttachment()
} else { } else {

@ -143,11 +143,10 @@ export default {
onSearch(search) { onSearch(search) {
this.search = { ...this.search, ...search, page: 1 } this.search = { ...this.search, ...search, page: 1 }
if ( if (
location.href.lastIndexOf( location.pathname + location.search ===
this.$router.resolve({         this.$router.resolve({
query: this.search,           query: this.search,
}).href         }).href
) === 0
) { ) {
this.listBanner() this.listBanner()
} else { } else {

@ -175,11 +175,10 @@ export default {
onSearch(search) { onSearch(search) {
this.search = { ...this.search, ...search, page: 1 } this.search = { ...this.search, ...search, page: 1 }
if ( if (
location.href.lastIndexOf( location.pathname + location.search ===
this.$router.resolve({         this.$router.resolve({
query: this.search,           query: this.search,
}).href         }).href
) === 0
) { ) {
this.listComment() this.listComment()
} else { } else {

@ -130,11 +130,10 @@ export default {
onSearch(search) { onSearch(search) {
this.search = { ...this.search, ...search, page: 1 } this.search = { ...this.search, ...search, page: 1 }
if ( if (
location.href.lastIndexOf( location.pathname + location.search ===
this.$router.resolve({         this.$router.resolve({
query: this.search,           query: this.search,
}).href         }).href
) === 0
) { ) {
this.listCategory() this.listCategory()
} else { } else {

@ -298,11 +298,10 @@ export default {
onSearch(search) { onSearch(search) {
this.search = { ...this.search, ...search, page: 1 } this.search = { ...this.search, ...search, page: 1 }
if ( if (
location.href.lastIndexOf( location.pathname + location.search ===
this.$router.resolve({         this.$router.resolve({
query: this.search,           query: this.search,
}).href         }).href
) === 0
) { ) {
this.listDocument() this.listDocument()
} else { } else {

@ -214,11 +214,10 @@ export default {
onSearch(search) { onSearch(search) {
this.search = { ...this.search, ...search, page: 1 } this.search = { ...this.search, ...search, page: 1 }
if ( if (
location.href.lastIndexOf( location.pathname + location.search ===
this.$router.resolve({         this.$router.resolve({
query: this.search,           query: this.search,
}).href         }).href
) === 0
) { ) {
this.listDocument() this.listDocument()
} else { } else {

@ -150,11 +150,10 @@ export default {
onSearch(search) { onSearch(search) {
this.search = { ...this.search, ...search, page: 1 } this.search = { ...this.search, ...search, page: 1 }
if ( if (
location.href.lastIndexOf( location.pathname + location.search ===
this.$router.resolve({         this.$router.resolve({
query: this.search,           query: this.search,
}).href         }).href
) === 0
) { ) {
this.$router.push({ this.$router.push({
query: this.search, query: this.search,

@ -160,11 +160,10 @@ export default {
onSearch(search) { onSearch(search) {
this.search = { ...this.search, ...search, page: 1 } this.search = { ...this.search, ...search, page: 1 }
if ( if (
location.href.lastIndexOf( location.pathname + location.search ===
this.$router.resolve({         this.$router.resolve({
query: this.search,           query: this.search,
}).href         }).href
) === 0
) { ) {
this.listNavigation() this.listNavigation()
} else { } else {

@ -155,11 +155,10 @@ export default {
onSearch(search) { onSearch(search) {
this.search = { ...this.search, ...search, page: 1 } this.search = { ...this.search, ...search, page: 1 }
if ( if (
location.href.lastIndexOf( location.pathname + location.search ===
this.$router.resolve({         this.$router.resolve({
query: this.search,           query: this.search,
}).href         }).href
) === 0
) { ) {
this.listReport() this.listReport()
} else { } else {

@ -175,11 +175,10 @@ export default {
onSearch(search) { onSearch(search) {
this.search = { ...this.search, ...search, page: 1 } this.search = { ...this.search, ...search, page: 1 }
if ( if (
location.href.lastIndexOf( location.pathname + location.search ===
this.$router.resolve({         this.$router.resolve({
query: this.search,           query: this.search,
}).href         }).href
) === 0
) { ) {
this.listGroup() this.listGroup()
} else { } else {

@ -196,11 +196,10 @@ export default {
onSearch(search) { onSearch(search) {
this.search = { ...this.search, ...search, page: 1 } this.search = { ...this.search, ...search, page: 1 }
if ( if (
location.href.lastIndexOf( location.pathname + location.search ===
this.$router.resolve({         this.$router.resolve({
query: this.search,           query: this.search,
}).href         }).href
) === 0
) { ) {
this.listUser() this.listUser()
} else { } else {

@ -133,11 +133,10 @@ export default {
onSearch(search) { onSearch(search) {
this.search = { ...this.search, ...search, page: 1 } this.search = { ...this.search, ...search, page: 1 }
if ( if (
location.href.lastIndexOf( location.pathname + location.search ===
this.$router.resolve({         this.$router.resolve({
query: this.search,           query: this.search,
}).href         }).href
) === 0
) { ) {
this.listPermission() this.listPermission()
} else { } else {

@ -240,11 +240,10 @@ export default {
page: 1, page: 1,
} }
if ( if (
location.href.lastIndexOf( location.pathname + location.search ===
this.$router.resolve({         this.$router.resolve({
query: this.search,           query: this.search,
}).href         }).href
) === 0
) { ) {
this.listPunishment() this.listPunishment()
} else { } else {

Loading…
Cancel
Save