This commit is contained in:
董海洋
2026-05-24 18:18:44 +08:00
parent e532e48e47
commit 5674ef016e
4 changed files with 84 additions and 6 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ router.post('/generate-product', async (ctx) => {
'Content-Type': 'application/json'
},
body: JSON.stringify({
model: 'deepseek-ai/deepseek-v4-pro',
model: 'deepseek-v4-flash',
messages: [
{
role: 'user',
+2 -2
View File
@@ -2,7 +2,6 @@ const Router = require('koa-router')
const multer = require('@koa/multer')
const path = require('path')
const fs = require('fs')
const { IMG_BASE_URL } = require('../config/domain')
const router = new Router()
@@ -37,7 +36,8 @@ router.post('/', upload.single('file'), async (ctx) => {
return
}
const fileUrl = `${IMG_BASE_URL}/${ctx.file.filename}`
// 存储相对路径,前端使用时拼接域名
const fileUrl = `/img/${ctx.file.filename}`
ctx.body = {
code: 200,
message: '上传成功',