import { qryDropDownOptionBatch, qryInputUserInfo } from "@/http/api"; import utils from "utils-lan"; /** * * @param {*} param0 * @param {*获取下拉选项对应的code} selectArg */ export const getOptionsData = async ({ commit, state }, selectArg) => { if (!selectArg || !utils.arrJudge(selectArg) || selectArg.length < 1) { return false; } const selectRes = await qryDropDownOptionBatch(selectArg); if (selectRes && selectRes.code === "00") { commit("setOptionsMap", { ...state.OPTIONSMAP, ...selectRes.result }); } }; /** * @param {*获取用户信息} */ export const getUserInfo = async ({ commit }) => { const userRes = await qryInputUserInfo(); if (userRes && userRes.code === "00") { commit("setUserInfo", userRes.result); } };