更换端口
This commit is contained in:
@@ -16,10 +16,10 @@ async function fixImageUrls() {
|
||||
for (const item of goods) {
|
||||
if (item.images) {
|
||||
const oldImages = item.images;
|
||||
// 替换所有 localhost:3000 和 localhost:3005
|
||||
// 替换所有 localhost:3000 和 localhost:3006
|
||||
let newImages = oldImages
|
||||
.replace(/http:\/\/localhost:3000/g, 'http://110.42.255.239:3005')
|
||||
.replace(/http:\/\/localhost:3005/g, 'http://110.42.255.239:3005');
|
||||
.replace(/http:\/\/localhost:3000/g, 'http://110.42.255.239:3006')
|
||||
.replace(/http:\/\/localhost:3006/g, 'http://110.42.255.239:3006');
|
||||
|
||||
await connection.execute(
|
||||
'UPDATE goods SET images = ? WHERE id = ?',
|
||||
@@ -41,8 +41,8 @@ async function fixImageUrls() {
|
||||
if (item.images) {
|
||||
const oldImages = item.images;
|
||||
let newImages = oldImages
|
||||
.replace(/http:\/\/localhost:3000/g, 'http://110.42.255.239:3005')
|
||||
.replace(/http:\/\/localhost:3005/g, 'http://110.42.255.239:3005');
|
||||
.replace(/http:\/\/localhost:3000/g, 'http://110.42.255.239:3006')
|
||||
.replace(/http:\/\/localhost:3006/g, 'http://110.42.255.239:3006');
|
||||
|
||||
await connection.execute(
|
||||
'UPDATE points_goods SET images = ? WHERE id = ?',
|
||||
|
||||
Reference in New Issue
Block a user