#跨域
This commit is contained in:
parent
2893c1de4a
commit
a61b5e43f8
|
@ -49,15 +49,16 @@ def alarm(request):
|
||||||
cursor1.execute("select * from alarms where name = '%s' order by created_at desc " % (n))
|
cursor1.execute("select * from alarms where name = '%s' order by created_at desc " % (n))
|
||||||
row1 = cursor1.fetchall()
|
row1 = cursor1.fetchall()
|
||||||
alarms = []
|
alarms = []
|
||||||
|
alarms.append(n)
|
||||||
for r1 in row1:
|
for r1 in row1:
|
||||||
print(r1)
|
print(r1)
|
||||||
o = dict()
|
o = dict()
|
||||||
o['id'] = r1[0]
|
o['id'] = r1[0]
|
||||||
o['name'] = r1[1]
|
|
||||||
o['type'] = r1[2]
|
o['type'] = r1[2]
|
||||||
o['status'] = r1[5]
|
o['status'] = r1[5]
|
||||||
o['duration'] = r1[6]
|
o['duration'] = r1[6]
|
||||||
o['created_at'] = r1[7]
|
o['created_at'] = r1[7]
|
||||||
|
|
||||||
alarms.append(o)
|
alarms.append(o)
|
||||||
print("===================================================================")
|
print("===================================================================")
|
||||||
res.append(alarms)
|
res.append(alarms)
|
||||||
|
|
Loading…
Reference in New Issue