| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { userInfo } from 'os' |
| | | import { |
| | | import { |
| | | login |
| | | } from '../../api/login' |
| | | export default { |
| | |
| | | } |
| | | }, |
| | | onLoad() { |
| | | let user = uni.getStorageSync('userInfo') |
| | | if( user ) { |
| | | let user = uni.getStorageSync('userInfo') |
| | | if (user) { |
| | | this.userInfo.account = user.code |
| | | } |
| | | }, |
| | |
| | | return |
| | | } |
| | | |
| | | |
| | | console.log(this.userInfo) |
| | | login(this.userInfo.account, this.userInfo.password).then(response => { |
| | | console.log(response) |
| | |
| | | username: response.data.FNAME, |
| | | code: response.data.FCODE, |
| | | company: response.data.FCOMPANY, |
| | | factory: response.data.FFACTORY |
| | | factory: response.data.FFACTORY, |
| | | }) |
| | | uni.navigateTo({ |
| | | url: '/pages/index/index' |
| | | url: '/pages/index/index', |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .uni-input { |
| | | height: 28px; |