TypeError:calculateGstBaseOnInput不是函数

时间:2018-06-05 12:03:52

标签: node.js

exports.test = function(req,res,next)
{
    wait.launchFiber(calculateGstBaseOnInput(req,res)); 
}
var calculateGstBaseOnInput = Fiber(function(req,res){
    console.log("welcome");
    for(var item of req.body.so_items) {
        req.productid = item.productid;
        req.qty = item.qty;
        wait.for(getItemDetail,req,res);
        wait.for(getCartItems,req,res);
        wait.for(calculateGST,req,res);
}};

错误:

  

TypeError:calculateGstBaseOnInput不是函数       在exports.test(D:\ node \ app \ addorder.js:47:5)       在Layer.handle [as handle_request](D:\ node \ node_modules \ express \ lib \ router \ layer.js:95:5)       在下一个(D:\ node \ node_modules \ express \ lib \ router \ route.js:137:13)       在Query._callback(D:\ node \ app \ addorder.js:41:21)       在Query.Sequence.end(D:\ node \ node_modules \ mysql \ lib \ protocol \ sequences \ Sequence.js:88:24)       在Query._handleFinalResultPacket(D:\ node \ node_modules \ mysql \ lib \ protocol \ sequences \ Query.js:139:8)       在Query.EofPacket(D:\ node \ node_modules \ mysql \ lib \ protocol \ sequences \ Query.js:123:8)       在Protocol._parsePacket(D:\ node \ node_modules \ mysql \ lib \ protocol \ Protocol.js:279:23)       在Parser.write(D:\ node \ node_modules \ mysql \ lib \ protocol \ Parser.js:76:12)       在Protocol.write(D:\ node \ node_modules \ mysql \ lib \ protocol \ Protocol.js:39:16)

0 个答案:

没有答案