Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
xuqi
10 years ago
Commit
fa18620fc51334e54bdbfb392adc12ae54944b3e
1 parent
2a9651ba
search
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
25 deletions
static/js/index/search.js
static/sass/index/_search.scss
template/m.yohobuy.com/actions/index/search/index.phtml
template/m.yohobuy.com/actions/product/list/index.phtml
static/js/index/search.js
View file @
fa18620
...
...
@@ -24,23 +24,6 @@ $('#clear-history').bind('touchstart', function() {
});
});
$
(
'#search'
).
bind
(
'touchstart'
,
function
()
{
var
val
=
$input
.
val
();
$
.
ajax
({
type
:
'POST'
,
url
:
'/search'
,
data
:
{
val
:
val
},
success
:
function
(
data
)
{
if
(
data
.
code
===
200
)
{
location
.
href
=
data
.
data
;
}
}
});
});
$input
.
bind
(
'input'
,
function
()
{
if
(
$input
.
val
()
===
''
)
{
$clear
.
addClass
(
'hide'
);
...
...
static/sass/index/_search.scss
View file @
fa18620
...
...
@@ -9,6 +9,7 @@
font-size
:
12px
;
top
:
16px
;
left
:
24px
;
color
:
#b2b2b2
;
}
input
{
...
...
@@ -24,6 +25,7 @@
position
:
absolute
;
top
:
12px
;
right
:
50px
;
color
:
#b2b2b2
;
}
.search
{
...
...
template/m.yohobuy.com/actions/index/search/index.phtml
View file @
fa18620
...
...
@@ -2,10 +2,12 @@
<div
class=
"search-page yoho-page"
>
{
{#
search
}
}
<div
id=
"search-input"
class=
"search-input"
>
<i
class=
"search-icon iconfont"
>
60
f;</i>
<input
type=
"text"
placeholder=
"搜索商品"
>
<i
class=
"clear-input iconfont hide"
>
61
a;</i>
<button
id=
"search"
class=
"search"
>搜索</button>
<form
action=
"/product/list/index"
method=
"get"
>
<i
class=
"search-icon iconfont"
>
60
f;</i>
<input
type=
"text"
placeholder=
"搜索商品"
name=
"query"
>
<i
class=
"clear-input iconfont hide"
>
626
;</i>
<button
id=
"search"
class=
"search"
type=
"submit"
>搜索</button>
</form>
</div>
<div
class=
"search-items"
>
<div
class=
"hot-search"
>
...
...
template/m.yohobuy.com/actions/product/list/index.phtml
View file @
fa18620
...
...
@@ -3,10 +3,12 @@
{
{#
goodList
}
}
{
{#
search
}
}
<div
id=
"search-input"
class=
"search-input"
>
<i
class=
"search-icon iconfont"
>
60
f;</i>
<input
type=
"text"
value=
{
{default
}
}>
<i
class=
"clear-input iconfont hide"
>
61
a;</i>
<button
id=
"search"
class=
"search"
>搜索</button>
<form
action=
"/product/list/index"
method=
"get"
>
<i
class=
"search-icon iconfont"
>
60
f;</i>
<input
type=
"text"
value=
{
{default
}
}
name=
"query"
>
<i
class=
"clear-input iconfont hide"
>
61
a;</i>
<button
id=
"search"
class=
"search"
type=
"submit"
>搜索</button>
</form>
</div>
{
{/
search
}
}
...
...
Please
register
or
login
to post a comment