Home > WeChat Applet > Mini Program Development > WeChat applet jump method to transfer data

WeChat applet jump method to transfer data

不言
Release: 2018-06-23 17:18:37
Original
1814 people have browsed it

This article mainly introduces relevant information about the examples of WeChat applet jumping and transferring data. Friends in need can refer to the following

Instances of WeChat applet jumping and transferring data

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>
Copy after login

Declare variables data-album-obj

Page jump

imageclick:function(e){
  console.log(e.currentTarget.dataset.albumObj);
  wx.navigateTo({
   url: &#39;albumdetail?str=&#39; + JSON.stringify(e.currentTarget.dataset.albumObj),
  })
 },
Copy after login

The interface after the jump gets the object

 onLoad: function (options) {
   this.setData({
    albumData: JSON.parse(options.str)
   })
 },
Copy after login

The above is the entire content of this article. I hope it will be helpful to everyone's study. For more related content, please pay attention to the PHP Chinese website!

Related recommendations:

About the code for paged loading of WeChat mini-programs

WeChat mini-program page jump and parameter passing Introduction

WeChat applet development to implement tab page switching

The above is the detailed content of WeChat applet jump method to transfer data. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template