1. 优化规则更新

This commit is contained in:
ngfchl
2022-08-30 13:26:47 +08:00
parent 91ffae3897
commit 431a1b30e8
2 changed files with 4 additions and 6 deletions

View File

@@ -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='更新成功!!',

View File

@@ -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({