CN110535774A - Dynamic routing processing method, device, computer equipment and storage medium - Google Patents

Dynamic routing processing method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN110535774A
CN110535774A CN201910672323.8A CN201910672323A CN110535774A CN 110535774 A CN110535774 A CN 110535774A CN 201910672323 A CN201910672323 A CN 201910672323A CN 110535774 A CN110535774 A CN 110535774A
Authority
CN
China
Prior art keywords
routing
user
permission
identity
component
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.)
Pending
Application number
CN201910672323.8A
Other languages
Chinese (zh)
Inventor
王冬扬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910672323.8A priority Critical patent/CN110535774A/en
Publication of CN110535774A publication Critical patent/CN110535774A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0815Network architectures or network communication protocols for network security for authentication of entities providing single-sign-on or federations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention discloses a kind of dynamic routing processing method, device, computer equipment and storage mediums.The present invention is applied to the R&D process in exploitation and optimizes field.The described method includes: if detecting, user is logined successfully, and is obtained the identity of the user and is routed permission according to the user that the identity obtains the user from server;It receives the global routing table that server returns and the routing table for meeting the user and routing permission is generated according to the global routing table;The routing table is converted into routing component and the routing component is added by routing manager dynamic;The routing component is rendered by render component to show side menu bar.Method by implementing the embodiment of the present invention can realize that routing is dynamically configurable, and the routing in different user permission menu can be added voluntarily, and the newly-increased routing page does not influence other routing pages.

Description

