二维码生成地址
This commit is contained in:
parent
58ccda4acf
commit
7131de4384
|
@ -1765,7 +1765,7 @@ def addtrain(req):
|
|||
a.material = req.POST.get('upfile')
|
||||
a.save()
|
||||
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()
|
||||
plist = req.POST.getlist('trainpart')
|
||||
ustr = req.POST.get('participant')
|
||||
|
@ -4890,7 +4890,7 @@ def apitool(req):
|
|||
elif a == 'correct_train_qr':
|
||||
for i in Train.objects.all():
|
||||
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()
|
||||
return JsonResponse({'code': 1})
|
||||
elif a == 'correct_teacher':
|
||||
|
@ -4902,19 +4902,19 @@ def apitool(req):
|
|||
elif a == 'correct_riskact_qr':
|
||||
for i in RiskAct.objects.all():
|
||||
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()
|
||||
return JsonResponse({'code': 1})
|
||||
elif a == 'correct_examtest_qr':
|
||||
for i in ExamTest.objects.all():
|
||||
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()
|
||||
return JsonResponse({'code': 1})
|
||||
elif a == 'correct_area_qr':
|
||||
for i in Area.objects.all():
|
||||
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()
|
||||
return JsonResponse({'code': 1})
|
||||
elif a == 'correct_risk':
|
||||
|
@ -6343,7 +6343,7 @@ def apiexamtest(req):
|
|||
obj.testnum = data['testnum']
|
||||
obj.save()
|
||||
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()
|
||||
if 'participant' in data and data['participant']:
|
||||
ksry = data['participant'].split(',')
|
||||
|
@ -6441,7 +6441,7 @@ def apiexamtest(req):
|
|||
obj.testnum = data['testnum']
|
||||
obj.save()
|
||||
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()
|
||||
if 'participant' in data and data['participant']:
|
||||
ksry = data['participant'].split(',')
|
||||
|
@ -6938,7 +6938,7 @@ def apiarea(req):
|
|||
obj = Area.objects.create(name=name, order=order, belongmap=Map.objects.get(
|
||||
id=map), usecomp=Partment.objects.get(partid=companyid))
|
||||
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})
|
||||
elif a == 'del':
|
||||
if User.objects.get(userid=userid).issuper == 1:
|
||||
|
@ -7051,7 +7051,7 @@ def apiequipment(req):
|
|||
obj.usecomp = Partment.objects.get(partid=companyid)
|
||||
obj.save()
|
||||
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()
|
||||
return JsonResponse({"code": 1})
|
||||
elif a == 'del':
|
||||
|
@ -7389,7 +7389,7 @@ def apiriskact(req):
|
|||
obj.kind = data['kind']
|
||||
obj.save()
|
||||
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()
|
||||
return JsonResponse({'code': 1})
|
||||
elif a == 'edit':
|
||||
|
@ -8979,7 +8979,7 @@ def apisafelist(req):
|
|||
obj.name = data['name']
|
||||
obj.save()
|
||||
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()
|
||||
return JsonResponse({"code":1})
|
||||
elif a == 'edit':
|
||||
|
|
Loading…
Reference in New Issue