Skip to content

Commit f96db6d

Browse files
author
dreamofei
committed
2015.12.10
1 parent 3abbdd8 commit f96db6d

9 files changed

Lines changed: 116 additions & 86 deletions

File tree

Libs/Css/Custom/main.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
body {
22
font-family: 'Microsoft YaHei';
33
}
4+
.zoneSplit{
5+
height:10px;
6+
}
47

58
.fa-margin {
69
margin-right: 10px;

Libs/Js/app.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
.when('/', {
44
templateUrl: 'Views/main.html'
55
})
6-
.when('/littleUtils', {
7-
templateUrl: 'Views/mainOfLittleUtils.html'
6+
.when('/sample', {
7+
templateUrl: 'Views/sample/index.html'
8+
})
9+
.when('/sample/s2', {
10+
templateUrl: 'Views/sample/s2.html'
811
})
912
.otherwise({
1013
redirectTo: '/'

Libs/Js/ctrls/ctrls.js

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
11
mainMoudle.controller('navbarCtrl', ['$scope', function ($scope) {
22
$scope.topMenu = [
3-
{ name: "网站首页", url: "#", child: null },
3+
{ name: "网站首页", url: "#/", child: null },
44
{
5-
name: "服务支持", url: "#/test/t1", child: [
6-
{ name: "售后服务", url: "#" },
7-
{ name: "法规标准", url: "#" },
8-
{ name: "下载中心", url: "#" },
9-
{ name: "安装方式", url: "#" },
10-
{ name: "操作视频", url: "#" },
11-
{ name: "用户反馈", url: "#" }
5+
name: "服务支持", url: "#/", child: [
6+
{ name: "售后服务", url: "#/" },
7+
{ name: "法规标准", url: "#/" },
8+
{ name: "下载中心", url: "#/" },
9+
{ name: "安装方式", url: "#/" },
10+
{ name: "操作视频", url: "#/" },
11+
{ name: "用户反馈", url: "#/" }
1212
]
1313
},
1414
{
15-
name: "解决方案", url: "#", child: [
16-
{ name: "电力", url: "#" },
17-
{ name: "小区", url: "#" },
18-
{ name: "别墅", url: "#" },
19-
{ name: "学校", url: "#" },
20-
{ name: "军事基地", url: "#" },
21-
{ name: "监狱", url: "#" },
22-
{ name: "看守所", url: "#" },
23-
{ name: "能源", url: "#" },
24-
{ name: "机场", url: "#" },
25-
{ name: "动植物基地", url: "#" },
26-
{ name: "仓库", url: "#" }
15+
name: "解决方案", url: "#/", child: [
16+
{ name: "电力", url: "#/" },
17+
{ name: "小区", url: "#/" },
18+
{ name: "别墅", url: "#/" },
19+
{ name: "学校", url: "#/" },
20+
{ name: "军事基地", url: "#/" },
21+
{ name: "监狱", url: "#/" },
22+
{ name: "看守所", url: "#/" },
23+
{ name: "能源", url: "#/" },
24+
{ name: "机场", url: "#/" },
25+
{ name: "动植物基地", url: "#/" },
26+
{ name: "仓库", url: "#/" }
2727
]
2828
},
2929
{
30-
name: "常识解答", url: "#", child: [
31-
{ name: "脉冲电子围栏", url: "#" },
32-
{ name: "张力电子围栏", url: "#" },
33-
{ name: "振动光纤系统", url: "#" },
34-
{ name: "数字光端机", url: "#" }
30+
name: "常识解答", url: "#/", child: [
31+
{ name: "脉冲电子围栏", url: "#/" },
32+
{ name: "张力电子围栏", url: "#/" },
33+
{ name: "振动光纤系统", url: "#/" },
34+
{ name: "数字光端机", url: "#/" }
3535
]
3636
},
3737
{
38-
name: "走近应心", url: "#", child: [
39-
{ name: "公司介绍", url: "#" },
40-
{ name: "生产基地", url: "#" },
41-
{ name: "公司资质", url: "#" },
42-
{ name: "经典案例", url: "#" },
43-
{ name: "员工动态", url: "#" }
38+
name: "走近应心", url: "#/", child: [
39+
{ name: "公司介绍", url: "#/" },
40+
{ name: "生产基地", url: "#/" },
41+
{ name: "公司资质", url: "#/" },
42+
{ name: "经典案例", url: "#/" },
43+
{ name: "员工动态", url: "#/" }
4444
]
4545
},
46-
{ name: "新闻中心", url: "#", child: null },
46+
{ name: "新闻中心", url: "#/", child: null },
4747
{
48-
name: "加入应心", url: "#", child: [
49-
{ name: "应聘流程", url: "#" },
50-
{ name: "招聘职位", url: "#" }
48+
name: "加入应心", url: "#/", child: [
49+
{ name: "应聘流程", url: "#/" },
50+
{ name: "招聘职位", url: "#/" }
5151
]
5252
},
53-
{ name: "联系我们", url: "#", child: null }
53+
{ name: "联系我们", url: "#/sample/s2", child: null }
5454

5555
];
5656

Libs/Js/ctrls/mainCtrl.js

Lines changed: 37 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,33 @@
44
.controller('sideMenuCtrl', function ($scope) {
55
$scope.sideMenu = [
66
{
7-
name: "脉冲电子围栏", url: "#", child: [
8-
{ name: "脉冲控制器", url: "#", img: "/Sources/imgs/R1.png" },
9-
{ name: "围栏配件", url: "#", img: "/Sources/imgs/R1.png" }
7+
name: "脉冲电子围栏", url: "#/", child: [
8+
{ name: "脉冲控制器", url: "#/", img: "/Sources/imgs/R1.png" },
9+
{ name: "围栏配件", url: "#/", img: "/Sources/imgs/R1.png" }
1010
], isFocus: false
1111
},
1212
{
13-
name: "张力电子围栏", url: "#", child: [
14-
{ name: "张力探测器", url: "#", img: "/Sources/imgs/R1.png" },
15-
{ name: "围栏配件", url: "#", img: "/Sources/imgs/R1.png" }
13+
name: "张力电子围栏", url: "#/", child: [
14+
{ name: "张力探测器", url: "#/", img: "/Sources/imgs/R1.png" },
15+
{ name: "围栏配件", url: "#/", img: "/Sources/imgs/R1.png" }
1616
], isFocus: false
1717
},
1818
{
19-
name: "智能管理中心", url: "#", child: [
20-
{ name: "智能报警主机", url: "#", img: "/Sources/imgs/R1.png" },
21-
{ name: "主机配套设备", url: "#", img: "/Sources/imgs/R1.png" }
19+
name: "智能管理中心", url: "#/", child: [
20+
{ name: "智能报警主机", url: "#/", img: "/Sources/imgs/R1.png" },
21+
{ name: "主机配套设备", url: "#/", img: "/Sources/imgs/R1.png" }
2222
], isFocus: false
2323
},
2424
{
25-
name: "振动光纤探测器", url: "#", child: [
26-
{ name: "双防区探测控制器", url: "#", img: "/Sources/imgs/R1.png" },
27-
{ name: "八防区光纤探测控制器", url: "#", img: "/Sources/imgs/R1.png" }
25+
name: "振动光纤探测器", url: "#/", child: [
26+
{ name: "双防区探测控制器", url: "#/", img: "/Sources/imgs/R1.png" },
27+
{ name: "八防区光纤探测控制器", url: "#/", img: "/Sources/imgs/R1.png" }
2828
], isFocus: false
2929
},
3030
{
31-
name: "高清网络光端机", url: "#", child: [
32-
{ name: "100M(百兆)高清系列", url: "#", img: "/Sources/imgs/R1.png" },
33-
{ name: "1000M(千兆)高清系列", url: "#", img: "/Sources/imgs/R1.png" }
31+
name: "高清网络光端机", url: "#/", child: [
32+
{ name: "100M(百兆)高清系列", url: "#/", img: "/Sources/imgs/R1.png" },
33+
{ name: "1000M(千兆)高清系列", url: "#/", img: "/Sources/imgs/R1.png" }
3434
], isFocus: false
3535
}
3636
];
@@ -44,22 +44,20 @@
4444
})
4545
.controller("classicalCaseCtrl", function ($scope) {
4646
$scope.scrollImgs = [
47-
{ name: "test001", url: "#", img: "/Sources/imgs/01.jpg" },
48-
{ name: "test002", url: "#", img: "/Sources/imgs/02.jpg" },
49-
{ name: "test003", url: "#", img: "/Sources/imgs/03.jpg" },
50-
{ name: "test004", url: "#", img: "/Sources/imgs/04.jpg" },
51-
{ name: "test005", url: "#", img: "/Sources/imgs/05.jpg" },
52-
{ name: "test006", url: "#", img: "/Sources/imgs/06.jpg" }
47+
{ name: "test001", url: "#/", img: "/Sources/imgs/01.jpg" },
48+
{ name: "test002", url: "#/", img: "/Sources/imgs/02.jpg" },
49+
{ name: "test003", url: "#/", img: "/Sources/imgs/03.jpg" },
50+
{ name: "test004", url: "#/", img: "/Sources/imgs/04.jpg" },
51+
{ name: "test005", url: "#/", img: "/Sources/imgs/05.jpg" },
52+
{ name: "test006", url: "#/", img: "/Sources/imgs/06.jpg" }
5353
];
5454

55-
window.onload = function () {
56-
var speed = 20;
55+
$scope.setScroll = function () {
56+
var speed = 15;
5757
var container = document.getElementsByClassName("scrollContainer")[0];
58-
//var container = document.getElementsByClassName("scrollContainer-inner")[0];
5958
var imgsDiv = document.getElementsByClassName("scrollContainer-imgs");
6059
var imgdiv1 = imgsDiv[0];
6160
var imgdiv2 = imgsDiv[1];
62-
//imgdiv2.innerHTML = imgdiv1.innerHTML;
6361
var Scrolling = function () {
6462
if (imgdiv2.offsetWidth - container.scrollLeft <= 0)
6563
container.scrollLeft -= imgdiv1.offsetWidth
@@ -70,21 +68,19 @@
7068
var scrollInterval = setInterval(Scrolling, speed);
7169
container.onmouseover = function () { clearInterval(scrollInterval) };
7270
container.onmouseout = function () { scrollInterval = setInterval(Scrolling, speed) };
73-
74-
//$('[data-toggle="tooltip"]').tooltip({ placement: "bottom" });
7571
}
7672

7773
})
7874
.controller('QANewsCtrl', function ($scope) {
7975
//news
8076
$scope.news = [
81-
{ content: "新闻一。。。。", url: "#", isFocus: false },
82-
{ content: "新闻eer。。。。", url: "#", isFocus: false },
83-
{ content: "sdfdsfsdfd。。。。", url: "#", isFocus: false },
84-
{ content: "新闻一ddfasdf", url: "#", isFocus: false },
85-
{ content: "sdfsdfsd。。。。", url: "#", isFocus: false },
86-
{ content: "ghtrtuyrr。。。。", url: "#", isFocus: false },
87-
{ content: "htre。。。。", url: "#", isFocus: false }
77+
{ content: "新闻一。。。。", url: "#/", isFocus: false },
78+
{ content: "新闻eer。。。。", url: "#/", isFocus: false },
79+
{ content: "sdfdsfsdfd。。。。", url: "#/", isFocus: false },
80+
{ content: "新闻一ddfasdf", url: "#/", isFocus: false },
81+
{ content: "sdfsdfsd。。。。", url: "#/", isFocus: false },
82+
{ content: "ghtrtuyrr。。。。", url: "#/", isFocus: false },
83+
{ content: "htre。。。。", url: "#/", isFocus: false }
8884
]
8985
$scope.aLinkHover = function (index) {
9086
$scope.news[index].isFocus = true;
@@ -99,32 +95,32 @@
9995
{
10096
question: "了空间了空间浪费空间?",
10197
answer: "了空间链接了解了了时间段里疯狂就死定了拉开距离龙聚楼酒楼。",
102-
url: "#"
98+
url: "#/"
10399
},
104100
{
105101
question: "欧赔,门将离开了我我我?",
106102
answer: "路肩路肩了解空间抛弃破IPIQ颇为家里快急死了到家了抛弃破费破量减少了空间刻录机你,没呢,吗。",
107-
url: "#"
103+
url: "#/"
108104
},
109105
{
110106
question: "户名称来看及?",
111107
answer: "我我我我ijoiiouosuf看见了看见了看见了健康了健康记录劈破。",
112-
url: "#"
108+
url: "#/"
113109
},
114110
{
115111
question: "品牌空间关闭接口卡啦啦啦?",
116112
answer: "哦IE偶奇偶及皮肤鹿鼎记佛经里看见的怕看见了家里快乐偶奇偶及皮肤鹿鼎记佛经里看见的怕看见了家里快乐偶奇偶及皮肤鹿鼎记佛经里看见的怕看见了家里快乐。",
117-
url: "#"
113+
url: "#/"
118114
},
119115
{
120116
question: "两句话给帮忙看看匹配进口零距离?",
121117
answer: "我看见了建瓯盘欺骗记录到快来看才看见哦自己哦了。",
122-
url: "#"
118+
url: "#/"
123119
}
124120
];
125121

126-
window.onload = function () {
127-
var speed = 20;
122+
$scope.setScroll = function () {
123+
var speed = 30;
128124
var qaScroll = document.getElementById("qaScroll");
129125
var qaScroll1 = document.getElementById("qaScroll1");
130126
var qaScroll2 = document.getElementById("qaScroll2");
@@ -139,7 +135,6 @@
139135
qaScroll.onmouseover = function () { clearInterval(scrollInterval) };
140136
qaScroll.onmouseout = function () { scrollInterval = setInterval(Scrolling, speed) };
141137

142-
//$('[data-toggle="tooltip"]').tooltip({ placement: "bottom" });
143138
}
144139
//end qa
145140
})

Libs/Js/directives/directives.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
mainMoudle.directive('onFinishRender', function ($timeout) {
2+
return {
3+
restrict: 'A',
4+
link: function (scope, element, attr) {
5+
if (scope.$last == true) {
6+
$timeout(function () {
7+
var fn = attr.onFinishRender;
8+
scope.$eval(fn);
9+
});
10+
}
11+
}
12+
};
13+
})
14+
15+
;

Views/main.html

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
<style type="text/css">
22

33
</style>
4+
<script type="text/javascript">
5+
$(document).ready(function () {
6+
alert("ready");
7+
})
8+
</script>
9+
<div class="row zoneSplit"></div>
410
<div class="row">
511
<div class="col-md-1">
612
</div>
713
<div class="col-md-10">
814
<div class="row">
9-
<div class="col-md-3 sideMenuAndSlideImg" ng-controller="sideMenuCtrl">
15+
<div class="col-md-3 sideMenuAndSlideImg zone" ng-controller="sideMenuCtrl">
1016
<!--<div>-->
1117
<h3><i class="fa fa-list-ul fa-margin" style="color: #d7000f;padding-left:10px;"></i>产品分类</h3>
1218
<div class="sideMenu">
@@ -66,6 +72,7 @@ <h3><i class="fa fa-list-ul fa-margin" style="color: #d7000f;padding-left:10px;"
6672
</div>
6773
</div>
6874

75+
<div class="row zoneSplit"></div>
6976
<div class="row" ng-controller="classicalCaseCtrl">
7077
<div class="col-md-12">
7178
<div class="row gray zoneTitle">
@@ -74,7 +81,7 @@ <h3 style="margin-top:10px;" class="col-md-6"><i class="fa fa-ellipsis-v fa-marg
7481
</div>
7582
<div class="row scrollContainer">
7683
<div class="scrollContainer-inner">
77-
<div class="scrollContainer-imgs" ng-repeat="i in [1,2]">
84+
<div class="scrollContainer-imgs" ng-repeat="i in [1,2]" on-finish-render="setScroll()">
7885
<a href="{{item.url}}" ng-repeat="item in scrollImgs" style="display:inline-block;">
7986
<img ng-src="{{item.img}}" />
8087
<span style="display: block; text-align: center; color: #ffffff;">{{item.name}}</span>
@@ -106,7 +113,7 @@ <h3 style="margin-top:10px;" class="col-md-6"><i class="fa fa-ellipsis-v fa-marg
106113
</div>
107114
</div>
108115
</div>
109-
<div class="row" style="height:10px;"></div>
116+
<div class="row zoneSplit"></div>
110117
<div class="row" ng-controller="QANewsCtrl">
111118
<div class="col-md-8">
112119
<div class="row gray zoneTitle">
@@ -119,7 +126,7 @@ <h3 style="margin-top:10px;" class="col-md-6"><i class="fa fa-question-circle fa
119126
</div>
120127
<div class="col-md-8">
121128
<div class="qaScroll qa-news-zone" id="qaScroll">
122-
<div id="qaScroll1">
129+
<div id="qaScroll{{i}}" ng-repeat="i in [1,2]" on-finish-render="setScroll()">
123130
<dl ng-repeat="qa in qaList">
124131
<dt>
125132
<i class="fa fa-question-circle fa-margin"></i><a ng-href="{{qa.url}}">{{qa.question}}</a>
@@ -129,7 +136,7 @@ <h3 style="margin-top:10px;" class="col-md-6"><i class="fa fa-question-circle fa
129136
</dd>
130137
</dl>
131138
</div>
132-
<div id="qaScroll2">
139+
<!--<div id="qaScroll2">
133140
<dl ng-repeat="qa in qaList">
134141
<dt>
135142
<i class="fa fa-question-circle fa-margin"></i><a ng-href="{{qa.url}}">{{qa.question}}</a>
@@ -138,7 +145,7 @@ <h3 style="margin-top:10px;" class="col-md-6"><i class="fa fa-question-circle fa
138145
<i class="fa fa-quote-left fa-margin"></i>{{qa.answer}}<i class="fa fa-quote-right"></i>
139146
</dd>
140147
</dl>
141-
</div>
148+
</div>-->
142149

143150
</div>
144151
</div>

Views/sample/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div class="row">
2+
<h1>this is Sample</h1>
3+
</div>

Views/sample/s2.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div class="row">
2+
<h1>this is Sample--s2</h1>
3+
</div>

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<script src="Libs/Js/angular/angular-route.js"></script>
99

1010
<script src="Libs/Js/app.js"></script>
11+
<script src="Libs/Js/directives/directives.js"></script>
1112
<script src="Libs/Js/ctrls/mainCtrl.js"></script>
1213
<script src="Libs/Js/ctrls/ctrls.js"></script>
1314

0 commit comments

Comments
 (0)