yisainan / web-interview

我是齐丶先丶森,收集整理全网面试题及面试技巧,旨在帮助前端工程师们找到一份好工作!更多详见公众号「前端面试秘籍」

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[微信小程序] 9、怎么解决小程序的异步请求问题?

qiilee opened this issue · comments

在回调函数中调用下一个组件的函数:

app.js

  success: function (info) {
    that.apirtnCallback(info)
  }

index.js

onLoad: function() {
	app.apirtnCallback = res => {
		console.log(res)
	}
}