修改路径

This commit is contained in:
yulixing 2019-06-24 19:09:32 +08:00
parent 6099a884be
commit 076b8ca0c0
3 changed files with 2 additions and 1 deletions

BIN
src/temp/1561374259596.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
src/temp/1561374267583.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View File

@ -1,4 +1,5 @@
const { registerFont, createCanvas, loadImage } = require('canvas');
const path = require('path')
const drawRoundRect = require('./round_rect');
const wrapText = require('./wrap_text');
@ -59,7 +60,7 @@ module.exports = async function paint(opt) {
// 生成图片
const tempName = `${new Date().getTime()}.png`;
const tempPath = config.root + `/src/temp/${tempName}`;
const tempPath = path.join(__dirname, '../../temp/' + tempName);
transformBase64(canvas.toDataURL(), tempPath);
return tempName;