VUE页面返回带数据
当前页面获取返回的数据
onShow() { uni.$on('uploadimg', (data) => { if(data){ _this.goodsData.goods_image.push(data); console.log(409,data) console.log(409,_this.goodsData.goods_image) } uni.$off('uploadimg') }) },
获取数据的页面
var cinfo = this.newImg; uni.$emit('uploadimg', cinfo); uni.navigateBack() return;
返回上一页同时把cinfo的值带回去