Skip to content

Commit b36890c

Browse files
committed
angular
1 parent d04466e commit b36890c

14 files changed

+779
-276
lines changed

views/app/app1.html renamed to public/app/app.html

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<!DOCTYPE html>
22
<html lang="zh-CN" >
3-
43
<meta charset='utf-8'>
54
<meta name="viewport" content="width=device-width, initial-scale=1.0">
65
<title>money</title>
@@ -11,14 +10,14 @@
1110
<script src="js/jquery-1.10.2.min.js"></script>
1211
<script src="js/bootstrap.js"></script>
1312
<script src="js/angular.min.js"></script>
14-
<!-- <script src="js/angular-route.min.js"></script> -->
13+
<script src="js/angular-route.min.js"></script>
1514
<script src="/socket.io/socket.io.js"></script>
1615
<script>
1716
var xueqiuUrl="key=47bce5c74f&access_token=S8nfhytJNtRNHoV9ntmtHY&_=1392196535991";
1817
//雪球接口长变化的参数
1918
</script>
2019
</head>
21-
<body ng-app="AMail">
20+
<body ng-app="ngView">
2221
<header class="navbar navbar-inverse navbar-fixed-top bs-docs-nav" role="banner">
2322
<div class="container">
2423
<div class="navbar-header">

public/app/index.html

+130
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
<div class="container " style="padding-top:70px;" ng-controller="IndexCtrl">
2+
<div class="row">
3+
<div class="col-md-2">
4+
<div class="list-group">
5+
<a href="#" class="list-group-item active">Link</a>
6+
<a href="#" class="list-group-item">Link</a>
7+
<a href="#" class="list-group-item">Link</a>
8+
<a href="#" class="list-group-item">Link</a>
9+
<a href="#" class="list-group-item">Link</a>
10+
<a href="#" class="list-group-item">Link</a>
11+
<a href="#" class="list-group-item">Link</a>
12+
<a href="#" class="list-group-item">Link</a>
13+
<a href="#" class="list-group-item">Link</a>
14+
<a href="#" class="list-group-item">Link</a>
15+
</div>
16+
</div>
17+
<div class="col-md-7">
18+
<div>
19+
<div class="col-sm-4">
20+
<input type="text" class="form-control" id="stockUid" placeholder="代码">
21+
</div>
22+
<button type="button" class="btn btn-primary" ng-click="search()">选择</button>
23+
</div>
24+
25+
<h3>我的选择</h3>
26+
<table class="table table-bordered table-hover table-condensed">
27+
<thead>
28+
<tr>
29+
<th>股票</th>
30+
<th>当前价</th>
31+
<th>涨跌额</th>
32+
<th>涨跌幅</th>
33+
<th>成交量</th>
34+
<th>市值</th>
35+
<th>操作</th>
36+
</tr>
37+
</thead>
38+
<tbody my-stock="<%= user.stock%>" id="stockList">
39+
40+
<!-- 第一层循环 -->
41+
42+
<tr class="{{stock.zdBack}} {{stock.zdClass}}" ng-repeat="stock in stocks">
43+
<td><a href="stock/{{stock.symbol}}">{{stock.name}}({{stock.symbol}})</a></td>
44+
<td>{{stock.current}}</td>
45+
<td>{{stock.change | number:2}}</td>
46+
<td>{{stock.percentage}}</td>
47+
<td>{{stock.volume}}万</td>
48+
<td>{{stock.marketCapital}}亿</td>
49+
<td><button type="button" class="btn btn-danger btn-xs" ng-click="delStock(stock)">删除</button></td>
50+
</tr>
51+
</tbody>
52+
</table>
53+
<h3>发布评论</h3>
54+
<textarea id="comment" ng-model="sayCom"></textarea>
55+
<button type="button" class="btn btn-primary navbar-right" ng-click="submitCom()">发布</button>
56+
57+
<div class="clearfix"></div>
58+
59+
<ul class="nav nav-tabs" id="myTab">
60+
<li class="active"><a href="#home" data-toggle="tab">我的关注</a></li>
61+
<li><a href="#stock" data-toggle="tab" ng-click="aboutStockTopic()">我的股票</a></li>
62+
<li><a href="#profile" data-toggle="tab" ng-click="myTopic()">我的评论</a></li>
63+
<li><a href="#messages" data-toggle="tab" ng-click="atTopic()">@我</a></li>
64+
</ul>
65+
66+
<div class="tab-content">
67+
<div class="tab-pane active" id="home">
68+
<%- include mode/topic %>
69+
</div>
70+
<div class="tab-pane" id="stock">
71+
<%- include mode/aboutstocktopic %>
72+
</div>
73+
<div class="tab-pane" id="profile">
74+
<%- include mode/mytopic %>
75+
</div>
76+
<div class="tab-pane" id="messages">
77+
<%- include mode/atmetopic %>
78+
</div>
79+
</div>
80+
81+
</div>
82+
<div class="col-md-3">
83+
<h3>整体</h3>
84+
<ul class="nav nav-tabs" id="all">
85+
<li class="active"><a href="#shanghai" data-toggle="tab">上海</a></li>
86+
<li><a href="#shengzheng" data-toggle="tab">深圳</a></li>
87+
</ul>
88+
89+
<div class="tab-content">
90+
<div class="tab-pane active" id="shanghai">...home</div>
91+
<div class="tab-pane" id="shengzheng">.profile..</div>
92+
</div>
93+
<h3>新闻</h3>
94+
<ul class="list-group">
95+
<li class="list-group-item">Cras justo odio</li>
96+
</ul>
97+
98+
<h3>热门</h3>
99+
<ul class="list-group">
100+
<li class="list-group-item" ng-repeat="list in topList">
101+
<a href="stock/{{ list.uid }}">{{ list.name }}({{ list.top }})</a>
102+
<button type="button" class="btn btn-danger btn-xs pull-right" ng-click="topWatch(list)" ng-show="{{list.haveWatch}}">关注</button>
103+
<span class="pull-right" ng-hide="{{list.haveWatch}}">已关注</span>
104+
</li>
105+
</ul>
106+
107+
<h3>推荐</h3>
108+
<ul class="list-group">
109+
<li>后台推荐1</li>
110+
<li>后台推荐1</li>
111+
<li>后台推荐1</li>
112+
</ul>
113+
114+
<h3>推荐用户</h3>
115+
<ul class="list-group">
116+
<li class="list-group-item" ng-repeat="people in peoples">
117+
<a href="people/{{ people.name }}">{{ people.name }}({{ people.top }})</a>
118+
<button type="button" class="btn btn-danger btn-xs pull-right" ng-click="topPeople(people)" ng-hide="{{people.isWatch}}">关注</button>
119+
<span class="pull-right" ng-show="{{people.isWatch}}">已关注</span>
120+
</li>
121+
</ul>
122+
</div>
123+
</div>
124+
</div>
125+
126+
127+
<!-- <script src="js/underscore.js"></script>
128+
<script src="js/bigpipe.js"></script>
129+
<script src="js/tgy/topic.js"></script>
130+
<script src="js/tgy/index.js"></script> -->

