change ip

This commit is contained in:
董海洋
2026-05-24 14:32:35 +08:00
parent 1e990d4355
commit 16fca085c0
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ router.post('/', upload.single('file'), async (ctx) => {
return return
} }
const fileUrl = `http://110.42.255.239:3006/uploads/${ctx.file.filename}` const fileUrl = `https://donghy.top/uploads/${ctx.file.filename}`
ctx.body = { ctx.body = {
code: 200, code: 200,
message: '上传成功**', message: '上传成功**',
+4 -4
View File
@@ -18,8 +18,8 @@ async function fixImageUrls() {
const oldImages = item.images; const oldImages = item.images;
// 替换所有 localhost:3000 和 localhost:3006 // 替换所有 localhost:3000 和 localhost:3006
let newImages = oldImages let newImages = oldImages
.replace(/http:\/\/localhost:3000/g, 'http://110.42.255.239:3006') .replace(/http:\/\/localhost:3000/g, 'https://donghy.top')
.replace(/http:\/\/localhost:3006/g, 'http://110.42.255.239:3006'); .replace(/http:\/\/localhost:3006/g, 'https://donghy.top');
await connection.execute( await connection.execute(
'UPDATE goods SET images = ? WHERE id = ?', 'UPDATE goods SET images = ? WHERE id = ?',
@@ -41,8 +41,8 @@ async function fixImageUrls() {
if (item.images) { if (item.images) {
const oldImages = item.images; const oldImages = item.images;
let newImages = oldImages let newImages = oldImages
.replace(/http:\/\/localhost:3000/g, 'http://110.42.255.239:3006') .replace(/http:\/\/localhost:3000/g, 'https://donghy.top')
.replace(/http:\/\/localhost:3006/g, 'http://110.42.255.239:3006'); .replace(/http:\/\/localhost:3006/g, 'https://donghy.top');
await connection.execute( await connection.execute(
'UPDATE points_goods SET images = ? WHERE id = ?', 'UPDATE points_goods SET images = ? WHERE id = ?',