import store from '@/store' import { diyApi } from '@/utils/queryByDiy'; import { getNodeId } from '@/utils/nodeId'; export function saveAccessLog(to, f) { // 开发环境不保存日志 if(import.meta.env.VITE_APP_ENV == 'development'){ return; } let flag = getApp().globalData.terminal + "_" + f; let data = { platform: getApp().globalData.appId, terminal: getApp().globalData.terminal, nodeId: getNodeId(), flag: getApp().globalData.terminal + "_" + f, fullPath: to.url.split("?")[0], allPath: to.url, menuName: to.tabBarText, userId: store.state.user.userInfo.userId, userName: store.state.user.userInfo.userName } diyApi("/system/log/insSysAccessLog", data); }