public/app/login.html

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
<div class="jumbotron" style="padding-top:70px;">
2+
<div class="container">
3+
<div class="col-md-9">
4+
5+
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
6+
<ol class="carousel-indicators">
7+
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
8+
<li data-target="#carousel-example-generic" data-slide-to="1" class=""></li>
9+
<li data-target="#carousel-example-generic" data-slide-to="2" class=""></li>
10+
</ol>
11+
<div class="carousel-inner">
12+
<div class="item active">
13+
<img src="images/3.jpg">
14+
</div>
15+
<div class="item">
16+
<img src="images/3.jpg">
17+
</div>
18+
<div class="item">
19+
<img src="images/3.jpg">
20+
</div>
21+
</div>
22+
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
23+
<span class="glyphicon glyphicon-chevron-left"></span>
24+
</a>
25+
<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
26+
<span class="glyphicon glyphicon-chevron-right"></span>
27+
</a>
28+
</div>
29+
</div>
30+
31+
32+
<div class="col-md-3">
33+
34+
<!-- <div class="small red"><%= locals.error %> </div> -->
35+
36+
<form role="form" id="login" action="/login" method="post" ng-show="{{formShow}}">
37+
<h3>用户登录</h3>
38+
<div class="form-group">
39+
<input type="text" name="name" class="form-control" placeholder="用户名">
40+
</div>
41+
<div class="form-group">
42+
<input type="password" name="password" class="form-control" placeholder="密码">
43+
</div>
44+
<div class="row">
45+
<div class="col-md-5 small">
46+
<input type="password" class="form-control" id="exampleInputPassword1" placeholder="验证码">
47+
</div>
48+
<div class="col-md-4 small">验证码</div>
49+
<div class="col-md-3 small">刷新</div>
50+
</div>
51+
<div><input type="checkbox" value="true"><small>自动登录</small></div>
52+
<button type="submit" class="btn btn-default">提交</button>
53+
<p class="text-primary small point" id="changeSign" ng-click="toggle()">没有账户,点击注册</p>
54+
</form>
55+
56+
<form role="form" id="sign" action="/sign" method="post" ng-hide="{{formShow}}">
57+
<h3>用户注册</h3>
58+
59+
<div class="form-group">
60+
<input type="text" name="name" class="form-control" placeholder="用户名">
61+
</div>
62+
<div class="form-group">
63+
<input type="password" name="password" class="form-control" placeholder="密码">
64+
</div>
65+
<div class="form-group">
66+
<input type="password" name="repassword" class="form-control" placeholder="确认密码">
67+
</div>
68+
<div class="row">
69+
<div class="col-md-5 small">
70+
<input type="password" class="form-control" id="exampleInputPassword1" placeholder="验证码">
71+
</div>
72+
<div class="col-md-4 small">验证码</div>
73+
<div class="col-md-3 small">刷新</div>
74+
</div>
75+
<button type="submit" class="btn btn-default">注册</button>
76+
<p class="text-primary small point" id="changeLogin" ng-click="toggle()">已有账户,点击登录</p>
77+
</form>
78+
</div>
79+
</div>
80+
</div>
81+
82+
83+
<div class="container">
84+
<div class="col-md-4">
85+
<h4>明星用户</h4>
86+
</div>
87+
<div class="col-md-4">
88+
<h4>热门</h4>
89+
</div>
90+
<div class="col-md-4">
91+
<h4>新闻</h4>
92+
</div>
93+
</div>
94+
95+
<script>
96+
// $("#changeSign").on("click",function(){
97+
// $("#login").hide();
98+
// $("#sign").show();
99+
// });
100+
// $("#changeLogin").on("click",function(){
101+
// $("#sign").hide();
102+
// $("#login").show();
103+
// });
104+
105+
// $('.carousel').carousel({
106+
// interval: 8000
107+
// })
108+
</script>

