12345678910111213141516171819202122232425262728293031323334353637 |
- 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)
- })
- })
- },
- }
|