| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | import { userInfo } from 'os' |
| | | import { |
| | | login |
| | | } from '../../api/login' |
| | | export default { |
| | |
| | | account: '', |
| | | password: '' |
| | | } |
| | | } |
| | | }, |
| | | onLoad() { |
| | | let user = uni.getStorageSync('userInfo') |
| | | if( user ) { |
| | | this.userInfo.account = user.code |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | }) |
| | | return |
| | | } |
| | | uni.setStorageSync('userInfo', { |
| | | username: response.data.FNAME, |
| | | code: response.data.FCODE, |
| | | company: response.data.FCOMPANY, |
| | | factory: response.data.FFACTORY |
| | | }) |
| | | uni.navigateTo({ |
| | | url:'/pages/index/index' |
| | | url: '/pages/index/index' |
| | | }) |
| | | }) |
| | | |
| | | |
| | | } |
| | | } |
| | | } |