var e=Object.defineProperty,t=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,a=(t,i,r)=>i in t?e(t,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[i]=r,s=(e,s)=>{for(var o in s||(s={}))i.call(s,o)&&a(e,o,s[o]);if(t)for(var o of t(s))r.call(s,o)&&a(e,o,s[o]);return e};import{A as o,B as n,l as u,C as c,D as p,E as l}from"./index.35bb0716.js";const f=["/api/authorize/obtainToken","/api/authorize/checkToken"];var d=(e,t,i)=>(o("request",{invoke(e){if(n({title:"加载中..."}),!u("uni-token")&&!f.includes(e.url))return console.log("-----------"),new Promise(((e,t)=>(c({url:"/api/authorize/obtainToken",method:"POST",data:{ticket:"uni-app"},success:e=>{200===e.statusCode&&(p("uni-token",e.data.data.token),window.location.href=window.location.href+"?t_reload="+(new Date).getTime()),console.log(e)},fail(e){t(e)}}),l(),!1)));e.header={"content-type":"POST"===e.method?"application/json":"application/x-www-form-urlencoded","X-Authorization":u("uni-token")}},success(e){l()},fail(e){console.log("interceptor-fail",e),console.log("请求失败"),l()},complete(e){l()}}),new Promise(((r,a)=>{c({url:e,method:t,data:s({},i),success(e){r(e.data)},fail(e){a(e)},complete(){l()}})})));const h={dev:{base_url:"https://mdev.zuihuibi.cn",api_url:"https://mdev.zuihuibi.cn/api",cffp_url:"https://mdev.zuihuibi.cn/api/cffp"},stage:{base_url:"https://mstage.zuihuibi.cn",api_url:"https://mstage.zuihuibi.cn/api",cffp_url:"https://mstage.zuihuibi.cn/api/cffp"},prod:{base_url:"https://m.zuihuibi.cn",api_url:"https://m.zuihuibi.cn/api",cffp_url:"https://m.zuihuibi.cn/api/cffp"}};let y=h.dev.base_url,m=h.dev.api_url,T=h.dev.cffp_url;var b={checkToken(){const e={token:u("uni-token"),ticket:"uni-app"};return d(`${y}/api/authorize/checkToken`,"POST",e)},obtainToken:()=>d(`${y}/api/authorize/obtainToken`,"POST",{ticket:"uni-app"}),verificationCode:e=>d(`${y}/api/verificationCode`,"POST",e),loginVerification:e=>d(`${T}/user/loginVerification`,"POST",e),register:e=>d(`${T}/user/register`,"POST",e),resetPassword:e=>d(`${T}/user/resetPassword`,"POST",e),courseList:e=>d(`${T}/course/list`,"POST",e),lecturerQuery:e=>d(`${m}/college/lecturerQuery`,"POST",e),queryAreaCenterInfo:e=>d(`${T}/areaCenter/queryAreaCenterInfo`,"POST",e),announcementQuery:e=>d(`${y}/ydapi/market/announcementQuery`,"POST",e),querySystemMessage:e=>d(`${m}/systemMessage/querySystemMessage`,"POST",e),oneKeyRead:e=>d(`${m}/systemMessage/oneKeyRead`,"POST",e),querySystemMessageDetail:e=>d(`${m}/systemMessage/querySystemMessageDetail`,"POST",e),querySignupList:e=>d(`${T}/signup/querySignupList`,"POST",e),userCertificateList:e=>d(`${T}/signup/userCertificateList`,"POST",e),queryCertificateInfo:e=>d(`${T}/certificate/queryCertificateInfo`,"POST",e),courseDetail:e=>d(`${T}/course/detail`,"POST",e),relatedCoursesList:e=>d(`${T}/course/relatedCoursesList`,"POST",e),saveApplyInfo:e=>d(`${T}/partner/saveApplyInfo`,"POST",e)};export{b as a};
