Преглед изворни кода

Merge remote-tracking branch 'origin/master'

suntg пре 8 година
родитељ
комит
df9650b2ab

+ 7 - 1
pom.xml

@@ -60,8 +60,14 @@
 		<dependency>
 			<groupId>com.uas.account</groupId>
 			<artifactId>account-common</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
 		</dependency>
-	</dependencies>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+            <version>4.5.2</version>
+        </dependency>
+    </dependencies>
 	<build>
 		<finalName>home</finalName>
 		<plugins>

+ 131 - 0
src/main/java/com/uas/platform/home/controller/UuzcController.java

@@ -0,0 +1,131 @@
+package com.uas.platform.home.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.uas.account.entity.User;
+import com.uas.account.entity.UserView;
+import com.uas.account.entity.UuzcUserSpaceDetail;
+import com.uas.account.util.AccountUtils;
+import com.uas.platform.home.core.support.SystemSession;
+import com.uas.platform.home.model.ResultInfo;
+import com.uas.platform.home.model.UuzcUserInfo;
+import com.uas.platform.home.web.BaseController;
+import com.uas.sso.SSOHelper;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * 关于优软众创的一些接口
+ *
+ * Created by hejq on 2017-11-02.
+ */
+@RestController
+@RequestMapping(value = "/uuzc")
+public class UuzcController extends BaseController {
+
+    /**
+     * 对当前登录账号进行检验
+     *
+     * @return
+     */
+    @RequestMapping(value = "/account/check", method = RequestMethod.GET)
+    public ModelMap checkAccount() throws Exception {
+        UserView user = SystemSession.getUser();
+        ModelMap map = new ModelMap();
+        if(null != user) {
+            if ( null != user.getHr() && 1 == user.getHr()) {// hr账户
+                UuzcUserInfo info = getUserInfo(user, true);
+                map.put("ishr", true);
+                map.put("user", info);
+                map.put("usertype", "hr");
+            } else if(null != user.getUuzcUserSpaceDetail()) {// 先通过登录的信息判断是否是企业用户
+                map.put("usertype", "company");
+                UuzcUserInfo info = getUserInfo(user, true);
+                //判断是否设置了hr
+                String result = AccountUtils.getHrAccount(info.getLicense());
+                ResultInfo resInfo = JSONObject.parseObject(result, ResultInfo.class);
+                map.put("hr", resInfo.getExistHr() ? true : false);
+                if(user.getName().equals(user.getUuzcUserSpaceDetail().getAdminName())) {
+                    map.put("manager", true);
+                } else {
+                    map.put("managerName", user.getUuzcUserSpaceDetail().getAdminName());
+                }
+                map.put("user", info);
+            } else if(null == user.getUuzcUserSpaceDetail()) {// 个人用户
+                UuzcUserInfo info = getUserInfo(user, false);
+                JSONObject formData = JSON.parseObject(JSON.toJSONString(info));
+                map.put("user", formData);
+                map.put("usertype", "personal");
+            }
+        } else {
+            SSOHelper.clearLogin(request, response);
+            return success(SSOHelper.getRedirectRefererLoginUrl(request));
+        }
+        return map;
+    }
+
+    /**
+     * 将账户中心信息转成众创需要的信息
+     *
+     * @param user
+     * @param company
+     * @return
+     */
+    private UuzcUserInfo getUserInfo(UserView user, boolean company) {
+        UuzcUserInfo info = new UuzcUserInfo();
+        info.setEmail(user.getSecondUID());
+        info.setMobile(user.getUid());
+        info.setUc_uid(user.getDialectUID());
+        info.setPassword(user.getPassword());
+        info.setSalt(user.getSalt());
+        info.setUsername(user.getName());
+        if(null != user.getUuzcUserSpaceDetail() && company) {
+            info.setCompanyname(user.getSpaceName());
+            info.setLicense(user.getSpaceUID());
+            info.setContact(user.getUuzcUserSpaceDetail().getContactMan() != null ?
+                    user.getUuzcUserSpaceDetail().getContactMan() : user.getUuzcUserSpaceDetail().getAdminName());
+            info.setWebsite(user.getUuzcUserSpaceDetail().getUrl());
+            info.setTelephone(user.getUuzcUserSpaceDetail().getTel() != null ?
+                    user.getUuzcUserSpaceDetail().getTel() : user.getUuzcUserSpaceDetail().getAdminTel());
+            info.setLandine_tel(user.getUuzcUserSpaceDetail().getContactTel() != null ?
+                    user.getUuzcUserSpaceDetail().getContactTel() : user.getUuzcUserSpaceDetail().getAdminTel());
+        }
+        return  info;
+    }
+
+    /**
+     * 设置hr账号
+     *
+     * @param user
+     * @return
+     */
+    @RequestMapping(value = "/setHrAccount", method = RequestMethod.POST)
+    public ModelMap setHrAccount(UuzcUserInfo user) throws Exception {
+        UuzcUserSpaceDetail detail = SystemSession.getUser().getUuzcUserSpaceDetail();
+        User userInfo = new User();
+        userInfo.setHr((short) 1);
+        userInfo.setName(user.getUsername());
+        userInfo.setUid(user.getMobile());
+        userInfo.setSecondUID(user.getEmail());
+        String result = AccountUtils.setHrAccount(userInfo, detail);
+        ResultInfo resInfo = JSONObject.parseObject(result, ResultInfo.class);
+        return new ModelMap("result", resInfo.getMsg());
+    }
+
+    /**
+     * 获取当前企业的用户信息
+     *
+     * @return
+     * @throws Exception
+     */
+    @RequestMapping(value = "/existusers", method = RequestMethod.GET)
+    public ModelMap getExistUsers() throws Exception {
+        List<User> users = AccountUtils.getEmployees(SystemSession.getUser().getUuzcUserSpaceDetail().getBusinessCode());
+        return success(users);
+    }
+
+}

+ 74 - 0
src/main/java/com/uas/platform/home/model/ResultData.java

