logo替换

This commit is contained in:
谢宇宁
2026-10-14 17:39:34 +07:00
parent 6b8f1e5b7c
commit 1373d48523
20 changed files with 106 additions and 94 deletions
+2 -4
View File
@@ -1,4 +1,5 @@
import { useHttp } from '../utils/userFetchReq'
import { APP_ID } from '~/config/app'
import type { donwloadParam, ButtonListParam, H5param } from './interface'
// 下载相关接口对齐 bili-landpage-client,域名写死(接口已开 CORS: *)
@@ -14,15 +15,12 @@ export const bottonclick = (param: donwloadParam) => {
return useHttp.post(`${STAT_API}/bottonclick`, param, {})
}
// iOS H5 描述文件的 appId 写死
const H5_CONFIG_APP_ID = 2
// iOS H5 描述文件:返回 .mobileconfig 原文(非 JSON),不走 useHttp
export const downloadH5 = async (data: H5param): Promise<string> => {
const res = await fetch(`${STAT_API}/h5/config`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ ...data, appId: H5_CONFIG_APP_ID }),
body: JSON.stringify({ ...data, appId: APP_ID }),
})
if (!res.ok) throw new Error('获取描述文件失败 ' + res.status)
return res.text()
+1 -1
View File
@@ -25,7 +25,7 @@ export type donwloadParam = {
packageType?: number // 1 企业签 / 2 商店包 / 3 TF
}
export type H5param = {
appId?: number // 请求时固定为 2,见 api/btn.ts downloadH5
appId?: number // 请求时取 config/app.ts 的 APP_ID,见 api/btn.ts downloadH5
dc?: string
pc?: string
[key: string]: number | string | undefined