Skip to content

Commit d502aa1

Browse files
author
ice_city
committed
V1 final
1 parent 040b498 commit d502aa1

3 files changed

Lines changed: 37 additions & 27 deletions

File tree

HFSA/src/main/java/com/controller/UserController.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import javax.servlet.http.HttpSession;
99

1010
import org.springframework.beans.factory.annotation.Autowired;
11+
import org.springframework.scheduling.annotation.Scheduled;
1112
import org.springframework.stereotype.Controller;
1213
import org.springframework.web.bind.annotation.RequestMapping;
1314
import org.springframework.web.bind.annotation.RequestMethod;
@@ -141,7 +142,7 @@ ModelAndView delFriends(@RequestParam("id")int id,@RequestParam("name")String na
141142
return model;
142143
}
143144

144-
//@Scheduled(cron="0 3 */1 * * *")
145+
@Scheduled(cron="0 3 */1 * * *")
145146
public void SpiderForce() throws FileNotFoundException, ClassNotFoundException, IOException {
146147
weiboService.weiboSpider();
147148
tianyaService.TianyaSpider();

HFSA/src/main/webapp/WEB-INF/views/AddFriend.jsp

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,48 +17,58 @@
1717
</head>
1818
<body>
1919
<div class="form-group">
20-
<div class="text-center">
20+
<div class="form-horizontal" style="margin-top: 10%">
2121
<div class="form-group">
22-
<input type="text" name="name" id="name" tabindex="1" class="form-control" placeholder="FriendName" required autofocus/>
22+
<label class="col-sm-3 control-label">好友名:</label>
23+
24+
<div class="col-sm-6">
25+
<input type="text" name="name" id="name" tabindex="1"
26+
class="form-control" placeholder="FriendName" required autofocus />
27+
<span class="help-block m-b-none">你可以为你的好友起一个名字</span>
28+
</div>
2329
</div>
2430
<div class="form-group">
25-
<input type="微博地址" name="weibourl" id="weibourl" tabindex="2" class="form-control" placeholder="微博昵称"required autofocus/>
31+
<label class="col-sm-3 control-label">微博主页url:</label>
32+
33+
<div class="col-sm-6">
34+
<input type="text" name="weibourl" id="weibourl" tabindex="2"
35+
class="form-control" placeholder="微博主页url" />
36+
</div>
2637
</div>
2738
<div class="form-group">
28-
<input type="天涯地址" name="tianyaurl" id="tianyaurl" tabindex="3" class="form-control" placeholder="天涯主页"/>
39+
<label class="col-sm-3 control-label">天涯主页url:</label>
40+
41+
<div class="col-sm-6">
42+
<input type="text" name="tianyaurl" id="tianyaurl" tabindex="3"
43+
class="form-control" placeholder="天涯主页url" />
44+
</div>
2945
</div>
3046
<div class="form-group">
31-
<div class="row">
32-
<div class="col-sm-6 col-sm-offset-3">
33-
<input type="submit" name="add-submit" id="add-submit" tabindex="4" class="form-control btn btn-login" value="添加" onclick="ajaxTest();"/>
34-
</div>
47+
<div class="col-sm-offset-3 col-sm-6">
48+
<input type="submit" name="add-submit" id="add-submit" tabindex="4"
49+
class="form-control btn btn-login" value="添加"
50+
onclick="ajaxTest();" />
3551
</div>
3652
</div>
3753
</div>
3854
</div>
3955

4056

4157
<script type="text/javascript">
42-
function ajaxTest(){
58+
function ajaxTest() {
4359
var id = ${userLogin.id };
4460
$.ajax({
45-
type:"post",
46-
url:"tianjia",
47-
data:{
48-
id:id,
49-
name:$("#name").val(),
50-
weibourl:$("#weibourl").val(),
51-
tianyaurl:$("#tianyaurl").val()
61+
type : "post",
62+
url : "tianjia",
63+
data : {
64+
id : id,
65+
name : $("#name").val(),
66+
weibourl : $("#weibourl").val(),
67+
tianyaurl : $("#tianyaurl").val()
5268
},
53-
dataType:"json",
54-
error:function(){
55-
if($("#msg") == "fail")
56-
{
57-
alert("error");
58-
}
59-
else{
60-
window.location.href="FriendsList?id="+id;
61-
}
69+
dataType : "json",
70+
error : function() {
71+
window.location.href = "FriendsList?id=" + id;
6272
}
6373
})
6474
}

HFSA/src/main/webapp/WEB-INF/views/HomePage.jsp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
</a>
3737
<ul class="dropdown-menu animated fadeInRight m-t-xs">
3838
<li><a class="J_menuItem" href="ProFile">个人资料</a>
39-
<li><a class="J_menuItem" href="test">test</a>
4039
</li>
4140
<li class="divider"></li>
4241
<li><a href="Login">安全退出</a>

0 commit comments

Comments
 (0)