如图
5 回复
yield后面的函数必须是promise,generator之类的.你普通的肯定不行撒.
var Promise = require("bluebird");
var fs = Promise.promisify(require("fs"));
icon = yield fs.readFile(path)
....
如图
yield后面的函数必须是promise,generator之类的.你普通的肯定不行撒.
var Promise = require("bluebird");
var fs = Promise.promisify(require("fs"));
icon = yield fs.readFile(path)
....