async onShareTimeline() {
const carsLength=await this.submitCars()
console.log("carsLength====>",carsLength);
const title='换台车 · '+carsLength+'台精品车源邀您品鉴'
return {
title:title,
query: {
locationId: this.data.location.id,
locationName: this.data.location.name
}
}
},
为啥这个自定义的标题没有生效
离谱,刚做到这个分享,onShareTimeline函数别用async await,就实现相关功能了
在调用分享前获取carsLength存data,然后分享的时候再从data取