import{T as a,b as n,s as u,p as t,D as l}from"./index.6b776f4b.js";const c=(e,i)=>{const s={url:e,action:(i==null?void 0:i.action)||"h5",pageTag:(i==null?void 0:i.pageTag)||1},o=encodeURIComponent(JSON.stringify(s));console.log(o,"query"),/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)?window.location.href=`ColexiuStudent://linkUrl=${o}`:/(Android)/i.test(navigator.userAgent)?window.location.href=`colexiustudent://html:8888/SplashActivity?url=${o}`:a("\u8BF7\u7528\u624B\u673A\u6216\u79FB\u52A8\u8BBE\u5907\u6253\u5F00")},f=e=>{if(n().isApp)if(u.platformType==="STUDENT"){window.location.replace(e),n().ios?window.location.replace(e):(t({api:"openWebView",content:{url:e,orientation:1,isHideTitle:!1}}),t({api:"back"}));return}else u.platformType==="TEACHER"&&l.alert({title:"\u63D0\u793A",message:"\u8BF7\u4F7F\u7528\u9177\u4E50\u79C0\u5B66\u751F\u7AEF\u626B\u7801\u6253\u5F00",confirmButtonColor:"#2dc7aa"}).then(()=>{t({api:"back"})});else c(e)};export{f as i,c as s};