@@ -0,0 +1,74 @@
+package com.uas.platform.home.model;
+
+/**
+ * 众创接口请求返回结果
+ *
+ * Created by hejq on 2017-11-02.
+ */
+public class ResultData {
+
+    /**
+     * 众创uid
+     */
+    private String uid;
+
+    /**
+     * 企业名称
+     */
+    private String companyname;
+
+    /**
+     * 电话
+     */
+    private String mobile;
+
+    /**
+     * 优软云维一编号
+     */
+    private String uc_uid;
+
+    /**
+     * 编号
+     */
+    private String code;
+
+    public String getUid() {
+        return uid;
+    }
+
+    public void setUid(String uid) {
+        this.uid = uid;
+    }
+
+    public String getCompanyname() {
+        return companyname;
+    }
+
+    public void setCompanyname(String companyname) {
+        this.companyname = companyname;
+    }
+
+    public String getMobile() {
+        return mobile;
+    }
+
+    public void setMobile(String mobile) {
+        this.mobile = mobile;
+    }
+
+    public String getUc_uid() {
+        return uc_uid;
+    }
+
+    public void setUc_uid(String uc_uid) {
+        this.uc_uid = uc_uid;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+}

+ 86 - 0
src/main/java/com/uas/platform/home/model/ResultInfo.java

@@ -0,0 +1,86 @@
+package com.uas.platform.home.model;
+
+/**
+ * 众创接口请求返回结果
+ *
+ * Created by hejq on 2017-11-02.
+ */
+public class ResultInfo {
+    /**
+     * 状态码
+     */
+    private Short status;
+
+    /**
+     * 消息
+     */
+    private String msg;
+
+    /**
+     * 提示
+     */
+    private String dialog;
+
+    /**
+     * 返回data数据
+     */
+    private ResultData data;
+
+    /**
+     * 是否存在hr账户
+     */
+    private boolean existHr;
+
+    /**
+     * hr数量
+     */
+    private Integer count;
+
+    public Short getStatus() {
+        return status;
+    }
+
+    public void setStatus(Short status) {
+        this.status = status;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public String getDialog() {
+        return dialog;
+    }
+
+    public void setDialog(String dialog) {
+        this.dialog = dialog;
+    }
+
+    public ResultData getData() {
+        return data;
+    }
+
+    public void setData(ResultData data) {
+        this.data = data;
+    }
+
+    public Integer getCount() {
+        return count;
+    }
+
+    public void setCount(Integer count) {
+        this.count = count;
+    }
+
+    public boolean getExistHr() {
+        return this.count > 0 ? true : false;
+    }
+
+    public void setExistHr(boolean existHr) {
+        this.existHr = existHr;
+    }
+}

+ 83 - 0
src/main/java/com/uas/platform/home/model/UserSpaceDetailInfo.java

@@ -0,0 +1,83 @@
+package com.uas.platform.home.model;
+
+public class UserSpaceDetailInfo {
+
+	/**
+	 * 企业名称
+	 */
+	private String company;
+
+	/**
+	 * 地址
+	 */
+	private String address;
+
+	/**
+	 * 管理员姓名
+	 */
+	private String username;
+
+	/**
+	 * 管理员电话
+	 */
+	private String usertel;
+
+	/**
+	 * 管理员imid
+	 */
+	private String imid;
+
+	/**
+	 * 管理员邮箱
+	 */
+	private String email;
+
+	public String getCompany() {
+		return company;
+	}
+
+	public void setCompany(String company) {
+		this.company = company;
+	}
+
+	public String getAddress() {
+		return address;
+	}
+
+	public void setAddress(String address) {
+		this.address = address;
+	}
+
+	public String getUsername() {
+		return username;
+	}
+
+	public void setUsername(String username) {
+		this.username = username;
+	}
+
+	public String getUsertel() {
+		return usertel;
+	}
+
+	public void setUsertel(String usertel) {
+		this.usertel = usertel;
+	}
+
+	public String getImid() {
+		return imid;
+	}
+
+	public void setImid(String imid) {
+		this.imid = imid;
+	}
+
+	public String getEmail() {
+		return email;
+	}
+
+	public void setEmail(String email) {
+		this.email = email;
+	}
+
+}

+ 191 - 0
src/main/java/com/uas/platform/home/model/UuzcUserInfo.java

@@ -0,0 +1,191 @@
+package com.uas.platform.home.model;
+
+/**
+ * 众创传输数据需要的参数
+ *
+ * Created by hejq on 2017-11-02.
+ */
+public class UuzcUserInfo {
+
+    /**
+     * 用户名
+     */
+    private String username;
+
+    /**
+     * 密码
+     */
+    private String password;
+
+    /**
+     * 邮箱
+     */
+    private String email;
+
+    /**
+     * 电话
+     */
+    private String mobile;
+
+    /**
+     * 优软云uid
+     */
+    private String uc_uid;
+
+    /**
+     * 盐值
+     */
+    private String salt;
+
+    /**
+     * 公司名称(企业需要)
+     */
+    private String companyname;
+
+    /**
+     * 公司联系人(企业需要)
+     */
+    private String contact;
+
+    /**
+     * 手机(企业需要)
+     */
+    private String telephone;
+
+    /**
+     * 公司400电话(企业需要)
+     */
+    private String landine_tel;
+
+    /**
+     * 营业执照号(企业需要)
+     */
+    private String license;
+
+    /**
+     * 注册资金(企业需要)
+     */
+    private Double registered;
+
+    /**
+     * 资金单位(企业需要)
+     */
+    private String currency;
+
+    /**
+     * 公司网址(企业需要)
+     */
+    private String website;
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public String getMobile() {
+        return mobile;
+    }
+
+    public void setMobile(String mobile) {
+        this.mobile = mobile;
+    }
+
+    public String getUc_uid() {
+        return uc_uid;
+    }
+
+    public void setUc_uid(String uc_uid) {
+        this.uc_uid = uc_uid;
+    }
+
+    public String getSalt() {
+        return salt;
+    }
+
+    public void setSalt(String salt) {
+        this.salt = salt;
+    }
+
+    public String getCompanyname() {
+        return companyname;
+    }
+
+    public void setCompanyname(String companyname) {
+        this.companyname = companyname;
+    }
+
+    public String getContact() {
+        return contact;
+    }
+
+    public void setContact(String contact) {
+        this.contact = contact;
+    }
+
+    public String getTelephone() {
+        return telephone;
+    }
+
+    public void setTelephone(String telephone) {
+        this.telephone = telephone;
+    }
+
+    public String getLandine_tel() {
+        return landine_tel;
+    }
+
+    public void setLandine_tel(String landine_tel) {
+        this.landine_tel = landine_tel;
+    }
+
+    public String getLicense() {
+        return license;
+    }
+
+    public void setLicense(String license) {
+        this.license = license;
+    }
+
+    public Double getRegistered() {
+        return registered;
+    }
+
+    public void setRegistered(Double registered) {
+        this.registered = registered;
+    }
+
+    public String getCurrency() {
+        return currency;
+    }
+
+    public void setCurrency(String currency) {
+        this.currency = currency;
+    }
+
+    public String getWebsite() {
+        return website;
+    }
+
+    public void setWebsite(String website) {
+        this.website = website;
+    }
+}

+ 14 - 2
src/main/resources/conf/account.properties

@@ -2,6 +2,18 @@
 sso.app=home
 # token secretkey
 sso.secretkey=0taQcW073Z7G628g5H
-sso.cookie.domain=.ubtob.com
 sso.cookie.secure=false
-sso.login.url=https://account.ubtob.com/sso/login
+
+#Õýʽ
+sso.cookie.domain=.ubtob.com
+sso.login.url=https://account.ubtob.com/sso/login
+
+#±¾µØ
+#sso.cookie.domain=:8080/home
+#sso.login.url=http://hejq.ubtob.com:8090/account/sso/login
+
+### account center config,
+account.us.save.url=http://10.10.100.133:8080/api/userspace
+account.user.save.url=http://10.10.100.133:8080/api/user
+account.user.getPartners.url = http://10.10.100.133:8080/api/partners
+account.user.getContactPage.url=https://account.ubtob.com/business/groups

+ 42 - 13
src/main/webapp/WEB-INF/views/normal/index.html

@@ -18,6 +18,7 @@
 <link rel="stylesheet" href="static/lib/bootstrap-tour/css/bootstrap-tour.min.css" />
 <link rel="stylesheet" href="static/css/common.css" />
 <link rel="stylesheet" href="static/css/index.css" />
+<link rel="stylesheet" href="static/css/toastr.css" />
 <title>优软云</title>
 <script>
 var _hmt = _hmt || [];
@@ -30,6 +31,24 @@ var _hmt = _hmt || [];
 </script>
 </head>
 <body>
+    <div id="body">
+        <!--请求众创登录接口的数据-->
+        <form action="" method="post" target="target" id="J_commenting">
+            <input id="username" name="username" type="hidden" >
+            <input id="password" name="password" type="hidden" >
+            <input id="email" name="email" type="hidden" >
+            <input id="mobile" name="mobile" type="hidden" >
+            <input id="uc_uid" name="uc_uid" type="hidden">
+            <input id="salt" name="salt" type="hidden" >
+            <!--企业-->
+            <input id="companyname" name="companyname" type="hidden" >
+            <input id="license" name="license" type="hidden" >
+            <input id="website" name="website" type="hidden" >
+            <input id="landine_tel" name="landine_tel" type="hidden" >
+            <input id="telephone" name="telephone" type="hidden" >
+        </form>
+        <iframe name="target" id="target" style="display:none;"></iframe>
+    </div>
 	<!-- nav start -->
 	<nav id="nav" class="navbar navbar-inverse navbar-fixed-top">
 		<div class="container">
@@ -43,14 +62,20 @@ var _hmt = _hmt || [];
 					<li><a href="http://www.usoftmall.com/" class="link-mall">优软商城</a></li>
 					<li><a href="saas/about" class="link-saas">优企云服</a></li>
 					<li><a href="#/finance" class="link-finance">金融服务</a></li><!-- http://finance.ubtob.com -->
-					<li><a href="http://job.uuzcc.com/" class="">人才招聘</a></li><!-- http://public.ubtob.com -->
+					<li><a href="#/uuzcJob" class="link-job">人才招聘</a></li><!-- http://public.ubtob.com -->
 					<li>
-						<a href="http://www.uuzcc.com/" class="">UU众创</a>
-						<ul>
-							<li><a href="http://zb.uuzcc.com/">任务外包</a></li>
-							<li><a href="http://fangan.uuzcc.com/">方案商城</a></li>
-							<li><a href="http://bbs.uuzcc.com/forum.php">技术论坛</a></li>
-						</ul>
+						<!--<a href="http://www.uuzcc.com/" class="">UU众创</a>-->
+						<!--<ul>-->
+							<!--<li><a href="http://zb.uuzcc.com/">任务外包</a></li>-->
+							<!--<li><a href="http://fangan.uuzcc.com/">方案商城</a></li>-->
+							<!--<li><a href="http://bbs.uuzcc.com/forum.php">技术论坛</a></li>-->
+						<!--</ul>-->
+                        <a href="#" class="x-link-info">UU众创</a>
+                        <ul>
+                            <li><a href="http://zb.uuzcc.com/">任务外包</a></li>
+                            <li><a href="http://fangan.uuzcc.com/">方案商城</a></li>
+                            <li><a href="http://bbs.uuzcc.com/forum.php">技术论坛</a></li>
+                        </ul>
 					</li><!-- http://public.ubtob.com -->
 					<li>
 						<a href="#/help" class="link-help">服务专区</a>
@@ -101,6 +126,7 @@ var _hmt = _hmt || [];
 				<li data-target="#carousel-example-generic" data-slide-to="7"></li>
 				<li data-target="#carousel-example-generic" data-slide-to="8"></li>
 				<li data-target="#carousel-example-generic" data-slide-to="9"></li>
+                <li data-target="#carousel-example-generic" data-slide-to="10"></li>
 			</ol>
 
 			<!-- Wrapper for slides -->
@@ -170,16 +196,18 @@ var _hmt = _hmt || [];
 						</div>
 					</div>
 				</div>
-				<div class="item carousel-item8">
-					<img src="static/img/carousel/header-09.jpg" alt="" />
+				<div class="item carousel-item10">
+					<img src="static/img/carousel/header-11.jpg" alt="" />
 					<div class="carousel-caption">
 						<div class="container">
 							<div class="header-text">
 								<h1>人才招聘</h1>
-								<p>优质服务,快速响应,极速入职!<br />
-									专为电子信息行业的资深工程师发现更好的工作机会,
-									<br />
-									为企业挖掘专业人才。</p>
+								<p>
+									优质服务,快速响应,急速入职!<br />专为电子信息行业的资深工程师发现更好的工作机会, <br/>为企业挖掘专业人才。
+								</p>
+							</div>
+							<div class="header-btn">
+								<a href="#" class="link-job-get">我要招人</a><a href="#" class="link-job-post">我要求职</a>
 							</div>
 						</div>
 					</div>
@@ -316,4 +344,5 @@ var _hmt = _hmt || [];
 <script type="text/javascript" src="static/lib/bootstrap-tour/js/bootstrap-tour.min.js"></script>
 <script type="text/javascript" src="static/js/common/common.js"></script>
 <script type="text/javascript" src="static/js/index/app.js"></script>
+<script type="text/javascript" src="static/js/common/toastr.js"></script>
 </html>

+ 128 - 0
src/main/webapp/WEB-INF/views/normal/setHrAccount.html

@@ -0,0 +1,128 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="renderer" content="webkit"> 
+<meta http-equiv="Content-Language" Content="zh-CN">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<meta name="author" content="优软科技">
+<meta name="Keywords" content="优软,优软云,优企云服,SAAS,UAS,ERP,企业管理">
+<meta name="baidu-site-verification" content="tamBdrxeYx" />
+<link href="static/img/icon/icon_32.png" rel="icon" type="image/x-icon" />
+<link rel="stylesheet" href="static/lib/bootstrap/css/bootstrap.min.css" />
+<link rel="stylesheet"
+	href="static/lib/fontawesome/css/font-awesome.min.css" />
+<link rel="stylesheet" href="static/lib/bootstrap-tour/css/bootstrap-tour.min.css" />
+<link rel="stylesheet" href="static/css/common.css" />
+<link rel="stylesheet" href="static/css/setHrAccount.css" />
+<title>设置hr账号</title>
+</head>
+<body>
+	<!-- nav start -->
+	<nav id="nav" class="navbar navbar-inverse navbar-fixed-top">
+		<div class="container">
+			<div class="navbar-header">
+				<a href="http://www.ubtob.com" id="logo"><img src="static/img/logo.png" alt=""
+					height="25px" /></a>
+			</div>
+			<div class="collapse navbar-collapse">
+				<div class="nav navbar-nav navbar-left">
+					<span>人才招聘</span>
+				</div>
+                <ul class="nav navbar-nav navbar-right x-nologin">
+                    <li><a href="#" class="link-login">登录</a></li>
+                    <li><a href="https://account.ubtob.com/sso/register">注册</a></li>
+                </ul>
+                <ul class="nav navbar-nav navbar-right x-login">
+                    <li class="dropdown">
+                        <a href="#" class="dropdown-toggle"><i class="fa fa-user"></i> <span class="title"></span></a>
+                    </li>
+                    <li><a href="#" class="link-logout">退出</a></li>
+                </ul>
+			</div>
+		</div>
+	</nav>
+	<!-- nav end -->
+
+	<!-- section start -->
+	<section>
+		<div class="container">
+			<div class="section-title">
+				<h3>设置HR账号</h3>
+			</div>
+			<div class="section-nav">
+				<span class="active">添加新的HR账号</span>
+				<span id="existUsers">选择现有人员账号</span>
+			</div>
+			<!--添加新的hr账号-->
+			<div class="section-choose show">
+				<form action="">
+					<div class="form-group">
+						<input id="hrname" type="text" class="form-control" placeholder="姓名" />
+					</div>
+					<div class="form-group">
+						<input id="hrtel" type="text" class="form-control" placeholder="电话号码" />
+					</div>
+					<div class="form-group">
+						<input id="hremail" type="text" class="form-control" placeholder="邮箱" />
+					</div>
+					<div class="form-group">
+						<a class="btn" id="addHrAccount" type="submit">添加并设置为HR账号</a>
+					</div>
+				</form>
+			</div>
+			<!--选择现有人员账号-->
+			<div class="section-choose" >
+				<form action="">
+					<div class="form-group">
+						<input type="text" id="username" class="form-control" placeholder="姓名" />
+						<ul id="userList">
+<!--							<li><b>李亚津</b><span class="phone">13800001111</span><span>liyj@ftchina.com</span></li>
+							<li><b>李亚津</b><span class="phone">13800001111</span><span>liyj@ftchina.com</span></li>
+							<li><b>李亚津</b><span class="phone">13800001111</span><span>liyj@ftchina.com</span></li>
+							<li><b>李亚津</b><span class="phone">13800001111</span><span>liyj@ftchina.com</span></li>
+							<li><b>李亚津</b><span class="phone">13800001111</span><span>liyj@ftchina.com</span></li>
+							<li><b>李亚津</b><span class="phone">13800001111</span><span>liyj@ftchina.com</span></li>
+							<li><b>李亚津</b><span class="phone">13800001111</span><span>liyj@ftchina.com</span></li>
+							<li><b>李亚津</b><span class="phone">13800001111</span><span>liyj@ftchina.com</span></li>
+							<li><b>李亚津</b><span class="phone">13800001111</span><span>liyj@ftchina.com</span></li>
+							<li><b>李亚津</b><span class="phone">13800001111</span><span>liyj@ftchina.com</span></li>
+							<li><b>李亚津</b><span class="phone">13800001111</span><span>liyj@ftchina.com</span></li>
+							<li><b>李亚津</b><span class="phone">13800001111</span><span>liyj@ftchina.com</span></li>-->
+						</ul>
+					</div>
+					<div class="form-group">
+						<input type="text" id="usertel" class="form-control" placeholder="电话号码" />
+					</div>
+					<div class="form-group">
+						<input type="text" id="useremail" class="form-control" placeholder="邮箱" />
+					</div>
+					<div class="form-group">
+						<input type="text" id="useruu" class="form-control" placeholder="UU号" />
+					</div>
+					<div class="form-group">
+						<a class="btn" id="setHrAccount" type="submit">添加并设置为HR账号</a>
+					</div>
+				</form>
+			</div>
+		</div>
+	</section>
+	<!-- section end -->
+
+</body>
+<script type="text/javascript" src="static/lib/jquery/jquery.min.js"></script>
+<script type="text/javascript" src="static/lib/bootstrap/js/bootstrap.min.js"></script>
+<script type="text/javascript" src="static/lib/bootstrap-tour/js/bootstrap-tour.min.js"></script>
+<script type="text/javascript" src="static/js/common/common.js"></script>
+<script type="text/javascript" src="static/js/index/app.js"></script>
+<script>
+	$(function(){
+		$('.section-nav').on('click','span',function() {
+			$(this).addClass('active').siblings().removeClass('active');
+			var $index = $(this).index();
+			$('.section-choose').eq($index).addClass('show').siblings().removeClass('show');
+		})
+	});
+</script>
+</html>

+ 2 - 0
src/main/webapp/WEB-INF/webmvc.xml

@@ -50,6 +50,8 @@
 	<mvc:view-controller path="/contact" view-name="contact" />
 	<mvc:view-controller path="/help/agreement" view-name="help/agreement" />
 	<mvc:view-controller path="/help/index" view-name="help/index" />
+	<mvc:view-controller path="/hiring" view-name="hiring" />
+	<mvc:view-controller path="/setHrAccount" view-name="setHrAccount" />
 
 	<mvc:interceptors>
 		<!-- SSO过滤 -->

+ 31 - 0
src/main/webapp/resources/css/index.css

@@ -296,3 +296,34 @@ section {
 .tour-backdrop {
 	opacity: 0.5;
 }
+
+/*人才招聘按钮*/
+header .carousel-caption .header-btn{
+	position: absolute;
+	bottom: 17%;
+	left: 50%;
+	margin-left: -200px;
+	width: 1140px;
+
+}
+header .carousel-caption .header-btn a{
+	display: inline-block;
+	width: 200px;
+	height: 40px;
+	line-height: 40px;
+	font-weight: bold;
+	text-align: center;
+	text-decoration: none;
+	border-radius: 20px;
+}
+header .carousel-caption .header-btn a:first-child{
+	margin-right: 26px;
+	font-size: 16px;
+	color: #fff;
+	background: #f85659;
+}
+header .carousel-caption .header-btn a:last-child{
+	font-size: 16px;
+	color: #f85659;
+	border: 1px solid #fff;
+}

+ 156 - 0
src/main/webapp/resources/css/setHrAccount.css

@@ -0,0 +1,156 @@
+/*nav begin*/
+div.navbar-nav{
+	position: relative;
+	height: 50px;
+	line-height: 50px;
+	font-size: 16px;
+	color: #fff;
+}
+div.navbar-nav span {
+	margin-left: 20px;
+}
+div.navbar-nav span:before{
+	content: '';
+	position: absolute;
+	top: 19px;
+	left: 0;
+	width: 1px;
+	height: 14px;
+	background: #dcdcdc;
+}
+.navbar-inverse .navbar-nav>li>a {
+	padding: 15px;
+	font-size: 14px;
+	color: #d3d3d3;
+}
+.navbar-inverse .navbar-nav>li>a.return{
+	font-size: 12px;
+}
+/*nav end*/
+
+/*section begin*/
+section {
+	margin: 0 auto;
+	width: 100%;
+}
+section .container{
+	margin: 0 auto;
+	width: 1140px;
+	text-align: center;
+}
+.section-title{
+	margin: 140px 0 70px;
+}
+.section-title h3{
+	font-size: 36px;
+	color: #1f1f1f;
+}
+.section-nav{
+	position: relative;
+	margin-bottom: 34px;
+}
+.section-nav span{
+	font-size: 16px;
+	color: #b5b5b5;
+	cursor: pointer;
+}
+.section-nav span:first-child{
+	margin-right: 56px;
+}
+.section-nav span:first-child:after{
+	position: absolute;
+	top: 4px;
+	right: 558px;
+	content: '';
+	width: 1px;
+	height: 16px;
+	background: #dcdcdc;
+}
+.section-nav span.active{
+	padding-bottom: 6px;
+	color: #e91c20;
+	border-bottom: 2px solid #f85659;
+}
+.section-choose .form-group {
+	margin: 0 auto;
+	position: relative;
+	margin-bottom: 12px;
+	width: 300px;
+}
+.section-choose .form-group input{
+	padding-left: 20px;
+	width: 300px;
+	height: 44px;
+	font-size: 16px;
+	color: #323232;
+	border-radius: 0;
+}
+.section-choose .form-group .btn{
+	margin-top: 40px;
+	width: 300px;
+	height: 44px;
+    line-height: 30px;
+	font-size: 16px;
+	color: #fff;
+	background: #f85659;
+	border-radius: 3px;
+}
+.section-choose .form-group ul{
+	position: absolute;
+	top: 44px;
+	left: 30px;
+	padding-left: 0;
+	margin: 0 auto;
+	width: 440px;
+	/*height: 300px;*/
+	background: #fff;
+	overflow-y: auto;
+	text-align:  left;
+	box-shadow: 0 0 2px 5px rgba(220,220,220,0.5);
+	-moz-box-shadow:  0 0 2px 5px rgba(220,220,220,0.5);
+	-webkit-box-shadow:  0 0 2px 5px rgba(220,220,220,0.5);
+	-o-box-shadow: 0 0 2px 5px rgba(220,220,220,0.5);
+	z-index: 1000;
+}
+.section-choose .form-group ul li{
+	width: 100%;
+	height: 34px;
+	line-height: 34px;
+	list-style: none;
+	cursor: pointer;
+}
+.section-choose .form-group ul li:hover,.section-choose .form-group ul li.active{
+	background: #e5e5e5;
+}
+.section-choose .form-group ul li b{
+	padding-left: 26px;
+	font-size: 14px;
+	font-weight: normal;
+	color: #323232;
+}
+.section-choose .form-group ul li span{
+	font-size: 14px;
+	color: #b4b4b4;
+}
+.section-choose .form-group ul li span.phone{
+	margin: 0 20px;
+}
+/*点击切换*/
+.section-choose{
+	display: none;
+}
+.show{
+	display: block;
+}
+/*section end*/
+
+
+#toast-container {
+    margin: 0 auto;
+    text-align: center;
+    position: fixed;
+    top: 20px !important ;
+    left: 50%!important ;
+    margin-left: -10%!important ;
+    z-index: 999999;
+}

+ 214 - 0
src/main/webapp/resources/css/toastr.css

@@ -0,0 +1,214 @@
+.toast-title {
+  font-weight: bold;
+}
+.toast-message {
+  -ms-word-wrap: break-word;
+  word-wrap: break-word;
+}
+
+.toast-message a,
+.toast-message label {
+  color: #ffffff;
+}
+.toast-message a:hover {
+  color: #cccccc;
+  text-decoration: none;
+}
+.toast-close-button {
+  position: relative;
+  right: -0.3em;
+  top: -0.3em;
+  float: right;
+  font-size: 20px;
+  font-weight: bold;
+  color: #ffffff;
+  -webkit-text-shadow: 0 1px 0 #ffffff;
+  text-shadow: 0 1px 0 #ffffff;
+  opacity: 0.8;
+  -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
+  filter: alpha(opacity=80);
+}
+.toast-close-button:hover,
+.toast-close-button:focus {
+  color: #000000;
+  text-decoration: none;
+  cursor: pointer;
+  opacity: 0.4;
+  -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
+  filter: alpha(opacity=40);
+}
+/*Additional properties for button version
+ iOS requires the button element instead of an anchor tag.
+ If you want the anchor version, it requires `href="#"`.*/
+button.toast-close-button {
+  padding: 0;
+  cursor: pointer;
+  background: transparent;
+  border: 0;
+  -webkit-appearance: none;
+}
+.toast-top-center {
+  top: 0;
+  right: 0;
+  width: 100%;
+}
+.toast-bottom-center {
+  bottom: 0;
+  right: 0;
+  width: 100%;
+}
+.toast-top-full-width {
+  top: 0;
+  right: 0;
+  width: 100%;
+}
+.toast-bottom-full-width {
+  bottom: 0;
+  right: 0;
+  width: 100%;
+}
+.toast-top-left {
+  top: 12px;
+  left: 12px;
+}
+.toast-top-right {
+  top: 12px;
+  right: 12px;
+}
+.toast-bottom-right {
+  right: 12px;
+  bottom: 12px;
+}
+.toast-bottom-left {
+  bottom: 12px;
+  left: 12px;
+}
+#toast-container {
+    margin: 0 auto;
+    text-align: center;
+    position: fixed;
+    top: 20% ;
+    left: 50%;
+    margin-left: -10%;
+    z-index: 999999;
+  /*overrides*/
+
+}
+#toast-container * {
+  -moz-box-sizing: border-box;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+}
+#toast-container > div {
+  position: relative;
+  overflow: hidden;
+  margin: 0 0 6px;
+  padding: 15px 15px 15px 50px;
+  width: 300px;
+  /*height: 70px;*/
+  -moz-border-radius: 3px 3px 3px 3px;
+  -webkit-border-radius: 3px 3px 3px 3px;
+  border-radius: 3px 3px 3px 3px;
+  background-position: 15px center;
+  background-repeat: no-repeat;
+  -moz-box-shadow: 0 0 12px #999999;
+  -webkit-box-shadow: 0 0 12px #999999;
+  box-shadow: 0 0 12px #999999;
+  color: #ffffff;
+  opacity: 0.8;
+  -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
+  filter: alpha(opacity=80);
+}
+#toast-container > :hover {
+  -moz-box-shadow: 0 0 12px #000000;
+  -webkit-box-shadow: 0 0 12px #000000;
+  box-shadow: 0 0 12px #000000;
+  opacity: 1;
+  -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
+  filter: alpha(opacity=100);
+  cursor: pointer;
+}
+#toast-container > .toast-info {
+  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=") !important;
+}
+#toast-container > .toast-error {
+  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=") !important;
+}
+#toast-container > .toast-success {
+  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==") !important;
+}
+#toast-container > .toast-warning {
+  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=") !important;
+}
+#toast-container.toast-top-center > div,
+#toast-container.toast-bottom-center > div {
+  width: 300px;
+  margin: auto;
+}
+#toast-container.toast-top-full-width > div,
+#toast-container.toast-bottom-full-width > div {
+  width: 96%;
+  margin: auto;
+}
+.toast {
+  background-color: #030303;
+}
+.toast-success {
+  background-color: #51a351;
+}
+.toast-error {
+  background-color: #bd362f;
+}
+.toast-info {
+  background-color: #2f96b4;
+}
+.toast-warning {
+  background-color: #f89406;
+}
+.toast-progress {
+  position: absolute;
+  left: 0;
+  bottom: 0;
+  height: 4px;
+  background-color: #000000;
+  opacity: 0.4;
+  -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
+  filter: alpha(opacity=40);
+}
+/*Responsive Design*/
+@media all and (max-width: 240px) {
+  #toast-container > div {
+    padding: 8px 8px 8px 50px;
+    width: 11em;
+  }
+  #toast-container .toast-close-button {
+    right: -0.2em;
+    top: -0.2em;
+  }
+}
+@media all and (min-width: 241px) and (max-width: 480px) {
+  #toast-container > div {
+    padding: 8px 8px 8px 50px;
+    width: 18em;
+  }
+  #toast-container .toast-close-button {
+    right: -0.2em;
+    top: -0.2em;
+  }
+}
+@media all and (min-width: 481px) and (max-width: 768px) {
+  #toast-container > div {
+    padding: 15px 15px 15px 50px;
+    width: 25em;
+  }
+}
+.toast-title {
+    font-weight: bold;
+    font-size: .4rem;
+}
+.toast-message {
+    -ms-word-wrap: break-word;
+    word-wrap: break-word;
+    font-size: .4rem;
+}
+

