text: (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/login/login"],{2478:function(e,t,n){},"49cb":function(e,t,n){"use strict";n.r(t);var s=n("b908"),a=n("730f");for(var o in a)"default"!==o&&function(e){n.d(t,e,(function(){return a[e]}))}(o);n("d7ee");var i,u=n("f0c5"),c=Object(u["a"])(a["default"],s["b"],s["c"],!1,null,"b1a6927e",null,!1,s["a"],i);t["default"]=c.exports},"730f":function(e,t,n){"use strict";n.r(t);var s=n("b7b7"),a=n.n(s);for(var o in s)"default"!==o&&function(e){n.d(t,e,(function(){return s[e]}))}(o);t["default"]=a.a},b7b7:function(e,t,n){"use strict";(function(e,s){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n("f691")),o=i(n("b5ea"));i(n("eb61"));function i(e){return e&&e.__esModule?e:{default:e}}var u={components:{},data:function(){return{username:"",sms:"",smsText:"发送验证码",agreement:!1,buttonActive:!1,disabled:!1}},onLoad:function(t){a.default.debug&&e("log","onLoad",t," at pages/login/login.vue:58")},onShow:function(){var e=o.default.getToken();if(e){var t=decodeURIComponent(this.redirect);t.indexOf("?")>-1?s.redirectTo({url:t}):s.switchTab({url:t})}},watch:{username:function(){this.username&&this.sms&&this.agreement?this.buttonActive=!0:this.buttonActive=!1},sms:function(){this.username&&this.sms&&this.agreement?this.buttonActive=!0:this.buttonActive=!1},agreement:function(){this.username&&this.sms&&this.agreement?this.buttonActive=!0:this.buttonActive=!1}},methods:{agreementChange:function(){this.agreement=!this.agreement},getSms:function(){var e=this;this.username&&11==this.username.length?s.request({url:"http://cuncun.app.iisu.cn/server/sso/code/send",data:{type:"mobile",account:this.username},method:"POST",header:{"Content-Type":"application/x-www-form-urlencoded","X-TENANT-ID":"cuncun:cc@2020"},success:function(t){var n=t.data;if(n.success){s.showToast({icon:"none",title:n.message}),e.disabled=!0;var a=30;e.smsText=a,e.timer=setInterval((function(){a--,a>=0?e.smsText=a:(clearInterval(e.timer),e.smsText="再次获取",e.disabled=!1)}),1e3)}else s.showToast({icon:"none",title:n.message})}}):s.showToast({title:"请输入正确的手机号",icon:"none"})},login:function(){this.username&&11==this.username.length?this.sms?this.agreement?s.request({url:"http://cuncun.app.iisu.cn/server/sso/auth/login4authcode",data:{type:"mobile",account:this.username,code:this.sms,autoreg:"y"},method:"POST",header:{"Content-Type":"application/x-www-form-urlencoded","X-TENANT-ID":"cuncun:cc@2020"},success:function(t){var n=t.data;if(n.success){s.showToast({icon:"none",title:n.message});var a="Bearer ".concat(n.data.token);s.setStorage({key:"token",data:a}),e("log",n.data.account," at pages/login/login.vue:192"),s.setStorage({key:"user",data:n.data.account}),s.switchTab({url:"/pages/tabs/tab1"})}else s.showToast({icon:"none",title:n.message})}}):s.showToast({title:"您必须同意用户协议",icon:"none"}):s.showToast({title:"请输入验证码",icon:"none"}):s.showToast({title:"请输入正确的手机号",icon:"none"})}}};t.default=u}).call(this,n("0de9")["default"],n("6e42")["default"])},b908:function(e,t,n){"use strict";var s,a=function(){var e=this,t=e.$createElement;e._self._c},o=[];n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return s}))},d7ee:function(e,t,n){"use strict";var s=n("2478"),a=n.n(s);a.a},db69:function(e,t,n){"use strict";(function(e){n("0007"),n("921b");s(n("66fd"));var t=s(n("49cb"));function s(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("6e42")["createPage"])}},[["db69","common/runtime","common/vendor"]]]);