|
|
<!DOCTYPE html>
|
|
|
<html>
|
|
|
|
|
|
<head>
|
|
|
<meta charset="UTF-8">
|
|
|
<title>个人中心</title>
|
|
|
<meta name="renderer" content="webkit">
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
|
|
<link rel="stylesheet" href="../../static/css/font.css">
|
|
|
<link rel="stylesheet" href="../../static/css/weadmin.css">
|
|
|
<link rel="stylesheet" href="../../lib/layui/css/layui.css">
|
|
|
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
|
|
|
<!--[if lt IE 9]>
|
|
|
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
|
|
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
|
|
<script type="text/javascript" src="http://qzonestyle.gtimg.cn/qzone/openapi/qc_loader.js" id="qqScript" data-appid="" data-redirecturi="" charset="utf-8" ></script>
|
|
|
<![endif]-->
|
|
|
<style>
|
|
|
.bindLi li{
|
|
|
height: 83px;
|
|
|
line-height: 83px;
|
|
|
padding-top: 15px;
|
|
|
border-bottom: 1px solid #e6e6e6;
|
|
|
padding: 0 20px;
|
|
|
clear: both;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.bindLi li:last-child {
|
|
|
border-bottom:none;
|
|
|
}
|
|
|
.fl {
|
|
|
float: left;
|
|
|
}
|
|
|
.fr {
|
|
|
float: right;
|
|
|
}
|
|
|
.hide{
|
|
|
display: none;
|
|
|
}
|
|
|
ul li p {
|
|
|
display: none;
|
|
|
}
|
|
|
.box {
|
|
|
position: relative;
|
|
|
width: 200px;
|
|
|
height: 83px;
|
|
|
}
|
|
|
.box span:nth-child(1) {
|
|
|
position: absolute;
|
|
|
left: 21px;
|
|
|
top:0px;
|
|
|
font-size:16px;
|
|
|
color: #666;
|
|
|
width: 300px;
|
|
|
}
|
|
|
.box span:nth-child(2) {
|
|
|
position: absolute;
|
|
|
left: 21px;
|
|
|
top:13px;
|
|
|
font-size:14px;
|
|
|
color: #888;
|
|
|
width: 300px;
|
|
|
}
|
|
|
.account a {
|
|
|
color: #059eff;
|
|
|
margin-left: 14px;
|
|
|
}
|
|
|
.account {
|
|
|
display: none;
|
|
|
}
|
|
|
.basicInfo {
|
|
|
padding-left: 106px;
|
|
|
}
|
|
|
.basicInfo li {
|
|
|
height: 40px;
|
|
|
line-height: 40px;
|
|
|
font-size: 15px;
|
|
|
color:#222;
|
|
|
}
|
|
|
.basicInfo li label {
|
|
|
text-align: right;
|
|
|
width: 90px;
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.basicInfo li:last-child {
|
|
|
margin-top: 30px;
|
|
|
padding-left: 90px;
|
|
|
}
|
|
|
</style>
|
|
|
|
|
|
</head>
|
|
|
|
|
|
<body>
|
|
|
<div style="padding:0 10px 20px 15px">
|
|
|
<div class="layui-tab layui-tab-brief" lay-filter="demo">
|
|
|
<ul class="layui-tab-title">
|
|
|
<li style="display: none">基本信息</li>
|
|
|
<li id="bindSetting" class="layui-this" >绑定设置</li>
|
|
|
<li id="changePwd" >修改密码</li>
|
|
|
</ul>
|
|
|
<div class="layui-tab-content" style="height:370px;padding-top:30px">
|
|
|
<div class="layui-tab-item" style="display: none">
|
|
|
<ul class="basicInfo">
|
|
|
<li>
|
|
|
<label for="">用户名:</label><span>测试测试</span>
|
|
|
</li>
|
|
|
<li>
|
|
|
<label for="">所属单位:</label><span>测试测试</span>
|
|
|
</li>
|
|
|
<li>
|
|
|
<label for="">身份证号:</label><span>2201656432121412424</span>
|
|
|
</li>
|
|
|
<li>
|
|
|
<label for="">用户名:</label><span>测试测试</span>
|
|
|
</li>
|
|
|
<li>
|
|
|
<label for="">所属单位:</label><span>测试测试</span>
|
|
|
</li>
|
|
|
<li>
|
|
|
<label for="">身份证号:</label><span>2201656432121412424</span>
|
|
|
</li>
|
|
|
<li>
|
|
|
<button class="layui-btn">保存</button>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
<div class="layui-tab-item layui-show">
|
|
|
<p style="color:#666;height:50px;line-height:50px;display: none">绑定帐号后,您可以直接用其登录长春市教育管理公共服务平台</p>
|
|
|
<ul class="bindLi">
|
|
|
<li>
|
|
|
<div class="fl">
|
|
|
<i class="fl"><img src="../../static/images/tel.png" alt="wechat" width="62" height="62"></i>
|
|
|
<div class="fl tel box">
|
|
|
<span>手机</span>
|
|
|
<span class="account"></span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="fr" id="tel">
|
|
|
<button class="layui-btn layui-icon layui-icon-add-1 bind" onclick="bindTel();"> 绑定</button>
|
|
|
<button class="layui-btn layui-icon layui-icon-ok unbind hide" onclick=""> 已绑定</button>
|
|
|
</div>
|
|
|
</li>
|
|
|
<li>
|
|
|
<div class="fl qq">
|
|
|
<i class="fl"><img src="../../static/images/qq.png" alt="QQ" width="56" height="56"></i>
|
|
|
<div class="fl qq box">
|
|
|
<span>QQ</span>
|
|
|
<span class="account"></span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="fr" id="qq">
|
|
|
<button class="layui-btn layui-icon layui-icon-add-1 bind" onclick="bindQq();"> 绑定</button>
|
|
|
<button class="layui-btn layui-icon layui-icon-ok unbind hide" onclick=""> 已绑定</button>
|
|
|
</div>
|
|
|
</li>
|
|
|
<li>
|
|
|
<div class="fl wx">
|
|
|
<i class="fl"><img src="../../static/images/wx.png" alt="wechat" width="56" height="56"></i>
|
|
|
<div class="fl wx box">
|
|
|
<span>微信</span>
|
|
|
<span class="account"></span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="fr" id="wx">
|
|
|
<button class="layui-btn layui-icon layui-icon-add-1 bind" onclick="bindWx();"> 绑定</button>
|
|
|
<button class="layui-btn layui-icon layui-icon-ok unbind hide" onclick=""> 已绑定</button>
|
|
|
</div>
|
|
|
</li>
|
|
|
<li>
|
|
|
<div class="fl email">
|
|
|
<i class="fl"><img src="../../static/images/email.png" alt="wechat" width="56" height="56"></i>
|
|
|
<div class="fl email box">
|
|
|
<span>邮箱</span>
|
|
|
<span class="account"></span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="fr" id="email">
|
|
|
<button class="layui-btn layui-icon layui-icon-add-1 bind" onclick="bindEmail();"> 绑定</button>
|
|
|
<button class="layui-btn layui-icon layui-icon-ok unbind hide" onclick=""> 已绑定</button>
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
<div class="layui-tab-item">
|
|
|
<form class="layui-form">
|
|
|
<div class="layui-form-item"></div>
|
|
|
<div class="layui-form-item">
|
|
|
<label for="old" class="layui-form-label">
|
|
|
<span class="we-red">*</span>原密码
|
|
|
</label>
|
|
|
<div class="layui-input-inline textinput">
|
|
|
<input type="password" id="old" name="old" lay-verify="required|pwd" autocomplete="off" placeholder="请输入原密码" maxlength="18" minlength="6" class="layui-input">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-form-item">
|
|
|
<label for="new" class="layui-form-label">
|
|
|
<span class="we-red">*</span>新密码
|
|
|
</label>
|
|
|
<div class="layui-input-inline textinput">
|
|
|
<input type="password" id="new" name="new" lay-verify="required|pwd" autocomplete="off" placeholder="请输入新密码" maxlength="18" minlength="6" class="layui-input">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-form-item">
|
|
|
<label for="repwd" class="layui-form-label">
|
|
|
<span class="we-red">*</span>确认密码
|
|
|
</label>
|
|
|
<div class="layui-input-inline textinput">
|
|
|
<input type="password" id="repwd" name="repwd" lay-verify="required|pwd" placeholder="请输入确认密码" maxlength="18" minlength="6" autocomplete="off" class="layui-input">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-form-item">
|
|
|
<label for="" class="layui-form-label">
|
|
|
</label>
|
|
|
<button class="layui-btn" lay-filter="save" lay-submit="" id="save">保存</button>
|
|
|
</div>
|
|
|
</form>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<script src="../../lib/layui/layui.js"></script>
|
|
|
<script>
|
|
|
layui.extend({
|
|
|
admin: '{/}../../static/js/admin'
|
|
|
});
|
|
|
|
|
|
layui.use(['jquery','admin','element','form'], function(){
|
|
|
var $ = layui.jquery,
|
|
|
element = layui.element,
|
|
|
form = layui.form,
|
|
|
admin = layui.admin; //Tab的切换功能,切换事件监听等,需要依赖element模块
|
|
|
|
|
|
window.isTelBind=function(){
|
|
|
// 获取登录人员是否绑定手机
|
|
|
$.ajax({
|
|
|
type : "GET",
|
|
|
async : false,
|
|
|
url : '/dsBase/loginPerson/getIsBindPhoneNum',
|
|
|
dataType : "json",
|
|
|
success: function (data) {
|
|
|
if(data.bind==1){
|
|
|
$("#tel .unbind").show();//已经绑定
|
|
|
$("#tel .bind").hide();
|
|
|
var phone=data.phone;
|
|
|
phone=phone.substr(0,3)+"****"+phone.substr(phone.length-4);
|
|
|
$(".tel .account").show().html("已绑定:"+phone+"<a href=\"javascript:changeTel();\">修改</a>");
|
|
|
$(".tel span:nth-child(1)").css({
|
|
|
"position":"absolute",
|
|
|
"top":"-15px"
|
|
|
});
|
|
|
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
window.isQqBind=function(){
|
|
|
$.ajax({
|
|
|
type : "GET",
|
|
|
async : false,
|
|
|
url : '/dsBase/loginPerson/getIsBindQq',
|
|
|
dataType : "json",
|
|
|
success: function (data) {
|
|
|
if(data.bind==1){
|
|
|
$("#qq .unbind").show();//已经绑定
|
|
|
$("#qq .bind").hide();
|
|
|
// $(".qq .account").show().html("已绑定:");
|
|
|
// $(".qq span:nth-child(1)").css({
|
|
|
// "position":"absolute",
|
|
|
// "top":"-15px"
|
|
|
// });
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
window.isWxBind=function(){
|
|
|
$.ajax({
|
|
|
type : "GET",
|
|
|
async : false,
|
|
|
url : '/dsBase/loginPerson/getIsBindWx',
|
|
|
dataType : "json",
|
|
|
success: function (data) {
|
|
|
if(data.bind==1){
|
|
|
$("#wx .unbind").show();//已经绑定
|
|
|
$("#wx .bind").hide();
|
|
|
// $(".wx .account").show().html("已绑定:");
|
|
|
// $(".wx span:nth-child(1)").css({
|
|
|
// "position":"absolute",
|
|
|
// "top":"-15px"
|
|
|
// });
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
window.isEmailBind=function(){
|
|
|
$.ajax({
|
|
|
type : "GET",
|
|
|
async : false,
|
|
|
url : '/dsBase/loginPerson/getIsBindEmail',
|
|
|
dataType : "json",
|
|
|
success: function (data) {
|
|
|
if(data.bind==1){
|
|
|
$("#email .unbind").show();//已经绑定
|
|
|
$("#email .bind").hide();
|
|
|
$(".email .account").show().html("已绑定:"+data.email+"<a href=\"javascript:changeEmail();\">修改</a>");
|
|
|
$(".email span:nth-child(1)").css({
|
|
|
"position":"absolute",
|
|
|
"top":"-15px"
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
$(function () {
|
|
|
$("body").css({
|
|
|
"height":"458px",
|
|
|
"overflow":"hidden"
|
|
|
});
|
|
|
isTelBind();
|
|
|
isQqBind();
|
|
|
isWxBind();
|
|
|
isEmailBind();
|
|
|
var data=getcookie();
|
|
|
if(data.identity_id==2||data.identity_id==3||data.identity_id==4){
|
|
|
$("#bindSetting").hide();
|
|
|
}
|
|
|
})
|
|
|
window.bindTel=function () {
|
|
|
WeAdminShow('绑定手机号','./bindTel.html',500,350);
|
|
|
}
|
|
|
// 修改手机号
|
|
|
window.changeTel=function(){
|
|
|
WeAdminShow('修改手机号','./bindTel.html',500,350);
|
|
|
}
|
|
|
|
|
|
window.bindQq=function () {
|
|
|
var url=document.location.protocol+'//'+document.domain+"/dsBase/html/pages/personalCenter/qq-passport.html";
|
|
|
window.open('https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101470748&response_type=code&scope=all&redirect_uri='+url);
|
|
|
|
|
|
|
|
|
}
|
|
|
window.bindWx=function () {
|
|
|
var url=document.location.protocol+'//'+document.domain+"/dsBase/html/pages/personalCenter/wx-passport.html";
|
|
|
window.open("https://open.weixin.qq.com/connect/qrconnect?appid=wx3e0449144386938a&redirect_uri="+url+"&response_type=code&scope=snsapi_login&state=STATE#wechat_redirect");
|
|
|
}
|
|
|
window.bindEmail=function () {
|
|
|
WeAdminShow('绑定邮箱','./bindEmail.html',500,350);
|
|
|
}
|
|
|
window.changeEmail=function () {
|
|
|
WeAdminShow('修改邮箱','./bindEmail.html',500,350);
|
|
|
}
|
|
|
|
|
|
|
|
|
// 密码校验 6-18位 大小写字母加数字
|
|
|
form.verify({
|
|
|
pwd: [
|
|
|
/^[A-Za-z0-9]{6,18}$/
|
|
|
,'密码必须是6到18位大小写字母与数字的组合,且不能出现空格'
|
|
|
]
|
|
|
});
|
|
|
// 监听提交
|
|
|
form.on('submit(save)',function (data) {
|
|
|
var f=data.field;
|
|
|
console.log(f);
|
|
|
// 校验新密码与确认密码是否相等
|
|
|
if(f.repwd!==f.new){
|
|
|
layer.msg('确认密码与新密码不一致,请重新输入',{icon:0});
|
|
|
return false;
|
|
|
}
|
|
|
$.ajax({
|
|
|
type:'POST',
|
|
|
dataType:'json',
|
|
|
url:'/dsBase/loginPerson/changePwd',
|
|
|
data:{
|
|
|
'old_pwd':f.old,
|
|
|
'new_pwd':f.new
|
|
|
},
|
|
|
success:function (data) {
|
|
|
if(data.success){
|
|
|
layer.msg('密码修改成功,3秒后您将重新登录',{icon: 1, time: 3000, shade: 0.1},function () {
|
|
|
var index=parent.layer.getFrameIndex(window.name);
|
|
|
parent.layer.close(index);
|
|
|
window.parent.location.href='/dsBase/logout';
|
|
|
});
|
|
|
|
|
|
}else{
|
|
|
layer.alert(data.message,{icon:0});
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
return false;
|
|
|
})
|
|
|
|
|
|
|
|
|
});
|
|
|
</script>
|
|
|
|
|
|
</body>
|
|
|
|
|
|
</html> |