vela-h5-sdk 0.0.23 → 0.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6401,7 +6401,7 @@ function Q(e, t, n, r) {
6401
6401
  //#region src/VelaLogin.ts
6402
6402
  var $ = class extends Ne {
6403
6403
  constructor(...e) {
6404
- super(...e), this.visible = !0, this.appId = "", this.channelId = "", this.uid = "", this.appleClientId = "", this.appleScope = "", this.appleState = "", this.appleNonce = "", this.appleUsePopup = !1, this.appleRedirectURI = "", this.facebookAppId = "", this.currentView = "login", this._isLoading = !1, this.accountName = "", this.passcode = "", this.confirmPasscode = "", this.reset_password = "", this.reset_new_password = "", this.reset_new_confirm_password = "", this.quickLoginResolve = null;
6404
+ super(...e), this.visible = !0, this.appId = "", this.channelId = "", this.uid = "", this.appleClientId = "", this.appleScope = "", this.appleState = "", this.appleNonce = "", this.appleUsePopup = !1, this.appleRedirectURI = "", this.facebookAppId = "", this.currentView = "login", this._isLoading = !1, this.accountName = "", this.passcode = "", this.confirmPasscode = "", this.reset_password = "", this.reset_new_password = "", this.reset_new_confirm_password = "", this.binding_info = {};
6405
6405
  }
6406
6406
  static {
6407
6407
  this.styles = _`
@@ -6786,10 +6786,7 @@ var $ = class extends Ne {
6786
6786
  this.visible = !0, this.currentView = e;
6787
6787
  }
6788
6788
  close() {
6789
- this.visible = !1, this.quickLoginResolve &&= (this.quickLoginResolve({
6790
- success: !1,
6791
- reason: "USER_CANCEL"
6792
- }), null), this.dispatchEvent(new CustomEvent("vela-close"));
6789
+ this.visible = !1, this.dispatchEvent(new CustomEvent("vela-close"));
6793
6790
  }
6794
6791
  switchToRegister() {
6795
6792
  this.currentView = "register", this.clearInputs();
@@ -6951,7 +6948,7 @@ var $ = class extends Ne {
6951
6948
  <div class="center-btn-list">
6952
6949
  <div>
6953
6950
  <div class="center-title">账号中心</div>
6954
- <div class="center-id">aa_123</div>
6951
+ <div class="center-id">aa_${this.uid}</div>
6955
6952
  </div>
6956
6953
  <!-- 重置密码 -->
6957
6954
  <button class="btn btn-list-item" type="button" @click="${this.switchToUserCenterResetPassword}">
@@ -7008,43 +7005,44 @@ var $ = class extends Ne {
7008
7005
  `;
7009
7006
  }
7010
7007
  renderBindingForm() {
7008
+ let e = this.binding_info;
7011
7009
  return he`
7012
7010
  <div class="binding-content">
7013
7011
  <div class="center-title">账户绑定</div>
7014
- <div class="center-id">aa_123</div>
7012
+ <div class="center-id">aa_${this.uid}</div>
7015
7013
  <div class="binding-item">
7016
7014
  <div class="binding-field-group">
7017
7015
  <label class="input-label">Account:</label>
7018
- <div>test222</div>
7016
+ <div>${e.account?.bind === 1 ? e.account.name : "未绑定"}</div>
7019
7017
  </div>
7020
- <button class="unbind-btn" @click="${() => this.handleUnbind("Account")}">修改密码</button>
7018
+ <button class="unbind-btn" @click="${() => this.bindAction("Account", e.account?.bind === 1)}">${e.account?.bind === 1 ? "修改密码" : "绑定"}</button>
7021
7019
  </div>
7022
7020
  <div class="input-line"></div>
7023
7021
 
7024
7022
  <div class="binding-item">
7025
7023
  <div class="binding-field-group">
7026
7024
  <label class="input-label" for="reg-passcode">Google:</label>
7027
- <div>222@gmail.com</div>
7025
+ <div>${e.google?.bind === 1 ? e.google.name : "未绑定"}</div>
7028
7026
  </div>
7029
- <button class="unbind-btn" @click="${() => this.handleUnbind("Google")}">解绑</button>
7027
+ <button class="unbind-btn" @click="${() => this.bindAction("Google", e.google?.bind === 1)}">${e.google?.bind === 1 ? "解绑" : "绑定"}</button>
7030
7028
  </div>
7031
7029
  <div class="input-line"></div>
7032
7030
 
7033
7031
  <div class="binding-item">
7034
7032
  <div class="binding-field-group">
7035
7033
  <label class="input-label" for="confirm-passcode">Facebook:</label>
7036
- <div>73429734623423409 | csdfe55@qq.com</div>
7034
+ <div>${e.facebook?.bind === 1 ? e.facebook.name : "未绑定"}</div>
7037
7035
  </div>
7038
- <button class="unbind-btn" @click="${() => this.handleUnbind("Facebook")}">解绑</button>
7036
+ <button class="unbind-btn" @click="${() => this.bindAction("Facebook", e.facebook?.bind === 1)}">${e.facebook?.bind === 1 ? "解绑" : "绑定"}</button>
7039
7037
  </div>
7040
7038
  <div class="input-line"></div>
7041
7039
 
7042
7040
  <div class="binding-item">
7043
7041
  <div class="binding-field-group">
7044
7042
  <label class="input-label" for="confirm-passcode">Apple:</label>
7045
- <div>private7yeufijfjw9jffff@apple.com</div>
7043
+ <div>${e.apple?.bind === 1 ? e.apple.name : "未绑定"}</div>
7046
7044
  </div>
7047
- <button class="unbind-btn" @click="${() => this.handleUnbind("Apple")}">解绑</button>
7045
+ <button class="unbind-btn" @click="${() => this.bindAction("Apple", e.apple?.bind === 1)}">${e.apple?.bind === 1 ? "解绑" : "绑定"}</button>
7048
7046
  </div>
7049
7047
  <div class="input-line"></div>
7050
7048
  </div>
@@ -7110,10 +7108,13 @@ var $ = class extends Ne {
7110
7108
  console.log("SDK接收到的数据类型是:", typeof e, e), e.code === 0 ? (this.dispatchEvent(new CustomEvent("vela-login-out", { detail: e.data })), this.uid = "", this.switchToLogin()) : alert(e.msg);
7111
7109
  }
7112
7110
  handleResetPasswordResult(e) {
7113
- console.log("SDK接收到的数据类型是:", typeof e, e), e.code === 0 || alert(e.msg);
7111
+ console.log("SDK接收到的数据类型是:", typeof e, e), e.code === 0 ? this.closeBtnTap() : alert(e.msg);
7114
7112
  }
7115
7113
  handleBindWaysResult(e) {
7116
- console.log("SDK接收到的数据类型是:", typeof e, e), e.code === 0 || alert(e.msg);
7114
+ console.log("SDK接收到的数据类型是:", typeof e, e), e.code === 0 ? this.binding_info = e.data : alert(e.msg);
7115
+ }
7116
+ handleUnBindResult(e) {
7117
+ console.log("SDK接收到的数据类型是:", typeof e, e), e.code === 0 ? this.closeBtnTap() : alert(e.msg);
7117
7118
  }
7118
7119
  async handleAccountLoginSubmit(e) {
7119
7120
  if (e.preventDefault(), !this.accountName || !this.passcode) {
@@ -7210,6 +7211,9 @@ var $ = class extends Ne {
7210
7211
  }
7211
7212
  this._isLoading = !1;
7212
7213
  }
7214
+ bindAction(e, t) {
7215
+ t && (e === "Account" ? this.switchToBindingResetPassword() : this.handleUnbind(e));
7216
+ }
7213
7217
  async handleUnbind(e) {
7214
7218
  if (e === "Account") this.switchToBindingResetPassword();
7215
7219
  else if (confirm(`您確定要解綁 ${e} 帳戶嗎?`)) try {
@@ -7218,7 +7222,7 @@ var $ = class extends Ne {
7218
7222
  app_id: this.appId,
7219
7223
  type: e
7220
7224
  });
7221
- this.handleBindWaysResult(t), alert(`${e} 帳戶解綁成功!`);
7225
+ this.handleUnBindResult(t), alert(`${e} 帳戶解綁成功!`), this.switchToUserBinding();
7222
7226
  } catch (e) {
7223
7227
  console.error(e), alert("操作失敗,請稍後再試");
7224
7228
  } finally {
@@ -7279,6 +7283,6 @@ Q([Re({
7279
7283
  })], $.prototype, "facebookAppId", void 0), Q([Re({
7280
7284
  type: String,
7281
7285
  attribute: "view-mode"
7282
- })], $.prototype, "currentView", void 0), Q([ze()], $.prototype, "_isLoading", void 0), Q([ze()], $.prototype, "accountName", void 0), Q([ze()], $.prototype, "passcode", void 0), Q([ze()], $.prototype, "confirmPasscode", void 0), Q([ze()], $.prototype, "reset_password", void 0), Q([ze()], $.prototype, "reset_new_password", void 0), Q([ze()], $.prototype, "reset_new_confirm_password", void 0), $ = Q([Fe("vela-login")], $);
7286
+ })], $.prototype, "currentView", void 0), Q([ze()], $.prototype, "_isLoading", void 0), Q([ze()], $.prototype, "accountName", void 0), Q([ze()], $.prototype, "passcode", void 0), Q([ze()], $.prototype, "confirmPasscode", void 0), Q([ze()], $.prototype, "reset_password", void 0), Q([ze()], $.prototype, "reset_new_password", void 0), Q([ze()], $.prototype, "reset_new_confirm_password", void 0), Q([ze()], $.prototype, "binding_info", void 0), $ = Q([Fe("vela-login")], $);
7283
7287
  //#endregion
7284
7288
  export { $ as VelaLogin };
@@ -7,7 +7,7 @@
7
7
  `);r=e===-1?``:n.slice(e+1)}if(!e.stack)e.stack=r;else if(r){let t=r.indexOf(`
8
8
  `),n=t===-1?-1:r.indexOf(`
9
9
  `,t+1),i=n===-1?``:r.slice(n+1);String(e.stack).endsWith(i)||(e.stack+=`
10
- `+r)}}catch{}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=_i(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&aa.assertOptions(n,{silentJSONParsing:Y.transitional(Y.boolean),forcedJSONParsing:Y.transitional(Y.boolean),clarifyTimeoutError:Y.transitional(Y.boolean),legacyInterceptorReqResOrdering:Y.transitional(Y.boolean),advertiseZstdAcceptEncoding:Y.transitional(Y.boolean),validateStatusUndefinedResolves:Y.transitional(Y.boolean)},!1),r!=null&&(G.isFunction(r)?t.paramsSerializer={serialize:r}:aa.assertOptions(r,{encode:Y.function,serialize:Y.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),aa.assertOptions(t,{baseUrl:Y.spelling(`baseURL`),withXsrfToken:Y.spelling(`withXSRFToken`)},!0),t.method=(G.getSafeProp(t,`method`)||G.getSafeProp(this.defaults,`method`)||`get`).toLowerCase();let a=i&&G.merge(i.common,i[t.method]);i&&G.forEach(Wr.concat(`common`),e=>{delete i[e]}),t.headers=K.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||Ar;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[ta.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e?e(f):f}catch(e){if(!t){l=Promise.reject(e);break}try{let n=t.call(this,e);G.isThenable(n)&&(l=Promise.resolve(n).then(()=>ta.call(this,f)))}catch(e){l=Promise.reject(e)}break}}if(!l)try{l=ta.call(this,f)}catch(e){l=Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=_i(this.defaults,e),wr(mi(e.baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}};G.forEach([`delete`,`get`,`head`,`options`],function(e){oa.prototype[e]=function(t,n){return this.request(_i(n||{},{method:e,url:t,data:n&&G.hasOwnProp(n,`data`)?n.data:void 0}))}}),G.forEach([`post`,`put`,`patch`,`query`],function(e){function t(t){return function(n,r,i){return this.request(_i(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}oa.prototype[e]=t(),e!==`query`&&(oa.prototype[e+`Form`]=t(!0))});var sa=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-->0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new Xr(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function ca(e){return function(t){return e.apply(null,t)}}function la(e){return G.isObject(e)&&e.isAxiosError===!0}var ua={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ua).forEach(([e,t])=>{ua[t]===void 0&&(ua[t]=e)});function da(e){let t=new oa(e),n=xt(oa.prototype.request,t);return G.extend(n,oa.prototype,t,{allOwnKeys:!0}),G.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return da(_i(e,t))},n}var X=da(qr);X.Axios=oa,X.CanceledError=Xr,X.CancelToken=sa,X.isCancel=Yr,X.VERSION=Ri,X.toFormData=yr,X.AxiosError=q,X.Cancel=X.CanceledError,X.all=function(e){return Promise.all(e)},X.spread=ca,X.isAxiosError=la,X.mergeConfig=_i,X.AxiosHeaders=K,X.formToJSON=e=>Ur(G.isHTMLForm(e)?new FormData(e):e),X.getAdapter=$i.getAdapter,X.HttpStatusCode=ua,X.default=X;var fa=u(bt(),1),pa=`https://cc.velalive.net.vn`,ma={url_web_account_login:pa+`/web/account_login/v2`,url_web_reset_password:pa+`/web/reset_password/v2`,url_web_third_login:pa+`/web/third_login/v2`,url_web_third_bind:pa+`/web/third_bind/v2`,url_web_bind_ways:pa+`/web/bind_ways/v2`,url_web_unbind:pa+`/web/unbind/v2`,url_web_login_out:pa+`/web/login_out/v2`},ha=X.create({timeout:1e4,headers:{"Content-Type":`application/json`,"X-Requested-With":`XMLHttpRequest`}});ha.interceptors.request.use(e=>{console.log(`request 拦截器 config`);let t=document.querySelector(`meta[name="csrf-token"]`);return t?e.headers[`X-CSRF-TOKEN`]=t.content:console.error(`CSRF token not found in meta tag!`),e},e=>(console.log(`request 拦截器 error`),Promise.reject(e))),ha.interceptors.response.use(e=>(console.log(`response 拦截器 data`),e.data),async e=>{console.log(`response 拦截器 error`);let t=e.config;if(t._retry)return Promise.reject(e);if(e.response)switch(e.response.status){case 401:alert(`登录状态已失效,请重新登录!`),window.location.reload();break;case 419:t._retry=!0;try{let e=(await X.get(`/refresh-csrf`)).data.token,n=document.querySelector(`meta[name="csrf-token"]`);return n&&n.setAttribute(`content`,e),ha({method:t.method,url:t.url,data:t.data,params:t.params,_retry:!0})}catch{alert(`页面已过期,请刷新网页重试!`),window.location.reload()}break;default:alert(e.response.data.message||`网络请求错误`)}return Promise.reject(e)});var Z={urls:ma,request:ha},ga=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFgAAABYCAIAAAD+96djAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFGmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az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UVORK5CYII=`;function Q(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var $=class extends Ne{constructor(...e){super(...e),this.visible=!0,this.appId=``,this.channelId=``,this.uid=``,this.appleClientId=``,this.appleScope=``,this.appleState=``,this.appleNonce=``,this.appleUsePopup=!1,this.appleRedirectURI=``,this.facebookAppId=``,this.currentView=`login`,this._isLoading=!1,this.accountName=``,this.passcode=``,this.confirmPasscode=``,this.reset_password=``,this.reset_new_password=``,this.reset_new_confirm_password=``,this.quickLoginResolve=null}static{this.styles=_`
10
+ `+r)}}catch{}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=_i(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&aa.assertOptions(n,{silentJSONParsing:Y.transitional(Y.boolean),forcedJSONParsing:Y.transitional(Y.boolean),clarifyTimeoutError:Y.transitional(Y.boolean),legacyInterceptorReqResOrdering:Y.transitional(Y.boolean),advertiseZstdAcceptEncoding:Y.transitional(Y.boolean),validateStatusUndefinedResolves:Y.transitional(Y.boolean)},!1),r!=null&&(G.isFunction(r)?t.paramsSerializer={serialize:r}:aa.assertOptions(r,{encode:Y.function,serialize:Y.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),aa.assertOptions(t,{baseUrl:Y.spelling(`baseURL`),withXsrfToken:Y.spelling(`withXSRFToken`)},!0),t.method=(G.getSafeProp(t,`method`)||G.getSafeProp(this.defaults,`method`)||`get`).toLowerCase();let a=i&&G.merge(i.common,i[t.method]);i&&G.forEach(Wr.concat(`common`),e=>{delete i[e]}),t.headers=K.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||Ar;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[ta.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e?e(f):f}catch(e){if(!t){l=Promise.reject(e);break}try{let n=t.call(this,e);G.isThenable(n)&&(l=Promise.resolve(n).then(()=>ta.call(this,f)))}catch(e){l=Promise.reject(e)}break}}if(!l)try{l=ta.call(this,f)}catch(e){l=Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=_i(this.defaults,e),wr(mi(e.baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}};G.forEach([`delete`,`get`,`head`,`options`],function(e){oa.prototype[e]=function(t,n){return this.request(_i(n||{},{method:e,url:t,data:n&&G.hasOwnProp(n,`data`)?n.data:void 0}))}}),G.forEach([`post`,`put`,`patch`,`query`],function(e){function t(t){return function(n,r,i){return this.request(_i(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}oa.prototype[e]=t(),e!==`query`&&(oa.prototype[e+`Form`]=t(!0))});var sa=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-->0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new Xr(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function ca(e){return function(t){return e.apply(null,t)}}function la(e){return G.isObject(e)&&e.isAxiosError===!0}var ua={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ua).forEach(([e,t])=>{ua[t]===void 0&&(ua[t]=e)});function da(e){let t=new oa(e),n=xt(oa.prototype.request,t);return G.extend(n,oa.prototype,t,{allOwnKeys:!0}),G.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return da(_i(e,t))},n}var X=da(qr);X.Axios=oa,X.CanceledError=Xr,X.CancelToken=sa,X.isCancel=Yr,X.VERSION=Ri,X.toFormData=yr,X.AxiosError=q,X.Cancel=X.CanceledError,X.all=function(e){return Promise.all(e)},X.spread=ca,X.isAxiosError=la,X.mergeConfig=_i,X.AxiosHeaders=K,X.formToJSON=e=>Ur(G.isHTMLForm(e)?new FormData(e):e),X.getAdapter=$i.getAdapter,X.HttpStatusCode=ua,X.default=X;var fa=u(bt(),1),pa=`https://cc.velalive.net.vn`,ma={url_web_account_login:pa+`/web/account_login/v2`,url_web_reset_password:pa+`/web/reset_password/v2`,url_web_third_login:pa+`/web/third_login/v2`,url_web_third_bind:pa+`/web/third_bind/v2`,url_web_bind_ways:pa+`/web/bind_ways/v2`,url_web_unbind:pa+`/web/unbind/v2`,url_web_login_out:pa+`/web/login_out/v2`},ha=X.create({timeout:1e4,headers:{"Content-Type":`application/json`,"X-Requested-With":`XMLHttpRequest`}});ha.interceptors.request.use(e=>{console.log(`request 拦截器 config`);let t=document.querySelector(`meta[name="csrf-token"]`);return t?e.headers[`X-CSRF-TOKEN`]=t.content:console.error(`CSRF token not found in meta tag!`),e},e=>(console.log(`request 拦截器 error`),Promise.reject(e))),ha.interceptors.response.use(e=>(console.log(`response 拦截器 data`),e.data),async e=>{console.log(`response 拦截器 error`);let t=e.config;if(t._retry)return Promise.reject(e);if(e.response)switch(e.response.status){case 401:alert(`登录状态已失效,请重新登录!`),window.location.reload();break;case 419:t._retry=!0;try{let e=(await X.get(`/refresh-csrf`)).data.token,n=document.querySelector(`meta[name="csrf-token"]`);return n&&n.setAttribute(`content`,e),ha({method:t.method,url:t.url,data:t.data,params:t.params,_retry:!0})}catch{alert(`页面已过期,请刷新网页重试!`),window.location.reload()}break;default:alert(e.response.data.message||`网络请求错误`)}return Promise.reject(e)});var Z={urls:ma,request:ha},ga=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFgAAABYCAIAAAD+96djAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFGmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDggNzkuMTY0MDM2LCAyMDE5LzA4LzEzLTAxOjA2OjU3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjEuMCAoTWFjaW50b3NoKSIgeG1wOkNyZWF0ZURhdGU9IjIwMTktMTItMTVUMjM6MTM6MTYtMDg6MDAiIHhtcDpNb2RpZnlEYXRlPSIyMDIwLTAx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m2HuYdM8IsKg+/w9SYAebZUILge8yD364BF5+tE54wH5jbf4BT+yKBGWZnLBGCbzAv4F/3xFCiC05dfgG/w0oiCqcNaB0oLZGEXwuUlGDBQwIlJNjwLoEcCRE8JqCREMNTAhIJFZxaxejTRoLauCXhfNkGLZwrkJIYaOESgZSECs4ZA5wxoYZrBJpr7gP7+5r7SS8Ijfassg2Z8E1u2a4y4XXrIUJT9FziDRD8OzLVsr4dwIQPE6O9S2KbkoAC8JjEOCUBheBqCWDCXwVFRiQBTPhUWOHYEmAAF0mAEZwtURnCY1/RZj0hgTdDeEriRF3waAyPdceIBOj3/AezMoRfS6wxv8T8E2AAh96kgmJqOI8AAAAASUVORK5CYII=`;function Q(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var $=class extends Ne{constructor(...e){super(...e),this.visible=!0,this.appId=``,this.channelId=``,this.uid=``,this.appleClientId=``,this.appleScope=``,this.appleState=``,this.appleNonce=``,this.appleUsePopup=!1,this.appleRedirectURI=``,this.facebookAppId=``,this.currentView=`login`,this._isLoading=!1,this.accountName=``,this.passcode=``,this.confirmPasscode=``,this.reset_password=``,this.reset_new_password=``,this.reset_new_confirm_password=``,this.binding_info={}}static{this.styles=_`
11
11
 
12
12
  html, body {
13
13
  width: 100%;
@@ -380,7 +380,7 @@
380
380
  .center-btn-list .btn:active {
381
381
  transform: scale(0.98); /* 点击时微弱缩放反馈 */
382
382
  }
383
- `}connectedCallback(){super.connectedCallback(),this.loadAppleSDK(),this.loadGoogleSDK(),this.loadFacebookSDK()}open(e=`login`){this.visible=!0,this.currentView=e}close(){this.visible=!1,this.quickLoginResolve&&=(this.quickLoginResolve({success:!1,reason:`USER_CANCEL`}),null),this.dispatchEvent(new CustomEvent(`vela-close`))}switchToRegister(){this.currentView=`register`,this.clearInputs()}switchToLogin(){this.currentView=`login`,this.clearInputs()}switchToUserCenter(){this.currentView=`userCenter`,this.clearInputs()}switchToUserCenterResetPassword(){this.currentView=`userCenter-reset-password`,this.clearInputs()}switchToBindingResetPassword(){this.currentView=`binding-reset-password`,this.clearInputs()}switchToUserBinding(){this.currentView=`userCenter-binding`,this.clearInputs(),this.fetchBindWays()}clearInputs(){this.accountName=``,this.passcode=``,this.confirmPasscode=``}renderView(){switch(this.currentView){case`login`:return this.renderLoginForm();case`register`:return this.renderRegisterForm();case`userCenter`:return this.renderCenterForm();case`userCenter-reset-password`:case`binding-reset-password`:return this.renderResetPasswordForm();case`userCenter-binding`:return this.renderBindingForm()}}closeBtnTap(){return this.currentView===`register`?this.switchToLogin():this.currentView.startsWith(`userCenter-`)?this.switchToUserCenter():this.currentView.startsWith(`binding-`)?this.switchToUserBinding():this.close()}render(){return this.visible?he`
383
+ `}connectedCallback(){super.connectedCallback(),this.loadAppleSDK(),this.loadGoogleSDK(),this.loadFacebookSDK()}open(e=`login`){this.visible=!0,this.currentView=e}close(){this.visible=!1,this.dispatchEvent(new CustomEvent(`vela-close`))}switchToRegister(){this.currentView=`register`,this.clearInputs()}switchToLogin(){this.currentView=`login`,this.clearInputs()}switchToUserCenter(){this.currentView=`userCenter`,this.clearInputs()}switchToUserCenterResetPassword(){this.currentView=`userCenter-reset-password`,this.clearInputs()}switchToBindingResetPassword(){this.currentView=`binding-reset-password`,this.clearInputs()}switchToUserBinding(){this.currentView=`userCenter-binding`,this.clearInputs(),this.fetchBindWays()}clearInputs(){this.accountName=``,this.passcode=``,this.confirmPasscode=``}renderView(){switch(this.currentView){case`login`:return this.renderLoginForm();case`register`:return this.renderRegisterForm();case`userCenter`:return this.renderCenterForm();case`userCenter-reset-password`:case`binding-reset-password`:return this.renderResetPasswordForm();case`userCenter-binding`:return this.renderBindingForm()}}closeBtnTap(){return this.currentView===`register`?this.switchToLogin():this.currentView.startsWith(`userCenter-`)?this.switchToUserCenter():this.currentView.startsWith(`binding-`)?this.switchToUserBinding():this.close()}render(){return this.visible?he`
384
384
  <div class="dialog-box active"> <!-- active 控制显示 -->
385
385
  <div class="dialog-wrap">
386
386
  <div class="dialog-conmain">
@@ -496,7 +496,7 @@
496
496
  <div class="center-btn-list">
497
497
  <div>
498
498
  <div class="center-title">账号中心</div>
499
- <div class="center-id">aa_123</div>
499
+ <div class="center-id">aa_${this.uid}</div>
500
500
  </div>
501
501
  <!-- 重置密码 -->
502
502
  <button class="btn btn-list-item" type="button" @click="${this.switchToUserCenterResetPassword}">
@@ -547,44 +547,44 @@
547
547
  <button class="btn btn-reg-sub" type="submit">ยืนยันการสมัคร</button>
548
548
  </div>
549
549
  </form>
550
- `}renderBindingForm(){return he`
550
+ `}renderBindingForm(){let e=this.binding_info;return he`
551
551
  <div class="binding-content">
552
552
  <div class="center-title">账户绑定</div>
553
- <div class="center-id">aa_123</div>
553
+ <div class="center-id">aa_${this.uid}</div>
554
554
  <div class="binding-item">
555
555
  <div class="binding-field-group">
556
556
  <label class="input-label">Account:</label>
557
- <div>test222</div>
557
+ <div>${e.account?.bind===1?e.account.name:`未绑定`}</div>
558
558
  </div>
559
- <button class="unbind-btn" @click="${()=>this.handleUnbind(`Account`)}">修改密码</button>
559
+ <button class="unbind-btn" @click="${()=>this.bindAction(`Account`,e.account?.bind===1)}">${e.account?.bind===1?`修改密码`:`绑定`}</button>
560
560
  </div>
561
561
  <div class="input-line"></div>
562
562
 
563
563
  <div class="binding-item">
564
564
  <div class="binding-field-group">
565
565
  <label class="input-label" for="reg-passcode">Google:</label>
566
- <div>222@gmail.com</div>
566
+ <div>${e.google?.bind===1?e.google.name:`未绑定`}</div>
567
567
  </div>
568
- <button class="unbind-btn" @click="${()=>this.handleUnbind(`Google`)}">解绑</button>
568
+ <button class="unbind-btn" @click="${()=>this.bindAction(`Google`,e.google?.bind===1)}">${e.google?.bind===1?`解绑`:`绑定`}</button>
569
569
  </div>
570
570
  <div class="input-line"></div>
571
571
 
572
572
  <div class="binding-item">
573
573
  <div class="binding-field-group">
574
574
  <label class="input-label" for="confirm-passcode">Facebook:</label>
575
- <div>73429734623423409 | csdfe55@qq.com</div>
575
+ <div>${e.facebook?.bind===1?e.facebook.name:`未绑定`}</div>
576
576
  </div>
577
- <button class="unbind-btn" @click="${()=>this.handleUnbind(`Facebook`)}">解绑</button>
577
+ <button class="unbind-btn" @click="${()=>this.bindAction(`Facebook`,e.facebook?.bind===1)}">${e.facebook?.bind===1?`解绑`:`绑定`}</button>
578
578
  </div>
579
579
  <div class="input-line"></div>
580
580
 
581
581
  <div class="binding-item">
582
582
  <div class="binding-field-group">
583
583
  <label class="input-label" for="confirm-passcode">Apple:</label>
584
- <div>private7yeufijfjw9jffff@apple.com</div>
584
+ <div>${e.apple?.bind===1?e.apple.name:`未绑定`}</div>
585
585
  </div>
586
- <button class="unbind-btn" @click="${()=>this.handleUnbind(`Apple`)}">解绑</button>
586
+ <button class="unbind-btn" @click="${()=>this.bindAction(`Apple`,e.apple?.bind===1)}">${e.apple?.bind===1?`解绑`:`绑定`}</button>
587
587
  </div>
588
588
  <div class="input-line"></div>
589
589
  </div>
590
- `}loadAppleSDK(){let e=document.createElement(`script`);e.src=`https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js`,e.onload=()=>{window.AppleID.auth.init({clientId:this.appleClientId,scope:this.appleScope,redirectURI:this.appleRedirectURI,state:this.appleState,nonce:this.appleNonce,usePopup:this.appleUsePopup}),document.addEventListener(`AppleIDSignInOnSuccess`,e=>{let t=e.detail.authorization.id_token;this.handleThirdLogin(`3`,t)}),document.addEventListener(`AppleIDSignInOnFailure`,e=>{console.error(e.detail.error)})},document.head.appendChild(e)}handleAppleClick(){window.AppleID.auth.signIn()}loadGoogleSDK(){let e=document.createElement(`script`);e.src=`https://accounts.google.com/gsi/client`,e.async=!0,e.onload=()=>{window.handleGoogleSignIn=e=>{console.log(`Google JWT: `,e.credential),this.handleThirdLogin(`2`,e.credential)}},document.head.appendChild(e)}loadFacebookSDK(){let e=document.createElement(`script`);e.src=`https://connect.facebook.net/en_US/sdk.js`,e.async=!0,e.defer=!0,e.crossOrigin=`anonymous`,e.onload=()=>{window.FB.init({appId:this.facebookAppId,cookie:!0,xfbml:!0,version:`v20.0`})},document.head.appendChild(e)}handleFacebookClick(){if(!window.FB){console.warn(`Facebook SDK not loaded`);return}window.FB.getLoginStatus(e=>{e.authResponse?this.handleThirdLogin(`1`,e.authResponse.userID):window.FB.login(e=>{e.authResponse?this.handleThirdLogin(`1`,e.authResponse.userID):console.log(`Facebook login cancelled`)},{scope:`public_profile`})})}handleLoginResult(e){console.log(`SDK接收到的数据类型是:`,typeof e,e),e.code===0?(this.dispatchEvent(new CustomEvent(`vela-login-out`,{detail:[]})),setTimeout(()=>{this.dispatchEvent(new CustomEvent(`vela-login-success`,{detail:e.data})),this.uid=e.data.uid,this.visible=!1},1e3)):alert(e.msg)}handleLoginOutResult(e){console.log(`SDK接收到的数据类型是:`,typeof e,e),e.code===0?(this.dispatchEvent(new CustomEvent(`vela-login-out`,{detail:e.data})),this.uid=``,this.switchToLogin()):alert(e.msg)}handleResetPasswordResult(e){console.log(`SDK接收到的数据类型是:`,typeof e,e),e.code===0||alert(e.msg)}handleBindWaysResult(e){console.log(`SDK接收到的数据类型是:`,typeof e,e),e.code===0||alert(e.msg)}async handleAccountLoginSubmit(e){if(e.preventDefault(),!this.accountName||!this.passcode){alert(`账号和密码不能为空!`);return}this._isLoading=!0;let t=fa.default.MD5(this.accountName).toString(),n=fa.default.MD5(this.passcode).toString();console.log(`执行登录...`,this.accountName,this.passcode);try{let e=await Z.request.post(Z.urls.url_web_account_login,{app_id:this.appId,channel_id:this.channelId,name:t,name2:this.accountName,password:n,password2:this.passcode,type:3});this.handleLoginResult(e)}catch(e){console.error(e)}this._isLoading=!1}async handleAccountRegisterSubmit(e){if(e.preventDefault(),this.passcode!==this.confirmPasscode){alert(`รหัสผ่านไม่ตรงกัน (两次输入的密码不一致)`);return}if(!this.accountName||!this.passcode){alert(`账号和密码不能为空!`);return}this._isLoading=!0;let t=fa.default.MD5(this.accountName).toString(),n=fa.default.MD5(this.passcode).toString();console.log(`执行注册...`,this.accountName,this.passcode);try{let e=await Z.request.post(Z.urls.url_web_account_login,{app_id:this.appId,channel_id:this.channelId,name:t,name2:this.accountName,password:n,password2:this.passcode,type:1});this.handleLoginResult(e)}catch(e){console.error(e)}this._isLoading=!1}async handleLogoutClick(e){e.preventDefault(),this._isLoading=!0,console.log(`执行退出登录...`);try{let e=await Z.request.post(Z.urls.url_web_login_out,{});this.handleLoginOutResult(e)}catch(e){console.error(e)}this._isLoading=!1,console.log(`退出登录`)}async handleResetPasswordSubmit(e){if(e.preventDefault(),console.log(`执行重置密码...`,this.reset_password,this.reset_new_password),this.reset_new_password!==this.reset_new_confirm_password){alert(`รหัสผ่านไม่ตรงกัน (两次输入的密码不一致)`);return}if(!this.reset_password||!this.reset_new_password){alert(`密码不能为空!`);return}this._isLoading=!0;let t=fa.default.MD5(this.reset_password).toString(),n=fa.default.MD5(this.reset_new_password).toString();try{let e=await Z.request.post(Z.urls.url_web_reset_password,{app_id:this.appId,old_password:t,password:n});this.handleResetPasswordResult(e)}catch(e){console.error(e)}this._isLoading=!1}async fetchBindWays(){this._isLoading=!0;try{let e=await Z.request.post(Z.urls.url_web_bind_ways,{app_id:this.appId});this.handleBindWaysResult(e)}catch(e){console.error(e)}this._isLoading=!1}async handleUnbind(e){if(e===`Account`)this.switchToBindingResetPassword();else if(confirm(`您確定要解綁 ${e} 帳戶嗎?`))try{this._isLoading=!0,console.log(`正在請求解綁: ${e}`);let t=await Z.request.post(Z.urls.url_web_unbind,{app_id:this.appId,type:e});this.handleBindWaysResult(t),alert(`${e} 帳戶解綁成功!`)}catch(e){console.error(e),alert(`操作失敗,請稍後再試`)}finally{this._isLoading=!1}}async handleThirdLogin(e,t){console.log(`执行三方登录...`,this.accountName,this.passcode);try{let n=await Z.request.post(Z.urls.url_web_third_login,{app_id:this.appId,type:e,open_id:t});alert(`สมัครสมาชิกสำเร็จ! (注册成功)`),this.handleLoginResult(n)}catch(e){console.error(e)}}async handleThirdBind(e,t){console.log(`执行三方登录...`,this.accountName,this.passcode);try{let n=await Z.request.post(Z.urls.url_web_third_bind,{app_id:this.appId,type:e,open_id:t});alert(`สมัครสมาชิกสำเร็จ! (注册成功)`),this.handleLoginResult(n)}catch(e){console.error(e)}}};Q([Re({type:Boolean,reflect:!0})],$.prototype,`visible`,void 0),Q([Re({type:String})],$.prototype,`appId`,void 0),Q([Re({type:String})],$.prototype,`channelId`,void 0),Q([Re({type:String})],$.prototype,`uid`,void 0),Q([Re({type:String,attribute:`apple-client-id`})],$.prototype,`appleClientId`,void 0),Q([Re({type:String,attribute:`apple-scope`})],$.prototype,`appleScope`,void 0),Q([Re({type:String,attribute:`apple-state`})],$.prototype,`appleState`,void 0),Q([Re({type:String,attribute:`apple-nonce`})],$.prototype,`appleNonce`,void 0),Q([Re({type:Boolean,attribute:`apple-use-popup`})],$.prototype,`appleUsePopup`,void 0),Q([Re({type:String,attribute:`apple-redirect-uri`})],$.prototype,`appleRedirectURI`,void 0),Q([Re({type:String,attribute:`facebook-app-id`})],$.prototype,`facebookAppId`,void 0),Q([Re({type:String,attribute:`view-mode`})],$.prototype,`currentView`,void 0),Q([ze()],$.prototype,`_isLoading`,void 0),Q([ze()],$.prototype,`accountName`,void 0),Q([ze()],$.prototype,`passcode`,void 0),Q([ze()],$.prototype,`confirmPasscode`,void 0),Q([ze()],$.prototype,`reset_password`,void 0),Q([ze()],$.prototype,`reset_new_password`,void 0),Q([ze()],$.prototype,`reset_new_confirm_password`,void 0),$=Q([Fe(`vela-login`)],$),Object.defineProperty(e,"VelaLogin",{enumerable:!0,get:function(){return $}})});
590
+ `}loadAppleSDK(){let e=document.createElement(`script`);e.src=`https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js`,e.onload=()=>{window.AppleID.auth.init({clientId:this.appleClientId,scope:this.appleScope,redirectURI:this.appleRedirectURI,state:this.appleState,nonce:this.appleNonce,usePopup:this.appleUsePopup}),document.addEventListener(`AppleIDSignInOnSuccess`,e=>{let t=e.detail.authorization.id_token;this.handleThirdLogin(`3`,t)}),document.addEventListener(`AppleIDSignInOnFailure`,e=>{console.error(e.detail.error)})},document.head.appendChild(e)}handleAppleClick(){window.AppleID.auth.signIn()}loadGoogleSDK(){let e=document.createElement(`script`);e.src=`https://accounts.google.com/gsi/client`,e.async=!0,e.onload=()=>{window.handleGoogleSignIn=e=>{console.log(`Google JWT: `,e.credential),this.handleThirdLogin(`2`,e.credential)}},document.head.appendChild(e)}loadFacebookSDK(){let e=document.createElement(`script`);e.src=`https://connect.facebook.net/en_US/sdk.js`,e.async=!0,e.defer=!0,e.crossOrigin=`anonymous`,e.onload=()=>{window.FB.init({appId:this.facebookAppId,cookie:!0,xfbml:!0,version:`v20.0`})},document.head.appendChild(e)}handleFacebookClick(){if(!window.FB){console.warn(`Facebook SDK not loaded`);return}window.FB.getLoginStatus(e=>{e.authResponse?this.handleThirdLogin(`1`,e.authResponse.userID):window.FB.login(e=>{e.authResponse?this.handleThirdLogin(`1`,e.authResponse.userID):console.log(`Facebook login cancelled`)},{scope:`public_profile`})})}handleLoginResult(e){console.log(`SDK接收到的数据类型是:`,typeof e,e),e.code===0?(this.dispatchEvent(new CustomEvent(`vela-login-out`,{detail:[]})),setTimeout(()=>{this.dispatchEvent(new CustomEvent(`vela-login-success`,{detail:e.data})),this.uid=e.data.uid,this.visible=!1},1e3)):alert(e.msg)}handleLoginOutResult(e){console.log(`SDK接收到的数据类型是:`,typeof e,e),e.code===0?(this.dispatchEvent(new CustomEvent(`vela-login-out`,{detail:e.data})),this.uid=``,this.switchToLogin()):alert(e.msg)}handleResetPasswordResult(e){console.log(`SDK接收到的数据类型是:`,typeof e,e),e.code===0?this.closeBtnTap():alert(e.msg)}handleBindWaysResult(e){console.log(`SDK接收到的数据类型是:`,typeof e,e),e.code===0?this.binding_info=e.data:alert(e.msg)}handleUnBindResult(e){console.log(`SDK接收到的数据类型是:`,typeof e,e),e.code===0?this.closeBtnTap():alert(e.msg)}async handleAccountLoginSubmit(e){if(e.preventDefault(),!this.accountName||!this.passcode){alert(`账号和密码不能为空!`);return}this._isLoading=!0;let t=fa.default.MD5(this.accountName).toString(),n=fa.default.MD5(this.passcode).toString();console.log(`执行登录...`,this.accountName,this.passcode);try{let e=await Z.request.post(Z.urls.url_web_account_login,{app_id:this.appId,channel_id:this.channelId,name:t,name2:this.accountName,password:n,password2:this.passcode,type:3});this.handleLoginResult(e)}catch(e){console.error(e)}this._isLoading=!1}async handleAccountRegisterSubmit(e){if(e.preventDefault(),this.passcode!==this.confirmPasscode){alert(`รหัสผ่านไม่ตรงกัน (两次输入的密码不一致)`);return}if(!this.accountName||!this.passcode){alert(`账号和密码不能为空!`);return}this._isLoading=!0;let t=fa.default.MD5(this.accountName).toString(),n=fa.default.MD5(this.passcode).toString();console.log(`执行注册...`,this.accountName,this.passcode);try{let e=await Z.request.post(Z.urls.url_web_account_login,{app_id:this.appId,channel_id:this.channelId,name:t,name2:this.accountName,password:n,password2:this.passcode,type:1});this.handleLoginResult(e)}catch(e){console.error(e)}this._isLoading=!1}async handleLogoutClick(e){e.preventDefault(),this._isLoading=!0,console.log(`执行退出登录...`);try{let e=await Z.request.post(Z.urls.url_web_login_out,{});this.handleLoginOutResult(e)}catch(e){console.error(e)}this._isLoading=!1,console.log(`退出登录`)}async handleResetPasswordSubmit(e){if(e.preventDefault(),console.log(`执行重置密码...`,this.reset_password,this.reset_new_password),this.reset_new_password!==this.reset_new_confirm_password){alert(`รหัสผ่านไม่ตรงกัน (两次输入的密码不一致)`);return}if(!this.reset_password||!this.reset_new_password){alert(`密码不能为空!`);return}this._isLoading=!0;let t=fa.default.MD5(this.reset_password).toString(),n=fa.default.MD5(this.reset_new_password).toString();try{let e=await Z.request.post(Z.urls.url_web_reset_password,{app_id:this.appId,old_password:t,password:n});this.handleResetPasswordResult(e)}catch(e){console.error(e)}this._isLoading=!1}async fetchBindWays(){this._isLoading=!0;try{let e=await Z.request.post(Z.urls.url_web_bind_ways,{app_id:this.appId});this.handleBindWaysResult(e)}catch(e){console.error(e)}this._isLoading=!1}bindAction(e,t){t&&(e===`Account`?this.switchToBindingResetPassword():this.handleUnbind(e))}async handleUnbind(e){if(e===`Account`)this.switchToBindingResetPassword();else if(confirm(`您確定要解綁 ${e} 帳戶嗎?`))try{this._isLoading=!0,console.log(`正在請求解綁: ${e}`);let t=await Z.request.post(Z.urls.url_web_unbind,{app_id:this.appId,type:e});this.handleUnBindResult(t),alert(`${e} 帳戶解綁成功!`),this.switchToUserBinding()}catch(e){console.error(e),alert(`操作失敗,請稍後再試`)}finally{this._isLoading=!1}}async handleThirdLogin(e,t){console.log(`执行三方登录...`,this.accountName,this.passcode);try{let n=await Z.request.post(Z.urls.url_web_third_login,{app_id:this.appId,type:e,open_id:t});alert(`สมัครสมาชิกสำเร็จ! (注册成功)`),this.handleLoginResult(n)}catch(e){console.error(e)}}async handleThirdBind(e,t){console.log(`执行三方登录...`,this.accountName,this.passcode);try{let n=await Z.request.post(Z.urls.url_web_third_bind,{app_id:this.appId,type:e,open_id:t});alert(`สมัครสมาชิกสำเร็จ! (注册成功)`),this.handleLoginResult(n)}catch(e){console.error(e)}}};Q([Re({type:Boolean,reflect:!0})],$.prototype,`visible`,void 0),Q([Re({type:String})],$.prototype,`appId`,void 0),Q([Re({type:String})],$.prototype,`channelId`,void 0),Q([Re({type:String})],$.prototype,`uid`,void 0),Q([Re({type:String,attribute:`apple-client-id`})],$.prototype,`appleClientId`,void 0),Q([Re({type:String,attribute:`apple-scope`})],$.prototype,`appleScope`,void 0),Q([Re({type:String,attribute:`apple-state`})],$.prototype,`appleState`,void 0),Q([Re({type:String,attribute:`apple-nonce`})],$.prototype,`appleNonce`,void 0),Q([Re({type:Boolean,attribute:`apple-use-popup`})],$.prototype,`appleUsePopup`,void 0),Q([Re({type:String,attribute:`apple-redirect-uri`})],$.prototype,`appleRedirectURI`,void 0),Q([Re({type:String,attribute:`facebook-app-id`})],$.prototype,`facebookAppId`,void 0),Q([Re({type:String,attribute:`view-mode`})],$.prototype,`currentView`,void 0),Q([ze()],$.prototype,`_isLoading`,void 0),Q([ze()],$.prototype,`accountName`,void 0),Q([ze()],$.prototype,`passcode`,void 0),Q([ze()],$.prototype,`confirmPasscode`,void 0),Q([ze()],$.prototype,`reset_password`,void 0),Q([ze()],$.prototype,`reset_new_password`,void 0),Q([ze()],$.prototype,`reset_new_confirm_password`,void 0),Q([ze()],$.prototype,`binding_info`,void 0),$=Q([Fe(`vela-login`)],$),Object.defineProperty(e,"VelaLogin",{enumerable:!0,get:function(){return $}})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vela-h5-sdk",
3
3
  "private": false,
4
- "version": "0.0.23",
4
+ "version": "0.0.24",
5
5
  "type": "module",
6
6
  "description": "Vela H5 登录弹窗 SDK",
7
7
  "main": "./dist/vela-login-sdk.umd.js",