You've already forked qlg.frontend
账号注销:除短信验证
This commit is contained in:
@ -72,6 +72,8 @@ mui.plusReady(function(){
|
||||
})
|
||||
mui('.down').on('tap', '#true', function() {
|
||||
var phoneCode = $('#phoneCode').val();
|
||||
var op_content = $('#reason').val();
|
||||
var op_user = $('#userName').val();
|
||||
var that = $(this);
|
||||
if(phoneCode == '') {
|
||||
alert('验证码不能为空!');
|
||||
@ -80,6 +82,53 @@ mui.plusReady(function(){
|
||||
alert('验证码格式不正确!');
|
||||
return;
|
||||
}
|
||||
alert('功能开发中');
|
||||
if (op_user == '') {
|
||||
alert('操作用户不能为空!');
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
url: qlgUrl('app/users/unregister'),
|
||||
method: 'POST',
|
||||
data: {
|
||||
op_user: op_user,
|
||||
op_content: op_content,
|
||||
code: phoneCode,
|
||||
},
|
||||
dataType: 'json',
|
||||
success(res) {
|
||||
mui.alert(res.msg, '提示')
|
||||
mui.ajax(qlgUrl('app/users/logout'), {
|
||||
headers: {
|
||||
"HYH-Token": token
|
||||
},
|
||||
data: {},
|
||||
dataType: 'json', //服务器返回json格式数据
|
||||
type: 'post', //HTTP请求类型
|
||||
timeout: 10000, //超时时间设置为10秒;
|
||||
success: function(data) { //服务器返回响应,根据响应结果,分析是否登录成功;
|
||||
// //console.log(data.data.goodsFavoritesNum)
|
||||
localStorage.removeItem("token");
|
||||
localStorage.removeItem("userId");
|
||||
localStorage.removeItem("userName");
|
||||
mui.fire(plus.webview.getWebviewById('templete/my.html'), 'refresh');
|
||||
mui.fire(plus.webview.getWebviewById('templete/shoppingcart_warp.html'), 'refresh');
|
||||
mui.fire(self.parent, 'refresh');
|
||||
mui.back();
|
||||
var data = toJson(data, 1);
|
||||
if(data.status == 1) {
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
error: function(xhr, type, errorThrown) { //异常处理;
|
||||
// mui.alert(type);
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
error(err) {
|
||||
mui.alert('请求异常', '提示')
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
Reference in New Issue
Block a user