fix first_term error
This commit is contained in:
parent
944220c206
commit
ae49b484e5
@ -73,10 +73,11 @@ def getGrade(Ip, S):
|
||||
first_term = split[0]['KSXNXQ']
|
||||
last_term = split[len(split)-1]['KSXNXQ']
|
||||
#转换成int元组
|
||||
first_term = (int(first_term[0:4]),int(last_term[4:6]))
|
||||
last_term = (int(last_term[0:4]),int(last_term[4:6]))
|
||||
first_term = (int(first_term[0:4]),int(first_term[4:5]))
|
||||
last_term = (int(last_term[0:4]),int(last_term[4:5]))
|
||||
print(first_term, last_term)
|
||||
#生成中间学期
|
||||
total_term = []
|
||||
total_term = [];
|
||||
for i in range(last_term[0],first_term[0] + 1):
|
||||
for j in range(1,3):
|
||||
total_term.append(str(i) + str(j))
|
||||
@ -274,10 +275,4 @@ def getSchedule(Ip, S):
|
||||
temp_lesson['Time_split'] = Time
|
||||
lesson[i][j*2+k].append(temp_lesson)
|
||||
data_cache = {'lesson':lesson,'days_per_week':days_per_week,'cur_week':CurWeek}
|
||||
return {'errcode': 200, 'errmsg': 'ok', 'data': data_cache}
|
||||
|
||||
data = connection('2018002129','cust5313.','')
|
||||
print(data)
|
||||
print(getGrade(data['ip'],data['s']))
|
||||
|
||||
print(getSchedule(data['ip'],data['s']))
|
||||
return {'errcode': 200, 'errmsg': 'ok', 'data': data_cache}
|
Loading…
x
Reference in New Issue
Block a user