How to develop WeChat Mini Programs imitating Ctrip system
This article mainly introduces the relevant knowledge of how to develop WeChat Mini Programs imitation Ctrip system, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this article on how to develop the WeChat Mini Programs imitation Ctrip system. Let's take a look.
Realization of query function
1. First of all, you need to get the input city and the city before the query, as well as the choice of time, and filter through these conditions, so you need to bind a time when you click the query button, and you need to carry parameters to query.
Query
two。 The receiving parameters of the page that needs to jump are obtained through the options of the onload event.
Var from = options.from; var to = options.to; var trainTime = options.trainTime
3. The most important thing is to filter out the relevant data. Here we need a judgment statement of the for loop. When requesting the data address URL, we can find out the corresponding json data in the corresponding data file through the for loop and the if statement.
Wx.request ({url: API_BASE, success: (res) = > {for (var iTuno)