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
5aa54a93
authored
Aug 06, 2019
by
施宇
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
3213
parent
e0eaf2e3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
19 deletions
Application/Home/View/Home/index.html
dist/css/home.css
dist/css/home.less
dist/js/global/api.js
dist/js/global/global.min.js
dist/js/home/index.js
Application/Home/View/Home/index.html
View file @
5aa54a93
...
...
@@ -55,15 +55,9 @@
</div>
</div>
<div
class=
"search_command clr"
>
<span
class=
"fl comman_title"
>
热门搜索:
</span>
<div
class=
"fl command_name"
>
<volist
name=
"hot_goods"
id=
"vo"
>
<a
class=
"fl"
href=
"{$vo.url}"
title=
"{$vo.title}"
target=
"_blank"
>
{$vo.title}
</a>
</volist>
</div>
</div>
</div>
<div
class=
"my_xj"
>
<div
class=
"my_xj_title xj_title"
>
<span
class=
"lineBlock"
></span>
...
...
@@ -88,6 +82,16 @@
</div>
<include
file=
"public/foot"
/>
<script
src=
"__PUBLIC__/js/home/index.js"
></script>
<script
type=
"text/html"
id=
"hotTpl"
>
{{
#
if
(
d
.
length
!=
0
){
}}
<
span
class
=
"fl comman_title"
>
热门搜索
:
<
/span
>
<
div
class
=
"fl command_name"
>
{{
#
layui
.
each
(
d
,
function
(
index
,
item
){
}}
<
div
class
=
"fl hot_item"
title
=
"{{item.title}}"
>
{{
item
.
title
}}
<
/div
>
{{
#
});
}}
<
/div
>
{{
#
}
}}
</script>
<script
type=
"text/html"
id=
"xjTpl"
>
<!--
询价模板
-->
<
div
class
=
"my_xj_list clr"
>
...
...
dist/css/home.css
View file @
5aa54a93
...
...
@@ -110,14 +110,14 @@
color
:
#8A9299
;
width
:
625px
;
}
.home_content
.search_section
.search_command
.command_name
a
{
.home_content
.search_section
.search_command
.command_name
div
{
margin-left
:
20px
;
cursor
:
pointer
;
transition
:
all
0.2s
ease-in-out
;
display
:
block
;
}
.home_content
.search_section
.search_command
.command_name
a
.active
,
.home_content
.search_section
.search_command
.command_name
a
:hover
{
.home_content
.search_section
.search_command
.command_name
div
div
.active
,
.home_content
.search_section
.search_command
.command_name
div
:hover
{
color
:
#0D84D1
;
}
.home_content
.xj_title
{
...
...
@@ -257,4 +257,3 @@
.home_content
.new_xj
.new_xj_list
.new_xj_item
:hover
{
box-shadow
:
0px
5px
10px
0px
rgba
(
216
,
223
,
230
,
0.5
);
}
/*# sourceMappingURL=home.css.map */
\ No newline at end of file
dist/css/home.less
View file @
5aa54a93
...
...
@@ -136,13 +136,12 @@
color: #8A9299;
width: 625px;
a
{
div
{
margin-left: 20px;
cursor: pointer;
transition: all 0.2s ease-in-out;
display: block;
&.active ,&:hover{
div.active ,&:hover{
color: #0D84D1;
}
}
...
...
dist/js/global/api.js
View file @
5aa54a93
...
...
@@ -61,6 +61,10 @@
* 获取会员认证信息
*/
authInfo
:
user_url
+
'/user/authinfo'
,
/****
* 获取热门搜索商品
*/
hotgoods
:
home_url
+
'/hotgoods'
,
/***
* 上传文件的接口
*/
...
...
@@ -89,7 +93,7 @@
* 商品修改
*/
goodsSave
:
goods_url
+
'/goods/save'
,
/***
/***
* 商品上下架
*/
goodsStatus
:
goods_url
+
"/goods/status"
,
...
...
@@ -117,7 +121,7 @@
* 询价统计
*/
inquirycount
:
offer_url
+
"/inquiry/count"
,
/***
* 报价统计
*/
...
...
dist/js/global/global.min.js
View file @
5aa54a93
This diff is collapsed.
Click to expand it.
dist/js/home/index.js
View file @
5aa54a93
...
...
@@ -4,6 +4,35 @@ $(function () {
this
.
bindFun
();
this
.
getXbData
(
1
);
this
.
getNewXj
();
this
.
getHotGoods
()
},
getHotGoods
:
function
()
{
var
obj
=
Util
.
dataEncryption
();
IcController
.
getData
(
apis
.
hotgoods
,
'GET'
,
{
timestamp
:
obj
.
timestampStr
,
random
:
obj
.
randomStr
,
signature
:
obj
.
singnatrueStr
},
function
(
res
)
{
var
hotHtml
=
hotTpl
.
innerHTML
;
if
(
res
.
err_code
===
0
)
{
if
(
res
.
data
.
length
)
{
layui
.
laytpl
(
hotHtml
).
render
(
res
.
data
,
function
(
html
)
{
$
(
".search_command"
).
empty
().
html
(
html
);
});
}
else
{
layui
.
laytpl
(
hotHtml
).
render
([],
function
(
html
)
{
$
(
".search_command"
).
empty
().
html
(
html
);
});
}
}
else
{
layui
.
laytpl
(
hotHtml
).
render
([],
function
(
html
)
{
$
(
".search_command"
).
empty
().
html
(
html
);
});
}
})
},
getXbData
:
function
(
type
)
{
//1报价 2询价
var
url
;
...
...
@@ -78,7 +107,7 @@ $(function () {
}
else
if
(
val
.
length
<
3
)
{
layer
.
msg
(
'请至少输入3个字符'
)
}
else
{
window
.
location
.
href
=
"/search?key="
+
val
+
'&type=1&time=1'
;
window
.
location
.
href
=
"/search?key="
+
val
+
'&type=1&time=1'
;
}
});
...
...
@@ -97,7 +126,13 @@ $(function () {
var
userid
=
$
(
this
).
attr
(
'userid'
),
offerid
=
$
(
this
).
attr
(
'offerid'
)
window
.
location
.
href
=
"/quotedetail?id="
+
userid
+
'&offerid='
+
offerid
})
});
$
(
'.search_command'
).
on
(
'click'
,
'.hot_item'
,
function
()
{
var
title
=
$
(
this
).
attr
(
'title'
);
window
.
location
.
href
=
"/search?key="
+
title
+
'&type=1&time=1'
;
});
}
};
homeObj
.
init
()
...
...
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