rabin 7 yıl önce
ebeveyn
işleme
76b9a1e29b
1 değiştirilmiş dosya ile 2 ekleme ve 4 silme
  1. 2 4
      front/api/login.py

+ 2 - 4
front/api/login.py

@@ -27,7 +27,6 @@ class login_path(Load):
 	"""
 	@Web.setting
 	def get(self):
- 
 		mobile = self.input('mobile')
 		password = self.input('password')
 		if mobile and password:
@@ -36,7 +35,7 @@ class login_path(Load):
 				temp = user['password'].split('_')
 				if Demeter.md5(password, temp[1]) == user['password']:
 					state = self.bind(user['id'])
-					if not state:
+					if state == False:
 						self.out('手机号或密码错误,登录失败')
 					else:
 						#self.set_secure_cookie('user', str(user['id']))
@@ -46,7 +45,7 @@ class login_path(Load):
 		else:
 			self.out('手机号或密码错误,登录失败')
 			return
-	@Web.setting
+
 	def bind(self, uid):
 		code = self.input('code')
 		if not code:
@@ -59,7 +58,6 @@ class login_path(Load):
 		url = url + '&grant_type=authorization_code'
 		data = Demeter.curl(url)
 		data = json.loads(data)
-		print data
 		if 'errcode' in data:
 			return False
 		update = {}