二维码生成地址
This commit is contained in:
parent
58ccda4acf
commit
7131de4384
|
@ -1765,7 +1765,7 @@ def addtrain(req):
|
||||||
a.material = req.POST.get('upfile')
|
a.material = req.POST.get('upfile')
|
||||||
a.save()
|
a.save()
|
||||||
a.checkqr = makeqr_train(
|
a.checkqr = makeqr_train(
|
||||||
'https://safeyun.ctcshe.com/miniprogram/checktrain?trainid='+str(a.trainid))
|
'https://cbma.ctc-gz.com/miniprogram/checktrain?trainid='+str(a.trainid))
|
||||||
a.save()
|
a.save()
|
||||||
plist = req.POST.getlist('trainpart')
|
plist = req.POST.getlist('trainpart')
|
||||||
ustr = req.POST.get('participant')
|
ustr = req.POST.get('participant')
|
||||||
|
@ -4890,7 +4890,7 @@ def apitool(req):
|
||||||
elif a == 'correct_train_qr':
|
elif a == 'correct_train_qr':
|
||||||
for i in Train.objects.all():
|
for i in Train.objects.all():
|
||||||
i.checkqr = makeqr_train(
|
i.checkqr = makeqr_train(
|
||||||
'https://safeyun.ctcshe.com/miniprogram/checktrain?trainid='+str(i.trainid))
|
'https://cbma.ctc-gz.com/miniprogram/checktrain?trainid='+str(i.trainid))
|
||||||
i.save()
|
i.save()
|
||||||
return JsonResponse({'code': 1})
|
return JsonResponse({'code': 1})
|
||||||
elif a == 'correct_teacher':
|
elif a == 'correct_teacher':
|
||||||
|
@ -4902,19 +4902,19 @@ def apitool(req):
|
||||||
elif a == 'correct_riskact_qr':
|
elif a == 'correct_riskact_qr':
|
||||||
for i in RiskAct.objects.all():
|
for i in RiskAct.objects.all():
|
||||||
i.qrcode = makeqr_riskact(
|
i.qrcode = makeqr_riskact(
|
||||||
'https://safeyun.ctcshe.com/miniprogram/riskact?id='+str(i.id))
|
'https://cbma.ctc-gz.com/miniprogram/riskact?id='+str(i.id))
|
||||||
i.save()
|
i.save()
|
||||||
return JsonResponse({'code': 1})
|
return JsonResponse({'code': 1})
|
||||||
elif a == 'correct_examtest_qr':
|
elif a == 'correct_examtest_qr':
|
||||||
for i in ExamTest.objects.all():
|
for i in ExamTest.objects.all():
|
||||||
i.qrcode = makeqr_examtest(
|
i.qrcode = makeqr_examtest(
|
||||||
'https://safeyun.ctcshe.com/miniprogram/examtest?id='+str(i.id))
|
'https://cbma.ctc-gz.com/miniprogram/examtest?id='+str(i.id))
|
||||||
i.save()
|
i.save()
|
||||||
return JsonResponse({'code': 1})
|
return JsonResponse({'code': 1})
|
||||||
elif a == 'correct_area_qr':
|
elif a == 'correct_area_qr':
|
||||||
for i in Area.objects.all():
|
for i in Area.objects.all():
|
||||||
i.qrcode = makeqr_area(
|
i.qrcode = makeqr_area(
|
||||||
'https://safeyun.ctcshe.com/miniprogram/area?id='+str(i.id))
|
'https://cbma.ctc-gz.com/miniprogram/area?id='+str(i.id))
|
||||||
i.save()
|
i.save()
|
||||||
return JsonResponse({'code': 1})
|
return JsonResponse({'code': 1})
|
||||||
elif a == 'correct_risk':
|
elif a == 'correct_risk':
|
||||||
|
@ -6343,7 +6343,7 @@ def apiexamtest(req):
|
||||||
obj.testnum = data['testnum']
|
obj.testnum = data['testnum']
|
||||||
obj.save()
|
obj.save()
|
||||||
obj.qrcode = makeqr_examtest(
|
obj.qrcode = makeqr_examtest(
|
||||||
'https://safeyun.ctcshe.com/miniprogram/examtest?id='+str(obj.id))
|
'https://cbma.ctc-gz.com/miniprogram/examtest?id='+str(obj.id))
|
||||||
obj.save()
|
obj.save()
|
||||||
if 'participant' in data and data['participant']:
|
if 'participant' in data and data['participant']:
|
||||||
ksry = data['participant'].split(',')
|
ksry = data['participant'].split(',')
|
||||||
|
@ -6441,7 +6441,7 @@ def apiexamtest(req):
|
||||||
obj.testnum = data['testnum']
|
obj.testnum = data['testnum']
|
||||||
obj.save()
|
obj.save()
|
||||||
obj.qrcode = makeqr_examtest(
|
obj.qrcode = makeqr_examtest(
|
||||||
'https://safeyun.ctcshe.com/miniprogram/examtest?id='+str(obj.id))
|
'https://cbma.ctc-gz.com/miniprogram/examtest?id='+str(obj.id))
|
||||||
obj.save()
|
obj.save()
|
||||||
if 'participant' in data and data['participant']:
|
if 'participant' in data and data['participant']:
|
||||||
ksry = data['participant'].split(',')
|
ksry = data['participant'].split(',')
|
||||||
|
@ -6938,7 +6938,7 @@ def apiarea(req):
|
||||||
obj = Area.objects.create(name=name, order=order, belongmap=Map.objects.get(
|
obj = Area.objects.create(name=name, order=order, belongmap=Map.objects.get(
|
||||||
id=map), usecomp=Partment.objects.get(partid=companyid))
|
id=map), usecomp=Partment.objects.get(partid=companyid))
|
||||||
makeqr_area(
|
makeqr_area(
|
||||||
'https://safeyun.ctcshe.com/miniprogram/area?id='+str(obj.id))
|
'https://cbma.ctc-gz.com/miniprogram/area?id='+str(obj.id))
|
||||||
return JsonResponse({"code": 1})
|
return JsonResponse({"code": 1})
|
||||||
elif a == 'del':
|
elif a == 'del':
|
||||||
if User.objects.get(userid=userid).issuper == 1:
|
if User.objects.get(userid=userid).issuper == 1:
|
||||||
|
@ -7051,7 +7051,7 @@ def apiequipment(req):
|
||||||
obj.usecomp = Partment.objects.get(partid=companyid)
|
obj.usecomp = Partment.objects.get(partid=companyid)
|
||||||
obj.save()
|
obj.save()
|
||||||
obj.qrcode = makeqr(
|
obj.qrcode = makeqr(
|
||||||
'https://safeyun.ctcshe.com/miniprogram/equipment?id='+str(obj.id))
|
'https://cbma.ctc-gz.com/miniprogram/equipment?id='+str(obj.id))
|
||||||
obj.save()
|
obj.save()
|
||||||
return JsonResponse({"code": 1})
|
return JsonResponse({"code": 1})
|
||||||
elif a == 'del':
|
elif a == 'del':
|
||||||
|
@ -7389,7 +7389,7 @@ def apiriskact(req):
|
||||||
obj.kind = data['kind']
|
obj.kind = data['kind']
|
||||||
obj.save()
|
obj.save()
|
||||||
obj.qrcode = makeqr_riskact(
|
obj.qrcode = makeqr_riskact(
|
||||||
'https://safeyun.ctcshe.com/miniprogram/riskact?id='+str(obj.id))
|
'https://cbma.ctc-gz.com/miniprogram/riskact?id='+str(obj.id))
|
||||||
obj.save()
|
obj.save()
|
||||||
return JsonResponse({'code': 1})
|
return JsonResponse({'code': 1})
|
||||||
elif a == 'edit':
|
elif a == 'edit':
|
||||||
|
@ -8979,7 +8979,7 @@ def apisafelist(req):
|
||||||
obj.name = data['name']
|
obj.name = data['name']
|
||||||
obj.save()
|
obj.save()
|
||||||
obj.qrcode = makeqr_safelist(
|
obj.qrcode = makeqr_safelist(
|
||||||
'https://safeyun.ctcshe.com/miniprogram/safelist?id='+str(obj.id))
|
'https://cbma.ctc-gz.com/miniprogram/safelist?id='+str(obj.id))
|
||||||
obj.save()
|
obj.save()
|
||||||
return JsonResponse({"code":1})
|
return JsonResponse({"code":1})
|
||||||
elif a == 'edit':
|
elif a == 'edit':
|
||||||
|
|
Loading…
Reference in New Issue