Files
Portal/unpackage/dist/build/h5/static/js/pages-login.a0afccfb.js
T
2026-01-17 17:39:51 +08:00

1 line
9.1 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-login"],{"0ce2":function(t,e,a){"use strict";var n=a("51e6"),o=a.n(n);o.a},"34f5":function(t,e,a){"use strict";a.r(e);var n=a("c7bc"),o=a.n(n);for(var i in n)["default"].indexOf(i)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(i);e["default"]=o.a},4374:function(t,e,a){var n=a("c86c"),o=a("2ec5"),i=a("24e4"),s=a("299e");e=n(!1);var c=o(i),l=o(s);e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */uni-page-body[data-v-29be3a44]{background:#000}body.?%PAGE?%[data-v-29be3a44]{background:#000}.flex[data-v-29be3a44]{display:flex}.flex-v[data-v-29be3a44]{flex-direction:column}.flex-1[data-v-29be3a44]{flex:1}.flex-align-center[data-v-29be3a44]{align-items:center}.flex-align-start[data-v-29be3a44]{align-items:flex-start}.flex-align-end[data-v-29be3a44]{align-items:flex-end}.flex-pack-center[data-v-29be3a44]{justify-content:center}.flex-pack-start[data-v-29be3a44]{justify-content:flex-start}.flex-pack-end[data-v-29be3a44]{justify-content:flex-end}.flex-pack-around[data-v-29be3a44]{justify-content:space-around}.flex-pack-between[data-v-29be3a44]{justify-content:space-between}.flex-wrap[data-v-29be3a44]{flex-wrap:wrap}.flex-nowrap[data-v-29be3a44]{flex-wrap:nowrap}.text_l[data-v-29be3a44]{text-align:left}.text_r[data-v-29be3a44]{text-align:right}.text_c[data-v-29be3a44]{text-align:center}.ellipsis[data-v-29be3a44]{word-break:keep-all;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.mb60[data-v-29be3a44]{margin-bottom:60px}.mb20[data-v-29be3a44]{margin-bottom:20px}.mb80[data-v-29be3a44]{margin-bottom:80px}.mb10[data-v-29be3a44]{margin-bottom:10px}.login[data-v-29be3a44]{width:100%;height:100%;position:fixed;left:0;top:0;background:url('+c+") no-repeat;background-size:100% auto;background-position:0 100%;overflow-y:auto}.login .langview[data-v-29be3a44]{position:absolute;top:15px;right:15px}.login .langview .select[data-v-29be3a44]{border-radius:4px;width:90px;display:inline-block;font-size:14px;color:#cfc189;line-height:35px;background:#212121;text-align:center}.login .langview .select[data-v-29be3a44]:active{opacity:.6}.login .langview .select-box[data-v-29be3a44]{position:absolute;right:0;top:45px;width:90px;line-height:30px;background:#212121;border-radius:4px;text-align:center;color:#fff;font-size:14px;z-index:9}.login .langview .select-box .option[data-v-29be3a44]:active{opacity:.6}.login .langview .select-box .active[data-v-29be3a44]{color:#cfc189;font-weight:700}.login .content[data-v-29be3a44]{width:280px;padding-bottom:50px;margin:0 auto}.login .content .logo[data-v-29be3a44]{display:flex;align-items:center;justify-content:center;margin-bottom:20px;margin-top:20%}.login .content .input[data-v-29be3a44]{height:30px;line-height:30px;margin-bottom:15px;background:#fff;border-radius:8px;overflow:hidden}.login .content .phone-code[data-v-29be3a44]{min-width:50px;text-align:center;border-right:1px solid #ddd}.login .content .btn-box[data-v-29be3a44]{margin-top:20px}.login .content .btn-box .btn[data-v-29be3a44]{width:100%;height:48px;line-height:48px;text-align:center;font-size:16px;background:url("+l+") no-repeat;background-size:100% 100%;font-weight:600;margin-top:15px}.login .content .btn-box .btn[data-v-29be3a44]:active{opacity:.8}.login .country[data-v-29be3a44]{position:fixed;bottom:0;left:0}.login .tip[data-v-29be3a44]{font-size:12px;color:#b38f3c;margin-top:20px;text-align:center;margin-bottom:20px}.login .tip[data-v-29be3a44]:active{opacity:.6}",""]),t.exports=e},"51e6":function(t,e,a){var n=a("4374");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var o=a("967d").default;o("1c77198d",n,!0,{sourceMap:!1,shadowMode:!1})},7993:function(t,e,a){"use strict";a.r(e);var n=a("a76d"),o=a("34f5");for(var i in o)["default"].indexOf(i)<0&&function(t){a.d(e,t,(function(){return o[t]}))}(i);a("0ce2");var s=a("828b"),c=Object(s["a"])(o["default"],n["b"],n["c"],!1,null,"29be3a44",null,!1,n["a"],void 0);e["default"]=c.exports},a76d:function(t,e,a){"use strict";a.d(e,"b",(function(){return o})),a.d(e,"c",(function(){return i})),a.d(e,"a",(function(){return n}));var n={"u-Image":a("1a0d").default,uInput:a("7673").default,uToast:a("3c10").default,countryCode:a("97c1").default},o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:"login"},[a("div",{staticClass:"langview"},[a("div",{staticClass:"select",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.showLangselect(!0)}}},[t._v(t._s(t.langList[t.language]))]),a("div",{directives:[{name:"show",rawName:"v-show",value:t.langselect,expression:"langselect"}],staticClass:"select-box"},t._l(Object.keys(t.langList),(function(e){return a("div",{key:e,staticClass:"option",class:{active:e==t.language},on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.choseLang(e)}}},[t._v(t._s(t.langList[e]))])})),0)]),a("v-uni-view",{staticClass:"content"},[a("v-uni-view",{staticClass:"logo"},[a("u--image",{attrs:{showLoading:!1,src:t.loginLogo,width:"125px",height:"119px",mode:"scaleToFill"}})],1),a("u-input",{staticClass:"input",attrs:{type:"number",clearable:!0,placeholder:t.$lang.enterAccount},model:{value:t.phone,callback:function(e){t.phone=e},expression:"phone"}}),a("u-input",{staticClass:"input",attrs:{password:!0,placeholder:t.$lang.enterPassword},model:{value:t.password,callback:function(e){t.password=e},expression:"password"}}),a("v-uni-view",{staticClass:"btn-box"},[a("v-uni-view",{staticClass:"btn",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.login("login")}}},[t._v(t._s(t.$lang.login))]),a("v-uni-view",{staticClass:"btn",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.login("dome")}}},[t._v(t._s(t.$lang.dome))])],1),a("v-uni-view",{staticClass:"tip",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.goRegister.apply(void 0,arguments)}}},[t._v(t._s(t.$lang.goRegister))])],1),a("u-toast",{ref:"uToast"}),a("country-code",{staticClass:"country",attrs:{show:t.countryShow,anchor:t.countryData.anchor_index,country:t.countryData.country_en},on:{select:function(e){arguments[0]=e=t.$handleEvent(e),t.selectCountryTap.apply(void 0,arguments)},close:function(e){arguments[0]=e=t.$handleEvent(e),t.countryShow=!1}}})],1)},i=[]},c7bc:function(t,e,a){"use strict";a("6a54");var n=a("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("5c47"),a("a1c1"),a("5ef2"),a("2c10");var o=n(a("9b1b")),i=a("8f59"),s={data:function(){return{phone:"",password:"",countryShow:!1,countryData:{anchor_index:2,country_en:"Philippines",country_cn:"菲律賓",country_code:"+63"},langList:{en:"English",tw:"繁體中文",cn:"简体中文",yn:"Việt nam",kr:"한국어",tl:"แบบไทย",in:"Indonesia"},langselect:!1}},computed:(0,o.default)({},(0,i.mapState)({language:function(t){return t.app.language?t.app.language:"en"},$lang:function(t){return t.app.lang[t.app.language]},loginLogo:function(t){return t.app.loginLogo}})),onLoad:function(){var t={};try{t=localStorage.getItem("userInfo"),t=t?JSON.parse(t):{},t&&t.id&&uni.switchTab({url:"/pages/index"})}catch(e){console.log(e)}},methods:{showLangselect:function(t){this.langselect=t},choseLang:function(t){this.$store.commit("app/updateLanguage",t),this.langselect=!1},selectCountryTap:function(t){this.countryData=t,this.countryShow=!1},goRegister:function(){this.$router.replace({path:"/pages/register"})},login:function(t){var e=this;if(this.phone||"login"!=t)if(!this.password&"login"==t)this.$toast({message:this.$lang.enterPassword,duration:2e3});else{var a=navigator.userAgent,n=a.indexOf("Android")>-1||a.indexOf("Adr")>-1,i=!!a.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),s=n?3:i?2:1,c={username:this.phone,password:this.password,code:this.countryData.country_code,client:s},l="login";"dome"==t&&(l="dome",c.token="shiwanlogin"),this.$toast({type:"loading",message:this.$lang.logining,duration:2e5}),this.$api[l](c).then((function(a){a.Success?(e.$store.commit("app/updateUserInfo",(0,o.default)({},a.Data)),e.$store.commit("app/updateLoginType",t),uni.switchTab({url:"/pages/index"}),e.$toastHide()):e.$toast({message:a.Msg,duration:2e3})})).catch((function(t){console.log(t),e.$toastHide()}))}else this.$toast({message:this.$lang.enterAccount,duration:2e3})}}};e.default=s}}]);