From e74516cb68f48212a719ed71a090f41df543e3ba Mon Sep 17 00:00:00 2001
From: yuanke <249218296@qq.com>
Date: Thu, 8 Sep 2016 15:34:48 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E4=BF=AE=E6=94=B9=E4=B8=AA?=
=?UTF-8?q?=E4=BA=BA=E8=B5=84=E6=96=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/assets/wechat/edit_userinfo.html | 4 ++--
.../wechat/controllers/edit_userinfo.js | 14 +-------------
2 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/public/assets/wechat/edit_userinfo.html b/public/assets/wechat/edit_userinfo.html
index e4a7a00f2..4b353229f 100644
--- a/public/assets/wechat/edit_userinfo.html
+++ b/public/assets/wechat/edit_userinfo.html
@@ -16,12 +16,12 @@
性别
男
-
+
女
-
+
diff --git a/public/javascripts/wechat/controllers/edit_userinfo.js b/public/javascripts/wechat/controllers/edit_userinfo.js
index 920e9dc0c..f367adf31 100644
--- a/public/javascripts/wechat/controllers/edit_userinfo.js
+++ b/public/javascripts/wechat/controllers/edit_userinfo.js
@@ -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)
{