feat(web): 品牌检测/图片生成服务端化——URL 统一 https+域名,入口文件带 hash 防长缓存失效

- brand/image 本地执行 API 服务端化(主机A shufu-web-api:15126,nginx 转发 /api/brand/* 等)
- 前端撤销本地回连逻辑(local-http 删除,http.ts/brand.ts 还原为域名相对路径)
- 版本更新改桌面桥 do_update_app(原 Flask /api/update/do 桥化,Web 无更新入口)
- 品牌检测页 Web 可用(hasBridge 恢复 blanket 判定:文件选择走浏览器降级、任务/SSE 走域名)
- vite 入口文件带内容 hash(/assets 配了 immutable 长缓存,无 hash 入口导致更新永不生效)
- public/logo.jpg:Web 版 /logo.jpg 素材(原 app_client/logo.jpg 随桌面瘦身移除)
This commit is contained in:
2026-09-07 17:11:33 +08:00
parent bbcc9be373
commit dfd4de2e97
8 changed files with 1576 additions and 26 deletions
+5 -4
View File
@@ -1,6 +1,5 @@
import { ref } from 'vue';
import { webFallbackApi } from './web-fallback';
import { isDesktopRuntime } from '@/shared/runtime-env';
export interface UploadedJavaFile {
fileKey: string;
@@ -122,6 +121,8 @@ export interface PywebviewApi {
not_found?: boolean;
error?: string;
}>;
/** 版本更新(桌面专属):下载更新包并启动 update.exe 后退出主程序(原 Flask /api/update/do 桥化) */
do_update_app?: (fileUrl: string) => Promise<{ success: boolean; error?: string }>;
launch_yaoayanui?: () => Promise<{
success: boolean;
path?: string;
@@ -197,8 +198,8 @@ declare global {
let cachedPywebviewApi: PywebviewApi | undefined;
let pywebviewReadyBound = false;
/** 当前是否运行在桌面客户端(pywebview)运行时;Web 独立部署下恒为 false */
export const isDesktopRuntime = ref(false);
/** 当前是否运行在桌面客户端(pywebview)运行时;Web 独立部署下恒为 false(见 runtime-env.ts 注释) */
export { isDesktopRuntime };
function syncPywebviewApi() {
cachedPywebviewApi = window.pywebview?.api;