import {aliyunLog} from 'mutants-log'; import User from '../model/User'; import tools from '../util/tools'; import {stores} from 'mutants-microfx'; interface LogParam{ eventId:string } export default function serverLog(logstore:string,param:T){ const user = User.restore(); if(!tools.isNull(user.userId)){ //如果缓存中有登录信息 将登录参数附加 const {orgList,channel,...usermsg} = user; usermsg.channel = channel.targetURL; const concatParam = {...param,...usermsg,...stores.logStore.logParam.appParam}; aliyunLog(logstore,concatParam); }else{ aliyunLog(logstore,param); } }