Files
qhmes/deploy-qhmes/frontend/js/AppThirdForm-C6uV5Gzd-B2msp03O.js
2026-05-15 11:34:12 +08:00

2 lines
4.6 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{f as u,u as c,d as H,ah as M,q as R,as as D,ar as G,au as d,k as I,aF as P,G as x,B as Q}from"./vue-vendor-C7Zq48Yl.js";import{a5 as j,i as z,bx as Y}from"./antd-vue-vendor-BPnV8VqP.js";import{C as J}from"./index-BhQEwnQQ.js";import{u as K,Y as W,q as X,ap as Z,f as L}from"./index-BI6CMai0.js";import{h as ee}from"./main.index-Cs5ETdXF.js";import"./useCountdown-DqnNWBp6.js";import"./index-Du0A3ksf.js";import"./BasicModal-0sAdFEk_.js";import"./ModalHeader-keHdAHWH.js";import"./useTimeout-DDl4l82I.js";import"./vxe-table-vendor-B88kchpX.js";import"./index-DeEq83Ov.js";import"./useWindowSizeFn-PRZSD86C.js";import"./index-pxs5MULf.js";import"./index-BgYCgfME.js";import"./index-f8O7TghW.js";import"./useIntersectionObserver-BMxdTqP3.js";import"./useFormItemSingle-BbRhswfn.js";import"./usePopBiz-CG0vVpgI.js";import"./useMethods-DVip17X8.js";import"./index-Dg4HCEvo.js";var te=Object.defineProperty,O=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable,B=(n,e,t)=>e in n?te(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,C=(n,e)=>{for(var t in e||(e={}))ne.call(e,t)&&B(n,t,e[t]);if(O)for(var t of O(e))re.call(e,t)&&B(n,t,e[t]);return n},ie=(n,e,t)=>new Promise((g,f)=>{var h=o=>{try{m(t.next(o))}catch(s){f(s)}},p=o=>{try{m(t.throw(o))}catch(s){f(s)}},m=o=>o.done?g(o.value):Promise.resolve(o.value).then(h,p);m((t=t.apply(n,e)).next())});function oe(n){const{createMessage:e,notification:t}=K(),{t:g}=W(),f=X(),h=Z(),p=u(""),m=u({}),o=u(!1),s=u(!1),y=u(""),T=u(!1),v=u(""),b=u("");function F(r){let i=`${f.uploadUrl}/sys/thirdLogin/render/${r}`;window.open(i,`login ${r}`,"height=500, width=500, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=n o, status=no"),p.value=r,m.value={},o.value=!1;let l=function(V){let a=V.data;if(typeof a=="string")if(a==="登录失败")e.warning(a);else if(a.includes("绑定手机号")){s.value=!0;let q=a.split(",");y.value=q[1],n("type",{loginType:"thirdLogin"})}else w(a);else typeof a=="object"?a.isObj===!0&&(T.value=!0,m.value=C({},a)):e.warning("不识别的信息传递");window.removeEventListener("message",c(l),!1)};window.addEventListener("message",l,!1)}function w(r){c(o)===!1&&(o.value=!0,h.ThirdLogin({token:r,thirdType:c(p)}).then(i=>{i&&i.userInfo?t.success({message:g("sys.login.loginSuccessTitle"),description:`${g("sys.login.loginSuccessDesc")}: ${i.userInfo.realname}`,duration:3}):S(i)}))}function S(r){t.error({message:"登录失败",description:((r.response||{}).data||{}).message||r.message||"请求出现错误,请稍后再试",duration:4})}function k(){c(v)||A("请输入手机号"),c(b)||A("请输入验证码");let r={mobile:c(v),captcha:c(b),thirdUserUuid:c(y)};L.post({url:"/sys/thirdLogin/bindingThirdPhone",params:r},{isTransformResponse:!1}).then(i=>{i.success?(s.value=!1,w(i.result)):e.warning(i.message)}).catch(i=>{e.warning(i.message)})}function A(r){t.error({message:"登录失败",description:r,duration:4})}function U(){n("type",{loginType:"login"})}function E(){n("type",{loginType:"register"})}function _(){s.value=!1}function $(r){return ie(this,null,function*(){let i=C({},r);i.thirdUserUuid=c(y),yield L.put({url:"/sys/thirdLogin/registerBindThirdAccount",params:i},{isTransformResponse:!1}).then(l=>{l.success?(s.value=!1,w(l.result)):e.warning(l.message)}).catch(l=>{e.warning(l.message)})})}function N(r){v.value=r.mobile,b.value=r.sms,k()}return{thirdConfirmShow:T,bindingAccount:s,thirdHandleOk:k,thirdPhone:v,thirdCaptcha:b,onThirdLogin:F,loginAccountClick:U,registerAccountClick:E,hideBindThirdAccount:_,bindThirdAccount:N,createAccountBindThird:$}}const se=j.Item,ae=z.Password,ce=H({name:"AppThirdForm",components:{FormItem:se,Form:j,InputPassword:ae,CountdownInput:J,QuestionCircleFilled:Y},setup(n,{emit:e}){return C({},oe(e))}}),le={class:"third-account"},ue={class:"content"},pe={class:"enter-x bind-btn"},de={class:"enter-x bind-btn",style:{"margin-top":"20px"}};function me(n,e,t,g,f,h){const p=M("a-button");return R((D(),G("div",le,[d("div",ue,[e[2]||(e[2]=d("div",{class:"bind-title"},[d("span",null,"还未绑定敲敲云账号")],-1)),e[3]||(e[3]=d("div",{class:"bind-title-desc"},[d("span",null,"请选择绑定已有帐户或创建新帐号")],-1)),d("div",pe,[I(p,{type:"primary",onClick:n.loginAccountClick},{default:P(()=>[...e[0]||(e[0]=[x("登录并绑定",-1)])]),_:1},8,["onClick"])]),d("div",de,[I(p,{type:"primary",onClick:n.registerAccountClick},{default:P(()=>[...e[1]||(e[1]=[x("注册新账号",-1)])]),_:1},8,["onClick"])])])],512)),[[Q,n.bindingAccount]])}const Ee=ee(ce,[["render",me],["__scopeId","data-v-c98a927f"]]);export{Ee as default};