In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how WeChat Mini Programs realizes sharing data between pictures". In daily operation, I believe that many people have doubts about how WeChat Mini Programs can share data between screens. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "how WeChat Mini Programs can achieve data sharing between pictures". Next, please follow the editor to study!
Sequence diagram
In order to straighten out the user's operation logic, we divide the setting of the monitoring point into two screens: selecting the monitoring point and editing the monitoring condition.
In order to generalize the process of creating a new monitoring point and editing a monitoring point, the task of creating a monitoring point object is assigned to the main screen.
The sequence diagram is as follows:
Index.js
NewButtonTaped: function () {
Console.log ("index.js::newButtonTaped")
This.mapCtx.getCenterLocation ({
Success: function (res) {
App.globalData.currentAlarm = {
Longitude: res.longitude
Latitude: res.latitude
}
Wx.navigateTo ({
Url:'.. / setpoint/setpoint'
})
}
})
}
While creating the monitoring point screen, set the initial value of the coordinates.
Setpoint.js
GetPoisInformation:function () {
Var that = this
Var mapCtx = wx.createMapContext ('alarmMap')
MapCtx.getCenterLocation ({
Success: function (res) {
Util.getPoisByLocation (res.longitude, res.latitude, function (data) {
Console.log (data)
That.setData ({
Pois: data.pois
Location: res.latitude.toFixed (4) +','+ res.longitude.toFixed (4)
});
App.globalData.currentAlarm = {
Longitude: res.longitude
Latitude: res.latitude
Title: data.pois [0] .title
}
})
}
})
}
Set the coordinates and the monitoring point title. The picture is as follows:
Dalian Convention Center is selected on the screen. Above is the famous Music Fountain Square.
Editaction.js
The function of editing the monitoring condition screen is under preparation. Let's show you the picture first.
The screen is only a prototype, and the location and ringtone specified by the selected monitoring point can be displayed at present. After you select a different ringtone, you can play it.
At this point, the study on "how WeChat Mini Programs can share data between pictures" is over. I hope to be able to solve everyone's doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 284
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.