Merge branch 'weixin_guange' of https://git.trustie.net/jacknudt/trustieforge into weixin_guange

This commit is contained in:
Tim 2016-09-08 15:37:07 +08:00
commit e5b1b920e6
2 changed files with 3 additions and 15 deletions

View File

@ -16,12 +16,12 @@
<div class="mt5" style="line-height:20px">
<span class="ml15 c-grey3">性别</span>
<span class="ml25"></span>
<span class="login-box fr mr10 mt2" ng-click="selectRole(9)" ng-class="['login-box', 'fr', 'mr10', 'img-circle', {'bg-grey':assistant,'checked': teacher}]"></span>
<span class="login-box fr mr10 mt2" ng-click="sex=0" ng-class="['login-box', 'fr', 'mr10', 'img-circle', {'checked': sex==0}]"></span>
</div>
<div class="mb5 mt5" style="line-height:20px;">
<span class="ml15 c-grey3"></span>
<span class="ml55"></span>
<span class="login-box fr mr10 mt2" ng-click="selectRole(9)" ng-class="['login-box', 'fr', 'mr10', 'img-circle', {'bg-grey':assistant,'checked': teacher}]"></span>
<span class="login-box fr mr10 mt2" ng-click="sex=1" ng-class="['login-box', 'fr', 'mr10', 'img-circle', {'checked': sex==1}]"></span>
</div>
</div>

View File

@ -21,13 +21,6 @@ app.controller('EditUserInfoController', ['$scope', 'config','$http', 'auth','$l
vm.lastname = vm.user.lastname;
vm.mail = vm.user.mail;
vm.sex = vm.user.gender;
if(vm.sex == 0){
vm.gender = "男";
}
else{
vm.gender = "女";
}
vm.user.img_url = vm.user.img_url +"?t="+Math.random();
}
);
@ -67,11 +60,6 @@ app.controller('EditUserInfoController', ['$scope', 'config','$http', 'auth','$l
return;
}
var sex = 0;
if(vm.gender == "女"){
sex = 1;
}
if(vm.lastname == ""){
vm.alertService_1.showMessage('提示', '姓名不能为空');
return;
@ -88,7 +76,7 @@ app.controller('EditUserInfoController', ['$scope', 'config','$http', 'auth','$l
// }
$http.post(config.apiUrl + "users/edit_userinfo",
{token: auth.token(),lastname: vm.lastname, sex: sex, mail: vm.mail}
{token: auth.token(),lastname: vm.lastname, sex: vm.sex, mail: vm.mail}
).then(function(response){
if(response.data.status == 0)
{