mirror of
https://github.com/ngfchl/ptools
synced 2023-07-10 13:41:22 +08:00
1. 优化规则更新
This commit is contained in:
@@ -208,6 +208,7 @@ def do_update(request):
|
||||
print(data[2])
|
||||
print(data[0].get('url'))
|
||||
for site in data:
|
||||
del site['pk']
|
||||
Site.objects.update_or_create(defaults=site, url=site.get('url'))
|
||||
return JsonResponse(data=CommonResponse.success(
|
||||
msg='更新成功!!',
|
||||
|
||||
@@ -142,18 +142,15 @@
|
||||
message: res.data.msg
|
||||
});
|
||||
}
|
||||
this.$router.go(0)
|
||||
this.reload()
|
||||
}).catch(res => {
|
||||
this.$router.go(0)
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: "重启失败!"
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
}).catch(res => {
|
||||
console.log(res)
|
||||
{#console.log(res)#}
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消重启'
|
||||
@@ -185,7 +182,7 @@
|
||||
message: res.data.msg
|
||||
});
|
||||
}
|
||||
this.$router.go(0)
|
||||
this.reload()
|
||||
}).catch(res => {
|
||||
console.log(res, 3)
|
||||
this.$message({
|
||||
|
||||
Reference in New Issue
Block a user