Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
施宇
/
icsales
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
674156f9
authored
Jul 24, 2019
by
施宇
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1111
parent
bfe2b744
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
16 deletions
dist/js/home/index.js
dist/js/index/search.js
dist/js/search/index.js
dist/js/home/index.js
View file @
674156f9
...
...
@@ -71,14 +71,15 @@ $(function () {
$
(
this
).
addClass
(
'active'
).
siblings
().
removeClass
(
'active'
)
});
$
(
'.input_btn'
).
click
(
function
()
{
var
key
=
$
.
trim
(
$
(
'.search-input'
).
val
());
if
(
key
.
length
<
3
)
{
var
val
=
$
.
trim
(
$
(
'.search-input'
).
val
());
if
(
!
val
.
length
)
{
layer
.
msg
(
'搜索内容不能为空'
)
}
else
if
(
val
.
length
<
3
)
{
layer
.
msg
(
'搜索内容太短'
)
}
else
{
window
.
location
.
href
=
"/search?key="
+
key
+
'&type=1&time=1'
;
window
.
location
.
href
=
"/search?key="
+
val
+
'&type=1&time=1'
;
}
});
$
(
'.home_content'
).
on
(
'click'
,
'.newXjIcon'
,
function
()
{
window
.
location
.
href
=
"/roborder"
...
...
dist/js/index/search.js
View file @
674156f9
...
...
@@ -61,26 +61,27 @@ $(function () {
var
self
=
this
;
$
(
'.search_nav li'
).
on
(
'click'
,
function
()
{
var
index
=
$
(
this
).
index
();
if
(
$
(
this
).
hasClass
(
'active'
))
{
if
(
$
(
this
).
hasClass
(
'active'
))
{
return
}
$
(
this
).
addClass
(
'active'
).
siblings
().
removeClass
(
'active'
);
$
(
".goods_data_list"
).
empty
();
$
(
'.nav_title'
).
find
(
'span'
).
text
(
0
);
if
(
index
==
0
)
{
if
(
index
==
0
)
{
self
.
type
=
1
}
else
{
}
else
{
self
.
type
=
2
}
$
(
'.jt'
).
click
();
});
$
(
'.input_btn'
).
on
(
'click'
,
function
()
{
var
len
=
$
.
trim
(
$
(
'.input-search'
).
val
());
if
(
len
<
3
)
{
var
val
=
$
.
trim
(
$
(
'.input-search'
).
val
());
if
(
!
val
.
length
)
{
layer
.
msg
(
'搜索内容不能为空'
)
}
else
if
(
val
.
length
<
3
)
{
layer
.
msg
(
'搜索内容太短'
)
}
else
{
var
val
=
$
(
'.input-search'
).
val
();
window
.
location
.
replace
(
"/indexsearch?key="
+
val
+
'&type='
+
self
.
type
+
'&time='
+
self
.
time
);
window
.
location
.
replace
(
"/indexsearch?key="
+
val
+
'&type='
+
self
.
type
+
'&time='
+
self
.
time
);
}
});
$
(
'.zz'
).
on
(
'click'
,
'.fl'
,
function
()
{
...
...
@@ -90,7 +91,7 @@ $(function () {
$
(
this
).
addClass
(
'active'
).
siblings
().
removeClass
(
'active'
);
if
(
self
.
type
==
2
)
{
spOrXj
=
2
}
else
{
}
else
{
spOrXj
=
1
}
if
(
index
==
0
)
{
...
...
dist/js/search/index.js
View file @
674156f9
...
...
@@ -93,11 +93,12 @@ $(function () {
$
(
'.jt'
).
click
();
});
$
(
'.input_btn'
).
on
(
'click'
,
function
()
{
var
len
=
$
.
trim
(
$
(
'.input-search'
).
val
());
if
(
len
<
3
)
{
layer
.
msg
(
'搜索内容太短'
)
var
val
=
$
.
trim
(
$
(
'.input-search'
).
val
());
if
(
!
val
.
length
)
{
layer
.
msg
(
'搜索内容不能为空'
)
}
else
if
(
val
.
length
<
3
)
{
layer
.
msg
(
'搜索内容太短'
);
}
else
{
var
val
=
$
(
'.input-search'
).
val
();
window
.
location
.
replace
(
"/search?key="
+
val
+
'&type='
+
self
.
type
+
'&time='
+
self
.
time
);
}
});
...
...
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