← Back
Editing: index-legacy106.js
!function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t=function(){return n};var r,n={},o=Object.prototype,a=o.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(r){f=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),u=new z(n||[]);return i(a,"_invoke",{value:I(e,r,u)}),a}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}n.wrap=d;var v="suspendedStart",h="suspendedYield",m="executing",y="completed",w={};function g(){}function b(){}function x(){}var _={};f(_,c,(function(){return this}));var k=Object.getPrototypeOf,E=k&&k(k(C([])));E&&E!==o&&a.call(E,c)&&(_=E);var L=x.prototype=g.prototype=Object.create(_);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function O(t,r){function n(o,i,u,c){var l=p(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==e(f)&&a.call(f,"__await")?r.resolve(f.__await).then((function(e){n("next",e,u,c)}),(function(e){n("throw",e,u,c)})):r.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return n("throw",e,u,c)}))}c(l.arg)}var o;i(this,"_invoke",{value:function(e,t){function a(){return new r((function(r,o){n(e,t,r,o)}))}return o=o?o.then(a,a):a()}})}function I(e,t,n){var o=v;return function(a,i){if(o===m)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:r,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var c=D(u,n);if(c){if(c===w)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var l=p(e,t,n);if("normal"===l.type){if(o=n.done?y:h,l.arg===w)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function D(e,t){var n=t.method,o=e.iterator[n];if(o===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=r,D(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),w;var a=p(o,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,w;var i=a.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,w):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,w)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function V(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function z(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function C(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function e(){for(;++o<t.length;)if(a.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=r,e.done=!0,e};return i.next=i}}throw new TypeError(e(t)+" is not iterable")}return b.prototype=x,i(L,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:b,configurable:!0}),b.displayName=f(x,s,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,f(e,s,"GeneratorFunction")),e.prototype=Object.create(L),e},n.awrap=function(e){return{__await:e}},j(O.prototype),f(O.prototype,l,(function(){return this})),n.AsyncIterator=O,n.async=function(e,t,r,o,a){void 0===a&&(a=Promise);var i=new O(d(e,t,r,o),a);return n.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(L),f(L,s,"Generator"),f(L,c,(function(){return this})),f(L,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},n.values=C,z.prototype={constructor:z,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(V),!e)for(var t in this)"t"===t.charAt(0)&&a.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,o){return u.type="throw",u.arg=e,t.next=n,o&&(t.method="next",t.arg=r),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=a.call(i,"catchLoc"),l=a.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,w):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),w},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),V(r),w}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;V(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),w}},n}function r(e,t,r,n,o,a,i){try{var u=e[a](i),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function n(e){return function(){var t=this,n=arguments;return new Promise((function(o,a){var i=e.apply(t,n);function u(e){r(i,o,a,u,c,"next",e)}function c(e){r(i,o,a,u,c,"throw",e)}u(void 0)}))}}System.register(["./utils-lib-legacy.js?v=VERSION_NUMBER","./index-legacy104.js?v=VERSION_NUMBER","./index-legacy100.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER","./useController-legacy.js?v=VERSION_NUMBER","./__commonjsHelpers__-legacy.js?v=VERSION_NUMBER"],(function(e,r){"use strict";var o,a,i,u,c,l,s,f,d,p,v,h,m,y,w,g,b,x,_,k,E,L,j,O,I,D,S,V,z,C,G,P,N,q,T;return{setters:[function(e){o=e.u,a=e.bn,i=e.bo,u=e.bp,c=e.t,l=e.bg,s=e.k,f=e.c,d=e.H,p=e.bq,v=e.b,h=e.e},function(e){m=e._},function(e){y=e.B},function(e){w=e.c,g=e.r,b=e.k,x=e.p,_=e.aD,k=e.G,E=e.q,L=e.M,j=e.A,O=e.e,I=e.y,D=e.z,S=e.J,V=e.H,z=e.x,C=e.O,G=e.v,P=e.B,N=e.C,q=e.I},function(e){T=e.b},null],execute:function(){var r={class:"flex !justify-center !w-full items-center"},B={class:"text-[2rem] text-dark inline-block mr-2 font-bold my-[10px]"},F={key:0,class:"absolute el-form-item__error"},U={class:"flex justify-end items-center mt-6 text-[1.2rem]"},A=w({__name:"index",props:{compData:{default:function(){return{title:"",btn:"",isDialog:!0}}}},setup:function(e,h){var w=h.expose,A=o().getGlobalInfo,H=v(),K=e,M=g(!1),Y=g(null),$=g(null),J=g(!1),R=g("获取验证码"),Q=b({username:"",password:"",code:""}),W=b({username:!1,password:!1,code:!1}),X=g(""),Z=g(),ee=g(),te=g(!1),re=g({username:[{validator:function(e,t,r){var n;if(null!==(n=K.compData)&&void 0!==n&&n.title&&(te.value=!1),/^1[3456789]\d{9}$/.test(t))r();else if(""===t)r(new Error("请输入宝塔官网账号"));else{var o;if(null!==(o=K.compData)&&void 0!==o&&o.title)return te.value=!0,void r(new Error(" "));r(new Error("请输入正确的手机号"))}},trigger:["blur","change"]}],password:[{required:!0,message:"请输入密码",trigger:["blur","change"]},{validator:function(e,t,r){t.length>=8?r():r(new Error("请输入至少8位密码"))},trigger:["blur","change"]}],token:[{required:!1,message:"请输入验证码",trigger:["blur","change"]},{validator:function(e,t,r){J.value||r(),6===t.length?r():r(new Error("请输入6位验证码,不可为空"))},trigger:["blur","change"]}]}),ne=function(){ee.value.validate(function(){var e=n(t().mark((function e(r){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r&&T({isCheck:J,userInfo:Q,userToken:X});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},oe=function(e){Z.value&&clearInterval(Z.value);var t=function(){if(--e<=0)return clearInterval(Z.value),R.value="获取验证码",void(W.code=!1);R.value="重新获取验证码(".concat(e,"s)")};t(),Z.value=setInterval(t,1e3),W.code=!0},ae=function(){var e=n(t().mark((function e(){var r;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Q.username&&Q.password){e.next=3;break}return H.error("请先输入手机号和密码"),e.abrupt("return");case 3:return W.username=!0,W.password=!0,oe(60),e.next=8,a({username:Q.username,token:X.value});case 8:r=e.sent,H.request(r);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ie=function(){var e=n(t().mark((function e(){var r,n,o;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M.value=!0,e.prev=1,e.next=4,i();case 4:(r=e.sent).status&&(n=window.screen.width/2-300,o=window.screen.height/2-250,Y.value=window.open(r.msg.replace("login.html","new/wxBindPanel.html"),"_blank","width=".concat(600,",height=").concat(500,",left=").concat(n,",top=").concat(o)),window.addEventListener("message",(function(e){var t;switch(e.data.type){case"wechat_auth_error":H.error(e.data.msg);try{var r;null===(r=Y.value)||void 0===r||r.close(),ie()}catch(i){}break;case"wechat_auth_complete":var n=e.data.data,o=n.code,a=n.state;null===(t=Y.value)||void 0===t||t.close(),ue(o,a)}}))),e.next=10;break;case 8:e.prev=8,e.t0=e.catch(1);case 10:return e.prev=10,M.value=!1,e.finish(10);case 13:case"end":return e.stop()}}),e,null,[[1,8,10,13]])})));return function(){return e.apply(this,arguments)}}(),ue=function(){var e=n(t().mark((function e(r,n){var o,a,i;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=H.load("正在配置面板用户信息,请稍后..."),e.prev=1,e.next=4,u({code:r,state:n});case 4:(a=e.sent).status?(H.success("微信绑定成功"),window.location.href=(null===(i=K.compData)||void 0===i?void 0:i.redirect)||"/"):H.error(a.msg||"微信绑定失败"),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),H.error("微信绑定失败");case 12:return e.prev=12,o.close(),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[1,8,12,15]])})));return function(t,r){return e.apply(this,arguments)}}();return w({onOpen:function(){c(ee.value.$el,"username")},onCancel:function(){ee.value.clearValidate(),$.value&&(clearInterval($.value),$.value=null),Y.value&&!Y.value.closed&&(Y.value.close(),Y.value=null)}}),x((function(){var e;null===(e=ee.value)||void 0===e||e.clearValidate(),A()})),_((function(){Z.value&&(clearInterval(Z.value),Z.value=null),$.value&&(clearInterval($.value),$.value=null),Y.value&&!Y.value.closed&&(Y.value.close(),Y.value=null)})),function(e,t){var n,o=y,a=l,i=s,u=f,c=d,v=m,h=p,w=k("focus");return E(),L(h,{ref_key:"bindUserRef",ref:ee,size:"default",rules:z(re),model:z(Q),class:S(["bind-user-info",{"bind-form":!(null===(n=e.compData)||void 0===n||!n.title)}])},{default:j((function(){var n;return[O(a,{class:"!mb-5 flex !justify-center"},{default:j((function(){var n;return[I("div",r,[I("h3",B,D((null===(n=e.compData)||void 0===n?void 0:n.title)||"切换宝塔官网账号"),1),O(o,{placement:"top-start",width:"200",trigger:"hover",content:"宝塔面板许多功能都依赖于官网,绑定仅限于为您提供更好的面板服务体验,不涉及您服务器任何敏感信息,请放心使用。",class:"inline-block relative -top-1.5"},{reference:j((function(){return t[7]||(t[7]=[I("a",{class:"bt-ico-ask align-middle inline-block",href:"javascript:;"}," ? ",-1)])})),_:1})])]})),_:1}),(E(),L(a,{key:1,prop:"username",class:S({"!mb-[3rem]":!(null===(n=e.compData)||void 0===n||!n.title)})},{default:j((function(){var r;return[V(O(i,{modelValue:z(Q).username,"onUpdate:modelValue":t[0]||(t[0]=function(e){return z(Q).username=e}),clearable:"",required:"",name:"username",placeholder:"宝塔官网账号",class:"h-[4rem] leading-[4rem] w-full",disabled:z(W).username,onKeyup:t[1]||(t[1]=C((function(e){return ne()}),["enter","native"]))},null,8,["modelValue","disabled"]),[[w]]),null!==(r=e.compData)&&void 0!==r&&r.title&&z(te)?(E(),G("span",F,[t[9]||(t[9]=I("span",null,"请使用宝塔官网登录账号进行登录,若未有账号,可进行",-1)),O(u,{class:"!text-[12px]",href:"https://www.bt.cn/register"},{default:j((function(){return t[8]||(t[8]=[P(" 免费注册 ")])})),_:1})])):N("",!0)]})),_:1},8,["class"])),(E(),L(a,{key:2,prop:"password"},{default:j((function(){return[O(i,{modelValue:z(Q).password,"onUpdate:modelValue":t[2]||(t[2]=function(e){return z(Q).password=e}),clearable:"",required:"",type:"password",name:"password",placeholder:"密码",class:"h-[4rem] leading-[4rem] w-full","show-password":!0,disabled:z(W).password,onKeyup:t[3]||(t[3]=C((function(e){return ne()}),["enter","native"]))},null,8,["modelValue","disabled"])]})),_:1})),V(O(a,{prop:"code"},{default:j((function(){return[O(i,{modelValue:z(Q).code,"onUpdate:modelValue":t[4]||(t[4]=function(e){return z(Q).code=e}),clearable:"",placeholder:"验证码",type:"text",onKeyup:t[5]||(t[5]=C((function(e){return ne()}),["enter","native"]))},{append:j((function(){return[O(c,{class:"relative top-0 rounded-none rounded-r-[3px] w-full !h-[auto]",size:"large",type:"primary",disabled:z(W).code,plain:"",onClick:ae},{default:j((function(){return[P(D(z(R)),1)]})),_:1},8,["disabled"])]})),_:1},8,["modelValue"])]})),_:1},512),[[q,z(J)]]),O(c,{type:"primary",class:"w-[100%] mt-[1.2rem]",size:"large",onClick:t[6]||(t[6]=function(e){return ne()})},{default:j((function(){var t,r;return[P(D((null===(t=e.compData)||void 0===t?void 0:t.btn)||(null!==(r=e.compData)&&void 0!==r&&r.title?"绑定账号":"切换账号")),1)]})),_:1}),I("div",U,[O(u,{href:"https://www.bt.cn/register"},{default:j((function(){return t[10]||(t[10]=[P("注册账号")])})),_:1}),O(v),O(u,{href:"https://www.bt.cn/login.html?page=reset"},{default:j((function(){return t[11]||(t[11]=[P("忘记密码")])})),_:1}),O(v),O(u,{href:"https://www.bt.cn/bbs"},{default:j((function(){return t[12]||(t[12]=[P("问题反馈")])})),_:1})]),t[14]||(t[14]=I("div",{class:"divider-container"},[I("div",{class:"divider-line"}),I("div",{class:"divider-text"},"第三方登录"),I("div",{class:"divider-line"})],-1)),I("div",{class:"flex justify-center items-center mt-2"},[I("div",{class:"wechat-login-container",onClick:ie},t[13]||(t[13]=[I("div",{class:"wechat-icon-circle"},[I("i",{class:"wechat-icon"},[I("svg",{t:"1749545795651",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"9096",width:"20",height:"20"},[I("path",{d:"M391.95 175.27c-159.03 0-289.29 108.4-289.29 246.04 0 79.45 43.35 144.67 115.74 195.2l-28.93 87.05 101.12-50.74c36.19 7.19 65.22 14.54 101.33 14.54 9.08 0 18.09-0.45 27.01-1.16-5.64-19.37-8.92-39.61-8.92-60.62 0-126.32 108.54-228.89 245.97-228.89 9.37 0 18.64 0.69 27.86 1.71C658.8 261.87 534.2 175.27 391.95 175.27z m-93.97 195.31c-21.67 0-43.56-14.52-43.56-36.21 0-21.77 21.89-36.09 43.56-36.09s36.12 14.33 36.12 36.09c-0.02 21.69-14.45 36.21-36.12 36.21z m202.46 0c-21.69 0-43.45-14.52-43.45-36.21 0-21.77 21.76-36.09 43.45-36.09 21.79 0 36.21 14.33 36.21 36.09 0 21.69-14.43 36.21-36.21 36.21z m0 0",fill:"#3CB034","p-id":"9097"}),I("path",{d:"M920.01 602.12c0-115.59-115.74-209.86-245.72-209.86-137.64 0-246.05 94.27-246.05 209.86 0 115.84 108.41 209.92 246.05 209.92 28.81 0 57.85-7.25 86.79-14.51l79.36 43.44-21.76-72.3c58.06-43.53 101.33-101.3 101.33-166.55z m-325.5-36.14c-14.41 0-28.95-14.31-28.95-28.92 0-14.44 14.54-28.96 28.95-28.96 21.89 0 36.21 14.52 36.21 28.96 0 14.61-14.33 28.92-36.21 28.92z m159.13 0c-14.31 0-28.74-14.31-28.74-28.92 0-14.44 14.43-28.96 28.74-28.96 21.67 0 36.21 14.52 36.21 28.96 0 14.61-14.54 28.92-36.21 28.92z m0 0",fill:"#3CB034","p-id":"9098"})])])],-1)]))])]})),_:1},8,["rules","model","class"])}}});e("default",h(A,[["__scopeId","data-v-9d4fa5bb"]]))}}}))}();
Save File
Cancel