import Vue from 'vue' import {Toast} from 'vant'; import {services as Services} from '../../../api/index' Vue.use(Toast); const state = { loading:false, ruledata:"" } const mutations = { } const actions = { pointruleApi({commit},payload){ state.loading=true; Services.pointruleApi().then((res) => { state.loading=false; let data = res.data; if (data.err_code == 0) { state.ruledata=data.data.data[0] } }).catch(function (err) { state.loading = false; }); }, } const getters = {} export default { state, mutations, actions, getters }