High-fidelity login status judgment, how to use global variables?

In the prototyping process, we often encounter such a situation: the same operation, due to the current conditions of different to perform different actions. For example: a lot of Product features that need to log in before they can operate. However, these functions can be seen when they are not logged in. When clicked, a pop-up window appears, guiding the user to log in or register.

In the face of such logic, the simplest way to do this is as follows: Add multiple use cases for the same action. When previewing the prototype, select a different use case to perform the operation.

This article describes a new way to achieve high-fidelity interaction.

Specific effects, see the link: (http://176.122.184.172/ login status judgment / # g = 1)

In the prototype, you can click the “Follow” button on the “Features” page, and the “Login” pop-up window will appear when you are not logged in. Click the “Login” button to go to the “Login” page and click “Login” Function “page, then click on the” attention “button again, it will become” attention. ”

How to set

1, add a global variable, the variable name account, the default value is 0. (“global variables” in the “project” menu)
2, for the “login” page “login” button to set the use case
3, for the “attention” button to set two states: “logged in” and “not logged in”
4, set the use case for the “attention” button

how to use

1, reference the first step, in your own project to add global variables. For example, the login status can use 0 and 1, 0 means not logged in, 1 means logged in. The initial value is set to 0.

2, any components will be affected by the login status of the dynamic panel, add two states, one is “not logged in”, one is “logged in”, and then step 4 set the use cases.

3. Refer to Step 2 to set the use case for the “Login” button on the “Login” page.

4, after such a setting, you can achieve the desired effect.

knowledge point analysis

1, global variables

The variables in Axure can be divided into three categories based on the scope of action: local variables, page variables, global variables. Local variables take effect in the same use case, page variables take effect in the same page, global variables in the entire prototype in effect. So, the global variable is cross-page, global variables are always maintained in the page switch. But we can modify global variables through use case actions. General products, login status, VIP and other content, suitable for storage with global variables.

2, dynamic panel “loading”

Components in the loading process, you can do some operations. With the conditions and global variables, you can simulate different situations to perform different operations. In this article, the focus button in the “loading”, the login status is judged, according to the value of the login status to show different content, thus triggering different operating logic.

Well, the content of this article all explained. Interested students can download the prototype self-experience.

It is noteworthy that such a Design will make the prototype loading speed slows, the prototype file becomes larger, will cause some trouble for the development. It is not uncommon for a development classmate to not trigger your login and thus fail to notice your Design details. Therefore, this approach is not recommended for prototyping. Unless you’re giving your boss or client a demo, this effect will make the experience great.

The role of global variables more than that, this article only discusses a scene. We can brainstorming, new ideas can leave a message, wecommunicate together.

No Comments

Leave a Reply