主进程接受不到 worker.postMessage消息?

Page({
data: {},
onLoad: function () {
this.worker = wx.createWorker('/worker/test.js');
this.worker.onMessage(function (res) {
console.log("主进程接受消息");
console.log(res);
});
this.worker.postMessage({
msg: "你好!!"
});
},
onUnload: function(){
this.worker.terminate();
}
})
worker/test.js 代码:
worker.onMessage(function (message) {
console.log("子进程worker输出");
console.log(message);
worker.postMessage({
msg: "hello!!!"
})
});