Dynamic routing processing method, device, computer equipment and storage medium
Technical field
The present invention relates to technical field of data processing more particularly to a kind of dynamic routing processing method, device, computer to set Standby and storage medium.
Background technique
With science and technology and expanding economy, internet becomes the entertainment way of mainstream in people's life, and people pass through net Life & amusement pastime is realized in upper surfing.In internet, the development of front end frame is also more and more mature, wherein Vue is instantly most Popular one of front end frame, Vue are the gradual frames of a set of building user interface, it is with data-driven and modularization Thought building, using the design of bottom-up incremental development.And in the dynamic routing of Vue realization, it can not accomplish flexibly to match Routing is set, arbitrarily increases dynamic routing newly in the page, the newly-increased routing for routing and adding before will affect later is closed, leads to not beat Open the page.
Summary of the invention
The embodiment of the invention provides a kind of dynamic routing processing method, device, computer equipment and storage mediums, it is intended to It solves the problems, such as not accomplishing that flexible configuration routes in the dynamic routing of Vue is realized.
In a first aspect, the embodiment of the invention provides a kind of dynamic routing processing methods comprising: if detecting, user is stepped on It records the identity for successfully obtaining the user and obtains the user road of the user from server according to the identity By permission;It receives the global routing table that server returns and the user is met according to the global routing table generation and route permission Routing table;The routing table is converted into routing component and the routing component is added by routing manager dynamic;Pass through Render component renders the routing component to show side menu bar.
Second aspect, the embodiment of the invention also provides a kind of dynamic routing processing units comprising: acquiring unit is used If obtaining the identity of the user in detecting that user logins successfully and being obtained from server according to the identity The user of the user routes permission;Generation unit, for receiving the global routing table of server return and according to the overall situation Routing table, which generates, meets the routing table that the user routes permission;Adding unit, for the routing table to be converted to group of routes Part simultaneously adds the routing component by routing manager dynamic;Rendering unit, for passing through render component to the group of routes Part is rendered to show side menu bar.
The third aspect, the embodiment of the invention also provides a kind of computer equipments comprising memory and processor, it is described Computer program is stored on memory, the processor realizes the above method when executing the computer program.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage medium, the storage medium storage There is computer program, the computer program includes program instruction, and described program instruction can be realized when being executed by a processor State method.
The embodiment of the invention provides a kind of dynamic routing processing method, device, computer equipment and storage mediums.Its In, which comprises if detecting, user is logined successfully, and obtains the identity of the user and according to the identity The user that the user is obtained from server routes permission;Receive the global routing table that server returns and according to the overall situation Routing table, which generates, meets the routing table that the user routes permission;The routing table is converted into routing component and by routing pipe Reason device dynamic adds the routing component;The routing component is rendered by render component to show side menu bar. The embodiment of the present invention routes permission by the user that User Identity obtains user, meets user according to the generation of global routing table Routing table is converted into routing component and carries out dynamic addition by routing manager, by render component by the routing table for routing permission Routing component is rendered, it can be achieved that routing is dynamically configurable, the routing in different user permission menu can be added voluntarily, newly The routing page of increasing does not influence other routing pages.
Detailed description of the invention
Technical solution in order to illustrate the embodiments of the present invention more clearly, below will be to needed in embodiment description Attached drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the invention, general for this field For logical technical staff, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is the application scenarios schematic diagram of dynamic routing processing method provided in an embodiment of the present invention;
Fig. 2 is the flow diagram of dynamic routing processing method provided in an embodiment of the present invention;
Fig. 3 is the sub-process schematic diagram of dynamic routing processing method provided in an embodiment of the present invention;
Fig. 4 be another embodiment of the present invention provides dynamic routing processing method flow diagram;
Fig. 5 is the sub-process schematic diagram of dynamic routing processing method provided in an embodiment of the present invention;
Fig. 6 is the sub-process schematic diagram of dynamic routing processing method provided in an embodiment of the present invention;
Fig. 7 is the schematic block diagram of dynamic routing processing unit provided in an embodiment of the present invention;
Fig. 8 is the schematic block diagram of the specific unit of dynamic routing processing unit provided in an embodiment of the present invention;
Fig. 9 be another embodiment of the present invention provides dynamic routing processing unit schematic block diagram;And
Figure 10 is the schematic block diagram of computer equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " and "comprising" instruction Described feature, entirety, step, operation, the presence of element and/or component, but one or more of the other feature, whole is not precluded Body, step, operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this description of the invention merely for the sake of description specific embodiment And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on Other situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and the appended claims is Refer to any combination and all possible combinations of one or more of associated item listed, and including these combinations.
Fig. 1 and Fig. 2 are please referred to, Fig. 1 is that the application scenarios of dynamic routing processing method provided in an embodiment of the present invention are illustrated Figure.Fig. 2 is the schematic flow chart of dynamic routing processing method provided in an embodiment of the present invention.The dynamic routing processing method is answered For in terminal 10, by interacting realization between terminal 10 and server 20.The present invention proposes a kind of realization of dynamic routing Method is applied in Vue, and Vue is the library JavaScriptMVVM, is the gradual frame of a set of building user interface.It It is to be constructed with data-driven and the thought of modularization, using the design of bottom-up incremental development, compared to other front end frames Frame, Vue provide API more succinct, being more readily understood, can rapidly go up hand and use.Existing Vue dynamic routing Realize, after adding new dynamic routing, be easy to appear jump to 404 the wrong page, cause webpage unstable, user uses It is poor to experience.And the dynamic routing realized through the invention, it may be implemented to route dynamically configurable, closing newly-increased routing page Other routing pages, the wrong page that still can normally open without jumping to 404 are not interfered with behind face.
Fig. 2 is the flow diagram of dynamic routing processing method provided in an embodiment of the present invention.As shown, this method packet Include following steps S110-S140.
If S110, detecting that user logins successfully, obtain the identity of the user and according to the identity from The user that the user is obtained in server routes permission.
In one embodiment, user opens webpage in front end, and usual webpage can prompt user to log in, and user needs to input account Number and password, when the account of user's input and then user logins successfully when correct password.What the identity of user referred to It is the mark for unique identification user identity, such as token namely token, user routes permission and refers to that user logs on to Routing permission after the page, it is that developer is preset that user, which routes permission, can arbitrarily be set according to practical business situation, For example, VIP user and ordinary user, VIP user logs on to the exclusive account management for having VIP after the page in menu bar, and common User logs on to after the page in menu bar then without this routing.User's logon account input account and password are sent to first Server is verified by identity of the server to user, illustrates that user logins successfully if being verified, user logins successfully Routing is intercepted before jumping to initial routing by Hook Function afterwards, obtain User Identity and according to User Identity from The user information of the user is obtained in server, wherein user information includes that user routes permission, user name and user's head portrait Deng.
In one embodiment, as shown in figure 3, the step S110 may include step: S111-S113.
S111, routing is intercepted by Hook Function and judges the identity mark for whether being stored with the user in browser rs cache Know.
If the not stored identity for having the user in S112, browser rs cache, the use that server returns is received The identity at family simultaneously stores the identity into browser rs cache.
S113, the user for obtaining the user from server according to the identity route permission.
In one embodiment, Hook Function refers to calling different node functions in the different phase of route handoff, this Embodiment uses this Hook Function of beforeEach, and beforeEach is a global before Hook Function, each road It requires to execute one time when by changing.Browser rs cache refers to that cookie, cookie are websites to distinguish user's body The data cached of local is arrived in part storage after encryption.The routing for jumping to initial page is intercepted by Hook Function first, by In initial page routing in include user user account, can be routed according to initial page in user account from browser or The identity of the corresponding user is determined in server, specifically, judged by the user account be in browser rs cache It is no that there are the identity of the corresponding user of the user account, if the identity of the user is not present in browser rs cache, The instruction for generating an acquisition identity is sent to server, and identity mark is returned after being passed through by server authentication user identity Know, by identity storage into browser rs cache, obtains the user of user from server according to the User Identity Information comprising user routes permission, user name and user's head portrait etc..
In one embodiment, as shown in figure 4, the step S110 further comprises the steps of: S114.
If being stored with the identity of the user in S114, browser rs cache, according to the identity from server The middle user for obtaining the user routes permission.
In one embodiment, if there are the identity of the user in browser rs cache, directly according to the body of the user Part mark obtains the permission of the user from server.The identity of user is only stored in local, without by user information Storage is to locally together, and each user logs in and obtains user information from server, to guarantee to use when user logs in every time Family information be all it is newest, avoid the occurrence of strange land have modified user information and before local read user information is modification Situation.
S120, the global routing table for receiving server return simultaneously meet the user road according to the global routing table generation By the routing table of permission.
In one embodiment, user, which logins successfully, is followed by receiving one that server returns global routing table, global routing table It routes permission with user to return together, global routing table refers to all routings of the page, which includes institute There is the routing of user right, is matched by the way that the user of the user is routed permission with the overall situation routing table, be determined for compliance with use The routing of family permission generates routing table.
In one embodiment, as shown in figure 5, the step S120 may include step: S121-S122.
S121, receive global routing table that server returns and by the user route permission and the global routing table into Row matching.
S122, the use is met according to the routing generation to match in the global routing table with user routing permission The routing table of family routing permission.
In one embodiment, receive server return global routing table after, according to the user right of the user with Global routing table is matched, and is found out in global routing table with the matched routing of the user right, the road that this part matches It is final that the user right is met according to the routing to match generation by routing accessible under the as user right of the user Routing table, for example, ordinary user, the user of ordinary user routes permission and is the absence of the routing of VIP account, then meeting common It is then all routings in global routing table other than the routing of VIP account that the user of user, which routes permission,.
S130, the routing table is converted to routing component and the routing component is added by routing manager dynamic.
In one embodiment, routing manager refers to that Router, Router realize routing function for managing routing component Energy.Since routing table is the data of string format, and routing manager management be structure of arrays component, it is therefore desirable to will The routing table is converted to routing component, then is added by routing manager dynamic.
In one embodiment, as shown in fig. 6, the step S130 may include step: S131-S132.
S131, the routing table is converted by traversing recursive mode and is encapsulated as routing component and by the routing component It stores in being locally stored.
In one embodiment, component refers to component, for encapsulating reusable code, encapsulates in routing component Meet the routing of the user right.It is locally stored and refers specifically to localStorage, localStorage is permanently to deposit Storage, in a browser, storing data is typically sized to 5M for storage, even if data still remain after browser is closed.Specifically Ground, due to common routing be it is multistage, it is nested layer by layer, it is therefore desirable to using recursive method is traversed, by the side transform Method traverses the conversion of each of recurrence routing table route implementing character string to component, it is ensured that conversion is realized in each routing Final encapsulation is at routing component, after obtaining routing component, then by routing component storage in being locally stored.Due to routing component It stores in localStorage, later user can call routing component when logging in directly from localStorage.
S132, the routing component is added by routing manager dynamic.
In one embodiment, after obtaining routing component, which is added by the addRoutes dynamic of routing manager Component specifically after routing component registration routing, calls routing manager to be added routing component, thus will routing Component is added in routing manager.Error handle routing would generally be jumped to when occurring abnormal, error handle routing is specific Refer to the routing of 404 pages, 404 pages are users when browsing webpage, and server can not normally provide information, or service Device can not be responded, and be unaware that the page that reason is returned.Therefore, it is also desirable to which mistake routing to be converted to the form of component, In When routing manager dynamic addition routing component in splicing, error handle routing is jumped to when the page occurs abnormal to realize The page.
S140, the routing component is rendered by render component to show side menu bar.
In one embodiment, render component refers specifically to element-ui, and element-ui is multilevel menu dynamic wash with watercolours The component of dye.Specifically, traversal routing component obtains the routing array of the user right, the side then rendered again by list Method carries out dynamic rendering, the final display for realizing side menu bar according to obtained routing array using v-for instruction.
The embodiment of the present invention illustrates a kind of dynamic routing processing method, if being obtained by detecting that user logins successfully The identity of the user simultaneously routes permission according to the user that the identity obtains the user from server;It receives The global routing table of server return simultaneously generates the routing table for meeting the user and routing permission according to the global routing table;It will The routing table is converted to routing component and adds the routing component by routing manager dynamic;By render component to institute It states routing component to be rendered to show side menu bar, by the way that different user's routing permissions is arranged different user can be weighed Routing in limit menu can be added voluntarily, route dynamically configurable.
Fig. 7 is a kind of schematic block diagram of dynamic routing processing unit provided in an embodiment of the present invention.As shown in fig. 7, right Ying Yu or more dynamic routing processing method, the present invention also provides a kind of dynamic routing processing units.The dynamic routing processing unit Including the unit for executing above-mentioned dynamic routing processing method, which can be configured in desktop computer, tablet computer, hand Mention computer, etc. in terminals.Specifically, referring to Fig. 7, the dynamic routing processing unit includes: acquiring unit 210, generation unit 220, adding unit 230 and rendering unit 240.
Acquiring unit 210, if obtaining the identity of the user and according to described for detecting that user logins successfully The user that identity obtains the user from server routes permission.
In one embodiment, as shown in figure 8, acquiring unit Unit 210 includes: judging unit 211, receiving unit 212 and first acquisition unit 213.
Whether judging unit 211 routes for being intercepted by Hook Function and judges to be stored in browser rs cache described The identity of user.
Receiving unit 212, if receiving server for the identity for having the user not stored in browser rs cache and returning The identity of the user returned simultaneously stores the identity into browser rs cache.
First acquisition unit 213, the user for obtaining the user from server according to the identity route Permission.
In one embodiment, as shown in figure 9, acquiring unit Unit 210 further include: second acquisition unit 214.
Second acquisition unit 214, if the identity for being stored with the user in browser rs cache, according to the body The user that part mark obtains the user from server routes permission.
Generation unit 220, for receiving the global routing table of server return and generating symbol according to the global routing table Close the routing table that the user routes permission.
In one embodiment, as shown in figure 8, generation unit Unit 220 includes: matching unit 221 and generates sub Unit 222.
Matching unit 221, for receive server return global routing table and by the user route permission with it is described Global routing table is matched.
Subelement 222 is generated, for routing the routing that permission matches with the user according in the global routing table It generates and meets the routing table that the user routes permission.
Adding unit 230, for the routing table to be converted to routing component and by routing manager dynamic addition institute State routing component.
In one embodiment, as shown in figure 8, adding unit Unit 230 includes: converting unit 231 and addition Unit 232.
Converting unit 231, for converting the routing table by the recursive mode of traversal and being encapsulated as routing component and general The routing component storage is in being locally stored.
Subelement 232 is added, for adding the routing component by routing manager dynamic.
Rendering unit 240, for being rendered to the routing component by render component to show side menu bar.
The embodiment of the present invention illustrates a kind of dynamic routing processing unit, if being obtained by detecting that user logins successfully The identity of the user simultaneously routes permission according to the user that the identity obtains the user from server;It receives The global routing table of server return simultaneously generates the routing table for meeting the user and routing permission according to the global routing table;It will The routing table is converted to routing component and adds the routing component by routing manager dynamic;By render component to institute Routing component is stated to be rendered to show side menu bar, it can be achieved that routing is dynamically configurable, in different user permission menu Routing can be added voluntarily, and the newly-increased routing page does not influence other routing pages.
It should be noted that it is apparent to those skilled in the art that, above-mentioned dynamic routing processing unit 200 and each unit specific implementation process, can with reference to the corresponding description in preceding method embodiment, for convenience of description and Succinctly, details are not described herein.
Above-mentioned dynamic routing processing unit can be implemented as a kind of form of computer program, which can be It is run in computer equipment as shown in Figure 10.
Referring to Fig. 10, Figure 10 is a kind of schematic block diagram of computer equipment provided by the embodiments of the present application.The calculating Machine equipment 500 can be terminal, wherein terminal can be smart phone, tablet computer, laptop, desktop computer, individual Digital assistants and wearable device etc. have the electronic equipment of communication function.
Refering to fig. 10, which includes processor 502, memory and the net connected by system bus 501 Network interface 505, wherein memory may include non-volatile memory medium 503 and built-in storage 504.
The non-volatile memory medium 503 can storage program area 5031 and computer program 5032.The computer program 5032 include program instruction, which is performed, and processor 502 may make to execute a kind of dynamic routing processing method.
The processor 502 is for providing calculating and control ability, to support the operation of entire computer equipment 500.
The built-in storage 504 provides environment for the operation of the computer program 5032 in non-volatile memory medium 503, should When computer program 5032 is executed by processor 502, processor 502 may make to execute a kind of dynamic routing processing method.
The network interface 505 is used to carry out network communication with other equipment.It will be understood by those skilled in the art that in Figure 10 The structure shown, only the block diagram of part-structure relevant to application scheme, does not constitute and is applied to application scheme The restriction of computer equipment 500 thereon, specific computer equipment 500 may include more more or fewer than as shown in the figure Component perhaps combines certain components or with different component layouts.
Wherein, the processor 502 is for running computer program 5032 stored in memory, to realize following step Rapid: if detecting, user is logined successfully, and is obtained the identity of the user and is obtained from server according to the identity The user of the user is taken to route permission;It receives the global routing table that server returns and symbol is generated according to the global routing table Close the routing table that the user routes permission;The routing table is converted into routing component and is added by routing manager dynamic The routing component;The routing component is rendered by render component to show side menu bar.
In one embodiment, processor 502 is in the realization identity for obtaining the user and according to the identity When the user that mark obtains the user from server routes permission step, it is implemented as follows step: passes through Hook Function It intercepts and routes and judge the identity for whether being stored with the user in browser rs cache;If not stored in browser rs cache have The identity of the user receives the identity for the user that server returns and stores the identity to clear In device of looking at caching;Permission is routed according to the user that the identity obtains the user from server.
In one embodiment, processor 502 is in the realization identity for obtaining the user and according to the identity When the user that mark obtains the user from server routes permission step, it is implemented as follows step: if browser rs cache In be stored with the identity of the user, power is routed according to the user that the identity obtains the user from server Limit.
In one embodiment, processor 502 is in the realization global routing table for receiving server return and according to described When global routing table generates the routing table step for meeting user's routing permission, it is implemented as follows step: receives server The global routing table of return simultaneously matches user routing permission with the global routing table;According to the global routing The routing that permission matches, which is routed, with the user in table generates the routing table for meeting the user and routing permission.
In one embodiment, the routing table described be converted to routing component and pass through routing realizing by processor 502 When manager dynamic adds the routing component step, it is implemented as follows step: being converted by the recursive mode of traversal described Routing table and be encapsulated as routing component and by the routing component storage in being locally stored;It is added by routing manager dynamic The routing component.
It should be appreciated that in the embodiment of the present application, processor 502 can be central processing unit (Central Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic Device, discrete gate or transistor logic, discrete hardware components etc..Wherein, general processor can be microprocessor or Person's processor is also possible to any conventional processor etc..
Those of ordinary skill in the art will appreciate that be realize above-described embodiment method in all or part of the process, It is that relevant hardware can be instructed to complete by computer program.The computer program includes program instruction, computer journey Sequence can be stored in a storage medium, which is computer readable storage medium.The program instruction is by the department of computer science At least one processor in system executes, to realize the process step of the embodiment of the above method.
Therefore, the present invention also provides a kind of storage mediums.The storage medium can be computer readable storage medium.This is deposited Storage media is stored with computer program, and wherein computer program includes program instruction.The program instruction makes when being executed by processor Processor executes following steps: if detecting, user is logined successfully, and obtains the identity of the user and according to the identity The user that mark obtains the user from server routes permission;Receive the global routing table that server returns and according to described Global routing table, which generates, meets the routing table that the user routes permission;The routing table is converted into routing component and passes through road The routing component is added by manager dynamic;The routing component is rendered by render component to show side menu Column.
In one embodiment, the processor realizes the identity for obtaining the user executing described program instruction When identifying and routing permission step according to the user that the identity obtains the user from server, it is implemented as follows Step: it is intercepted by Hook Function and routes and judge the identity for whether being stored with the user in browser rs cache;If clear The not stored identity for having the user in device of looking at caching receives the identity for the user that server returns and by institute Identity storage is stated into browser rs cache;User's routing of the user is obtained from server according to the identity Permission.
In one embodiment, the processor realizes the identity for obtaining the user executing described program instruction When identifying and routing permission step according to the user that the identity obtains the user from server, it is implemented as follows Step: if being stored with the identity of the user in browser rs cache, institute is obtained from server according to the identity The user for stating user routes permission.
In one embodiment, the processor realizes the complete of the reception server return executing described program instruction Office's routing table simultaneously generates when meeting the user and routing the routing table step of permission according to the global routing table, and specific implementation is such as Lower step: the user is simultaneously routed permission and the global routing table progress by the global routing table of reception server return Match;Meet user's routing permission according to the routing generation that permission matches is routed in the global routing table with the user Routing table.
In one embodiment, the processor is realized and described is converted to the routing table executing described program instruction Routing component and by routing manager dynamic add the routing component step when, be implemented as follows step: passing through traversal Recursive mode converts the routing table and is encapsulated as routing component and by routing component storage in being locally stored;Pass through Routing manager dynamic adds the routing component.
The storage medium can be USB flash disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), magnetic disk Or the various computer readable storage mediums that can store program code such as CD.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware With the interchangeability of software, each exemplary composition and step are generally described according to function in the above description.This A little functions are implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Specially Industry technical staff can use different methods to achieve the described function each specific application, but this realization is not It is considered as beyond the scope of this invention.
In several embodiments provided by the present invention, it should be understood that disclosed device and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary.For example, the division of each unit, only Only a kind of logical function partition, there may be another division manner in actual implementation.Such as multiple units or components can be tied Another system is closed or is desirably integrated into, or some features can be ignored or not executed.
The steps in the embodiment of the present invention can be sequentially adjusted, merged and deleted according to actual needs.This hair Unit in bright embodiment device can be combined, divided and deleted according to actual needs.In addition, in each implementation of the present invention Each functional unit in example can integrate in one processing unit, is also possible to each unit and physically exists alone, can also be with It is that two or more units are integrated in one unit.
If the integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product, It can store in one storage medium.Based on this understanding, technical solution of the present invention is substantially in other words to existing skill The all or part of part or the technical solution that art contributes can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, terminal or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in various equivalent modifications or replace It changes, these modifications or substitutions should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with right It is required that protection scope subject to.

