这是首页的代码<image class="seedingBannar" data-id="{{item.id}}" bindtap="goTweet" src="{{resourceUrl+item.iconPath}}"></image> // 跳转到推文页面 goTweet: function (e) { console.log(e.currentTarget.dataset.id) wx.navigateTo({ url: `/pages/index/tweet/index?id=${e.currentTarget.dataset.id}`, }) },后台传过来的数据是这样的link:http://mp.weixin.qq.com/s?__biz=MzIxMzA0MTU1OA==&mid=100000677&idx=1&sn=40f1405accbfd3b1baca905c980f4848&chksm=17bdab5c20ca224a04f1c86ba13bdff7f8b0d5d865926f6f6a8ab02a4f394ced5087efe7d9d7#rdid:6ea09982-28bd-4ec7-ad5c-4cf79825dadb因为文章的链接太长,不能传过去,所以传id过去,然后根据id查询到相应的 文章链接
这是我的页面路径排版
/pages/index/tweet/index 页面代码<script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script><web-view src="{{link}}"></web-view>link就是你的文章链接
开始整了半天点击文章里面的产品不跳转小程序页面,第二天莫名奇妙又好了,什么都没改,可能是要等待的吧