pages-login-login.e654a8cd.js 6.34 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-login-login"],{1758:function(t,a,e){var n=e("bfa8");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=e("4f06").default;i("7fec530c",n,!0,{sourceMap:!1,shadowMode:!1})},"591c":function(t,a,e){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var n={data:function(){return{username:"",password:"",navheight:0,atoken:"",id:""}},onLoad:function(){this.getDate(),this.dateArr()},onReady:function(){var t=this;uni.getStorage({key:"statusBarH",success:function(a){t.navheight=a.data}})},methods:{getDate:function(){for(var t=[],a={},e=1999;e<2020;e++){a={value:e+"年",children:[]};for(var n=0;n<12;n++){var i=n+1;i=i>9?i:"0"+i;var o={value:i+"月",children:[]};a.children.push(o);for(var s=new Date(e,n+1,0),r=s.getDate(),u=0;u<r;u++){i=u+1;i=i>9?i:"0"+i;var c={value:i+"日"};a.children[n].children.push(c)}}t.push(a)}uni.setStorage({key:"dayData",data:JSON.stringify(t)})},dateArr:function(){for(var t=[],a=[],e=[],n=[],i=[],o=[],s=[],r=[],u=1999;u<2020;u++)t.push(u+"年");a.push(t);var c=[];for(u=1;u<12;u++){var d=u;u<10&&(d="0"+u),c.push(d+"月")}n.push(t),n.push(c);var l=["第一周","第二周","第三周","第四周","第五周"];o.push(t),o.push(c),o.push(l);var g=new Date,p=g.getFullYear(),f=p-1999;e.push(f);var h=g.getMonth();d=h+1>9?h+1:"0"+(h+1);i.push(f),i.push(h);var v=g.getDay(),b=g.getDate(),w=Math.ceil((b+6-v)/7)-1;s.push(f),s.push(h),s.push(w);var k=b-1;r.push(f),r.push(h),r.push(k),uni.setStorage({key:"yearData",data:JSON.stringify(a)}),uni.setStorage({key:"yearData",data:JSON.stringify(a)}),uni.setStorage({key:"currentYear",data:JSON.stringify(e)}),uni.setStorage({key:"monthData",data:JSON.stringify(n)}),uni.setStorage({key:"currentMonth",data:JSON.stringify(i)}),uni.setStorage({key:"weekData",data:JSON.stringify(o)}),uni.setStorage({key:"currentWeek",data:JSON.stringify(s)}),uni.setStorage({key:"currentDay",data:JSON.stringify(r)})},login:function(){this.username.length<=0?uni.showToast({icon:"none",title:"请输入用户名"}):this.password.length<=0?uni.showToast({icon:"none",title:"请输入密码"}):(uni.showLoading({title:"加载中"}),uni.request({url:window.url+"/users/login",data:{loginName:this.username,password:this.password},method:"POST",success:function(t){uni.hideLoading();var a=t.data;200==a.code?(this.atoken=a.data.atoken,this.id=a.data.user.accountId,uni.request({url:window.url+"/malls",data:{accountId:this.id,_t:Date.parse(new Date)/1e3},header:{Authorization:this.atoken},method:"GET",success:function(t){uni.setStorage({key:"accountList",data:JSON.stringify(t.data.data)})}}),uni.request({url:window.url+"/accounts",data:{id:this.id,_t:Date.parse(new Date)/1e3},header:{Authorization:this.atoken},method:"GET",success:function(t){if(200==t.data.code){var a=t.data.data;uni.setStorage({key:"orgName",data:a[0].name}),uni.setStorage({key:"accountName",data:a[0].name})}uni.switchTab({url:"../index/index"})}}),uni.setStorage({key:"atoken",data:a.data.atoken}),uni.setStorage({key:"accountId",data:a.data.user.accountId}),uni.setStorage({key:"orgIds",data:a.data.user.accountId}),uni.setStorage({key:"type",data:"account"})):uni.showToast({icon:"none",title:a.msg})}}))}}};a.default=n},"5ff9":function(t,a,e){t.exports=e.p+"static/img/loginBg.521f9b73.png"},"722d":function(t,a,e){"use strict";e.r(a);var n=e("c8f5"),i=e("8cfa");for(var o in i)"default"!==o&&function(t){e.d(a,t,function(){return i[t]})}(o);e("8e3f");var s=e("2877"),r=Object(s["a"])(i["default"],n["a"],n["b"],!1,null,"665c4ecb",null);a["default"]=r.exports},"8cfa":function(t,a,e){"use strict";e.r(a);var n=e("591c"),i=e.n(n);for(var o in n)"default"!==o&&function(t){e.d(a,t,function(){return n[t]})}(o);a["default"]=i.a},"8e3f":function(t,a,e){"use strict";var n=e("1758"),i=e.n(n);i.a},bfa8:function(t,a,e){var n=e("b041");a=t.exports=e("2350")(!1),a.push([t.i,".loginBg[data-v-665c4ecb]{background:url("+n(e("5ff9"))+") no-repeat;background-size:100% 100%;height:%?731.88?%}.loginBox[data-v-665c4ecb]{background:#fff;width:%?670.28?%;height:%?663.04?%;position:relative;top:%?311.59?%;margin:0 auto;-webkit-box-shadow:0 0 %?12.68?% 0 rgba(0,0,0,.14);box-shadow:0 0 %?12.68?% 0 rgba(0,0,0,.14);border-radius:%?7.24?%;padding-top:%?85.14?%}.loginTitle[data-v-665c4ecb]{font-size:%?43.47?%;color:#4a4a4a;letter-spacing:%?1.81?%;text-align:center;display:block;position:relative;margin-bottom:%?119.56?%}.inputBox[data-v-665c4ecb]{width:%?528.98?%;border-bottom:%?1.81?% solid #9b9b9b;margin:0 auto;padding-left:%?12.68?%;position:relative}.userBox[data-v-665c4ecb]{margin-bottom:%?43.47?%}.userBox uni-image[data-v-665c4ecb]{height:%?32.6?%;width:%?25.5?%;display:inline-block;position:absolute;top:%?16.3?%}.pwdBox uni-image[data-v-665c4ecb]{height:%?32.6?%;width:%?32.6?%;display:inline-block;position:absolute;top:%?16.3?%}.userInput[data-v-665c4ecb]{display:inline-block;font-size:%?30.79?%;top:%?9.05?%;left:%?54.34?%}.pwdInput[data-v-665c4ecb]{display:inline-block;font-size:%?30.79?%;top:%?9.05?%;left:%?54.34?%}.pwdBox[data-v-665c4ecb]{margin-bottom:%?94.2?%}.loginBtn[data-v-665c4ecb]{width:%?516.36?%;height:%?76.08?%;background:#0069ff;border-radius:21px;font-size:%?36.23?%;color:#fff;line-height:%?76.08?%;letter-spacing:%?25.36?%;padding:0;padding-left:%?25.36?%}",""])},c8f5:function(t,a,e){"use strict";var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("v-uni-view",[e("div",{style:{height:t.navheight+"px",background:"#008fff"}}),e("v-uni-view",{staticClass:"loginBg"},[e("v-uni-view",{staticClass:"loginBox"},[e("v-uni-text",{staticClass:"loginTitle"},[t._v("智慧商业客流6.0")]),e("v-uni-view",{staticClass:"inputBox userBox"},[e("v-uni-image",{attrs:{src:"../../static/login/user.png",mode:""}}),e("v-uni-input",{staticClass:"uni-input userInput",attrs:{focus:"",placeholder:"请输入用户名"},model:{value:t.username,callback:function(a){t.username=a},expression:"username"}})],1),e("v-uni-view",{staticClass:"inputBox pwdBox"},[e("v-uni-image",{attrs:{src:"../../static/login/pwd.png",mode:""}}),e("v-uni-input",{staticClass:"uni-input pwdInput",attrs:{placeholder:"请输入密码",password:""},model:{value:t.password,callback:function(a){t.password=a},expression:"password"}})],1),e("v-uni-button",{staticClass:"loginBtn",on:{click:function(a){a=t.$handleEvent(a),t.login(a)}}},[t._v("登录")])],1)],1)],1)},i=[];e.d(a,"a",function(){return n}),e.d(a,"b",function(){return i})}}]);