转发出去的页面,点击打开找不到该页面
发布于 6 年前 作者 bzhu 10200 次浏览 来自 问答

转发出去的页面,点击打开找不到该页面,路径没有错,首页的转发可以打开

3 回复

你好,请提供一下出现问题的机型和微信版本,以及能复现问题的简单代码示例。

path: ‘/pages/detail/detail/’ + that.data.houseId

这个 path 不是固定的?

微信版本6.6.1,安卓苹果都是这样;

onShareAppMessage: function (res) {

var that = this;

if (res.from === ‘button’) {

// 来自页面内转发按钮

}

return {

title: that.data.houseTitle,

path: ‘/pages/detail/detail/’ + that.data.houseId,

success: function (res) {

var unionId = wx.getStorageSync(‘unionId’);

var url = app.globalData.setInfo + ‘/api/house/share/count’ + ‘?unionId=’ + unionId

wx.request({

url: url,

method: ‘GET’,

data: { houseId: that.data.houseId },

header: {

‘Content-Type’: ‘application/x-www-form-urlencoded’

},

dataType: ‘json’,

success: function (res) {

}

})

},

fail: function (res) {

// 转发失败

}

}

},

回到顶部