Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
html
/
bdideal
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
03455e1b
authored
Mar 06, 2019
by
hank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页模拟数据
parent
4384298d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
2 deletions
+49
-2
html/index.html
+49
-2
No files found.
html/index.html
View file @
03455e1b
...
...
@@ -469,7 +469,7 @@
<div
class=
"menu-item"
>
数字互动解决方案
</div>
</div>
</div>
<div
class=
"more text-center"
>
more >>
</div>
<div
class=
"more text-center"
>
<a
href=
"dynamic.html"
style=
"color: black;"
>
more >>
</a>
</div>
</div>
</div>
...
...
@@ -534,6 +534,8 @@
</body>
<script>
$
(
document
).
ready
(
function
()
{
var
sliceNum
=
6
;
// 展示数量
var
sliceNum2
=
4
;
// 展示数量
var
mySwiper
=
new
Swiper
(
'.swiper-container'
,
{
direction
:
'horizontal'
,
// 垂直切换选项
loop
:
true
,
// 循环模式选项
...
...
@@ -552,7 +554,51 @@
// scrollbar: {
// el: '.swiper-scrollbar',
// },
})
});
// 生成解方案html
function
createSolutionHtml
(
data
)
{
data
=
data
.
slice
(
0
,
sliceNum
);
console
.
log
(
data
)
var
html
=
""
;
data
.
forEach
(
function
(
item
)
{
html
+=
'
<
div
class
=
"item"
>
' +
'
<
a
href
=
"./productDetail.html?id='+item.id +'"
>
'+
'
<
img
src
=
"'+ item.imagesUrl+'"
alt
=
""
><
/a>'
+
'
<
div
class
=
"item-title"
>
'+item.proName+'
<
/div>'
+
'
<
/div>
'
});
return
html
;
}
function
createDynamicHtml
(
data
)
{
data
=
data
.
slice
(
0
,
sliceNum2
);
var
html
=
""
;
data
.
forEach
(
function
(
item
)
{
html
+=
'
<
div
class
=
"item"
>
' +
'
<
a
href
=
"./dynamicDetail.html?id='+ item.id+'"
>
' +
'
<
div
class
=
"img-container"
>
' +
'
<
img
src
=
"' +
item.imagesUrl +
'"
alt
=
""
>
' +
'
<
/div>'
+
'
<
div
class
=
"item-title item-title2"
>
' +
item.title +
'
<
/div>'
+
'
<
div
class
=
"bottom-word"
>
' +
'
<
span
class
=
"name"
>
'+ item.type +'
<
/span> '+
'
<
span
class
=
"date"
><
img
src
=
"../img/time.png"
alt
=
""
>
'+ item.date +'
<
/span> '
+
'
<
/div>'
+
'
<
/a></
div
>
';
});
return html;
}
$('
#
dashuju
').html(createSolutionHtml(ideal.produtsList));
$('
.
industry
-
dynamics
.
list
-
item
').eq(0).html(createDynamicHtml(ideal.dynamicList))
// 生成活动html
// 菜单切换
function tab(container) {
$('
.
menu
-
item
').click(function(e) {
$(this).parent().children().removeClass('
active
');
...
...
@@ -564,6 +610,7 @@
list_item
.
eq
(
index
).
show
();
})
}
tab
()
});
</script>
...
...
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