Home > Article > WeChat Applet > Detailed explanation of the code for jumping and transferring data in WeChat applet
This article mainly introduces relevant information about examples of jump and transfer data in WeChat applet. Friends in need can refer to
Instances of jump and transfer of data in WeChat applet
Click view to jump to the page
<view class="album_image" data-album-obj="{{item}}" bindtap="imageclick"> <image style="width:98%;" src="{{item.data[0].url}}"></image> </view>
Declare variables data-album-obj
Page jump Go to
imageclick:function(e){ console.log(e.currentTarget.dataset.albumObj); wx.navigateTo({ url: 'albumdetail?str=' + JSON.stringify(e.currentTarget.dataset.albumObj), }) },
Get the object in the interface after the jump
onLoad: function (options) { this.setData({ albumData: JSON.parse(options.str) }) },
The above is the detailed content of Detailed explanation of the code for jumping and transferring data in WeChat applet. For more information, please follow other related articles on the PHP Chinese website!