1234567891011121314151617181920212223242526272829 |
- import Ajax from '../../util/ajax'
- import api from '../../util/api'
-
-
- export default {
- namespaced: true,
- state: {
- customerList: []
- },
- mutations: {
- setCustomerList (state, data) {
- state.customerList = data
- }
- },
- actions: {
- getCustomerList (context) {
- return new Promise((resolve) => {
- Ajax(api.card.myCustomer.url, {
- method: api.card.myCustomer.method
- }).then(res => {
- context.commit('setCustomerList', res)
- resolve(res)
- }).catch((err) => {
- reject(err)
- })
- })
- }
- }
- }
|