数据结构优化
This commit is contained in:
@@ -347,7 +347,7 @@ const runCode = async () => {
|
||||
doc.write(loadingTemplate)
|
||||
|
||||
try {
|
||||
const response = await fetch('http://localhost:8081/api/run', {
|
||||
const response = await fetch('/api/run', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
|
||||
@@ -115,7 +115,7 @@ const uploadFile = async (file: File) => {
|
||||
formData.append('storageType', 'local')
|
||||
|
||||
const token = localStorage.getItem('token')
|
||||
const response = await fetch('http://localhost:8081/api/admin/attachments/upload', {
|
||||
const response = await fetch('/api/admin/attachments/upload', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
...(token ? { Authorization: `Bearer ${token}` } : {})
|
||||
|
||||
@@ -95,12 +95,16 @@ const drawStars = () => {
|
||||
}
|
||||
}
|
||||
|
||||
ctx.globalAlpha = star.alpha
|
||||
ctx.beginPath()
|
||||
ctx.arc(star.x, star.y, star.radius, 0, Math.PI * 2)
|
||||
ctx.fill()
|
||||
if (ctx) {
|
||||
ctx.globalAlpha = star.alpha
|
||||
ctx.beginPath()
|
||||
ctx.arc(star.x, star.y, star.radius, 0, Math.PI * 2)
|
||||
ctx.fill()
|
||||
}
|
||||
})
|
||||
ctx.globalAlpha = 1
|
||||
if (ctx) {
|
||||
ctx.globalAlpha = 1
|
||||
}
|
||||
}
|
||||
|
||||
// 生成流星
|
||||
|
||||
Reference in New Issue
Block a user