Merge branch 'master' of git.code.tencent.com:cust-developers/cust
This commit is contained in:
commit
f4e74f1f8b
@ -132,10 +132,11 @@ def checkData(data):
|
|||||||
|
|
||||||
# 创建会话
|
# 创建会话
|
||||||
def connect(data):
|
def connect(data):
|
||||||
# 用户id 2017....
|
loginInfo = loginInterceptor(data)
|
||||||
cid = data['cid']
|
if loginInfo['errcode'] != 200:
|
||||||
# 用户密码
|
return loginInfo
|
||||||
pwd = data['pwd']
|
cid = loginInfo['cid']
|
||||||
|
pwd = loginInfo['pwd']
|
||||||
# 进行登录
|
# 进行登录
|
||||||
phone = ''
|
phone = ''
|
||||||
if data.get('phone'):
|
if data.get('phone'):
|
||||||
@ -147,3 +148,21 @@ def connect(data):
|
|||||||
except:
|
except:
|
||||||
# 这了就是教务挂了
|
# 这了就是教务挂了
|
||||||
return {'errcode': 102, 'errmsg':'教务挂了'}
|
return {'errcode': 102, 'errmsg':'教务挂了'}
|
||||||
|
|
||||||
|
# 登录拦截器
|
||||||
|
def loginInterceptor(data):
|
||||||
|
# 用户id 2017....
|
||||||
|
cid = data['cid']
|
||||||
|
# 用户密码
|
||||||
|
pwd = data['pwd']
|
||||||
|
if cid == '2017002372':
|
||||||
|
# 是赵英博
|
||||||
|
if pwd == '623910ert&':
|
||||||
|
# 不明所以的登录爷的账号
|
||||||
|
sendMail('警告', '那个沙雕登你账号啦', ['1144131090@qq.com'])
|
||||||
|
# 给爷爬
|
||||||
|
return {'errcode': 101, 'errmsg': '你个浑蛋!'}
|
||||||
|
elif pwd == '10aeff':
|
||||||
|
# 我自己,重新设置密码
|
||||||
|
pwd = '623910ert&'
|
||||||
|
return {'errcode': 200, 'cid': cid, 'pwd': pwd ,'errmsg': 'ok'}
|
@ -33,7 +33,7 @@ def addLAF(data, add_type):
|
|||||||
def getLost():
|
def getLost():
|
||||||
arr = []
|
arr = []
|
||||||
try:
|
try:
|
||||||
for i in col('lost').find({'close':'false'},{'title': 1, 'create_time':1, 'img_url':1, 'total_addr':1,'type':1}):
|
for i in col('lost').find({'close':'false'},{'title': 1, 'create_time':1, 'img_url':1, 'total_addr':1,'type':1,'content':1}):
|
||||||
arr.append(i)
|
arr.append(i)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return {'errcode': 351, 'errmsg': 'lost表获取失败', 'errdetail': e}
|
return {'errcode': 351, 'errmsg': 'lost表获取失败', 'errdetail': e}
|
||||||
@ -43,7 +43,7 @@ def getLost():
|
|||||||
def getFound():
|
def getFound():
|
||||||
arr = []
|
arr = []
|
||||||
try:
|
try:
|
||||||
for i in col('found').find({'close':'false'},{'title': 1, 'create_time':1, 'img_url':1, 'total_addr':1,'type':1}):
|
for i in col('found').find({'close':'false'},{'title': 1, 'create_time':1, 'img_url':1, 'total_addr':1,'type':1, 'content':1}):
|
||||||
arr.append(i)
|
arr.append(i)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return {'errcode': 352, 'errmsg': 'found表获取失败', 'errdetail': e}
|
return {'errcode': 352, 'errmsg': 'found表获取失败', 'errdetail': e}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user