login.js 3.19 KB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/login/login"],{1637:function(t,e,a){"use strict";a.r(e);var n=a("d686"),o=a.n(n);for(var s in n)"default"!==s&&function(t){a.d(e,t,function(){return n[t]})}(s);e["default"]=o.a},"7dfa":function(t,e,a){"use strict";a("eb2b");var n=s(a("b0ce")),o=s(a("ee79"));function s(t){return t&&t.__esModule?t:{default:t}}Page((0,n.default)(o.default))},"96d3":function(t,e,a){"use strict";var n=a("c811"),o=a.n(n);o.a},c020:function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("view",[a("view",{staticClass:"loginBg"},[a("view",{staticClass:"loginBox"},[a("text",{staticClass:"loginTitle"},[t._v("智慧商业客流6.0")]),a("view",{staticClass:"inputBox userBox"},[a("image",{attrs:{src:"../../static/login/user.png",mode:""}}),a("input",{directives:[{name:"model",rawName:"v-model",value:t.username,expression:"username"}],staticClass:"uni-input userInput",attrs:{focus:"",placeholder:"请输入用户名",eventid:"7f776b89-0"},domProps:{value:t.username},on:{input:function(e){e.target.composing||(t.username=e.target.value)}}})]),a("view",{staticClass:"inputBox pwdBox"},[a("image",{attrs:{src:"../../static/login/pwd.png",mode:""}}),a("input",{directives:[{name:"model",rawName:"v-model",value:t.password,expression:"password"}],staticClass:"uni-input pwdInput",attrs:{placeholder:"请输入密码",password:"",eventid:"7f776b89-1"},domProps:{value:t.password},on:{input:function(e){e.target.composing||(t.password=e.target.value)}}})]),a("button",{staticClass:"loginBtn",attrs:{eventid:"7f776b89-2"},on:{tap:t.login}},[t._v("登录")])],1)])])},o=[];a.d(e,"a",function(){return n}),a.d(e,"b",function(){return o})},c811:function(t,e,a){},d686:function(t,e,a){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a={data:function(){return{username:"vion",password:123456}},onLoad:function(){},methods:{login:function(){this.username.length<=0?t.showToast({icon:"none",title:"请输入用户名"}):this.password.length<=0?t.showToast({icon:"none",title:"请输入密码"}):t.request({url:"https://store.keliuyun.com/report/users/login",data:{loginName:this.username,password:this.password},method:"POST",success:function(e){var a=e.data;200==a.code?(t.request({url:"https://store.keliuyun.com/report/accounts",data:{id:a.data.user.accountId,_t:Date.parse(new Date)/1e3},header:{Authorization:a.data.atoken},method:"GET",success:function(e){if(200==e.data.code){var a=e.data.data;t.setStorage({key:"orgName",data:a[0].name}),t.setStorage({key:"accountName",data:a[0].name})}}}),t.switchTab({url:"../index/index"}),t.setStorage({key:"atoken",data:a.data.atoken}),t.setStorage({key:"accountId",data:a.data.user.accountId}),t.setStorage({key:"orgIds",data:a.data.user.accountId}),t.setStorage({key:"type",data:"account"})):t.showToast({icon:"none",title:a.msg})}})}}};e.default=a}).call(this,a("649d")["default"])},ee79:function(t,e,a){"use strict";a.r(e);var n=a("c020"),o=a("1637");for(var s in o)"default"!==s&&function(t){a.d(e,t,function(){return o[t]})}(s);a("96d3");var r=a("2877"),u=Object(r["a"])(o["default"],n["a"],n["b"],!1,null,null,null);e["default"]=u.exports}},[["7dfa","common/runtime","common/vendor"]]]);