Claims (10)

1. a kind of dynamic routing processing method characterized by comprising
If detecting, user is logined successfully, and is obtained the identity of the user and is obtained from server according to the identity The user of the user is taken to route permission;
It receives the global routing table that server returns and is generated according to the global routing table and meet user's routing permission Routing table;
The routing table is converted into routing component and the routing component is added by routing manager dynamic;
The routing component is rendered by render component to show side menu bar.
2. dynamic routing processing method according to claim 1, which is characterized in that the identity mark for obtaining the user Know and permission routed according to the user that the identity obtains the user from server, comprising:
It is intercepted by Hook Function and routes and judge the identity for whether being stored with the user in browser rs cache;
If the not stored identity for having the user in browser rs cache, the identity mark for the user that server returns is received Know and by identity storage into browser rs cache;
Permission is routed according to the user that the identity obtains the user from server.
3. dynamic routing processing method according to claim 2, which is characterized in that the identity mark for obtaining the user Know and permission routed according to the user that the identity obtains the user from server, further includes:
If being stored with the identity of the user in browser rs cache, obtained from server according to the identity described in The user of user routes permission.
4. dynamic routing processing method according to claim 1, which is characterized in that the overall situation for receiving server and returning Routing table simultaneously generates the routing table for meeting the user and routing permission according to the global routing table, comprising:
It receives the global routing table that server returns and the user is routed into permission and matched with the global routing table;
Meet user's routing power according to the routing generation that permission matches is routed in the global routing table with the user The routing table of limit.
5. dynamic routing processing method according to claim 1, which is characterized in that described that the routing table is converted to road The routing component is added by component and by routing manager dynamic, comprising:
The routing table is converted by the recursive mode of traversal and is encapsulated as routing component and by routing component storage to originally In ground storage;
The routing component is added by routing manager dynamic.
6. a kind of dynamic routing processing unit characterized by comprising
Acquiring unit, if obtaining the identity of the user and according to the identity mark for detecting that user logins successfully Know user's routing permission that the user is obtained from server;
Generation unit, for receiving the global routing table of server return and meeting the use according to the global routing table generation The routing table of family routing permission;
Adding unit, for the routing table to be converted to routing component and adds the group of routes by routing manager dynamic Part;
Rendering unit, for being rendered to the routing component by render component to show side menu bar.
7. dynamic routing processing unit according to claim 6, which is characterized in that the generation unit includes:
Matching unit, for receiving the global routing table of server return and the user being routed permission and the global routing Table is matched;
Subelement is generated, for meeting according to the routing generation to match in the global routing table with user routing permission The user routes the routing table of permission.
8. dynamic routing processing unit according to claim 6, which is characterized in that the adding unit, comprising:
Converting unit, for converting the routing table by traversing recursive mode and being encapsulated as routing component and by the routing Component is stored in being locally stored;
Subelement is added, for adding the routing component by routing manager dynamic.
9. a kind of computer equipment, which is characterized in that the computer equipment includes memory and processor, on the memory It is stored with computer program, the processor is realized as described in any one of claim 1-5 when executing the computer program Method.
10. a kind of computer readable storage medium, which is characterized in that the storage medium is stored with computer program, the meter Calculation machine program can realize method according to any one of claims 1 to 5 when being executed by a processor.
CN201910672323.8A 2019-07-24 2019-07-24 Dynamic routing processing method, device, computer equipment and storage medium Pending CN110535774A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910672323.8A CN110535774A (en) 2019-07-24 2019-07-24 Dynamic routing processing method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910672323.8A CN110535774A (en) 2019-07-24 2019-07-24 Dynamic routing processing method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110535774A true CN110535774A (en) 2019-12-03

