menu.js
584 Bytes
import { myMobileHome, downloadImg } from '@/api/portal.js'
const state = {}
const getters = {}
const actions = {
//获取首页布局
myMobileHome({ commit, state }) {
return new Promise((resolve, reject) => {
myMobileHome((response) => {
resolve(response)
})
})
},
downloadImg({ commit, state }, url) {
return new Promise((resolve, reject) => {
downloadImg(url, (response) => {
resolve(response)
})
})
},
}
const mutations = {}
export default {
namespaced: true,
state,
getters,
actions,
mutations,
}