| | |
| | | } |
| | | return resp |
| | | }, |
| | | loginShop: async function({ |
| | | loginSupplier: async function({ |
| | | commit, |
| | | dispatch, |
| | | state |
| | | }, data) { |
| | | { |
| | | const resp = await http.request('post', '/api/login/employee', { |
| | | const resp = await http.request('post', '/api/login/supplier'+(data.phoneNumber?'/phone':''), { |
| | | data: { |
| | | username: data.username, |
| | | password: data.password |
| | | password: data.password, |
| | | tel:data.phoneNumber, |
| | | smsCode:data.smsCode || '' |
| | | }, |
| | | params: { |
| | | clientType: data.clientType || 'app' |
| | |
| | | // url: '/views/app/app-home/app-home' |
| | | // }) |
| | | uni.reLaunch({ |
| | | url: '/pages/home/home' |
| | | url: '/pages/home/farmer-home' |
| | | }) |
| | | } else { |
| | | // this.$message.showToast('登录失败') |