Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
songxia-wxherr
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
songxia-wxherr
Commits
04ba505a
Commit
04ba505a
authored
Jun 16, 2017
by
杨培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去登录,优化搜索
parent
21dbacf0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
26 deletions
+14
-26
home.vue
src/pages/home.vue
+14
-26
No files found.
src/pages/home.vue
View file @
04ba505a
...
...
@@ -193,14 +193,11 @@ export default {
},
searchable
()
{
return
!
(
this
.
categoryId
==
0
||
this
.
code
==
''
||
(
this
.
isUseCaptcha
&&
!
this
.
isCheckCaptcha
));
},
targetUrl
()
{
return
{
path
:
'/code/'
+
this
.
brandId
+
'/'
+
this
.
categoryId
,
query
:
{
code
:
this
.
code
}};
},
}
},
mounted
()
{
this
.
isBanshou
=
common
.
isBanshou
();
// this.checkLogin();
var
self
=
this
;
document
.
title
=
'松下快查'
;
...
...
@@ -316,8 +313,11 @@ export default {
searchCode
()
{
var
self
=
this
;
if
(
!
self
.
searchable
)
{
if
(
self
.
blurSearch
)
{
self
.
blurSearch
=
false
;
}
if
(
!
self
.
searchable
)
{
return
false
;
}
...
...
@@ -347,20 +347,13 @@ export default {
return
;
}
var
url
=
common
.
getUrl
(
'#/code/'
+
self
.
brandId
+
'/'
+
self
.
categoryId
)
+
"?code="
+
encodeURIComponent
(
code
)
+
"&t="
+
res
.
data
.
tk
;
var
invite
=
common
.
getParameterByName
(
'invite'
);
if
(
invite
)
{
url
=
url
+
'&invite='
+
invite
}
if
(
!
self
.
isLogin
)
{
common
.
requestLogin
(
url
);
return
false
;
}
self
.
$router
.
push
(
self
.
targetUrl
);
self
.
$router
.
push
({
path
:
'/code/'
+
self
.
brandId
+
'/'
+
self
.
categoryId
,
query
:
{
code
:
code
,
tk
:
res
.
data
.
tk
}
});
});
return
false
;
...
...
@@ -428,12 +421,7 @@ export default {
onSelect
:
function
(
item
)
{
if
(
self
.
code
!=
item
.
data
)
{
self
.
code
=
item
.
data
;
if
(
!
self
.
searchable
)
{
self
.
blurSearch
=
false
;
}
else
{
self
.
searchCode
();
}
self
.
searchCode
();
}
}
});
...
...
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