| | |
| | | } |
| | | } |
| | | }, |
| | | onLoad() { |
| | | let user = uni.getStorageSync('userInfo') |
| | | if (user) { |
| | | this.userInfo.account = user.code |
| | | } |
| | | }, |
| | | methods: { |
| | | login() { |
| | | // 输入检验 |
| | |
| | | return |
| | | } |
| | | |
| | | |
| | | console.log(this.userInfo) |
| | | login(this.userInfo.account, this.userInfo.password).then(response => { |
| | | console.log(response) |
| | |
| | | }) |
| | | 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', |
| | | }) |
| | | }) |
| | | |
| | | |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .uni-input { |
| | | height: 28px; |