提交 c2230b56 编写于 作者: 璃白.'s avatar 璃白. 🌻

change time

上级 87f3e915
......@@ -4,6 +4,8 @@ import { CacheManager } from '@midwayjs/cache';
const xml2js = require('xml2js');
const sha1 = require('sha1');
import { decrypt } from '@wecom/crypto';
const path = require('path');
const fs = require('fs');
// import { decrypt, encrypt, getSignature } from '@wecom/crypto';
@Provide()
......@@ -108,6 +110,13 @@ export class UserService {
)
.then(({ data: res }) => {
console.log('success', res);
const dist = path.resolve(__dirname, '../../logs/records.json');
fs.appendFile(dist, {
userId: messageInfo.FromUserName,
question: messageInfo.question,
answer,
createTime: Date.now().toString(),
});
})
.catch(e => {
console.log('error', e);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册