rabin 7 years ago
parent
commit
57204b8bd9
1 changed files with 2 additions and 2 deletions
  1. 2 2
      front/api/login.py

+ 2 - 2
front/api/login.py

@@ -27,7 +27,7 @@ class login_path(Load):
 	{"status": 2, "msg": "\u64cd\u4f5c\u5931\u8d25", "code": 0, "data": {}}
 	"""
 	@Web.setting
-	def post(self):
+	def get(self):
 		mobile = self.input('mobile')
 		password = self.input('password')
 		if mobile and password:
@@ -36,7 +36,7 @@ class login_path(Load):
 				temp = user['password'].split('_')
 				if Demeter.md5(password, temp[1]) == user['password']:
 					state = self.bind(user['id'])
-					if state == False:
+					if not state:
 						self.out('手机号或密码错误,登录失败')
 					else:
 						#self.set_secure_cookie('user', str(user['id']))