该问题出现在v3.4.2之前版本,当进入分销商中心,点击商品-》立即推广后,报错出现。如图1
解决办法:
1、打开移动端(uniapp源码)文件:pages\distribute\goods\list.vue 按图2代码修改
2、打开移动端(uniapp源码)文件:pages\distribute\goods\list.js 按图3代码修改
showPopup(e, popup, item) {
if (popup == 'share') {
this.share.item = item
this.share.body = model.shareBody(this)
}
return this.$refs[popup].open()
}
/**
* 推广/分享商品
* 小程序/APP/海报分享中使用的数据
* @param {Object} that
*/
function shareBody(that) {
let goods = that.share.item
return {
title: goods.goods_name,
imgUrl: goods.default_image, // APP、小程序分享显示的图片
summary: goods.goods_name, // 针对APP
//desc: goods.goods_name, // 针对小程序
path: '/pages/goods/index?id=' + goods.goods_id + '&invite=' + goods.inviteCode,
poster: { // 针对海报
route: 'goods/qrcode', // 生成海报的后端
params: {
goods_id: goods.goods_id
}
}
}
}