美文网首页微信小程序
微信小程序方法

微信小程序方法

作者: 若风_412d | 来源:发表于2019-08-19 11:14 被阅读0次

不同文件:
https://www.jianshu.com/p/6e5301587ccf
相同文件:
//原理:运行函数时候,把另一个函数作为参数。

  onShow: function () {
//调用
    var that = this;
    that.aaa('10sdfsdfsdfsdfsdfasdf', function (res) {

      console.log(res);
    }
);

  },
//原始
  aaa:function(bbb,ddd){
    ddd(bbb);
  },




//-------------原型

  onShow: function () {


    that.aaa('10sdfsdfsdfsdfsdfasdf', that.xxxx
);

  },
  aaa:function(bbb,ddd){
    ddd(bbb);
  },
  xxxx:function(res){
    console.log(res);
  },

相关文章

网友评论

    本文标题:微信小程序方法

    本文链接:https://www.haomeiwen.com/subject/ncnjsctx.html