BIN
src/main/webapp/resources/img/carousel/header-11.jpg


+ 296 - 7
src/main/webapp/resources/js/common/common.js

@@ -1,38 +1,60 @@
 function isLogin() {
 	return window._hasAccountInfo;
 }
-// 获取用户信息
+
+/**
+ * 引入toaster方法
+ */
+document.write("<script language=javascript src='static/js/common/toastr.js'></script>");
+
+/**
+ *  获取用户信息
+ */
 function getAccountInfo() {
 	$.get('account', function(data){
 		if (data.content) {
 			$('.x-nologin').hide();
 			$('.x-login').show();
-			$('.x-login').find('.title').text(data.content.name + ',' + data.content.spaceName);
+
+			if(null != data.content.spaceName) {
+                $('.x-login').find('.title').text(data.content.name + ',' + data.content.spaceName);
+            } else {
+                $('.x-login').find('.title').text(data.content.name);
+            }
 			$('.link-mall').attr('href', 'http://www.usoftmall.com/login/proxy');
 			window._hasAccountInfo = true;
 		}
 	});
 }
 
-// 登录
+/**
+ * 登录
+ * @param event
+ */
 function login(event) {
 	event.preventDefault();
-	$.get('account/login', function(data){
+	$.get('account/login', function(data) {
 		data.content && (window.location.href = data.content);
 	});
 }
 
-// 退出
+/**
+ * 退出
+ */
 function logout() {
 	$.get('account/logout', function(data) {
 		if(data.success) {
 			logoutUuzc();
+            logoutUuzcJob();
 			setTimeout("window.location.reload()", 200);
 		}
 	});
 }
 
-function logoutUuzc() { // 通知众创登出
+/**
+ * 通知众创登出
+ */
+function logoutUuzc() {
 	var url = 'http://login.uuzcc.com/index/ubtob/logout';
 	$.ajax(url, {
 		dataType: 'jsonp',
@@ -45,6 +67,253 @@ function logoutUuzc() { // 通知众创登出
 	});
 }
 
+/**
+ * 通知众创人才招聘退出
+ */
+function logoutUuzcJob() {
+    var url = 'http://job.uuzcc.com/index.php?m=&c=ubtob&a=logout';
+    $.ajax(url, {
+        dataType: 'jsonp',
+        crossDomain: true,
+        success: function(data) {
+            if(data && data.resultcode == '200'){
+                console.log(data.result.today);
+            }
+        }
+    });
+}
+
+
+/**
+ * 点击顶部导航栏跳转到人才招聘
+ */
+function jobUuzc() {
+    var url = 'http://job.uuzcc.com/';
+    var loginUrl = 'http://job.uuzcc.com/index.php?m=&c=ubtob&a=login';
+    $.get('uuzc/account/check', function(data) {
+        var user = data.user;
+        if(data.usertype == 'hr') { // 账号类型是hr直接登录
+            loginJobUuzc(user, loginUrl, 'hr');
+            setTimeout(window.location.href = url, 200);
+        } else if(data.usertype == 'company' && !data.ishr) {// 如果是企业账号并且未设置hr账号,停留在当前页,其他的都跳转到人才招聘页
+            if(data.hr) {// 如果企业存在hr账号,直接跳转
+                loginJobUuzc(user, loginUrl, data.usertype);
+                setTimeout(window.location.href = url, 200);
+            } else {
+                return;
+            }
+        } else if(data.usertype == 'personal') {
+            loginJobUuzc(user, loginUrl, data.usertype);
+            setTimeout(window.location.href = url, 200);
+        } else {
+            window.location.href = url;
+        }
+    });
+}
+
+/**
+ * 链接到优软众创人才招聘(招聘入口)
+ */
+function jobUuzcGet() {
+    var url = 'http://job.uuzcc.com/';
+    var loginUrl = 'http://job.uuzcc.com/index.php?m=&c=ubtob&a=login';
+    $.get('uuzc/account/check', function(data) {
+        var user = data.user;
+        if(null != data && 'personal' == data.usertype) {
+            toastr.error("您的账号为个人账号,不可进行此操作");
+        } else if(null != data && 'company' == data.usertype) {
+            if(!data.hr) {// 企业不存在hr账号
+                if(data.manager) {// 管理员停留设置hr
+                    window.location.href = window.location.origin + window.location.pathname + "setHrAccount";
+                } else {
+                    toastr.error('请通知管理员' + data.managerName + '设置HR账号');
+                }
+            } else {// 如果企业存在hr
+                toastr.error('您的账号非HR账号,不可进行此操作');
+            }
+        } else if(data.usertype =='hr') {
+            loginJobUuzc(user, loginUrl, 'hr');
+            setTimeout(window.location.href = url, 200);
+        } else {
+            data.content && (window.location.href = data.content);
+        }
+    });
+}
+
+/**
+ * 人才招聘求职入口
+ */
+function jobUuzcPost() {
+    var url = 'http://job.uuzcc.com/';
+    var loginUrl = 'http://job.uuzcc.com/index.php?m=&c=ubtob&a=login';
+    $.get('uuzc/account/check', function(data) {
+        if(null != data.usertype) {
+            var user = data.user;
+            if(data.usertype == 'hr') {
+                toastr.error('您的账号为HR账号,不能进行此操作');
+                return;
+            } else {
+                loginJobUuzc(user, loginUrl, data.usertype);
+                setTimeout(window.location.href = url, 200);
+            }
+        } else {// 求职时可以未登录
+            data.content && (window.location.href = url);
+        }
+    });
+}
+
+/**
+ * 通知众创人才招聘登录
+ * @param user
+ * @param userLoginUrl
+ */
+function loginJobUuzc(user, url, type) {
+    $('#J_commenting').attr("action", url);
+    $('#username').val(user.username);
+    $('#password').val(user.password);
+    $('#email').val(user.email);
+    $('#mobile').val(user.mobile);
+    $('#uc_uid').val(user.uc_uid);
+    $('#salt').val(user.salt);
+    if(type == 'hr') {// 只有hr会带出当前企业的信息
+        $('#companyname').val(user.companyname);
+        $('#license').val(user.license);
+        $('#website').val(user.website);
+        $('#landine_tel').val(user.landine_tel);
+        $('#telephone').val(user.telephone);
+    }
+    $('#J_commenting').submit();
+}
+
+/**
+ * 添加hr账号
+ */
+function addHrAccount() {
+    var user = {
+        username: $('#hrname').val(),
+        email: $('#hremail').val(),
+        mobile: $('#hrtel').val()
+    };
+    $.ajax({
+        url: 'uuzc/setHrAccount',
+        data: user,
+        method: 'POST',
+        async: false,
+        success: function(data) {
+           if(data) {
+               var result = data.result;
+               if(result == 'success') {
+                   toastr.success('设置HR账号成功');
+                   setTimeout(window.location.href = 'http://www.ubtob.com/#/uuzcJob', 500);
+               }
+               if(result == 'exist') {
+                   toastr.error('该企业HR账号已存在');
+               }
+               if(result == 'setFailure') {
+                   toastr.erroror('设置HR账号失败');
+               }
+           }
+        },
+        error: function (error) {
+            toastr.erroror(error);
+        }
+    });
+}
+
+/**
+ * 设置hr账号
+ */
+function setHrAccount() {
+    var user = {
+        username: $('#username').val(),
+        email: $('#useremail').val(),
+        mobile: $('#usertel').val()
+    };
+    $.ajax({
+        url: 'uuzc/setHrAccount',
+        data: user,
+        method: 'POST',
+        async: false,
+        success: function(data) {
+            if(data) {
+                console.log(data);
+                var result = data.result;
+                if(result == 'success') {
+                    toastr.success('设置HR账号成功');
+                    setTimeout(window.location.href = 'http://www.ubtob.com/#/uuzcJob', 500);
+                }
+                if(result == 'exist') {
+                    toastr.error('该企业HR账号已存在');
+                }
+                if(result == 'setFailure') {
+                    toastr.erroror('设置HR账号失败');
+                }
+            }
+        },
+        error: function (error) {
+            toastr.erroror(error);
+        }
+    });
+}
+
+/**
+ * 获取当前企业已存在的用户的信息
+ */
+function getExistUser() {
+    var users = [];
+    $.ajax('uuzc/existusers', {
+        dataType: 'json',
+        method: 'GET',
+        async: false,
+        success: function(data) {
+            users = data.content;
+            if(users.length == 0) {
+                $('#userList').css('display','none');
+            }
+            var ul = document.getElementById("userList");
+            for(var i = 0; i < users.length; i++) {
+                var li = document.createElement('li');
+                var b = document.createElement('b');
+                b.innerHTML = users[i].name;
+                li.appendChild(b);
+                var span = document.createElement('span');
+                span.class = "phone"
+                span.innerHTML = users[i].uid;
+                li.appendChild(span);
+                var span2 = document.createElement('span');
+                span2.innerHTML = users[i].secondUID;
+                li.appendChild(span2);
+                li.id = 'btn_' + i;
+                ul.appendChild(li);
+                (function(i) {
+                    $("#btn_" + i ).click(function() {
+                        setAccount(users[i]);
+                        $('#userList').css('display','none');
+                    });
+                })(i)
+            }
+        }
+    });
+}
+
+/**
+ * 选择现有的人员赋值
+ *
+ * @param user
+ */
+function setAccount(user) {
+    $('#username').val(user.name);
+    $('#useremail').val(user.secondUID);
+    $('#usertel').val(user.uid);
+    $('#useruu').val(user.dialectUID);
+}
+
+/**
+ * 相关提示信息
+ */
+function suspendMessage() {
+    toastr.error('网站正在升级中,敬请期待!');
+}
 $(function() {
 	'use strict';
 	
@@ -65,5 +334,25 @@ $(function() {
 	
 	// 退出点击
 	$('.link-logout').click(logout);
-	
+
+	// 点击链接到众创人才招聘(招聘)
+    $('.link-job-get').click(jobUuzcGet);
+
+    // 连接到众创招聘
+    $('.link-job').click(jobUuzc);
+
+    // 求职
+    $('.link-job-post').click(jobUuzcPost);
+
+    // 添加hr账号(新增)
+    $('#addHrAccount').click(addHrAccount);
+
+    // 添加hr账户(现有)
+    $('#setHrAccount').click(setHrAccount);
+
+    // 获取当前企业用户信息
+    $('#existUsers').click(getExistUser);
+
+    // 点击众创链接给出提示
+    $('.x-link-info').click(suspendMessage);
 });

+ 415 - 0
src/main/webapp/resources/js/common/toastr.js

@@ -0,0 +1,415 @@
+/*
+ * Toastr
+ * Copyright 2012-2015
+ * Authors: John Papa, Hans Fjällemark, and Tim Ferrell.
+ * All Rights Reserved.
+ * Use, reproduction, distribution, and modification of this code is subject to the terms and
+ * conditions of the MIT license, available at http://www.opensource.org/licenses/mit-license.php
+ *
+ * ARIA Support: Greta Krafsig
+ *
+ * Project: https://github.com/CodeSeven/toastr
+ */
+/* global define */
+; (function (define) {
+    define(['jquery'], function ($) {
+        return (function () {
+            var $container;
+            var listener;
+            var toastId = 0;
+            var toastType = {
+                error: 'error',
+                info: 'info',
+                success: 'success',
+                warning: 'warning'
+            };
+
+            var toastr = {
+                clear: clear,
+                remove: remove,
+                error: error,
+                getContainer: getContainer,
+                info: info,
+                options: {},
+                subscribe: subscribe,
+                success: success,
+                version: '2.1.1',
+                warning: warning
+            };
+
+            var previousToast;
+
+            return toastr;
+
+            ////////////////
+
+            function error(message, title, optionsOverride) {
+                return notify({
+                    type: toastType.error,
+                    iconClass: getOptions().iconClasses.error,
+                    message: message,
+                    optionsOverride: optionsOverride,
+                    title: title
+                });
+            }
+
+            function getContainer(options, create) {
+                if (!options) { options = getOptions(); }
+                $container = $('#' + options.containerId);
+                if ($container.length) {
+                    return $container;
+                }
+                if (create) {
+                    $container = createContainer(options);
+                }
+                return $container;
+            }
+
+            function info(message, title, optionsOverride) {
+                return notify({
+                    type: toastType.info,
+                    iconClass: getOptions().iconClasses.info,
+                    message: message,
+                    optionsOverride: optionsOverride,
+                    title: title
+                });
+            }
+
+            function subscribe(callback) {
+                listener = callback;
+            }
+
+            function success(message, title, optionsOverride) {
+                return notify({
+                    type: toastType.success,
+                    iconClass: getOptions().iconClasses.success,
+                    message: message,
+                    optionsOverride: optionsOverride,
+                    title: title
+                });
+            }
+
+            function warning(message, title, optionsOverride) {
+                return notify({
+                    type: toastType.warning,
+                    iconClass: getOptions().iconClasses.warning,
+                    message: message,
+                    optionsOverride: optionsOverride,
+                    title: title
+                });
+            }
+
+            function clear($toastElement, clearOptions) {
+                var options = getOptions();
+                if (!$container) { getContainer(options); }
+                if (!clearToast($toastElement, options, clearOptions)) {
+                    clearContainer(options);
+                }
+            }
+
+            function remove($toastElement) {
+                var options = getOptions();
+                if (!$container) { getContainer(options); }
+                if ($toastElement && $(':focus', $toastElement).length === 0) {
+                    removeToast($toastElement);
+                    return;
+                }
+                if ($container.children().length) {
+                    $container.remove();
+                }
+            }
+
+            // internal functions
+
+            function clearContainer (options) {
+                var toastsToClear = $container.children();
+                for (var i = toastsToClear.length - 1; i >= 0; i--) {
+                    clearToast($(toastsToClear[i]), options);
+                }
+            }
+
+            function clearToast ($toastElement, options, clearOptions) {
+                var force = clearOptions && clearOptions.force ? clearOptions.force : false;
+                if ($toastElement && (force || $(':focus', $toastElement).length === 0)) {
+                    $toastElement[options.hideMethod]({
+                        duration: options.hideDuration,
+                        easing: options.hideEasing,
+                        complete: function () { removeToast($toastElement); }
+                    });
+                    return true;
+                }
+                return false;
+            }
+
+            function createContainer(options) {
+                $container = $('<div/>')
+                    .attr('id', options.containerId)
+                    .addClass(options.positionClass)
+                    .attr('aria-live', 'polite')
+                    .attr('role', 'alert');
+
+                $container.appendTo($(options.target));
+                return $container;
+            }
+
+            function getDefaults() {
+                return {
+                    tapToDismiss: true,
+                    toastClass: 'toast',
+                    containerId: 'toast-container',
+                    debug: false,
+
+                    showMethod: 'fadeIn', //fadeIn, slideDown, and show are built into jQuery
+                    showDuration: 300,
+                    showEasing: 'swing', //swing and linear are built into jQuery
+                    onShown: undefined,
+                    hideMethod: 'fadeOut',
+                    hideDuration: 1000,
+                    hideEasing: 'swing',
+                    onHidden: undefined,
+
+                    extendedTimeOut: 1000,
+                    iconClasses: {
+                        error: 'toast-error',
+                        info: 'toast-info',
+                        success: 'toast-success',
+                        warning: 'toast-warning'
+                    },
+                    iconClass: 'toast-info',
+                    positionClass: 'toast-top-right',
+                    timeOut: 500000, // Set timeOut and extendedTimeOut to 0 to make it sticky
+                    titleClass: 'toast-title',
+                    messageClass: 'toast-message',
+                    target: 'body',
+                    closeHtml: '<button type="button">&times;</button>',
+                    newestOnTop: true,
+                    preventDuplicates: false,
+                    progressBar: false
+                };
+            }
+
+            function publish(args) {
+                if (!listener) { return; }
+                listener(args);
+            }
+
+            function notify(map) {
+                var options = getOptions();
+                var iconClass = map.iconClass || options.iconClass;
+
+                if (typeof (map.optionsOverride) !== 'undefined') {
+                    options = $.extend(options, map.optionsOverride);
+                    iconClass = map.optionsOverride.iconClass || iconClass;
+                }
+
+                if (shouldExit(options, map)) { return; }
+
+                toastId++;
+
+                $container = getContainer(options, true);
+
+                var intervalId = null;
+                var $toastElement = $('<div/>');
+                var $titleElement = $('<div/>');
+                var $messageElement = $('<div/>');
+                var $progressElement = $('<div/>');
+                var $closeElement = $(options.closeHtml);
+                var progressBar = {
+                    intervalId: null,
+                    hideEta: null,
+                    maxHideTime: null
+                };
+                var response = {
+                    toastId: toastId,
+                    state: 'visible',
+                    startTime: new Date(),
+                    options: options,
+                    map: map
+                };
+
+                personalizeToast();
+
+                displayToast();
+
+                handleEvents();
+
+                publish(response);
+
+                if (options.debug && console) {
+                    console.log(response);
+                }
+
+                return $toastElement;
+
+                function personalizeToast() {
+                    setIcon();
+                    setTitle();
+                    setMessage();
+                    setCloseButton();
+                    setProgressBar();
+                    setSequence();
+                }
+
+                function handleEvents() {
+                    $toastElement.hover(stickAround, delayedHideToast);
+                    if (!options.onclick && options.tapToDismiss) {
+                        $toastElement.click(hideToast);
+                    }
+
+                    if (options.closeButton && $closeElement) {
+                        $closeElement.click(function (event) {
+                            if (event.stopPropagation) {
+                                event.stopPropagation();
+                            } else if (event.cancelBubble !== undefined && event.cancelBubble !== true) {
+                                event.cancelBubble = true;
+                            }
+                            hideToast(true);
+                        });
+                    }
+
+                    if (options.onclick) {
+                        $toastElement.click(function () {
+                            options.onclick();
+                            hideToast();
+                        });
+                    }
+                }
+
+                function displayToast() {
+                    $toastElement.hide();
+
+                    $toastElement[options.showMethod](
+                        {duration: options.showDuration, easing: options.showEasing, complete: options.onShown}
+                    );
+
+                    if (options.timeOut > 0) {
+                        intervalId = setTimeout(hideToast, options.timeOut);
+                        progressBar.maxHideTime = parseFloat(options.timeOut);
+                        progressBar.hideEta = new Date().getTime() + progressBar.maxHideTime;
+                        if (options.progressBar) {
+                            progressBar.intervalId = setInterval(updateProgress, 10);
+                        }
+                    }
+                }
+
+                function setIcon() {
+                    if (map.iconClass) {
+                        $toastElement.addClass(options.toastClass).addClass(iconClass);
+                    }
+                }
+
+                function setSequence() {
+                    if (options.newestOnTop) {
+                        $container.prepend($toastElement);
+                    } else {
+                        $container.append($toastElement);
+                    }
+                }
+
+                function setTitle() {
+                    if (map.title) {
+                        $titleElement.append(map.title).addClass(options.titleClass);
+                        $toastElement.append($titleElement);
+                    }
+                }
+
+                function setMessage() {
+                    if (map.message) {
+                        $messageElement.append(map.message).addClass(options.messageClass);
+                        $toastElement.append($messageElement);
+                    }
+                }
+
+                function setCloseButton() {
+                    if (options.closeButton) {
+                        $closeElement.addClass('toast-close-button').attr('role', 'button');
+                        $toastElement.prepend($closeElement);
+                    }
+                }
+
+                function setProgressBar() {
+                    if (options.progressBar) {
+                        $progressElement.addClass('toast-progress');
+                        $toastElement.prepend($progressElement);
+                    }
+                }
+
+                function shouldExit(options, map) {
+                    if (options.preventDuplicates) {
+                        if (map.message === previousToast) {
+                            return true;
+                        } else {
+                            previousToast = map.message;
+                        }
+                    }
+                    return false;
+                }
+
+                function hideToast(override) {
+                    if ($(':focus', $toastElement).length && !override) {
+                        return;
+                    }
+                    clearTimeout(progressBar.intervalId);
+                    return $toastElement[options.hideMethod]({
+                        duration: options.hideDuration,
+                        easing: options.hideEasing,
+                        complete: function () {
+                            removeToast($toastElement);
+                            if (options.onHidden && response.state !== 'hidden') {
+                                options.onHidden();
+                            }
+                            response.state = 'hidden';
+                            response.endTime = new Date();
+                            publish(response);
+                        }
+                    });
+                }
+
+                function delayedHideToast() {
+                    if (options.timeOut > 0 || options.extendedTimeOut > 0) {
+                        intervalId = setTimeout(hideToast, options.extendedTimeOut);
+                        progressBar.maxHideTime = parseFloat(options.extendedTimeOut);
+                        progressBar.hideEta = new Date().getTime() + progressBar.maxHideTime;
+                    }
+                }
+
+                function stickAround() {
+                    clearTimeout(intervalId);
+                    progressBar.hideEta = 0;
+                    $toastElement.stop(true, true)[options.showMethod](
+                        {duration: options.showDuration, easing: options.showEasing}
+                    );
+                }
+
+                function updateProgress() {
+                    var percentage = ((progressBar.hideEta - (new Date().getTime())) / progressBar.maxHideTime) * 100;
+                    $progressElement.width(percentage + '%');
+                }
+            }
+
+            function getOptions() {
+                return $.extend({}, getDefaults(), toastr.options);
+            }
+
+            function removeToast($toastElement) {
+                if (!$container) { $container = getContainer(); }
+                if ($toastElement.is(':visible')) {
+                    return;
+                }
+                $toastElement.remove();
+                $toastElement = null;
+                if ($container.children().length === 0) {
+                    $container.remove();
+                    previousToast = undefined;
+                }
+            }
+
+        })();
+    });
+}(typeof define === 'function' && define.amd ? define : function (deps, factory) {
+    if (typeof module !== 'undefined' && module.exports) { //Node
+        module.exports = factory(require('jquery'));
+    } else {
+        window['toastr'] = factory(window['jQuery']);
+    }
+}));

+ 2 - 0
src/main/webapp/resources/js/index/app.js

@@ -18,6 +18,8 @@ $(function() {
 				$('.carousel').carousel(9); break;
 			case '/help':
 				$('.carousel').carousel(7); break;
+            case '/uuzcJob':
+                $('.carousel').carousel(5); break;
 		}
 	};