You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
2.0 KiB
HTML

<extend name="Public/bases" />
<block name="body" >
<link href="__CSS__/user.css" rel="stylesheet" >
<script src="__JS__/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="__JS__/getRem.js"></script>
<link rel="stylesheet" type="text/css" href="__CSS__/reset.css">
<link rel="stylesheet" type="text/css" href="__CSS__/name.css">
<section class="trunker">
<section class="container">
<form id="form" action="" method="post" onsubmit="return false" class="">
<div class="name">
<!-- 子页公共头部 -->
<div class="subpage-heard">修改昵称
<a href="javascript:window.history.go(-1);" class="arrows"></a>
</div>
<div class="name-info">
<div class="name-input">
<div class="name-inputBox">
<img src="__IMG__/mingzibianji.png" alt="">
<div>昵称</div>
</div>
<input type="text" placeholder="请输入昵称" style="padding: 0" name="nickname" id="nickname" value="{$user['nickname']}">
</div>
<div class="save jssubmit">保存修改</div>
</div>
</div>
</form>
</section>
</section>
<div class="popmsg pop-dialog"></div>
<script src="__JS__/pop.lwx.min.js"></script>
<script>
$(function() {
$('.jssubmit').click(function() {
var nickname = $.trim($('#nickname').val());
var pmsg = $('.popmsg').pop();
if(nickname == ""){
pmsg.msg("请输入昵称");
return false;
}
$.ajax({
cache:true,
type:'post',
url:"{:U('User/usernick')}",
data:$('#form').serialize(),
dataType:'json',
success:function(result){
pmsg.msg(result.info);
if(result.url !=''){
setTimeout(function () {
window.location.href = result.url;
}, 2000);
}
},
error:function(){
alert("错误")
}
})
return false;
});
});
</script>
</block>