public/app/people.html

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<div class="container " style="padding-top:70px;">
2+
<div class="row">
3+
<div class="col-md-10 col-md-offset-1">
4+
<h3 id="pageName" pName="<%= people.name %>"><%= people.name %>的信息</h3>
5+
<div class="col-md-2">
6+
<img src="/images/<%= people.info.pic.big %>" style="width:100%"/>
7+
</div>
8+
<div class="col-md-8">
9+
<p isWatch="<%= locals.isWatch %>" id="watchP">
10+
<button type="button" class="btn btn-info col-md-offset-4" ng-click="watchPeo()" id="watchOk">关注</button>
11+
<button type="button" class="btn btn-info col-md-offset-4" ng-click="unwatchPeo()" id="watchNo">取消关注</button>
12+
</p>
13+
<p>特长:<span><%= people.info.Spec %></span></p>
14+
<p>兴趣:<span><%= people.info.interest %></span></p>
15+
</div>
16+
17+
<div class="clearfix"></div>
18+
<h3>我的选择</h3>
19+
<table class="table table-bordered table-hover table-condensed">
20+
<thead>
21+
<tr>
22+
<th>股票</th>
23+
<th>当前价</th>
24+
<th>涨跌额</th>
25+
<th>涨跌幅</th>
26+
<th>成交量</th>
27+
<th>市值</th>
28+
<th>52周最低</th>
29+
<th>52周最高</th>
30+
</tr>
31+
</thead>
32+
<tbody my-stock="<%= people.stock%>" id="stockList">
33+
<tr class="{{stock.zdBack}} {{stock.zdClass}}" ng-repeat="stock in stocks">
34+
<td><a href="stock/{{stock.symbol}}">{{stock.name}}({{stock.symbol}})</a></td>
35+
<td>{{stock.current}}</td>
36+
<td>{{stock.change | number:2}}</td>
37+
<td>{{stock.percentage}}</td>
38+
<td>{{stock.volume}}万</td>
39+
<td>{{stock.marketCapital}}亿</td>
40+
<td>{{stock.low52week}}</td>
41+
<td>{{stock.high52week}}</td>
42+
</tr>
43+
</tbody>
44+
</table>
45+
46+
<ul class="nav nav-tabs" id="myTab">
47+
<li class="active"><a href="#home" data-toggle="tab">话题</a></li>
48+
<li><a href="#profile" data-toggle="tab">Profile</a></li>
49+
<li><a href="#messages" data-toggle="tab" ng-click="watchTab()">关注(<%= people.watch.length %>)</a></li>
50+
<li><a href="#settings" data-toggle="tab" ng-click="fensTab()">粉丝(<%= people.beWatch.length %>)</a></li>
51+
</ul>
52+
53+
<div class="tab-content">
54+
<div class="tab-pane active" id="home">
55+
<%- include mode/mytopic %>
56+
</div>
57+
<div class="tab-pane" id="profile">
58+
<ul class="list-group">
59+
<li>Profile</li>
60+
</ul>
61+
</div>
62+
<div class="tab-pane" id="messages">
63+
<ul class="list-group">
64+
<li class="list-group-item col-md-3 col-md-offset-1" ng-repeat="look in looks">
65+
{{look.name}}
66+
<button type="button" class="btn btn-danger btn-xs pull-right" ng-show="{{look.watch}}">关注</button>
67+
<button type="button" class="btn btn-danger btn-xs pull-right" ng-show="{{look.unwatch}}">取消</button>
68+
</li>
69+
</ul>
70+
</div>
71+
<div class="tab-pane" id="settings">
72+
<ul class="list-group">
73+
<li class="list-group-item col-md-3 col-md-offset-1" ng-repeat="fen in fens">
74+
{{fen.name}}
75+
<button type="button" class="btn btn-danger btn-xs pull-right" ng-show="{{fen.watch}}">关注</button>
76+
<button type="button" class="btn btn-danger btn-xs pull-right" ng-show="{{fen.unwatch}}">取消</button>
77+
</li>
78+
</ul>
79+
</div>
80+
</div>
81+
</div>
82+
</div>
83+
</div>
84+
85+
<!-- <script src="js/tgy/topic.js"></script>
86+
<script src="js/tgy/peo.js"></script> -->

0 commit comments

Comments
 (0)