CN107391103B - Application program login method and device - Google Patents
Application program login method and device Download PDFInfo
- Publication number
- CN107391103B CN107391103B CN201710390724.5A CN201710390724A CN107391103B CN 107391103 B CN107391103 B CN 107391103B CN 201710390724 A CN201710390724 A CN 201710390724A CN 107391103 B CN107391103 B CN 107391103B
- Authority
- CN
- China
- Prior art keywords
- login
- application program
- waiting interface
- display
- time delay
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Information Transfer Between Computers (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The invention provides a login method and a device of an application program, wherein the method comprises the following steps: receiving a login instruction for logging in an application program; acquiring the time delay display duration of a login waiting interface according to the login instruction; during the period of time delay display of the login waiting interface within the time delay display duration, receiving a login success state sent by a server, and downloading data of a display page according to the login success state; and the display page is a page jumped after the application program is successfully logged in. According to the login method and device for the application program, when the user logs in the pre-login application program, the situation that the login page reversely jumps due to the fact that the display page is downloaded by the pre-login application program can be avoided, and user experience is improved.
Description
Technical Field
The present invention relates to the field of terminals, and in particular, to a login method and device for an application program.
Background
At present, with the continuous improvement of user requirements, more and more application programs can be applied to the terminal in the market. These applications can be roughly divided into two categories, one is applications that require a user to log in, for example: instant messaging application programs, mailbox application programs and the like; another class is applications that do not require a user to log in, such as: camera type applications, flashlight applications, etc.
The application programs needing the user login include a pre-login application program. After the application program of the pre-login is started, the application program directly jumps to a login page to allow a user to perform login operation. That is, the pre-registered application will not enter any presentation page when it is started, i.e., the user cannot use the application without logging into the application.
In the prior art, the display page to be skipped is determined only after the user successfully logs in the application program with the pre-login, so that the login page is displayed again by the application program with the pre-login during the process of downloading the display page, the login page is skipped reversely, and the user experience is poor.
Disclosure of Invention
The invention provides a login method and a login device for an application program, which are used for solving the technical problems that when a user logs in a pre-login application program in the prior art, the login page is displayed again during the process of downloading a display page by the pre-login application program, so that the login page jumps reversely, and the user experience is poor.
In a first aspect, the present invention provides a login method for an application, the method comprising:
receiving a login instruction for logging in an application program;
acquiring the time delay display duration of a login waiting interface according to the login instruction;
during the period of time delay display of the login waiting interface within the time delay display duration, receiving a login success state sent by a server, and downloading data of a display page according to the login success state; and the display page is a page jumped after the application program is successfully logged in.
In a possible implementation, the login instruction at least includes: maximum login latency allowed by the application;
the obtaining of the time delay display duration of the login waiting interface according to the login instruction includes:
and taking the minimum value between the maximum login time delay allowed by the application program and the preset maximum time delay time as the time delay display time.
In another possible implementation, the login instruction at least includes: a preset parameter for indicating whether the login waiting interface is displayed in a delayed manner or not;
before the obtaining of the time delay display duration of the login waiting interface according to the login instruction and after the receiving of the login instruction of the login application program, the method further includes:
determining whether to delay the display of the login waiting interface or not according to preset parameters in the login instruction;
the obtaining of the time delay display duration of the login waiting interface according to the login instruction includes:
and when the login waiting interface is determined to be displayed in a delayed mode, the delayed display duration of the login waiting interface is obtained according to the login instruction.
In another possible implementation, the login instruction at least includes: displaying identification information of the control required to be called by the login waiting interface;
before the obtaining of the time delay display duration of the login waiting interface according to the login instruction and after the receiving of the login instruction of the login application program, the method further includes:
registering and displaying the control required to be called by the login waiting interface according to the identification information of the control, and registering a callback function required to be returned after the time delay display duration is reached;
the displaying the login waiting interface in a delayed manner within the delayed display duration includes:
and before the callback function is called, calling the control to display the login waiting interface in a delayed manner within the delayed display duration.
In another possible implementation, the login instruction at least includes: logging in the user identification of the application program;
the downloading the data of the display page according to the login success state comprises the following steps:
and downloading the data of the display page matched with the user identification according to the login success state.
In another possible implementation manner, the login waiting interface is a user account login waiting interface or a third party account login waiting interface.
In another possible implementation manner, when the login waiting interface is a third-party account login waiting interface, the display page is a target page that needs to be jumped and is preset by the application program after the login of the third-party account is successful.
In another possible implementation manner, the time duration of the delayed display is determined in advance according to an average time duration required for logging in and displaying the display page by the application program.
In another possible implementation manner, if the login success status sent by the server is not received during the time of displaying the login waiting interface in a delayed manner within the delayed display time, after the delayed display time is reached, the user jumps to the login failure interface.
In a second aspect, the present invention provides a login device for an application, the device comprising:
the first receiving module is used for receiving a login instruction for logging in the application program;
the acquisition module is used for acquiring the time delay display duration of the login waiting interface according to the login instruction;
the second receiving module is used for receiving the login success state sent by the server during the time delay display of the login waiting interface within the time delay display duration;
the downloading module is used for downloading the data of the display page according to the login success state; and the display page is a page jumped after the application program is successfully logged in.
In a possible implementation, the login instruction at least includes: maximum login latency allowed by the application;
the obtaining module is specifically configured to use a minimum value between a maximum login time delay allowed by the application program and a preset maximum time delay time as the time delay display time.
In another possible implementation, the login instruction at least includes: a preset parameter for indicating whether the login waiting interface is displayed in a delayed manner or not;
the device further comprises:
the determining module is used for determining whether the login waiting interface is displayed in a delayed manner or not after the first receiving module receives the login instruction of the login application program and before the obtaining module obtains the delayed display duration of the login waiting interface according to the login instruction;
the obtaining module is specifically configured to, when the login waiting interface is determined to be displayed in a delayed manner, obtain a delayed display duration of the login waiting interface according to the login instruction.
In another possible implementation, the login instruction at least includes: displaying identification information of the control required to be called by the login waiting interface;
the device further comprises:
the registration module is used for registering and displaying the control required to be called by the login waiting interface according to the identification information of the control and registering the callback function required to be returned after the time delay display time length is reached after the first receiving module receives the login instruction of the login application program and before the acquisition module acquires the time delay display time length of the login waiting interface according to the login instruction;
and the calling module is used for calling the control to display the login waiting interface in a delayed manner within the delayed display duration before calling the callback function.
In another possible implementation, the login instruction at least includes: logging in the user identification of the application program;
and the downloading module is specifically used for downloading the data of the display page matched with the user identifier according to the login success state.
In another possible implementation manner, the login waiting interface is a user account login waiting interface or a third party account login waiting interface.
In another possible implementation manner, when the login waiting interface is a third-party account login waiting interface, the display page is a target page that needs to be jumped and is preset by the application program after the login of the third-party account is successful.
In another possible implementation manner, the time duration of the delayed display is determined in advance according to an average time duration required for logging in and displaying the display page by the application program.
In another possible embodiment, the apparatus further comprises:
and the processing module is used for skipping to a login failure interface after the time delay display duration is reached when the login success state sent by the server is not received during the time delay display of the login waiting interface by the second receiving module within the time delay display duration.
According to the login method and device for the application program, when a user logs in the pre-login application program, the terminal equipment can obtain the delayed display time length of the login waiting interface according to the login instruction after receiving the login instruction of the login application program, so that during the time delay display of the login waiting interface within the delayed display time length, the terminal equipment can download the data of the display page jumped after the login of the application program is successful in the background according to the login success state sent by the server, and therefore after the login waiting interface is displayed, the display page can be directly jumped, the situation that the login page is jumped reversely is avoided, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a login method of an application according to the present invention;
FIG. 2 is a schematic structural diagram of a login device for an application according to the present invention;
FIG. 3 is a schematic structural diagram of a login device of another application provided in the present invention;
FIG. 4 is a schematic structural diagram of a login device of another application provided in the present invention;
fig. 5 is a schematic structural diagram of a login device of another application program according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides a login method of an application program, and aims to solve the technical problems that when a user logs in a pre-login application program in the prior art, the login page is displayed again during the process of downloading a display page by the pre-login application program, so that the login page jumps reversely, and the user experience is poor. Of course, the login method of the application program provided by the present invention includes, but is not limited to, the application scenario of the application program logged in the pre-login, and as long as any type of application program has a scenario of a reverse jump of the login page when the user logs in, the login method of the application program provided by the present invention can be adopted.
The technical solution of the present invention will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 1 is a schematic flowchart of a login method of an application program according to the present invention. The execution main body of the method can be a login device of an application program, and can also be terminal equipment of the login device integrated with the application program, the following description takes the execution main body as the terminal equipment (short for: terminal equipment) of the login device integrated with the application program as an example, and the implementation relates to how the terminal equipment avoids the reverse jump of a login page caused by downloading a display page of a pre-login application program when a user logs in the pre-login application program on the terminal equipment. As shown in fig. 1, the method may include:
s101, receiving a login instruction for logging in an application program.
Specifically, when a user logs in a certain pre-login application program on the terminal device, the terminal device may receive a login instruction of the login application program triggered by the user. For example: the login instruction may be a login instruction generated by a user by inputting a user account and a password on a login page of the application program. Alternatively, the login instruction may be a login instruction generated by the user selecting a third-party account on a login page of the application program.
And S102, acquiring the time delay display duration of the login waiting interface according to the login instruction.
Specifically, in this embodiment, the terminal device may delay to display the login waiting interface when the user logs in the application program. The login waiting interface may be a user account login waiting interface or a third party account login waiting interface, and may be specifically determined according to a login mode selected by a user.
Therefore, after receiving the login instruction, the terminal device may obtain the time duration of the delayed display of the login waiting interface of the application program according to the login instruction. For example: if the delay display duration of the login waiting interface is the preset delay duration, the terminal device may obtain the delay display duration of the login waiting interface by obtaining the preset delay duration. Or, if the login instruction carries the delay display duration of the login waiting interface, the terminal device may obtain the delay display duration of the login waiting interface according to the delay display duration of the login waiting interface carried by the login instruction.
Optionally, in an implementation manner of the present invention, a maximum delay time is preset in the terminal device, and the login instruction carries a maximum login delay allowed by the application program, so that the terminal device may use a minimum value between the maximum login delay allowed by the application program and the preset maximum delay time as the delay display time according to the maximum login delay allowed by the application program carried in the login instruction and the preset maximum delay time. The preset maximum delay time may be specifically set according to a requirement of a user.
S103, during the time of displaying the login waiting interface in a delayed manner within the delayed display duration, receiving a login success state sent by the server, and downloading data of the display page according to the login success state; the display page is a page which is jumped after the application program successfully logs in.
Specifically, after the terminal device obtains the time delay display duration of the login waiting interface, the terminal device may display the login waiting interface to the user in a time delay manner within the time delay display duration. Meanwhile, during the period of displaying the login waiting interface to the user in a delayed mode, the terminal device can send the login instruction to the server to which the application program belongs in a background operation mode so as to perform login operation. Furthermore, the terminal device may download and display the data of the display page according to the login success status after receiving the login success status sent by the server based on the login instruction. I.e. the data of the page that is jumped after the application login was successful. If the terminal does not receive the login success state sent by the server during the time delay display of the login waiting interface within the time delay display duration, the terminal equipment can jump from the login waiting interface to the login failure interface after the time delay display duration is reached so as to prompt the user of login failure.
In the prior art, the display page to be skipped is determined only after the user successfully logs in the application program with the pre-login, that is, after the display of the login waiting interface is finished, so that the application program with the pre-login redisplays the login page during the period of downloading the display page by the terminal device, the login page is reversely skipped, and the user experience is poor. By the application program login method provided by the embodiment, the terminal device can finish downloading the data of the display page in the background during the time of displaying the login waiting interface in a delayed manner for the user, so that the terminal device can directly jump to the display page after the display of the login waiting interface is finished, the reverse jump of the login page is avoided, and the user experience is improved.
According to the login method of the application program, when a user logs in the pre-login application program, the terminal equipment can obtain the delayed display time length of the login waiting interface according to the login instruction after receiving the login instruction of the login application program, so that during the time period that the terminal equipment displays the login waiting interface in the delayed display time length in a delayed mode, the data of the display page jumped after the login of the application program is successful can be downloaded in the background according to the login success state sent by the server, the display page can be directly jumped after the login waiting interface is displayed, the reverse jump of the login page is avoided, and the user experience is improved.
Further, on the basis of the foregoing embodiment, after the foregoing S101 and before the foregoing S102, the method may further include: and determining whether to delay to display a login waiting interface according to preset parameters in the login instruction.
Specifically, in this embodiment, the login instruction carries a preset parameter, and the preset parameter is used to identify whether to delay display the login waiting interface. In specific implementation, whether the login waiting interface is displayed in a delayed mode or not can be identified through different preset parameters. For example: one preset parameter is used for identifying a login waiting interface displayed in a delayed mode, and the other preset parameter is used for identifying a login waiting interface displayed in a non-delayed mode. Whether the login waiting interface is displayed in a delayed mode or not can be identified through different values of the same preset parameter. For example: when the value of the preset parameter carried in the login instruction is 1, the login waiting interface is displayed in a delayed mode; and when the value of the preset parameter carried in the login instruction is 0, showing that a login waiting interface is displayed without delay. Or when the value of the preset parameter carried in the login instruction is 0, indicating that a login waiting interface is displayed in a delayed mode; and when the value of the preset parameter carried in the login instruction is 1, displaying a login waiting interface without delaying, and the like.
Therefore, after receiving the login instruction of the login application program and before obtaining the time delay display duration of the login waiting interface according to the login instruction, the terminal device may determine whether to display the login waiting interface in a time delay manner according to the preset parameter in the login instruction. If the terminal device determines to display the login waiting interface in a delayed manner according to the preset parameters in the login instruction, the terminal device may further obtain the delayed display duration of the login waiting interface according to the login instruction. If the terminal device determines not to display the login waiting interface in a delayed manner according to the preset parameters in the login instruction, the terminal device may perform subsequent login operations in the existing manner, which is not described again.
According to the login method of the application program, when a user logs in a pre-login application program, after the terminal equipment receives a login instruction of the login application program and before the time delay display duration of the login waiting interface is obtained according to the login instruction, whether the login waiting interface is displayed in a time delay mode or not can be determined according to preset parameters in the login instruction, and then when the login waiting interface is determined to be displayed in a time delay mode, the operation of obtaining the time delay display duration of the login waiting interface is executed, so that the login execution mode of the terminal equipment is more flexible and diversified.
Further, on the basis of the foregoing embodiment, when the login instruction includes a user identifier (for example, a user account or a third party account authorization code) of the login application program, the step S103 may include: and downloading the data of the display page matched with the user identification according to the login success state. Optionally, when the login instruction includes a user account, the login instruction may further include: a user password.
The user identifier is used to distinguish the identity of the user when using the application program, for example: when the application is a shopping application, the user identity may be, for example, a merchant identity or a buyer identity. Because the display pages displayed by the application program to the users with different user identities may be different, the terminal device may download the data of the display page matched with the user identity according to the login success state after receiving the login success state sent by the server during the time delay display of the login waiting interface within the time delay display duration. I.e. downloading data of the presentation page matching the user identity.
Optionally, when the server stores the corresponding relationship between the user identifier and the user identity, the terminal device may carry the user identifier included in the login instruction in the download request when sending the download request to the server to which the application program belongs, so that the server may determine the user identity corresponding to the user identifier based on the user identifier in the download request, and further send data of the display page matched with the user identity to the terminal device.
Optionally, when the terminal device stores the corresponding relationship between the user identifier and the user identity, the terminal device may determine the user identity corresponding to the user identifier according to the user identifier included in the login instruction before sending the download request to the server to which the application program belongs. Then, the terminal device may carry the user identity in the download request, so that the server may send data of the presentation page matching the user identity to the terminal device based on the user identity in the download request.
In some embodiments, the user identification is used to distinguish the manner in which the user logs into the application. For example: when the user identifier is the user account, it indicates that the user is an application program logged in by using the user account, that is, the login waiting interface is a user account login waiting interface. When the user identifier is the third-party account authorization code, the user is an application program logged in by using the third-party account, that is, the login waiting interface is a third-party account login waiting interface. When the application program is different from the display pages displayed by the users who log in different modes, the terminal equipment can download the data of the display pages matched with the user identifications according to the login success state after receiving the login success state sent by the server during the time delay display of the login waiting interface within the time delay display duration. I.e. downloading data of the presentation page matching the user identity.
For example: when the user identifier is a user account, that is, when the login waiting interface is a user account login waiting interface, the display page may be a target page that needs to be skipped and is preset by the application program after the user account login is successful. When the user identifier is a third-party account authorization code, that is, when the login waiting interface is a third-party account login waiting interface, the display page may be a target page that needs to be skipped and is preset after the application program successfully logs in for the third-party account.
According to the login method of the application program, the terminal equipment can download the data of the display page matched with the user identification according to the login success state after receiving the login success state sent by the server based on the user identification of the login application program carried in the login instruction, the correctness of the downloaded display page is ensured, and the user experience is improved.
The following describes the login method of the application program in detail by using a specific example. In this example, the terminal device realizes the above-described login method of the application program by the application program. The login service (which can also be regarded as a thread) of the application program is preset with a timer for monitoring the delay display duration of the login waiting interface and a maximum delay duration (for example, 1000 milliseconds). Meanwhile, the main thread of the application program is provided with a switch for delaying the display of the login waiting interface and the maximum login delay allowed by the application program. When the switch is turned on, the main thread of the application program sends a delay setting instruction to the login service, and the instruction carries the maximum login delay allowed by the application program, so that the login service can obtain the delay display duration of the login waiting interface and delay the login waiting interface within the delay display duration. When the switch is closed, the main thread of the application program does not send a delay setting instruction to the login service, and then the login service does not execute the action of obtaining the delay display duration of the login waiting interface, and further the login waiting interface cannot be displayed in a delayed manner. In this example, the switch is set to an open state.
The application program may perform the following operations:
A. the main thread receives a login instruction triggered by a user. Wherein, the login command at least comprises: a user account and a user password. Or, the login instruction at least comprises: and the third party account authorization code.
B. When the main thread determines that the switch is in an open state, starting login service, and sending a login instruction and a setting instruction for setting delay to the login service; the setting instruction carries the maximum login delay allowed by the application program.
C. The login service takes the minimum value between the maximum login time delay allowed by the application program and the preset maximum time delay time as the time delay display time of the login waiting interface.
It should be noted that the main thread of the application program is responsible for modifying and/or adjusting the delay display duration of the login waiting interface, so as to avoid that the function of the application program is wrong and user experience is affected due to the fact that the non-main thread modifies and/or adjusts the delay display duration of the login waiting interface.
D. And the login service sets and starts a timer according to the delay display duration of the login waiting interface. And the maximum duration of the timer is the delay display duration of the login waiting interface.
It should be noted that, in some embodiments, the time duration of the delayed display may also be a preset time duration, where the preset time duration may be determined by an average time duration required by a developer to log in and display the display page according to the application program in advance.
E. After the login service starts the timer, before the timer is overtime, the login waiting interface is displayed in a delayed mode. Meanwhile, the login service initiates a login operation to the server according to the login instruction, and after receiving a login success state sent by the server based on the login instruction, the login success state is called back to the main thread, and the instruction is waited.
F. And after receiving the callback login success state, the main thread downloads the data of the display page, and enters a waiting state after finishing downloading the data of the display page.
G. And when the timer is overtime, the login service finishes displaying the login waiting interface, and calls back a waiting finishing instruction to the main thread, so that the main thread jumps to the display page after receiving the waiting finishing instruction called back by the login service.
Optionally, in some embodiments, the login instruction at least includes: when the identification information of the control required to be called by the login waiting interface is displayed, between the step A and the step B, the following steps can be further included: and registering and displaying the control required to be called by the login waiting interface according to the identification information of the control, and registering the callback function required to be returned after the time delay display duration is reached.
The control described herein is a control required for displaying a login waiting interface, for example: wait for animation controls, etc. By the method, the login service can know which controls need to be displayed in a delayed manner in the plurality of called controls, and the login waiting interface can be correctly displayed by the login service during the delayed display of the login waiting interface. The identification information of the control can be, for example, a name of the control, an index number of the control, and the like. In this example, the control to be called for registering and displaying the login waiting interface according to the identification information of the control, and the callback function to be returned after the registration reaches the delay display duration may be executed by the login service.
The callback function is used for identifying that the display of the login waiting interface reaches the time delay display duration, so that the login service can notify the main thread that the display of the login waiting interface reaches the time delay display duration by calling the callback function when the time delay display duration is reached (namely, the timer is overtime). That is, the main thread is notified to end the wait so that the main thread can jump to the presentation page downloaded by the main thread.
By the mode, the login waiting interface can be closed by delaying the login service of the application program for a plurality of milliseconds, so that the main thread of the application program can have sufficient time to download the data of the display page, the situation that the login waiting interface is closed during the process of downloading the data of the display page, the reverse jump to the login interface is caused is avoided, and the poor user experience is improved.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Fig. 2 is a schematic structural diagram of a login device of an application according to the present invention. Referring to fig. 2, the login device of the application program may include a first receiving module 11, an obtaining module 12, a second receiving module 13 and a downloading module 14, wherein,
the first receiving module 11 is configured to receive a login instruction for logging in an application program.
The obtaining module 12 is configured to obtain a delay display duration of the login waiting interface according to the login instruction; for example, the time delay display duration may be determined in advance according to an average duration required by the application to log in and display the presentation page.
The second receiving module 13 is configured to receive a login success status sent by the server during a time delay display of the login waiting interface within the time delay display duration;
a downloading module 14, configured to download data of the display page according to the login success status; the display page is a page which is jumped after the application program successfully logs in.
Optionally, the login waiting interface is a user account login waiting interface or a third party account login waiting interface. Illustratively, when the login waiting interface is a third-party account login waiting interface, the display page is a target page which is preset by the application program after the login of the third-party account is successful and needs to be jumped.
Optionally, in some embodiments, the login instruction at least includes: maximum login latency allowed by the application. In this implementation manner, the obtaining module 12 is specifically configured to use a minimum value between a maximum login delay allowed by the application program and a preset maximum delay time as the delay display time.
Optionally, in some embodiments, when the login instruction at least includes the user identifier of the login application program, the downloading module 14 is specifically configured to download the data of the display page matched with the user identifier according to the login success state.
Fig. 3 is a schematic structural diagram of another login device for an application according to the present invention. Referring to fig. 3, on the basis of the block diagram shown in fig. 2, when the login instruction at least includes a preset parameter for indicating whether to delay displaying the login waiting interface, the apparatus may further include a determining module 15. Wherein,
the determining module 15 is configured to determine whether to delay display of the login waiting interface after the first receiving module 11 receives the login instruction of the login application and before the obtaining module 12 obtains the delay display duration of the login waiting interface according to the login instruction.
In this implementation manner, the obtaining module 12 is specifically configured to, when the login waiting interface is determined to be displayed in a delayed manner, obtain the time duration of the delayed display of the login waiting interface according to the login instruction.
Fig. 4 is a schematic structural diagram of a login device of another application program provided by the present invention. Referring to fig. 4, on the basis of the block diagram shown in fig. 2, when the login instruction at least includes identification information of a control that needs to be called for displaying the login waiting interface, the apparatus may further include: a registration module 16 and a calling module 17. Wherein,
the registration module 16 is configured to register a control to be called for displaying the login waiting interface according to the identification information of the control after the first receiving module 11 receives the login instruction of the login application and before the obtaining module 12 obtains the delay display duration of the login waiting interface according to the login instruction, and register a callback function to be returned after the delay display duration is reached;
and the calling module 17 is configured to call the control to display the login waiting interface in a delayed manner within the delayed display duration before calling the callback function.
Fig. 5 is a schematic structural diagram of a login device of another application program according to the present invention. Referring to fig. 5, on the basis of the block diagram shown in fig. 2, the apparatus may further include: a processing module 18. Wherein,
and the processing module 18 is configured to jump to the login failure interface after the time delay display duration is reached when the login success status sent by the server is not received during the time delay display of the login waiting interface by the second receiving module 13 within the time delay display duration.
The login device of the application program provided by the invention can execute the technical scheme shown in the embodiment of the method, the implementation principle and the beneficial effect are similar, and the detailed description is omitted here.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
Claims (10)
1. A login method for an application program, the method comprising:
receiving a login instruction for logging in an application program;
acquiring the time delay display duration of a login waiting interface according to the login instruction;
during the period of time delay display of the login waiting interface within the time delay display duration, receiving a login success state sent by a server, and downloading data of a display page according to the login success state; and the display page is a page jumped after the application program is successfully logged in.
2. The method according to claim 1, wherein the login instruction at least comprises: maximum login latency allowed by the application;
the obtaining of the time delay display duration of the login waiting interface according to the login instruction includes:
and taking the minimum value between the maximum login time delay allowed by the application program and the preset maximum time delay time as the time delay display time.
3. The method according to claim 1, wherein the login instruction at least comprises: a preset parameter for indicating whether the login waiting interface is displayed in a delayed manner or not;
before the obtaining of the time delay display duration of the login waiting interface according to the login instruction and after the receiving of the login instruction of the login application program, the method further includes:
determining whether to delay the display of the login waiting interface or not according to preset parameters in the login instruction;
the obtaining of the time delay display duration of the login waiting interface according to the login instruction includes:
and when the login waiting interface is determined to be displayed in a delayed mode, the delayed display duration of the login waiting interface is obtained according to the login instruction.
4. The method according to claim 1, wherein the login instruction at least comprises: displaying identification information of the control required to be called by the login waiting interface;
before the obtaining of the time delay display duration of the login waiting interface according to the login instruction and after the receiving of the login instruction of the login application program, the method further includes:
registering and displaying the control required to be called by the login waiting interface according to the identification information of the control, and registering a callback function required to be returned after the time delay display duration is reached;
the displaying the login waiting interface in a delayed manner within the delayed display duration includes:
and before the callback function is called, calling the control to display the login waiting interface in a delayed manner within the delayed display duration.
5. The method according to claim 1, wherein the login instruction at least comprises: logging in the user identification of the application program;
the downloading the data of the display page according to the login success state comprises the following steps:
and downloading the data of the display page matched with the user identification according to the login success state.
6. The method of any one of claims 1-5, wherein the login-waiting interface is a user account login-waiting interface or a third party account login-waiting interface.
7. The method according to claim 6, wherein when the login waiting interface is a third party account login waiting interface, the display page is a preset target page to be jumped to after the application program successfully logs in for the third party account.
8. The method according to any one of claims 1 to 5, wherein the time delay display duration is determined in advance according to an average duration required for the application to log in and display the display page.
9. The method according to any one of claims 1 to 5 or 7, wherein if a login success status sent by a server is not received during the time delay display of the login waiting interface within the time delay display duration, jumping to a login failure interface after the time delay display duration is reached.
10. An apparatus for logging in an application, the apparatus comprising:
the first receiving module is used for receiving a login instruction for logging in the application program;
the acquisition module is used for acquiring the time delay display duration of the login waiting interface according to the login instruction;
the second receiving module is used for receiving the login success state sent by the server during the time delay display of the login waiting interface within the time delay display duration;
the downloading module is used for downloading the data of the display page according to the login success state; and the display page is a page jumped after the application program is successfully logged in.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710390724.5A CN107391103B (en) | 2017-05-27 | 2017-05-27 | Application program login method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710390724.5A CN107391103B (en) | 2017-05-27 | 2017-05-27 | Application program login method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107391103A CN107391103A (en) | 2017-11-24 |
CN107391103B true CN107391103B (en) | 2021-01-22 |
Family
ID=60338391
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710390724.5A Active CN107391103B (en) | 2017-05-27 | 2017-05-27 | Application program login method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107391103B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112163201A (en) * | 2020-09-29 | 2021-01-01 | 江西江铃集团新能源汽车有限公司 | User login management method and system, readable storage medium and electronic device |
CN114676416A (en) * | 2022-03-10 | 2022-06-28 | 北京卓越乐享网络科技有限公司 | Login control method, device, electronic equipment, storage medium and program product |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8725994B2 (en) * | 2007-11-13 | 2014-05-13 | Hewlett-Packard Development Company, L.P. | Launching an application from a power management state |
US8676979B2 (en) * | 2010-05-18 | 2014-03-18 | Salesforce.Com, Inc. | Methods and systems for efficient API integrated login in a multi-tenant database environment |
CN104852944B (en) * | 2014-02-19 | 2019-02-12 | 腾讯科技(深圳)有限公司 | The display methods and device of login interface |
CN104156401A (en) * | 2014-07-22 | 2014-11-19 | 小米科技有限责任公司 | Webpage loading method, device and equipment |
CN105373370B (en) * | 2014-08-26 | 2019-12-27 | 腾讯科技(深圳)有限公司 | Control display method and device |
CN104281476B (en) * | 2014-10-13 | 2018-09-11 | 中国外汇交易中心 | A kind of data download method and its data downloading management device for computer system |
CN106161521B (en) * | 2015-04-01 | 2019-09-10 | 阿里巴巴集团控股有限公司 | The processing method and processing device of hypertext transfer protocol requests |
-
2017
- 2017-05-27 CN CN201710390724.5A patent/CN107391103B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN107391103A (en) | 2017-11-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106161385B (en) | A kind of remote control method and device of equipment | |
RU2673845C2 (en) | Method and server for profile management | |
EP3334127A1 (en) | Message pushing method and apparatus thereof | |
EP3780550B1 (en) | Information pushing method and device | |
EP2852199A1 (en) | System for data backup and restoration, server and mobile terminal | |
EP2528327A1 (en) | System and method for re-access of wireless video conference terminal | |
CN110011885B (en) | Control authority binding method and device of electric appliance, storage medium and electric appliance | |
CN112436986B (en) | Distribution network method, distribution network device, distribution network equipment and computer readable storage medium | |
CN107548054B (en) | Master-slave equipment switching method of eSIM card, slave equipment and eSIM card management server | |
EP2741245A1 (en) | Mobile payment method, device and system for server end and client | |
CN107391103B (en) | Application program login method and device | |
CN104156246A (en) | Method and device for gray scale upgrade | |
KR102113384B1 (en) | Method and device for verifying user behaviour in mobile scenario | |
CN102955705A (en) | Method and system for realizing mutual starting among programs | |
CN106657545B (en) | Method, device and terminal for intercepting push information | |
CN115499438B (en) | A task allocation method, device, electronic device and storage medium | |
CN112235386A (en) | Remote assistance method based on intelligent terminal, terminal and storage medium | |
CN108418905B (en) | Method, terminal, cloud platform device and medium for safely binding devices | |
CN108540371B (en) | Method and system for uploading electronic evidence | |
EP4310407A1 (en) | Control right switching method and apparatus for virtual remote control, device, and storage medium | |
CN112316438B (en) | User authentication method, device, storage medium and terminal equipment | |
CN111142976B (en) | Logic code execution method, device, server and medium | |
CN103685776A (en) | Method and device for processing call | |
CN113965770A (en) | Virtual resource processing method, device, server and storage medium | |
CN114500012B (en) | Verification code login method and system and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |