import{s as e,f as s,g as t,h as o,l as a,j as n,t as c,o as r,c as i,i as u}from"./index-9ce39810.js";import{o as d}from"./uni-app.es.01965594.js";import{$ as l}from"./apiManager.70733ad9.js";import{m}from"./http.893100ba.js";import{n as E}from"./member.09536bb4.js";const h={__name:"lite",setup(h){function p(e,t,o){if(!t)return n(),c("登录失败");{let t="jeepayChannelUserId_"+e;if(m.channelUserId(t))return E(m.channelUserId(t)),void n();o&&(o.isUseSubmchAccount=s.isUseSubmchAccount),l(o).then((({bizData:e})=>{console.log("channelUserId",e),e&&m.channelUserId(t,e),E(e),n()})).catch((e=>{n(),console.log(e)}))}}return d((r=>{e(),s.currentPageType==s.PAGE_TYPE_ENUM.WECHAT_LITE?function(e){let r=e.q||"";t(decodeURIComponent(r)),o({title:"加载中..."}),a({success(e){p(s.PAGE_TYPE_ENUM.WECHAT_LITE,e.code,{code:e.code})},fail(){n(),c("登录失败")}})}(r):s.currentPageType==s.PAGE_TYPE_ENUM.ALIPAY_LITE&&function(e){if(e&&e.isNeedParseQrc){let s=e.q||"";t(decodeURIComponent(s))}o({title:"加载中..."}),my.getAuthCode({success:e=>{p(s.PAGE_TYPE_ENUM.ALIPAY_LITE,e.authCode,{auth_code:e.authCode})},fail:e=>{n(),c("登录失败")}})}(r)})),(e,s)=>{const t=u;return r(),i(t)}}};export{h as default};
