(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-login-login"],{"0caf":function(t,e,n){"use strict";var i=n("ab1b"),o=n.n(i);o.a},2981:function(t,e,n){"use strict";var i=n("4ea4");n("d3b7"),Object.defineProperty(e,"__esModule",{value:!0}),e.config=e.uploading=e.request=void 0;var o=i(n("6c25")),a={apiUrl:"http://api.water.shangkelian.cn/api/",timeout:6e4};e.config=a;var s=!1,r=function(t,e){if("undefined"!==t.url&&""!==t.url)return a.header={Accept:"application/json",Authorization:o.default.getters.getToken||""},e||uni.showLoading({title:"加载中",mask:!0}),new Promise((function(e,n){uni.request({url:a.apiUrl+t.url,timeout:a.timeout,header:a.header||{},data:t.data||{},method:t.method||"GET",success:function(t){if(t.header.Authorization&&u("token",t.header.Authorization),200===t.statusCode){uni.hideLoading();var i=t.data;return 200===i.status_code?void e(i.data):401===i.status_code?void l():void n(i)}d(t.statusCode)}})}));uni.showToast({title:"请求地址不能为空",icon:"none"})};e.request=r;var c=function(t){return uni.showLoading({title:"上传中",mask:!0}),a.header={Accept:"application/json",Authorization:o.default.getters.getToken||""},new Promise((function(e,n){uni.uploadFile({url:a.apiUrl+"storage/uploads",files:t,header:a.header||{},success:function(t){if(200===t.statusCode){uni.hideLoading();var i=JSON.parse(t.data);return 200===i.status_code?void e(i.data):void n(i)}d(t.statusCode)}})}))};e.uploading=c;var d=function(t){switch(t){case 404:uni.showToast({title:t+"接口不存在,请联系系统管理员",icon:"none"});break;case 405:uni.showToast({title:t+"请检查接口请求方式错误",icon:"none"});break;case 500:uni.showToast({title:t+"服务端错误,请检查服务器信息",icon:"none"});break}},u=function(t){o.default.commit("setToken",t)},l=function(){s||(s||(s=!0),u(""),uni.showModal({title:"登录提示",content:"您的登录信息已过期,请重新登录",confirmColor:"#8b64fd",showCancel:!1,success:function(t){s=!1,t.confirm&&uni.reLaunch({url:"/pages/index/index"})}}))}},"349e":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSms=e.smsAuth=void 0;var i=n("2981"),o=function(t){return(0,i.request)({url:"user/auth/sms",method:"POST",data:t})};e.smsAuth=o;var a=function(t){return(0,i.request)({url:"user/auth/verify",method:"POST",data:t})};e.getSms=a},8468:function(t,e,n){"use strict";var i;n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return i}));var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"content"},[n("v-uni-view",{staticClass:"login-top"},[n("v-uni-view",{staticClass:"top-logo-content"},[t._v("手机号快捷登录")]),t._v("未注册的手机号码将自动注册")],1),n("v-uni-view",{staticClass:"inputs phone"},[n("v-uni-label",{staticClass:"label"},[t._v("+86")]),n("v-uni-input",{attrs:{type:"number",placeholder:"输入您的手机号码",maxlength:"11"},model:{value:t.phone,callback:function(e){t.phone=e},expression:"phone"}})],1),n("v-uni-view",{staticClass:"inputs sms"},[n("v-uni-input",{attrs:{type:"number",placeholder:"输入短信验证码",maxlength:"4"},model:{value:t.code,callback:function(e){t.code=e},expression:"code"}}),n("v-uni-button",{staticClass:"sms-btn",attrs:{type:"default",size:"mini",disabled:""==t.phone||t.getSms},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.getPhoneCode.apply(void 0,arguments)}}},[t._v(t._s(t.getSms?"重新发送"+t.smsTime+"s":"发送验证码"))])],1),n("v-uni-view",{staticClass:"inputs"},[n("v-uni-input",{attrs:{placeholder:"邀请码 (选填)",maxlength:"10"},model:{value:t.parentId,callback:function(e){t.parentId=e},expression:"parentId"}})],1),n("v-uni-button",{staticClass:"btn",attrs:{type:"default",disabled:""==t.phone||""==t.code},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.login.apply(void 0,arguments)}}},[t._v("登录")]),n("v-uni-view",{staticClass:"beianNo"},[t._v("黑ICP备2021013714号-1")])],1)},a=[]},"92c4":function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* uview scss */\n/* 引入自定义的scss */\n/**\n * Web唐明明\n * 匆匆数载恍如梦,岁月迢迢华发增。\n * 碌碌无为枉半生,一朝惊醒万事空。\n */.ios-bottom[data-v-1721efc0]{padding-bottom:env(safe-area-inset-bottom);padding-bottom:constant(safe-area-inset-bottom)}.ios-left[data-v-1721efc0]{padding-left:env(safe-area-inset-left);padding-left:constant(safe-area-inset-left)}.ios-right[data-v-1721efc0]{padding-right:env(safe-area-inset-right);padding-right:constant(safe-area-inset-right)}.ios-top[data-v-1721efc0]{padding-top:0}.vertical[data-v-1721efc0]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-pack:center}.nowrap[data-v-1721efc0]{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ellipsis[data-v-1721efc0]{max-width:100%;display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2}\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.content[data-v-1721efc0]{height:100vh;width:100vw;padding:%?90?%;box-sizing:border-box;background:#fff}.content .login-top[data-v-1721efc0]{height:17vh;width:100%;flex-direction:row;align-items:flex-end;justify-content:center;box-sizing:border-box;position:relative;color:#919191}.content .login-top .top-bg[data-v-1721efc0]{position:absolute;bottom:%?30?%;z-index:2;width:%?740?%}.content .login-top .top-logo-content[data-v-1721efc0]{box-sizing:border-box;color:#000;font-weight:600;font-size:%?40?%;margin-bottom:%?10?%}.content .login-top .top-logo-content .top-logo[data-v-1721efc0]{margin-bottom:%?20?%;width:%?146?%;height:%?146?%}.content .inputs[data-v-1721efc0]{background:rgba(68,144,255,.05);border:solid %?1?% #f2f2f2;position:relative;margin-top:%?30?%;height:%?80?%;line-height:%?80?%}.content .inputs uni-input[data-v-1721efc0]{width:100%;height:%?80?%;line-height:%?80?%;padding:0 %?30?%;border:none;box-sizing:border-box;font-size:%?30?%}.content .inputs.phone[data-v-1721efc0]{padding-left:%?120?%}.content .inputs.phone .label[data-v-1721efc0]{position:absolute;left:0;top:0;width:%?120?%;text-align:center;border-right:solid %?1?% #f2f2f2;font-size:%?30?%}.content .inputs.sms[data-v-1721efc0]{padding-right:%?200?%}.content .inputs.sms .sms-btn[size="mini"][data-v-1721efc0]{width:%?200?%;height:%?77?%;line-height:%?77?%;position:absolute;top:%?1?%;right:%?1?%;padding:0;margin:0;border-radius:0;border-left:solid %?1?% #f2f2f2;color:#4490ff;font-size:%?30?%}.content .inputs.sms .sms-btn[size="mini"][data-v-1721efc0]::after{border:none}.content .inputs.sms .sms-btn[size="mini"][disabled][data-v-1721efc0]{color:rgba(68,144,255,.6);background:#f7f8fa}.content .title[data-v-1721efc0]{text-align:center;font-size:%?38?%;font-weight:700;color:#2a2a2a;margin-bottom:%?100?%}.content .btn[data-v-1721efc0]{background:#6e79ec;color:#fff;border-radius:0;margin-top:%?30?%;font-size:%?32?%;line-height:%?90?%;height:%?90?%;font-weight:700}.content .btn[data-v-1721efc0]::after{border:none}.content .btn[disabled][data-v-1721efc0]{background:rgba(110,121,236,.6)}.content .beianNo[data-v-1721efc0]{font-size:%?26?%;color:#9d9d9d;text-align:center;padding-top:%?60?%}',""]),t.exports=e},aa61:function(t,e,n){"use strict";n.r(e);var i=n("f93e"),o=n.n(i);for(var a in i)"default"!==a&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=o.a},ab1b:function(t,e,n){var i=n("92c4");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var o=n("4f06").default;o("29523fca",i,!0,{sourceMap:!1,shadowMode:!1})},b707:function(t,e,n){"use strict";n.r(e);var i=n("8468"),o=n("aa61");for(var a in o)"default"!==a&&function(t){n.d(e,t,(function(){return o[t]}))}(a);n("0caf");var s,r=n("f0c5"),c=Object(r["a"])(o["default"],i["b"],i["c"],!1,null,"1721efc0",null,!1,i["a"],s);e["default"]=c.exports},f93e:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("349e"),o={data:function(){return{phone:"",code:"",parentId:"",smsTime:60,getSms:!1}},mounted:function(){this.parentId=this.$Route.query.invite||""},methods:{login:function(){var t=this;(0,i.smsAuth)({mobileNo:this.phone,code:this.code,invite:this.parentId}).then((function(e){t.$store.commit("setToken",e.token_type+" "+e.access_token),t.$Route.toName?t.$Router.back():t.$Router.replaceAll({name:"Index"})})).catch((function(t){uni.showToast({title:t.message,icon:"none"})}))},getPhoneCode:function(){var t=this;(0,i.getSms)({mobileNo:this.phone}).then((function(e){uni.showToast({title:e,icon:"none"}),t.getSms=!0,setInterval((function(){t.smsTime<=1&&(t.getSms=!1,t.smsTime=60,clearInterval("outTime")),t.smsTime-=1}),1e3)})).catch((function(t){uni.showToast({title:t.message,icon:"none"})}))}}};e.default=o}}]);