当前位置:网站首页>The sign in function completes 03 "IVX low code sign in system production"

The sign in function completes 03 "IVX low code sign in system production"

2022-06-25 03:37:00 1_ bit

Make iVX Low code projects need to go online IDE:https://editor.ivx.cn/

One 、 Sign in page production

The previous section completed the release of sign in content , Then how do we make a check-in page and check in ?

At this point, we first create a page called the check-in QR code page :
 Insert picture description here
Then preview the page directly , You will see that there will be a pid, This pid Namely ivx On this page id value :
 Insert picture description here

Let's directly copy this string of values to the corresponding link generated after the release check-in in the previous section :
 Insert picture description here
Then go to this page and make the page content , The page is as follows :
 Insert picture description here

This page is very simple , Similar top content , Then here is a two-dimensional code , At this point, we will not repeat this part .

At this point, the current page needs to receive the parameters passed in , Then add parameter acquisition in the display event of the current page , Get parameters. You can use the application system to get :
 Insert picture description here

This id In the last section, we have learned that , It means which sign in ID, So now I get this id It must be necessary to get the current ID Check in content of , At this point, you need to create a service term to get this one ID Corresponding data , Create a service called search check-in information :
 Insert picture description here
Then write the current service , Receive a parameter as sign in ID, Then through this ID Value to find the corresponding check-in in the database :
 Insert picture description here

Because this time is through id Find value , Then the value must be a piece of data , It can't be multiple pieces of data , because ID Value is unique , So here I return a certain line of output results , This line is 0,0 Indicates the first line because the index is from 0 Start :
 Insert picture description here
Then we return to the display event of the page , In the access to id Call the service directly after the parameter :
 Insert picture description here
After completion, directly use an object variable to assign values :
 Insert picture description here
Then you need to create an object variable , This object variable needs to correspond to the transmitted data one by one , Fields of this object variable :
 Insert picture description here
At this point, you also need to create a check-in name string variable , When the value of the sign in information is obtained , Give the sign in name directly , And the sign in name variable is bound to the title of the current page :
 Insert picture description here
Then let's create an action below to assign a value to the QR code in the current page :
 Insert picture description here

At this point, you can see that I used a time variable here :
 Insert picture description here
This time variable needs to be created , And named the current time :
 Insert picture description here

Two 、 Transformed QR code

In the current time mentioned in the first point, in order to make the two-dimensional code discover the transformation , The time stamp parameter of the QR code we need to sign in is 2 In seconds , So every 2 Seconds will give this QR code a new url value , But I personally don't like this operation , Here I will demonstrate how to transform QR code , However, I will not use this value for sign in entry , I will directly use the timestamp after the jump page .

At this point we create a timer —— trigger :
 Insert picture description here
At this point, I change the trigger to automatically change the verification code , This trigger is automatically responsive :
 Insert picture description here
every other 3 Seconds to trigger , What triggers it ? We can view events :
 Insert picture description here
That is, assign a value to the time variable , Because the current value obtained by the time variable will be the content of the current time by default , Then we preview the current page :
 Insert picture description here
Remember to bring id, Otherwise, you will be prompted that there is no current check-in content , At this point, we find that the current QR code every 3 Seconds to switch .

3、 ... and 、 Complete the check-in function

You need to complete the check-in function and create a page , Use this page to respond to seat check-in :
 Insert picture description here

This check-in page is divided into two functions , One is the success prompt , There is also a failure prompt :
 Insert picture description here
 Insert picture description here
At this time, the login function is reserved , Because the previous articles have done , Just take it as a hint here .

Preview the page's url, Copy the corresponding uid Go to the QR code , So you can scan the code to this page , Then we write the content of parameter acquisition in the event of this page :
 Insert picture description here

After the thin spot area receives the results, it will be copied to the sign in ID Currently signed in id value , Then search the current id The content of , Why search ? Because we need to judge the corresponding start and end time from the database , Here we must pay attention to , Data input externally “ It's not safe ”, If we can use internal data, we can use internal .

Then after the search , Let's create corresponding time variables and object variables , And return values to these variables :
 Insert picture description here
Then we directly determine whether the value of the current time is within the range of the database timestamp , Because it's the number of seconds , So just make a direct judgment :
 Insert picture description here
After judging the success, the successful block can be displayed :
 Insert picture description here
Otherwise, the failed block is displayed :
 Insert picture description here
These two blocks are hidden by default :
 Insert picture description here

Such a core function of check-in is realized .

原网站

版权声明
本文为[1_ bit]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206250037226962.html