(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/login/login"],{"0601":function(t,e,n){"use strict";n.r(e);var o=n("52ab"),i=n("1c10");for(var a in i)"default"!==a&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n("1af4");var c,s=n("f0c5"),r=Object(s["a"])(i["default"],o["b"],o["c"],!1,null,"e3edb270",null,!1,o["a"],c);e["default"]=r.exports},"1af4":function(t,e,n){"use strict";var o=n("5958"),i=n.n(o);i.a},"1c10":function(t,e,n){"use strict";n.r(e);var o=n("3549"),i=n.n(o);for(var a in o)"default"!==a&&function(t){n.d(e,t,(function(){return o[t]}))}(a);e["default"]=i.a},3549:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n("c041"),i={data:function(){return{isCanUse:t.getStorageSync("isCanUse"),nickName:"",avatarUrl:"",bgImg:["https://6d61-matchbox-79a395-1302390714.tcb.qcloud.la/matchbox/img_flower_4.jpg","https://6d61-matchbox-79a395-1302390714.tcb.qcloud.la/matchbox/img_flower_1.jpg","https://6d61-matchbox-79a395-1302390714.tcb.qcloud.la/matchbox/img_flower_3.jpg","https://6d61-matchbox-79a395-1302390714.tcb.qcloud.la/matchbox/img_flower_2.jpg"],imgTime:"",imgIndex:0,codeName:"验证码",isCode:!0,tel:"12345678912",smscode:"123456"}},props:{},onLoad:function(t){this.wxlogin()},onReady:function(){},onShow:function(){this.setbImg()},onHide:function(){clearInterval(this.imgTime)},onUnload:function(){clearInterval(this.imgTime)},onPullDownRefresh:function(){},onReachBottom:function(){},onShareAppMessage:function(){},methods:{getUserInfo:function(){console.log("点了");var e=this;t.getUserInfo({provider:"weixin",success:function(n){console.log(n),e.setData({nickName:n.userInfo.nickName,avatarUrl:n.userInfo.avatarUrl});var i=(new Date).getTime();(0,o.setToken)(i),(0,o.setUserInfo)(n.userInfo);try{t.setStorageSync("isCanUse",1),t.switchTab({url:"/pages/views/tabBar/home"})}catch(a){console.log("缓存失败")}},fail:function(t){}})},setbImg:function(){clearInterval(this.imgTime);var t=this;console.log("执行了");var e=setInterval((function(){var e=t.imgIndex+1;e>=t.bgImg.length&&(e=0),t.setData({imgIndex:e})}),15e3);this.setData({imgTime:e})},onlogin:function(){var e=(new Date).getTime();(0,o.setToken)(e);var n={avatarUrl:"/static/images/face.jpg",nickName:"用户2020"};(0,o.setUserInfo)(n),t.showLoading({title:"登录中..."}),setTimeout((function(){t.hideLoading(),t.showToast({title:"登陆成功"})}),500),setTimeout((function(){t.navigateBack(-1)}),1500)},getCode:function(){if(0!=this.isCode){if(""!=this.tel)return/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.tel)?void this.getPhoneCode():(t.showToast({title:"请填写正确手机号码",icon:"none"}),!1);t.showToast({title:"请输入手机号",icon:"none"})}},getPhoneCode:function(){var e="",n=120,o=this;1==o.isCode&&(t.showToast({title:"验证码发送成功~",icon:"none"}),clearInterval(e),setInterval((function(){n>=1?(n--,o.codeName=n+"秒重试",o.isCode=!1):(o.isCode=!0,o.codeName="验证码",clearInterval(e))}),1e3))},wxlogin:function(){t.login({provider:"weixin",success:function(t){console.log("这是用户的code",t)}})},onAuthorize:function(){t.showToast({title:"对接你的公众号登录方法",icon:"none"})}}};e.default=i}).call(this,n("543d")["default"])},"52ab":function(t,e,n){"use strict";var o;n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return o}));var i=function(){var t=this,e=t.$createElement;t._self._c},a=[]},5958:function(t,e,n){},"8d13":function(t,e,n){"use strict";(function(t){n("2804");o(n("66fd"));var e=o(n("0601"));function o(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])}},[["8d13","common/runtime","common/vendor"]]]);