| | |
| | | state |
| | | }, data) { |
| | | { |
| | | const resp = await http.request('post', '/api/login/customer' + (data |
| | | .phoneNumber ? '/phone' : ''), { |
| | | const resp = await http.request('post', '/api/login/customer' + ((data.phoneNumber || data.tel) ? '/phone' : ''), { |
| | | data: { |
| | | username: (data.phoneNumber || data.tel) ? (data.phoneNumber || |
| | | data.tel) : data.username, |
| | |
| | | } |
| | | return resp |
| | | }, |
| | | countShopping: async function({ |
| | | commit, |
| | | dispatch, |
| | | state |
| | | }, data) { |
| | | if(state.currentInfo.id){ |
| | | const resp = await http.request('get', '/api/customer/flower/cart/flower/count', {}) |
| | | if (resp && resp.code === 0) { |
| | | return resp.data || 0 |
| | | } else { |
| | | return 0 |
| | | } |
| | | } |
| | | return 0 |
| | | }, |
| | | |
| | | |
| | | } |
| | | }) |