fix: 下载判断

main
fadeaway 8 months ago
parent 0af3244cf4
commit 4d367aa722

@ -1,5 +1,5 @@
// 安卓包名 // 安卓包名
const APK_NAME = 'cn.luoo.indiemusic'; // const APK_NAME = 'cn.luoo.indiemusic';
export const isBuiltIn = () => { export const isBuiltIn = () => {
const ua = window?.navigator?.userAgent?.toLowerCase(); const ua = window?.navigator?.userAgent?.toLowerCase();
@ -46,27 +46,35 @@ export const download = () => {
// 内置浏览器 可加提示使其打开手机自带浏览器 // 内置浏览器 可加提示使其打开手机自带浏览器
return; return;
} }
const iosLinkUrl = ''; // TODO: // const iosLinkUrl = ''; // TODO:
const androidLinkurl = '//cdn.indie.cn/release/queyue.apk'; const androidLinkurl = '//cdn.indie.cn/release/queyue.apk';
const huaweiUrl = `appmarket://details?id=${APK_NAME}`; // const huaweiUrl = `appmarket://details?id=${APK_NAME}`;
const oppoUrl = `oppomarket://details?packagename=${APK_NAME}`; // const oppoUrl = `oppomarket://details?packagename=${APK_NAME}`;
const vivoUrl = `vivomarket://details?id=${APK_NAME}`; // const vivoUrl = `vivomarket://details?id=${APK_NAME}`;
const xiaomiUrl = `mimarket://details?id=${APK_NAME}`; // const xiaomiUrl = `mimarket://details?id=${APK_NAME}`;
// switch (verifyBrand()) {
// case 'iphone':
// window.location.href = iosLinkUrl;
// break;
// case 'xiaomi':
// window.location.href = xiaomiUrl;
// break;
// case 'huawei':
// window.location.href = huaweiUrl;
// break;
// case 'vivo':
// window.location.href = vivoUrl;
// break;
// case 'oppo':
// window.location.href = oppoUrl;
// break;
// default:
// window.location.href = androidLinkurl;
// break;
// }
switch (verifyBrand()) { switch (verifyBrand()) {
case 'iphone': case 'iphone':
window.location.href = iosLinkUrl; alert('开发中,敬请期待');
break;
case 'xiaomi':
window.location.href = xiaomiUrl;
break;
case 'huawei':
window.location.href = huaweiUrl;
break;
case 'vivo':
window.location.href = vivoUrl;
break;
case 'oppo':
window.location.href = oppoUrl;
break; break;
default: default:
window.location.href = androidLinkurl; window.location.href = androidLinkurl;

Loading…
Cancel
Save