import http from '@/request/index.js'; // 上架详情 export const state = { tarRoomData: [], consumeData:[] }; export const mutations = { setTarRomData(state, data) { state.tarRoomData = data }, setConmData(state, data) { state.consumeData = data }, } export const actions = { getTarRomData({ commit, rootState }, data) { return new Promise((resolve, reject) => { http('outboundIng.targetRoom', data, '加载中').then(res => { if (res.success == true) { res.data.length > 0 && res.data.forEach((item) => { item['text'] = item.stroomName; item['value'] = item.id; }) commit('setTarRomData', res.data); } }).catch(e => { reject(e) }) }) }, }