Record 12306 compilation of the plug-in of the freight system "purchasing empty vehicles" -- Review the car booking process

Source: Internet
Author: User

-- Sort out the car booking process

After receiving this activity, I realized that 12306 of websites still had this function. The whole website is still quite complicated. The whole car booking process is very similar to buying a train ticket for a passenger. As a result, Each Logistics Company "grabs a ticket" for its own goods and then is eligible to use a freight train to deliver its own goods.

First, let's sort out the entire car booking process:

1. Click "freight service" on the homepage of the 12306 website ".

2. In the lower left corner of the page, select the website of the Railway Bureau of the logistics company.

Figure ‑ 1

3. Select "Frequent Customer Login" to log on to the corresponding website system. You need to enter the verification code when logging on.

Figure ‑ 2

4. Select the "Reservation" Function

Figure ‑ 3

5. Click "Online Reservation" to open the reservation page, fill in the basic information and delivery information of the goods to be scheduled for transportation in the next few months, and then save and report for review, after the application is approved, it can be used as an appointment information. This step is probably meant to facilitate the allocation of freight trains by the Railway Department. The approval of this step indicates that there are trains that meet the transportation requirements, which is the prerequisite for the next empty car Booking (ticket snatching.

Figure ‑ 4

6. After the reservation is saved and submitted for review, you can proceed to the next step: click "Car booking" in the left-side menu ".

7. Enter a keyword in the "Enter query keyword" field or click the input box to list the matching reservation information.

Figure ‑ 5

8. Click a piece of information, and the corresponding reservation information is automatically filled in the following table.

9. After adjusting the relevant information, click "save". A corresponding record is displayed in the "no empty car query result reported" list below.

Figure 6

10. Select the record and "report". If the information is correct, you can make a reservation for an empty car. The next step is to wait for the approval of the Railway Department.

 

In the above steps, except for the logon steps, you can make an appointment in step 1 in advance. As long as the plan is sufficient, you can even make an appointment for the plan for the next three months in advance. Therefore, steps 6-10 are critical and time-consuming for each "preemptive subscription" operation, especially before the report is submitted in step 5, steps 7-9 actually took a lot of unnecessary time to get the booking information and save the empty car information. Therefore, to speed up the subscription, the plug-in must speed up the two steps. Let's take a look at the source code of the website and analyze it in these steps, the general process of related code.

By viewing the source code, you can see that in figure 5, the right part of the page is actually an iframe. When you click the menu bar in the upper part of the page, specify different URLs for iframe to access different function subpages (mainly because the classId parameter is different later. Figure-5 the url of the corresponding sub-page is under the root path of the site: "/gateway/hydzsw/Dzsw/action/NavigationAction_redirect? ClassId = 684 ". Of course, this is just a jump address. When we open this link in a new browser window, we will find that the page jumps to another address: "/gateway/hydzsw/Dzsw/action/ZcrbjhAction_initAdd? CurrentPosition = % E9 % A2 % 84% E7 % BA % A6 % 26 nbsp % 3B % 3E % 3E % 26 nbsp % 3B % E8 % AE % A2 % E7 % A9 % BA % e8 % BD % A6 ", as shown in:

Figure 7

You can view the code on this page to find all the core code required to buy an empty car. Let's refer to the Code involved in the entire car booking process:

1. [enter the query keyword]. The input box is autocomplete. The Data url is "/gateway/hydzsw/Dzsw/action/ZcrbjhAction_getYsxq ", after the data is obtained, it is formatted and filled into the candidate list for the user to choose from.

2. click a candidate result. Call the resultFunc (item) and createZyz (PZYCFH) methods and enter the default data in the form of the empty car, you may need to adjust the loading date, location, SMS notification, and receiver phone number.

 

3. Click "save" to run the "/gateway/hydzsw/Dzsw/action/TbInformationRestrictionAction_checkOrder" command. In fact, if the ajax request is successful, the next step will be taken regardless of whether the verification is successful or not.

4. [save car Booking Information], call the save () function, serialize the car Booking Information Form, and submit Ajax: "/gateway/hydzsw/Dzsw/action/ZcrbjhAction_add", and then call clearForm (); refresh the page. A new empty car message is displayed in the "no empty car query result reported" list. The most important information is the uuid value in the hidden domain of each row.

5. [report]: Call commitAction (). The prompt items are displayed. Check the "agree" button and call showSubmitBtn (). The final report button is displayed. Then, submitFun () is called (); function, using Ajax "/gateway/hydzsw/Dzsw/action/ZcrbjhAction_operateZcrbjh", the most important parameter is UIDs, whose value is the uuid of all empty vehicle information currently reported, which is spliced by commas.

So far, the process of a complete empty car is complete; the sky is changing, and then the day is resumed ......

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.