Family

ID=68661293

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910672323.8A Pending CN110535774A (en) 2019-07-24 2019-07-24 Dynamic routing processing method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110535774A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110888731A (en) * 2019-12-09 2020-03-17 北京博睿宏远数据科技股份有限公司 Route data acquisition method, device, equipment and storage medium
CN111443908A (en) * 2020-03-19 2020-07-24 深圳市震有软件科技有限公司 vue method, device, equipment and medium for realizing route interaction of multiple independent pages
CN111459566A (en) * 2020-03-10 2020-07-28 中国平安人寿保险股份有限公司 Authority verification-based route loading method and related equipment
CN111563215A (en) * 2020-07-16 2020-08-21 平安国际智慧城市科技股份有限公司 Method and device for controlling front-end operation authority and related equipment
CN111783050A (en) * 2020-07-02 2020-10-16 浪潮云信息技术股份公司 Role and authority control system of website user
CN112615923A (en) * 2020-12-21 2021-04-06 北京鸿盈信息技术有限公司 Single-page application page display control method and device, terminal equipment and server
CN113254100A (en) * 2021-05-25 2021-08-13 四川虹魔方网络科技有限公司 Vue-based multi-level routing dynamic loading implementation method
CN113918263A (en) * 2021-11-11 2022-01-11 盐城金堤科技有限公司 Virtual routing method, device and equipment of view component and computer storage medium
CN115344259A (en) * 2022-08-26 2022-11-15 山东浪潮爱购云链信息科技有限公司 Dynamic menu generation method and equipment based on Vue

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294594A (en) * 2016-07-29 2017-01-04 东软集团股份有限公司 Page rendering method and device
CN106911687A (en) * 2017-02-20 2017-06-30 深圳国泰安教育技术股份有限公司 A kind of page makeup control method and device
CN109376316A (en) * 2018-11-05 2019-02-22 珠海格力电器股份有限公司 Method, system and the server of dynamically load routing
CN109784033A (en) * 2018-12-13 2019-05-21 平安科技(深圳)有限公司 Operating right Dynamic Configuration and relevant device based on page menus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294594A (en) * 2016-07-29 2017-01-04 东软集团股份有限公司 Page rendering method and device
CN106911687A (en) * 2017-02-20 2017-06-30 深圳国泰安教育技术股份有限公司 A kind of page makeup control method and device
CN109376316A (en) * 2018-11-05 2019-02-22 珠海格力电器股份有限公司 Method, system and the server of dynamically load routing
CN109784033A (en) * 2018-12-13 2019-05-21 平安科技(深圳)有限公司 Operating right Dynamic Configuration and relevant device based on page menus

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HESHUAICSDN: "vue router.beforeEach(),详解", 《CSDN博客(URL:HTTPS://BLOG.CSDN.NET/HESHUAICSDN/ARTICLE/DETAILS/88020796)》 *
让时光到此为止: "vue+elementUI树形菜单的递归组件", 《CSDN博客(URL:HTTPS://BLOG.CSDN.NET/QQ_35257117/ARTICLE/DETAILS/89636044)》 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110888731B (en) * 2019-12-09 2023-07-07 北京博睿宏远数据科技股份有限公司 Method, device, equipment and storage medium for acquiring route data
CN110888731A (en) * 2019-12-09 2020-03-17 北京博睿宏远数据科技股份有限公司 Route data acquisition method, device, equipment and storage medium
CN111459566A (en) * 2020-03-10 2020-07-28 中国平安人寿保险股份有限公司 Authority verification-based route loading method and related equipment
CN111443908A (en) * 2020-03-19 2020-07-24 深圳市震有软件科技有限公司 vue method, device, equipment and medium for realizing route interaction of multiple independent pages
CN111443908B (en) * 2020-03-19 2024-01-02 深圳市震有软件科技有限公司 Method, device, equipment and medium for realizing route interaction of vue multiple independent pages
CN111783050A (en) * 2020-07-02 2020-10-16 浪潮云信息技术股份公司 Role and authority control system of website user
CN111563215A (en) * 2020-07-16 2020-08-21 平安国际智慧城市科技股份有限公司 Method and device for controlling front-end operation authority and related equipment
CN112615923B (en) * 2020-12-21 2023-07-28 三六零科技集团有限公司 Single-page application page display control method and device, terminal equipment and server
CN112615923A (en) * 2020-12-21 2021-04-06 北京鸿盈信息技术有限公司 Single-page application page display control method and device, terminal equipment and server
CN113254100A (en) * 2021-05-25 2021-08-13 四川虹魔方网络科技有限公司 Vue-based multi-level routing dynamic loading implementation method
CN113254100B (en) * 2021-05-25 2023-08-01 四川虹魔方网络科技有限公司 Method for realizing dynamic loading of multistage route based on Vue
CN113918263A (en) * 2021-11-11 2022-01-11 盐城金堤科技有限公司 Virtual routing method, device and equipment of view component and computer storage medium
CN113918263B (en) * 2021-11-11 2023-09-05 盐城天眼察微科技有限公司 Virtual routing method, device and equipment of view component and computer storage medium
CN115344259A (en) * 2022-08-26 2022-11-15 山东浪潮爱购云链信息科技有限公司 Dynamic menu generation method and equipment based on Vue

Similar Documents

Publication Publication Date Title
CN110535774A (en) Dynamic routing processing method, device, computer equipment and storage medium
US11184241B2 (en) Topology-aware continuous evaluation of microservice-based applications
US11048620B2 (en) Distributed system test device
US10942708B2 (en) Generating web API specification from online documentation
CN110286897A (en) API Visual Dynamic configuration method, device, equipment and storage medium
US10528675B2 (en) Context-aware translation memory to facilitate more accurate translation
KR102024694B1 (en) Decentralized service platform using multiple service nodes based on block chain
CN108809956A (en) Method for authenticating, access request retransmission method based on micro services and device, system
US8402319B2 (en) Method and system to extract a navigation model for analysis of a web application
CN112154420B (en) Automatic intelligent cloud service testing tool
US11720742B2 (en) Detecting webpages that share malicious content
US20190251019A1 (en) Testing web applications using clusters
CN114008994A (en) Network server request identification
CN109981664A (en) Website logging method, device and the realization device of page end
CN103942055A (en) Development system and method for fusion network mixing service process programming language
CN106034138A (en) Remote service calling method and remote service calling device
CN107465722A (en) The implementation method and device of web access
CN109684008A (en) Card rendering method, device, terminal and computer readable storage medium
CN110532107A (en) Interface call method, device, computer equipment and storage medium
CN109857391A (en) Processing method and processing device, storage medium and the electronic device of data
CN108762809A (en) Software function extended method, device, computer equipment and storage medium
CN104980511B (en) A kind of game data access method, system and game web page server
US20210173728A1 (en) Rest application programming interface route modeling
US10896094B2 (en) Automated failover of data traffic routes for network-based applications
CN103853580A (en) Methods and systems for conditionally refreshing workarea user interfaces

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20191203

RJ01 Rejection of invention patent application after publication