feat: 完成前端业务闭环与后端联调
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { hasRemoteConfig, resolveRuntimeMode } from '@/utils/runtime-config.js'
|
||||
import { normalizeFeedbackPayload } from './feedback-contract.js'
|
||||
import {
|
||||
createRequestError,
|
||||
@@ -8,9 +7,6 @@ import {
|
||||
export const feedbackApi = {
|
||||
async submitFeedback(payload, requestOptions = {}) {
|
||||
const feedback = normalizeFeedbackPayload(payload)
|
||||
if (resolveRuntimeMode() !== 'remote') {
|
||||
throw createRequestError('当前为本地预览模式,反馈未提交服务器', 'WRITE_UNAVAILABLE')
|
||||
}
|
||||
return requestStrict({
|
||||
url: '/genealogy/app/feedback',
|
||||
method: 'POST',
|
||||
@@ -22,9 +18,6 @@ export const feedbackApi = {
|
||||
},
|
||||
|
||||
async getFeedback(requestOptions = {}) {
|
||||
if (!hasRemoteConfig()) {
|
||||
throw createRequestError('我的反馈读取需要真实服务,当前本地预览不会伪造结果', 'REMOTE_READ_REQUIRED')
|
||||
}
|
||||
const feedbackHistory = await requestStrict({
|
||||
url: '/genealogy/app/feedback',
|
||||
method: 'GET'
|
||||
|
||||
Reference in New Issue
Block a user