(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{2166:function(n,e,t){"use strict";t.r(e);var o=t("593d"),a=t.n(o);for(var s in o)"default"!==s&&function(n){t.d(e,n,(function(){return o[n]}))}(s);e["default"]=a.a},"2f5e":function(n,e,t){"use strict";(function(n){t("bdbd"),t("921b");o(t("66fd"));var e=o(t("64ba"));function o(n){return n&&n.__esModule?n:{default:n}}n(e.default)}).call(this,t("543d")["createPage"])},"359a":function(n,e,t){},"4e25":function(n,e,t){"use strict";var o=t("359a"),a=t.n(o);a.a},"4e90":function(n,e,t){"use strict";var o=t("d869"),a=t.n(o);a.a},"593d":function(n,e,t){"use strict";(function(n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t={onLaunch:function(){console.log("App Launch")},onShow:function(){console.log("App Show")},onHide:function(){console.log("App Hide")},post:function(e,t,o){var a=this,s=new Promise((function(s,r){var i=n.getStorageSync("token"),u={token:i||""};n.request({url:a.globalData.baseUrl+e,data:t,method:o,header:u,success:function(n){200==n.statusCode?s(n):r(n.data)},fail:function(n){console.log(n),r("网络出错"),wx.hideNavigationBarLoading()},complete:function(n){}})}));return s},globalData:{userInfo:null,baseUrl:"https://www.bjzha.net/api/"}};e.default=t}).call(this,t("543d")["default"])},"59df":function(n,e,t){"use strict";t.r(e);var o=t("2166");for(var a in o)"default"!==a&&function(n){t.d(e,n,(function(){return o[n]}))}(a);t("4e90");var s,r,i,u,c=t("f0c5"),l=Object(c["a"])(o["default"],s,r,!1,null,null,null,!1,i,u);e["default"]=l.exports},"64ba":function(n,e,t){"use strict";t.r(e);var o=t("7fcf"),a=t("cbd6");for(var s in a)"default"!==s&&function(n){t.d(e,n,(function(){return a[n]}))}(s);t("4e25");var r,i=t("f0c5"),u=Object(i["a"])(a["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],r);e["default"]=u.exports},"7fcf":function(n,e,t){"use strict";var o,a=function(){var n=this,e=n.$createElement;n._self._c},s=[];t.d(e,"b",(function(){return a})),t.d(e,"c",(function(){return s})),t.d(e,"a",(function(){return o}))},cbd6:function(n,e,t){"use strict";t.r(e);var o=t("fe21"),a=t.n(o);for(var s in o)"default"!==s&&function(n){t.d(e,n,(function(){return o[n]}))}(s);e["default"]=a.a},d869:function(n,e,t){},fe21:function(n,e,t){"use strict";(function(n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=a(t("59df"));function a(n){return n&&n.__esModule?n:{default:n}}var s={data:function(){return{selshow:!0,phone:"",password:"",rangenum:"",yanzhengcode:"",tanceng:!1,seldeng:0,seldengk:0}},onLoad:function(){var e=("000000"+Math.floor(999999*Math.random())).slice(-6);this.rangenum=e;var t=n.getStorageSync("username"),o=n.getStorageSync("password");console.log("用户名",t),""!=t&&(this.phone=t,this.password=o,this.selshow=!0)},methods:{zhengce:function(e){var t=e.currentTarget.dataset.id;n.navigateTo({url:"../yinsi/yinsi?id="+t})},selectxuan:function(){console.log(888),this.selshow=!this.selshow,1==this.selshow?(n.setStorageSync("username",this.phone),n.setStorageSync("password",this.password)):n.setStorageSync("username","")},changenum:function(){var n=("000000"+Math.floor(999999*Math.random())).slice(-6);this.rangenum=n},enteryanzheng:function(n){this.yanzhengcode=n.target.value},onKeyInput:function(n){console.log(n),this.phone=n.target.value},enterpass:function(n){this.password=n.target.value},login:function(){var e=this,t=this;if(t.seldeng=1,console.log(666),console.log(this.phone),console.log(this.password),""==this.phone)return n.showToast({title:"请输入登录账号",icon:"none"}),t.seldeng=0,!1;if(""==this.password)return n.showToast({title:"请输入密码",icon:"none"}),t.seldeng=0,!1;if(""==this.yanzhengcode)return n.showToast({title:"请输入验证码",icon:"none"}),t.seldeng=0,!1;if(""!=this.yanzhengcode&&this.yanzhengcode!=this.rangenum)return n.showToast({title:"验证码输入错误",icon:"none"}),t.seldeng=0,!1;var a="project/Login",s={username:t.phone,password:t.password};console.log("8877665544",s),o.default.post(a,s,"post").then((function(o){t.seldengk=1,console.log("1234567890",o);var a=o.data;if(1==o.data[0].status)null==o.data[0].username?t.seldengk=0:t.seldengk=1,n.showToast({title:o.data[0].message,icon:"none"});else{n.setStorageSync("username",e.phone),n.setStorageSync("password",e.password);var s=a[0].role,r=a[0].userid,i=a[0].username;n.setStorageSync("role",s),n.setStorageSync("userid",r),n.setStorageSync("name",i),console.log("打印",n.getStorageSync("role")),console.log("打印",n.getStorageSync("name")),n.showToast({title:"登录成功",icon:"none"}),setTimeout((function(){console.log(8800),n.navigateTo({url:"../daiban/daiban"})}),500)}})).catch((function(n){console.log(n),t.seldengk=0,t.tanceng=!0,setTimeout((function(){t.tanceng=!1}),1500)}))}}};e.default=s}).call(this,t("543d")["default"])}},[["2f5e","common/runtime","common/vendor"]]]);