Commit b378f824 by wangyalan-git

首页搜索问题

parent 61cd5dda
......@@ -3,7 +3,10 @@ import VueRouter from 'vue-router'
import Layout from '@/views/layout/Layout'
Vue.use(VueRouter)
const VueRouterPush = VueRouter.prototype.push
VueRouter.prototype.push = function push (to) {
return VueRouterPush.call(this, to).catch(err => err)
}
const routes = [
{
path: '/login',
......
......@@ -8,7 +8,7 @@ import { getToken } from '@/utils/auth'
const service = axios.create({
// baseURL: process.env.BASE_API,
withCredentials: true,
baseURL: 'http://192.168.31.116:8401/mall-portal',
baseURL: 'http://vankefilemanage.jsonpro.cn/mall-portal',
// baseURL: 'http://hhg.api.jsonpro.cn:8201/mall-admin',
timeout: 60000 // 请求超时时间
})
......
......@@ -23,7 +23,7 @@
</template>
</el-table-column>
<el-table-column
width="100">
width="130">
<template slot-scope="scope">
<el-button
type="primary"
......@@ -58,7 +58,7 @@
</template>
</el-table-column>
<el-table-column
width="100">
width="130">
<template slot-scope="scope">
<el-button
@click.native.prevent="handleDown(scope.row)"
......
......@@ -100,6 +100,7 @@ export default {
// 条件查询
handleSearchList () {
this.listQuery.pageNum = 1
console.log('this.listQuery', typeof (this.listQuery.queryTime))
this.$router.push({
path: 'search',
query: {
......
......@@ -90,9 +90,18 @@ export default {
} else {
this.activeIndex = '1'
}
this.getList()
this.init()
},
methods: {
init(){
console.log('this.$route.query.name',this.$route.query.name,this.$route.query)
this.listQuery.name = this.$route.query.name
this.listQuery.typeId = this.$route.query.typeId
this.listQuery.adminName = this.$route.query.adminName
this.listQuery.queryTime = this.$route.query.queryTime
this.listQuery.pageNum = 1
this.getList()
},
getFormat (value) {
if (!value) {
return '--'
......@@ -164,13 +173,7 @@ export default {
watch: {
$route: {
handler (value) {
console.log('this.$route.query.name',this.$route.query.name,this.$route.query)
this.listQuery.name = this.$route.query.name
this.listQuery.typeId = this.$route.query.typeId
this.listQuery.adminName = this.$route.query.adminName
this.listQuery.queryTime = this.$route.query.queryTime
this.listQuery.pageNum = 1
this.getList()
this.init()
},
deep: true
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment