|
@@ -27,10 +27,9 @@ class login_path(Load):
|
|
|
{"status": 2, "msg": "\u64cd\u4f5c\u5931\u8d25", "code": 0, "data": {}}
|
|
|
"""
|
|
|
@Web.setting
|
|
|
- def get(self):
|
|
|
+ def post(self):
|
|
|
mobile = self.input('mobile')
|
|
|
password = self.input('password')
|
|
|
- code = self.input('code')
|
|
|
if mobile and password:
|
|
|
user = self.service('common').one('farm_user', mobile=mobile)
|
|
|
if user:
|
|
@@ -38,15 +37,14 @@ class login_path(Load):
|
|
|
if Demeter.md5(password, temp[1]) == user['password']:
|
|
|
state = self.bind(user['id'])
|
|
|
if state == False:
|
|
|
- code = self.input('code')
|
|
|
- self.out('手机号或密码错误,登录失败' + code)
|
|
|
+ self.out('手机号或密码错误,登录失败')
|
|
|
else:
|
|
|
#self.set_secure_cookie('user', str(user['id']))
|
|
|
#self.redirect('/')
|
|
|
self.out('yes', {'uid':user['id']})
|
|
|
return
|
|
|
else:
|
|
|
- self.out('手机号或密码错误,登录失败' + code)
|
|
|
+ self.out('手机号或密码错误,登录失败')
|
|
|
return
|
|
|
@Web.setting
|
|
|
def bind(self, uid):
|