This commit is contained in:
谢宇宁
2026-10-08 23:37:39 +07:00
parent 3d9f1a7914
commit e3db013668
20 changed files with 174 additions and 896 deletions
+34
View File
@@ -0,0 +1,34 @@
import request from "@/utils/request";
// 下载相关接口对齐 huangguo_landpage,域名写死(接口已开 CORS: *)
const STAT_API = "https://blsp01.com/api/stat/version";
// 黄果短剧 App 在下载接口的 appId
export const APP_ID = 5;
// 按钮开关:iosDown / iosStore / iosTF / iosH5 / androidButton,不含下载地址
export const getButtonList = data =>
request({
method: "post",
url: `${STAT_API}/bottonlist`,
data: { ...data, appId: APP_ID }
});
// 点击下载:返回 data.link(下载地址数组),同时后端记录点击
export const bottonclick = data =>
request({
method: "post",
url: `${STAT_API}/bottonclick`,
data: { ...data, appId: APP_ID }
});
// iOS H5 描述文件:返回 .mobileconfig 原文(非 JSON)
export const downloadH5 = async data => {
const res = await fetch(`${STAT_API}/h5/config`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ ...data, appId: APP_ID })
});
if (!res.ok) throw new Error("获取描述文件失败 " + res.status);
return res.text();
};