thinkjs怎么继承其他操作

如下,indexAction继承的addAction貌似不起作用,求大神

 indexAction(){
 this.addAction();
 return this.display();
 }
 * addAction(){
 let model = this.model("test");
 let status = yield model.add({name: "xxx"});
 return status;
 }
w3ctech微信

扫码关注w3ctech微信公众号

共收到5条回复

  • 不起作用是指? 数据没插入进去?

    回复此楼
  • 可以加入 QQ 群: 339337680

    回复此楼
  • @老六 数据没加进去

    回复此楼
  • @老六 已加QQ群求通过

    回复此楼
  • 解决了 yield 改成 await 就好了,谢谢

    回复此楼

AltStyle によって変換されたページ (->オリジナル) /