@
uchihaObito 感谢回复!
对于异步没接触过,有的地方还是有点不明白
比如:小程序的转发
通过 getOpenid,怎么赋值给 openid 就不知道了
```
onShareAppMessage(option){
this.$base.getOpenid().then(openid => {
console.log(openid) //这里可以显示 openid 的值
}).catch(err => {
console.error(err)
})
let title = this.detail.title
let path = 'pages/index/index/scene='+ openid //怎么赋值到这个 openid 变量就不知道了
let imageUrl = this.detail.thumb
return {
title: title,
path: path,
imageUrl:imageUrl,
success: function (res) {
console.log("转发成功:" + JSON.stringify(res));
},
fail: function (res) {
console.log("转发失败:" + JSON.stringify(res));
}
}
}```