| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <script src="Script/Common/huayi.load.js"></script>
- <script src="Script/Common/huayi.config.js"></script>
- <title>个人中心</title>
- <!--[if lt IE 9]>
- <meta http-equiv="refresh" content="0;ie.html" />
- <![endif]-->
- <link href="./css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
- <link href="./css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
- <link href="./css/animate.min.css" rel="stylesheet">
- <link href="./css/style.min862f.css?v=4.1.0" rel="stylesheet">
- <!--<link rel="stylesheet" href="js/cropper/cropper.css" />-->
- <link href="./css/plugins/cropper/cropper.min.css" rel="stylesheet">
- <link href="./css/plugins/jasny/jasny-bootstrap.min.css" rel="stylesheet">
- <style>
- .clearFix:after {
- content: "";
- display: block;
- clear: both;
- }
- .personal {
- width: 500px;
- margin: 0 auto;
- font-size: 14px;
- }
- .perBox {
- border: 1px solid #eeeeee;
- height: 400px;
- }
- .ptop {
- height: 35px;
- background: #2f4050;
- color: #fff;
- line-height: 35px;
- padding: 0 15px;
- border-top-left-radius: 3px;
- border-top-right-radius: 3px;
- }
- .ptop .ptl {
- float: left;
- margin: 0;
- }
- .ptop .ptr {
- float: right;
- font-size: 18px;
- cursor: pointer;
- margin: 0;
- }
- .perTab {
- width: 100%;
- border-bottom: 1px solid #b3b3b3;
- list-style: none;
- padding: 0 12px;
- margin-top: 15px;
- }
- .perTab li {
- float: left;
- padding: 7px;
- cursor: pointer;
- }
- .sel {
- border-top: 1px solid #b3b3b3;
- border-left: 1px solid #b3b3b3;
- border-right: 1px solid #b3b3b3;
- border-top-left-radius: 3px;
- border-top-right-radius: 3px;
- }
- .grt {
- width: 90%;
- margin: 0 auto;
- border-bottom: 1px solid #999999;
- }
- .grtl {
- float: left;
- }
- .grtr {
- float: right;
- }
- .grtr i{
- display: inline-block;
- vertical-align: middle;
- width: 18px;
- height: 18px;
- cursor: pointer;
- }
- .grqx{
- background: url(img/grcx.png) no-repeat;
- margin-right: 5px;
- }
- .grbj{
- background: url(img/bjic.png) no-repeat;
- }
- .grzl {
- font-size: 14px;
- border: 0;
- width: 80%;
- margin: 35px auto;
- }
- .grzl tr {
- border: 0;
- }
- .grzl th {
- padding: 5px 8px 5px 0;
- text-align: right;
- width: 45%;
- font-weight: normal;
- border: 0;
- }
- .grzl tbody > tr > td,
- .grzl tbody > tr > th {
- border: 0;
- }
- .grzl tbody > tr > td input {
- border: 0;
- outline: none;
- padding-left: 5px;
- width: 50%;
- }
- .crop_left {
- width: 40%;
- float: left;
- }
- .image-crop {
- width: 100%;
- }
- .crop_left img {
- width: 100%;
- }
- .crop_right {
- width: 30%;
- float: right;
- margin-right: 25px;
- }
- .img-preview-sm {
- width: 100%;
- }
- .img-preview-sm img {
- width: 100%;
- height: 100%;
- }
- .perTab_con > div {
- display: none;
- }
- .btnn {
- background: #2f4050;
- color: #fff;
- padding: 3px 10px;
- border: 0;
- border-radius: 3px;
- cursor: pointer;
- }
- .wrong {
- color: red;
- display: none;
- }
- </style>
- </head>
- <body class="gray-bg" style="background: #fefefe;">
- <div class="personal">
- <div class="ptop clearFix">
- <p class="ptl">个人中心</p>
- <p class="ptr" title="关闭">x</p>
- </div>
- <div class="perBox ">
- <ul class="perTab clearFix">
- <li class="sel">个人资料</li>
- <li>修改头像</li>
- </ul>
- <div class="perTab_con">
- <div class="geRen" style="display: block;">
- <div class="grt clearFix">
- <p class="grtl">基本资料</p>
- <p class="grtr">
- <i class="grqx" title="取消编辑"></i>
- <i class="grbj" title="编辑资料"></i>
- </p>
-
- </div>
- <table class="table grzl">
- <tr>
- <th>我的工号:</th>
- <td><input type="text" value="00000" class="mgh" /></td>
- </tr>
- <tr>
- <th>我的姓名:</th>
- <td><input type="text" value="小白" class="mn" /></td>
- </tr>
- <tr>
- <th>原密码:</th>
- <td><input type="password" value="123456" class="spwd" /></td>
- </tr>
- <tr>
- <th>新密码:</th>
- <td><input type="password" value="123456" class="npwd" /></td>
- </tr>
- <tr>
- <th>确认密码:</th>
- <td><input type="password" value="123456" class="epwd" /><span class="wrong">*密码不一致</span></td>
- </tr>
- <tr>
- <th></th>
- <td><button class="btnn grbtn">保存修改</button></td>
- </tr>
- </table>
- </div>
- <div class="crop ">
- <div class="clearFix" style="margin-top: 45px;">
- <div class="crop_left">
- <div class="image-crop">
- <img src="./img/gaga.jpg">
- </div>
- </div>
- <div class="crop_right">
- <h4>图片预览:</h4>
- <div class="img-preview img-preview-sm"></div>
- </div>
- </div>
- <!--<div class="btn-group">
- <label title="上传图片" for="inputImage" class="btn btn-primary">
- <input type="file" accept="image/*" name="file" id="inputImage" class="hide"> 本地上传
- </label>-->
- <!--<label title="下载图片" id="download" class="btn btn-primary">下载</label>-->
- <!--</div>
- <div class="btn-group">-->
- <!--<button class="btn btn-white" id="zoomIn" type="button">放大</button>-->
- <!--<button class="btn btn-white" id="zoomOut" type="button">缩小</button>-->
- <!--<button class="btn btn-white" id="rotateLeft" type="button">左旋转</button>-->
- <!--<button class="btn btn-white" id="rotateRight" type="button">右旋转</button>-->
- <!--<button class="btn btn-warning " id="setDrag" type="button">裁剪</button>
- </div>-->
- <div class="anniu" style="margin-top: 75px;text-align: center;">
- <label title="上传图片" for="inputImage" class="btnn" style="margin-right: 100px;">
- <input type="file" accept="image/*" name="file" id="inputImage" class="hide"> 本地上传
- </label>
- <!--<button class="btn btn-warning " id="setDrag" type="button">裁剪</button>-->
- <button class="btnn" id="zoomIn" type="button">放大</button>
- <button class="btnn" id="zoomOut" type="button">缩小</button>
- <button class="btnn" id="rotateLeft" type="button">左旋转</button>
- <button class="btnn" id="rotateRight" type="button">右旋转</button>
- <button class="btnn" id="setDrag" type="button">确定保存</button>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script src="./js/jquery.min.js"></script>
- <script src="./js/bootstrap.min.js?v=3.3.6"></script>
- <script src="./js/jquery.cookie.js"></script>
- <script src="./js/plugins/datapicker/bootstrap-datepicker.js"></script>
- <script src="./js/plugins/cropper/cropper.min.js"></script>
- <script>
- //tab切换
- $('.perTab li').click(function () {
- $(this).addClass('sel').siblings().removeClass('sel');
- var index = $(this).index();
- $('.perTab_con').children('div').eq(index).show().siblings().hide();
- })
- //编辑个人资料
- $('.grzl tbody>tr>td input').attr('readonly', true);
- $('.grbj').click(function () {
- $('.grzl tbody>tr>td input').attr('readonly', false);
- $('.grzl tbody>tr>td input').css('border-bottom', "1px solid #b3b3b3");
- })
- //取消编辑
- $('.grqx').click(function(){
- $('.grzl tbody>tr>td input').attr('readonly', true);
- $('.grzl tbody>tr>td input').css('border-bottom', "none");
- })
- //关闭按钮
- $('.ptr').click(function () {
- $('.personal').hide();
- })
- $('.grbtn').click(function () {
- var gh = $('.mgh').val();
- var xm = $('.mn').val();
- var ymm = $('.spwd').val();
- var xmm = $('.npwd').val();
- var qmm = $('.epwd').val();
- if (xmm !== qmm) {
- $('.wrong').show();
- $('.npwd').val('')
- $('.epwd').val('')
- } else {
- $('.wrong').hide();
- $('.grzl tbody>tr>td input').attr('readonly', true);
- $('.grzl tbody>tr>td input').css('border-bottom', "none");
- //console.log("工号:" + gh + "," + "姓名:" + xm + "," + "原密码:" + ymm + "," + "新密码:" + xmm + "," + "确认密码:" + qmm + ",");
- }
- })
- //图片裁剪
- var o = $(".image-crop > img");
- $(o).cropper({
- aspectRatio: 1 / 1,
- resizable:false,
- preview: ".img-preview",
- done: function () { }
- });
- var r = $("#inputImage");
- if (window.FileReader) {
- r.change(function () {
- var e, i = new FileReader, t = this.files;
- if (t.length && (e = t[0], /^image\/\w+$/.test(e.type))) {
- i.readAsDataURL(e);
- i.onload = function () {
- r.val("");
- o.cropper("reset", !0).cropper("replace", this.result);
- }
- } else {
- alert("请选择图片文件");
- }
- });
- $("#setDrag").click(function () {
- o.cropper("setDragMode", "crop");
- var img = o.cropper("getDataURL");
- $.post('http://localhost:63662/Index/UploadTX64', { dataurl: encodeURIComponent(img), "token": $.cookie("token") }, function (result) {
- result = $.parseJSON(result);
- if (result.state.toLowerCase() == "success") {
- }
- })
- });
- $("#zoomIn").click(function () {
- o.cropper("zoom", .1)
- });
- $("#zoomOut").click(function () {
- o.cropper("zoom", -.1)
- });
- $("#rotateLeft").click(function () {
- o.cropper("rotate", 45)
- });
- $("#rotateRight").click(function () {
- o.cropper("rotate", -45)
- });
- }
- else {
- r.addClass("hide");
- }
- </script>
- </body>
- </html>
|