Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
file
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vanke
file
Commits
b378f824
Commit
b378f824
authored
Jul 14, 2020
by
wangyalan-git
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页搜索问题
parent
61cd5dda
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
13 deletions
+20
-13
index.js
src/router/index.js
+4
-1
request.js
src/utils/request.js
+1
-1
index.vue
src/views/home/index.vue
+2
-2
Header.vue
src/views/layout/modules/Header.vue
+2
-1
index.vue
src/views/search/index.vue
+11
-8
No files found.
src/router/index.js
View file @
b378f824
...
@@ -3,7 +3,10 @@ import VueRouter from 'vue-router'
...
@@ -3,7 +3,10 @@ import VueRouter from 'vue-router'
import
Layout
from
'@/views/layout/Layout'
import
Layout
from
'@/views/layout/Layout'
Vue
.
use
(
VueRouter
)
Vue
.
use
(
VueRouter
)
const
VueRouterPush
=
VueRouter
.
prototype
.
push
VueRouter
.
prototype
.
push
=
function
push
(
to
)
{
return
VueRouterPush
.
call
(
this
,
to
).
catch
(
err
=>
err
)
}
const
routes
=
[
const
routes
=
[
{
{
path
:
'/login'
,
path
:
'/login'
,
...
...
src/utils/request.js
View file @
b378f824
...
@@ -8,7 +8,7 @@ import { getToken } from '@/utils/auth'
...
@@ -8,7 +8,7 @@ import { getToken } from '@/utils/auth'
const
service
=
axios
.
create
({
const
service
=
axios
.
create
({
// baseURL: process.env.BASE_API,
// baseURL: process.env.BASE_API,
withCredentials
:
true
,
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',
// baseURL: 'http://hhg.api.jsonpro.cn:8201/mall-admin',
timeout
:
60000
// 请求超时时间
timeout
:
60000
// 请求超时时间
})
})
...
...
src/views/home/index.vue
View file @
b378f824
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
width=
"1
0
0"
>
width=
"1
3
0"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
width=
"1
0
0"
>
width=
"1
3
0"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-button
@
click
.
native
.
prevent=
"handleDown(scope.row)"
@
click
.
native
.
prevent=
"handleDown(scope.row)"
...
...
src/views/layout/modules/Header.vue
View file @
b378f824
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
<el-button
@
click=
"handleSearchList()"
<el-button
@
click=
"handleSearchList()"
type=
"primary"
type=
"primary"
size=
"small"
size=
"small"
style=
"margin-left: 20px;"
>
style=
"margin-left: 20px;"
>
搜索
搜索
</el-button>
</el-button>
<el-button
@
click=
"handleResetSearch()"
<el-button
@
click=
"handleResetSearch()"
...
@@ -100,6 +100,7 @@ export default {
...
@@ -100,6 +100,7 @@ export default {
// 条件查询
// 条件查询
handleSearchList
()
{
handleSearchList
()
{
this
.
listQuery
.
pageNum
=
1
this
.
listQuery
.
pageNum
=
1
console
.
log
(
'this.listQuery'
,
typeof
(
this
.
listQuery
.
queryTime
))
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'search'
,
path
:
'search'
,
query
:
{
query
:
{
...
...
src/views/search/index.vue
View file @
b378f824
...
@@ -90,9 +90,18 @@ export default {
...
@@ -90,9 +90,18 @@ export default {
}
else
{
}
else
{
this
.
activeIndex
=
'1'
this
.
activeIndex
=
'1'
}
}
this
.
getLis
t
()
this
.
ini
t
()
},
},
methods
:
{
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
)
{
getFormat
(
value
)
{
if
(
!
value
)
{
if
(
!
value
)
{
return
'--'
return
'--'
...
@@ -164,13 +173,7 @@ export default {
...
@@ -164,13 +173,7 @@ export default {
watch
:
{
watch
:
{
$route
:
{
$route
:
{
handler
(
value
)
{
handler
(
value
)
{
console
.
log
(
'this.$route.query.name'
,
this
.
$route
.
query
.
name
,
this
.
$route
.
query
)
this
.
init
()
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
()
},
},
deep
:
true
deep
:
true
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment