小程序学习

1.组件自定义事件this.triggerEvent('customevent', myEventDetail, myEventOption)
<another-component bindcustomevent="pageEventListener1">
  <my-component bindcustomevent="pageEventListener2"></my-component>
</another-component>
2.Behavior
写法和component一样,类似于多继承,behavior里的生命周期函数不会被覆盖,二次依次执行



小程序请求接口需要在小程序后台设置域名白名单

原文地址:https://www.cnblogs.com/lmp5023/p/13219045.html