9376cbad by ex

获取code 重新登录

1 parent 9e43930c
......@@ -17,28 +17,27 @@ angular.module('myApp')
if(code){
dingdaService.verifyThirdCode(code).success(function (res) {
if(res.mate.code == 200) {
if (data.meta.code == 200) {
data.data.userName = $scope.phoneNumberVal;
globalService.saveData('user',data.data);
// layer.open({
// content: '登录成功',
// time:1
// });
setTimeout(function() {
location.reload();
} , 300);
} else if (data.meta.code == 401) {
layer.open({
content: data.meta.message,
time:1
});
dingdaService.verifyPhoneCode(res.data.mobile, res.data.code).success(function (data) {
if (data.meta.code == 200) {
data.data.userName = $scope.phoneNumberVal;
globalService.saveData('user',data.data);
// layer.open({
// content: '登录成功',
// time:1
// });
setTimeout(function() {
location.reload();
} , 300);
} else if (data.meta.code == 401) {
layer.open({
content: data.meta.message,
time:1
});
// alert(data.meta.message);
// layer.msg(data.data.error);
return;
}
// dingdaService.verifyPhoneCode(res.data.mobile, res.data.code).success(function (data) {
//
// })
return;
}
})
}
if(res.mate.code == 500){
$state.go('login', {}, {reload: true});
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!