修改路径
This commit is contained in:
parent
6099a884be
commit
076b8ca0c0
BIN
src/temp/1561374259596.png
Normal file
BIN
src/temp/1561374259596.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 54 KiB |
BIN
src/temp/1561374267583.png
Normal file
BIN
src/temp/1561374267583.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 54 KiB |
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user