<script type="text/javascript" src="__STATIC__/scripts/zepto.min.js">
<script type="text/javascript" src="__STATIC__/scripts/zepto.cookie.min.js">
<script type="text/javascript" src="__STATIC__/scripts/swiper-3.4.2.jquery.min.js">
<script type="text/javascript">
$(function () {
function RndNum(n) {
var rnd ="";
for (var i =0; i < n; i++) {
rnd += Math.floor(Math.random() *10);
}
return rnd;
}
$('.btn-full').on('click', function () {
var uid = $.fn.cookie('uid');;
var oldpassword =$("input[name='oldpassword']").val();
var newpassword =$("input[name='newpassword']").val();
var newpasswordagain =$("input[name='newpasswordagain']").val();
if (oldpassword=='') {
alert('请输入原密码')
return false;
}
if (newpassword=='') {
alert('请输入新密码')
return false;
}
if (newpasswordagain=='') {
alert('请输入确认密码')
return false;
}
$.ajax({
type:'POST',
url:'/api/v1/edituserpwd',
data: {app_key:'','nonce':, 'device_id':'1', 'sign':'', 'timestamp':'', 'uid':uid,
'oldpassword': oldpassword, 'newpassword': newpassword, 'newpasswordagain': newpasswordagain
},
dataType:'json',
success:function(data){
alert(data.msg)
},
error:function(xhr, type){
alert('Ajax error!')
}
})
})
})
</script>