二维码修改
This commit is contained in:
parent
8c99202755
commit
a83ccdae96
|
@ -12,7 +12,7 @@ DATABASES = {
|
||||||
'NAME': 'safedb',
|
'NAME': 'safedb',
|
||||||
'USER':'postgres',
|
'USER':'postgres',
|
||||||
'PASSWORD':'cbma1234',
|
'PASSWORD':'cbma1234',
|
||||||
'HOST':'47.94.4.206',
|
'HOST':'39.105.200.14',
|
||||||
'PORT':'5432',
|
'PORT':'5432',
|
||||||
# 'CONN_MAX_AGE': 60,
|
# 'CONN_MAX_AGE': 60,
|
||||||
},
|
},
|
||||||
|
|
|
@ -451,7 +451,7 @@ def drequipments(companyid,path):
|
||||||
a.cate=Dickey.objects.get(dickeyid=catedict[cate])
|
a.cate=Dickey.objects.get(dickeyid=catedict[cate])
|
||||||
a.usecomp=Partment.objects.get(partid=companyid)
|
a.usecomp=Partment.objects.get(partid=companyid)
|
||||||
a.save()
|
a.save()
|
||||||
a.qrcode = makeqr('https://safeyun.ctcshe.com/miniprogram/equipment?id='+str(a.id))
|
a.qrcode = makeqr('https://cbma.ctc-gz.com/miniprogram/equipment?id='+str(a.id))
|
||||||
a.save()
|
a.save()
|
||||||
numdict[num]=a
|
numdict[num]=a
|
||||||
else:
|
else:
|
||||||
|
@ -617,7 +617,7 @@ def drrisks(companyid,path):
|
||||||
if users.exists():
|
if users.exists():
|
||||||
obj.zrr = users[0]
|
obj.zrr = users[0]
|
||||||
obj.save()
|
obj.save()
|
||||||
obj.qrcode = makeqr_riskact('https://safeyun.ctcshe.com/miniprogram/riskact?id='+str(obj.id))
|
obj.qrcode = makeqr_riskact('https://cbma.ctc-gz.com/miniprogram/riskact?id='+str(obj.id))
|
||||||
obj.save()
|
obj.save()
|
||||||
a = Risk()
|
a = Risk()
|
||||||
a.riskact=obj
|
a.riskact=obj
|
||||||
|
@ -659,7 +659,7 @@ def drrisks(companyid,path):
|
||||||
# if users.exists():
|
# if users.exists():
|
||||||
# obj.zrr = users[0]
|
# obj.zrr = users[0]
|
||||||
# obj.save()
|
# obj.save()
|
||||||
# obj.qrcode = makeqr3('https://safeyun.ctcshe.com/miniprogram/riskact?id='+str(obj.id))
|
# obj.qrcode = makeqr3('https://cbma.ctc-gz.com/miniprogram/riskact?id='+str(obj.id))
|
||||||
# obj.save()
|
# obj.save()
|
||||||
# a = Risk()
|
# a = Risk()
|
||||||
# a.riskact=obj
|
# a.riskact=obj
|
||||||
|
@ -778,7 +778,7 @@ def drsafelist(companyid,path):
|
||||||
safelist.usecomp = user.usecomp
|
safelist.usecomp = user.usecomp
|
||||||
safelist.name = safelist_name
|
safelist.name = safelist_name
|
||||||
safelist.save()
|
safelist.save()
|
||||||
safelist.qrcode = makeqr_safelist('https://safeyun.ctcshe.com/miniprogram/safelist?id='+str(safelist.id))
|
safelist.qrcode = makeqr_safelist('https://cbma.ctc-gz.com/miniprogram/safelist?id='+str(safelist.id))
|
||||||
safelist.save()
|
safelist.save()
|
||||||
except:
|
except:
|
||||||
return {'code':0,'msg':'创建清单失败!'}
|
return {'code':0,'msg':'创建清单失败!'}
|
||||||
|
|
|
@ -719,7 +719,7 @@ def exportxlsx(a,objs):
|
||||||
if x.area:
|
if x.area:
|
||||||
sheet['e'+num] = x.area.name
|
sheet['e'+num] = x.area.name
|
||||||
sheet['f'+num] = '正常' if x.state==1 else '异常'
|
sheet['f'+num] = '正常' if x.state==1 else '异常'
|
||||||
sheet['g'+num] = 'https://safeyun.ctcshe.com/miniprogram/equipment?id='+str(x.id)
|
sheet['g'+num] = 'https://cbma.ctc-gz.com/miniprogram/equipment?id='+str(x.id)
|
||||||
nowtime = datetime.now().strftime('%Y%m%d%H%M%S')
|
nowtime = datetime.now().strftime('%Y%m%d%H%M%S')
|
||||||
sheet['b1'] = nowtime
|
sheet['b1'] = nowtime
|
||||||
filename = 'SBS' + nowtime
|
filename = 'SBS' + nowtime
|
||||||
|
|
|
@ -277,7 +277,7 @@
|
||||||
// $('#qrimg').qrcode({
|
// $('#qrimg').qrcode({
|
||||||
// "render": "canvas",
|
// "render": "canvas",
|
||||||
// "size": 200,
|
// "size": 200,
|
||||||
// "text": 'https://safeyun.ctcshe.com/miniprogram/equipmentdetail?id='+res.id.toString()
|
// "text": 'https://cbma.ctc-gz.com/miniprogram/equipmentdetail?id='+res.id.toString()
|
||||||
// });
|
// });
|
||||||
$('#qrimg').attr('src', res.qrcode)
|
$('#qrimg').attr('src', res.qrcode)
|
||||||
})
|
})
|
||||||
|
|
|
@ -147,7 +147,7 @@
|
||||||
<script>
|
<script>
|
||||||
$('#qrcode').qrcode({
|
$('#qrcode').qrcode({
|
||||||
width: 220, height: 220,
|
width: 220, height: 220,
|
||||||
text: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx4d75244c1b980b5b&redirect_uri=https%3a%2f%2fsafeyun.ctcshe.com%2fbwlogin&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect" });
|
text: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx4d75244c1b980b5b&redirect_uri=https%3a%2f%2fcbma.ctc-gz.com%2fbwlogin&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect" });
|
||||||
</script> -->
|
</script> -->
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in New Issue