1 line
9.3 KiB
JavaScript
1 line
9.3 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-register"],{"1f8a":function(t,e,a){"use strict";a.d(e,"b",(function(){return s})),a.d(e,"c",(function(){return r})),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},s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:"register"},[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:{focus:t.focusUsername,type:"number",clearable:!0,placeholder:t.$lang.enterAccount},model:{value:t.username,callback:function(e){t.username=e},expression:"username"}},[a("v-uni-text",{staticClass:"text",attrs:{slot:"prefix"},slot:"prefix"},[t._v(t._s(t.$lang.account))])],1),a("u-input",{staticClass:"input",attrs:{focus:t.focusPassword,password:!0,placeholder:t.$lang.enterPassword,autocomplete:"new-password"},model:{value:t.password,callback:function(e){t.password=e},expression:"password"}},[a("v-uni-text",{staticClass:"text",attrs:{slot:"prefix"},slot:"prefix"},[t._v(t._s(t.$lang.password))])],1),a("u-input",{staticClass:"input",attrs:{focus:t.focusRepass,password:!0,placeholder:t.$lang.enterPasswordAgain},model:{value:t.repass,callback:function(e){t.repass=e},expression:"repass"}},[a("v-uni-text",{staticClass:"text",attrs:{slot:"prefix"},slot:"prefix"},[t._v(t._s(t.$lang.confirmPassword))])],1),a("u-input",{staticClass:"input",attrs:{focus:t.focusPhone,type:"number",clearable:!0,placeholder:""+t.$lang.enterPhone},model:{value:t.phone,callback:function(e){t.phone=e},expression:"phone"}},[a("v-uni-view",{staticClass:"phone-code",attrs:{slot:"prefix"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.countryShow=!0}},slot:"prefix"},[t._v(t._s(t.countryData.country_code))])],1),a("u-input",{staticClass:"input",attrs:{placeholder:"TC176852",disabled:t.referral_disabled},model:{value:t.referral_code,callback:function(e){t.referral_code=e},expression:"referral_code"}},[a("v-uni-text",{staticClass:"text",attrs:{slot:"prefix"},slot:"prefix"},[t._v(t._s(t.$lang.invitationCode))])],1),a("v-uni-view",{staticClass:"btn-box"},[a("v-uni-view",{staticClass:"btn",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.register()}}},[t._v(t._s(t.$lang.register))])],1),a("v-uni-view",{staticClass:"tip",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.goLogin.apply(void 0,arguments)}}},[t._v(t._s(t.$lang.goLogin))])],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}}}),a("v-uni-view",{staticClass:"mb60"})],1)},r=[]},"2d9e":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 s=n(a("9b1b")),r=a("8f59"),o={data:function(){return{username:"",password:"",repass:"",phone:"",referral_code:void 0,countryShow:!1,referral_disabled:!1,countryData:{anchor_index:2,country_en:"Philippines",country_cn:"菲律宾",country_code:"+63"},focusUsername:!1,focusPassword:!1,focusRepass:!1,focusPhone:!1}},computed:(0,s.default)({},(0,r.mapState)({$lang:function(t){return t.app.lang[t.app.language]},loginLogo:function(t){return t.app.loginLogo}})),onLoad:function(){var t=this.$route.query.invitedCode,e=void 0===t?null:t;e&&(this.referral_code=e,this.referral_disabled=!0)},methods:{selectCountryTap:function(t){this.countryData=t,this.countryShow=!1},goLogin:function(){this.$router.replace({path:"/pages/login"})},register:function(){var t=this;if(this.username)if(this.password)if(this.repass)if(this.phone){var e=navigator.userAgent,a=e.indexOf("Android")>-1||e.indexOf("Adr")>-1,n=!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),r=a?3:n?2:1,o=this.referral_code?this.referral_code:"TC176852",i={username:this.username,pass:this.password,repass:this.repass,mobile:this.phone,code:this.countryData.country_code,referral_code:o,area_id:2,client:r};this.$toast({type:"loading",message:"".concat(this.$lang.register,"..."),duration:2e5}),this.$api.register(i).then((function(e){t.$toastHide(),1==e.Success?(t.$store.commit("app/updateUserInfo",(0,s.default)({},e.Data)),uni.switchTab({url:"/pages/login"}),t.$toast({message:t.$lang.register+t.$lang.success,duration:2e3})):t.$toast({message:e.Msg,duration:2e3})})).catch((function(e){t.$toastHide()}))}else this.$toast({message:this.$lang.enterPhone,duration:2e3}),this.focusPhone=!0;else this.$toast({message:this.$lang.enterPasswordAgain,duration:2e3}),this.focusRepass=!0;else this.$toast({message:this.$lang.enterPassword,duration:2e3}),this.focusPassword=!0;else this.$toast({message:this.$lang.enterAccount,duration:2e3}),this.focusUsername=!0}}};e.default=o},"2dc0":function(t,e,a){"use strict";a.r(e);var n=a("1f8a"),s=a("ef1b");for(var r in s)["default"].indexOf(r)<0&&function(t){a.d(e,t,(function(){return s[t]}))}(r);a("45e0");var o=a("828b"),i=Object(o["a"])(s["default"],n["b"],n["c"],!1,null,"67520bfc",null,!1,n["a"],void 0);e["default"]=i.exports},"45e0":function(t,e,a){"use strict";var n=a("4cc2"),s=a.n(n);s.a},"4cc2":function(t,e,a){var n=a("7dc7");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var s=a("967d").default;s("1f31a56c",n,!0,{sourceMap:!1,shadowMode:!1})},"7dc7":function(t,e,a){var n=a("c86c"),s=a("2ec5"),r=a("24e4"),o=a("299e");e=n(!1);var i=s(r),c=s(o);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-67520bfc]{background:#000}body.?%PAGE?%[data-v-67520bfc]{background:#000}.flex[data-v-67520bfc]{display:flex}.flex-v[data-v-67520bfc]{flex-direction:column}.flex-1[data-v-67520bfc]{flex:1}.flex-align-center[data-v-67520bfc]{align-items:center}.flex-align-start[data-v-67520bfc]{align-items:flex-start}.flex-align-end[data-v-67520bfc]{align-items:flex-end}.flex-pack-center[data-v-67520bfc]{justify-content:center}.flex-pack-start[data-v-67520bfc]{justify-content:flex-start}.flex-pack-end[data-v-67520bfc]{justify-content:flex-end}.flex-pack-around[data-v-67520bfc]{justify-content:space-around}.flex-pack-between[data-v-67520bfc]{justify-content:space-between}.flex-wrap[data-v-67520bfc]{flex-wrap:wrap}.flex-nowrap[data-v-67520bfc]{flex-wrap:nowrap}.text_l[data-v-67520bfc]{text-align:left}.text_r[data-v-67520bfc]{text-align:right}.text_c[data-v-67520bfc]{text-align:center}.ellipsis[data-v-67520bfc]{word-break:keep-all;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.mb60[data-v-67520bfc]{margin-bottom:60px}.mb20[data-v-67520bfc]{margin-bottom:20px}.mb80[data-v-67520bfc]{margin-bottom:80px}.mb10[data-v-67520bfc]{margin-bottom:10px}.register[data-v-67520bfc]{width:100%;height:100%;position:fixed;left:0;top:0;background:url('+i+") no-repeat;background-size:100% auto;background-position:0 100%;overflow-y:auto}.register .content[data-v-67520bfc]{width:280px;padding-bottom:50px;margin:0 auto}.register .content .logo[data-v-67520bfc]{display:flex;align-items:center;justify-content:center;margin-bottom:20px;margin-top:20%}.register .content .input[data-v-67520bfc]{height:30px;line-height:30px;margin-bottom:15px;background:#fff;border-radius:8px;overflow:hidden}.register .content .phone-code[data-v-67520bfc]{min-width:50px;text-align:center;border-right:1px solid #ddd}.register .content .text[data-v-67520bfc]{padding-right:5px}.register .content .btn-box[data-v-67520bfc]{margin-top:20px}.register .content .btn-box .btn[data-v-67520bfc]{width:100%;height:48px;line-height:48px;text-align:center;font-size:16px;background:url("+c+") no-repeat;background-size:100% 100%;font-weight:600;margin-top:15px}.register .content .btn-box .btn[data-v-67520bfc]:active{opacity:.8}.register .country[data-v-67520bfc]{position:fixed;bottom:0;left:0}.register .tip[data-v-67520bfc]{font-size:12px;color:#b38f3c;margin-top:20px;text-align:center;margin-bottom:20px}.register .tip[data-v-67520bfc]:active{opacity:.6}",""]),t.exports=e},ef1b:function(t,e,a){"use strict";a.r(e);var n=a("2d9e"),s=a.n(n);for(var r in n)["default"].indexOf(r)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(r);e["default"]=s.a}}]); |