Giter VIP home page Giter VIP logo

think-wechat's Issues

Unhandled rejection Error: PREVENT_NEXT_PROCESS

通过微信给服务端发送消息后,服务端报错

Unhandled rejection Error: PREVENT_NEXT_PROCESS
    at Object.think.prevent (/home/project/weixin-demo/node_modules/thinkjs/lib/core/think.js:511:13)
    at _class.end (/home/project/weixin-demo/node_modules/thinkjs/lib/controller/base.js:426:18)
    at _class.indexAction (/home/project/weixin-demo/app/wechat/controller/index.js:21:14)
    at _class._callee$ (/home/project/weixin-demo/node_modules/thinkjs/lib/core/base.js:78:44)
    at tryCatch (/home/project/weixin-demo/node_modules/thinkjs/node_modules/babel-runtime/regenerator/runtime.js:88:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/home/project/weixin-demo/node_modules/thinkjs/node_modules/babel-runtime/regenerator/runtime.js:341:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/home/project/weixin-demo/node_modules/thinkjs/node_modules/babel-runtime/regenerator/runtime.js:121:21)
    at step (/home/project/weixin-demo/node_modules/thinkjs/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
    at /home/project/weixin-demo/node_modules/thinkjs/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:7
    at Promise._execute (/home/project/weixin-demo/node_modules/thinkjs/node_modules/bluebird/js/release/debuggability.js:180:9)
    at Promise._resolveFromExecutor (/home/project/weixin-demo/node_modules/thinkjs/node_modules/bluebird/js/release/promise.js:460:18)
    at new Promise (/home/project/weixin-demo/node_modules/thinkjs/node_modules/bluebird/js/release/promise.js:76:14)
    at _class.<anonymous> (/home/project/weixin-demo/node_modules/thinkjs/node_modules/babel-runtime/helpers/asyncToGenerator.js:14:12)
    at _class.invoke (/home/project/weixin-demo/node_modules/thinkjs/lib/core/base.js:102:18)
    at _class.action (/home/project/weixin-demo/node_modules/thinkjs/lib/core/http_base.js:152:25)
    at _class.execAction (/home/project/weixin-demo/node_modules/thinkjs/lib/core/app.js:188:19)

[2016-03-02 14:43:57] [HTTP] POST /wechat/?signature=bd70de24ea2404e87a45883a4c405e334a0d42e6&timestamp=1456901036&nonce=1532463979 200 13ms

感觉这个中间件没起作用,没有进入处理文字消息的action

textAction(){
        var message = this.post();
        console.log(message);
        var msg = message.Content.trim();
        this.reply('测试成功:'+msg);
    }

能否提供个完整的配置流程

您好,我的thinkjs版本是2.2,折腾了半天也没有搞定,问题如下:
第一张图是middleware的配置:
image
第二张图是controller里的配置:
image
我这样配置了以后为什么微信发信息,还是在wechat而不是在wechat/text接收到?

控制台一直输出/wechat<>weixin/wechat

按照官网的例子,控制台一直输出以下信息:
/wechat<>weixin/wechat
You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
Error: PREVENT_NEXT_PROCESS

nodejs : 7.4
thinkjs : 2.2.16

公众号显示“获取中...”数秒才消失

Thinkjs 3.0 使用过程中,

async eventAction(){ const message = this.post(); think.logger.info('eventAction:'); think.logger.info(message); return this.success(123); }

在公众号点击菜单事件,文本直接立刻返回123,但是公众号仍会显示“获取中...”数秒才消失,请问如何优化

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.