tplus-api
Version:
tplus api invoke
1 lines • 979 B
Source Map (JSON)
{"version":3,"sources":["tplus-api/../src/log/ServerLog.ts"],"names":[],"mappings":"AAIA,UAAU,QAAQ;IACd,OAAO,EAAC,MAAM,CAAA;CACjB;AACD,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,CAAC,SAAS,QAAQ,EAAE,QAAQ,EAAC,MAAM,EAAC,KAAK,EAAC,CAAC,QAa5E","file":"ServerLog.d.ts","sourcesContent":["import {aliyunLog} from 'mutants-log';\nimport User from '../model/User';\nimport tools from '../util/tools';\nimport {stores} from 'mutants-microfx';\ninterface LogParam{\n eventId:string\n}\nexport default function serverLog<T extends LogParam>(logstore:string,param:T){\n\n const user = User.restore();\n if(!tools.isNull(user.userId)){\n //如果缓存中有登录信息 将登录参数附加\n const {orgList,channel,...usermsg} = user;\n usermsg.channel = channel.targetURL;\n const concatParam = {...param,...usermsg,...stores.logStore.logParam.appParam};\n aliyunLog(logstore,concatParam);\n }else{\n aliyunLog(logstore,param);\n }\n \n}"]}