Nothing Special   »   [go: up one dir, main page]

CN110362986A - A kind of wechat small routine automatic logging method and storage equipment - Google Patents

A kind of wechat small routine automatic logging method and storage equipment Download PDF

Info

Publication number
CN110362986A
CN110362986A CN201910644241.2A CN201910644241A CN110362986A CN 110362986 A CN110362986 A CN 110362986A CN 201910644241 A CN201910644241 A CN 201910644241A CN 110362986 A CN110362986 A CN 110362986A
Authority
CN
China
Prior art keywords
token
developer
server
login
interface
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
CN201910644241.2A
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.)
Fuzhou Fuzhen Network Technology Co Ltd
Original Assignee
Fuzhou Fuzhen Network Technology 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 Fuzhou Fuzhen Network Technology Co Ltd filed Critical Fuzhou Fuzhen Network Technology Co Ltd
Priority to CN201910644241.2A priority Critical patent/CN110362986A/en
Publication of CN110362986A publication Critical patent/CN110362986A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/45Structures or tools for the administration of authentication

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present invention relates to field of computer technology, in particular to a kind of wechat small routine automatic logging method and storage equipment.A kind of wechat small routine automatic logging method, comprising steps of obtaining front end logs in state, judge that token whether there is, if the token exists, judge whether the token is expired, if the token is expired, wx.login () is called automatically and developer's server-side is called by passback parameter;Developer's server-side returns to token and pulls back to the interface of current request, and continues earlier data interface calling, completes user and logs in.The application rear end can then call wx.login () automatically and call developer's server-side by passback parameter, developer's server-side returns to token and pulls back to the interface of current request, and continues earlier data interface calling when detecting that token is expired.To the intuitional and experiential thinking of user it is then to be done directly login on interface, goes to log on again manually without oneself, substantially improve the interactive experience of user.

Description

A kind of wechat small routine automatic logging method and storage equipment
Technical field
The present invention relates to field of computer technology, in particular to a kind of wechat small routine automatic logging method and storage are set It is standby.
Background technique
In the prior art, into wechat small routine, typically calling wx.login () obtains temporary login voucher code, And passing back to developer's server, server-side returns to the subsequent interface of token by transmitting call parameter token request, but because There is validity period for token, therefore be more than then to need to re-request login validity period, the requirements of process of login opens login page again It allows user to click to log in, the interactive experience of user is poor.
Summary of the invention
It is more than to have to solve token in the prior art for this reason, it may be necessary to provide a kind of wechat small routine automatic logging method The effect phase needs to re-request login, the problem of user-interaction experience difference.Specific technical solution is as follows:
A kind of wechat small routine automatic logging method judges that token whether there is comprising steps of obtaining front end logs in state, If the token exists, judge whether the token is expired, if the token is expired, calls wx.login () automatically and lead to It crosses passback parameter and calls developer's server-side;Developer's server-side returns to token and pulls back to the interface of current request, and continues Earlier data interface calls, and completes user and logs in.
Further, described " call wx.login () automatically and call developer's server-side by passback parameter ", also wraps It includes step: calling wx.login () to obtain code automatically, wx.getUserInfo () is called to obtain encryptedData iv rawData signature;And developer is called by code and encryptedData iv rawData signature Server-side.
It is further, described that " developer's server-side returns to token and pulls back to the interface of current request, and continues front Data-interface calls ", it further comprises the steps of: developer's server-side and obtains token, and transmit newest acquisition by way of parameter Token completes the request of current interface to the interface of current request.
Further, it further comprises the steps of: and obtains front end login state, judge that token whether there is, if the token is not deposited It is then jumping to login page prompt user and is logging in.
In order to solve the above technical problems, additionally providing a kind of storage equipment, specific technical solution is as follows:
A kind of storage equipment, wherein being stored with instruction set, described instruction collection is for executing: obtaining front end and logs in state, judgement Token whether there is, if the token exists, judge whether the token is expired, automatic to call if the token is expired Wx.login () simultaneously calls developer's server-side by passback parameter;Developer's server-side returns to token and pulls back to and currently asks The interface asked, and continue earlier data interface calling, it completes user and logs in.
Further, described instruction collection is also used to execute: described " to call wx.login () automatically and by passback parameter tune With developer's server-side ", it further comprises the steps of: automatic calling wx.login () and obtains code, wx.getUserInfo () is called to obtain Take encryptedData iv rawData signature;And pass through code and encryptedData iv rawData Signature calls developer's server-side.
Further, described instruction collection is also used to execute: described " developer's server-side returns to token and pulls back to current The interface of request, and continue earlier data interface calling ", it further comprises the steps of: developer's server-side and obtains token, and pass through ginseng Several forms transmits the token of newest acquisition to the interface of current request, completes the request of current interface.
Further, described instruction collection is also used to execute: obtaining front end and logs in state, judges that token whether there is, if described Token is not present, then jumps to login page prompt user and log in.
The beneficial effects of the present invention are: logging in state by obtaining front end, judge that token whether there is, if the token is deposited Then illustrating user not and be to log in for the first time, then continuing to judge the token, whether expired (i.e. whether the token of local cache It is expired), if the token is expired, wx.login () is called automatically and developer's server-side is called by passback parameter;Exploitation Person's server-side returns to token and pulls back to the interface of current request, and continues earlier data interface calling, completes user and logs in. In the prior art, if the token is expired, it will pop up login page and user allowed to log on, and the application rear end is being detected When expired to token, then wx.login () can be called automatically and developer's server-side, developer's clothes are called by passback parameter Business end returns to token and pulls back to the interface of current request, and continues earlier data interface calling.To the straight of user on interface Seeing experience is then to be done directly login, goes to log on again manually without oneself, substantially improves the interactive experience of user.
Detailed description of the invention
Fig. 1 is a kind of flow chart of wechat small routine automatic logging method described in specific embodiment;
Fig. 2 is a kind of module diagram for storing equipment described in specific embodiment.
Description of symbols:
200, equipment is stored.
Specific embodiment
Technology contents, construction feature, the objects and the effects for detailed description technical solution, below in conjunction with specific reality It applies example and attached drawing is cooperated to be explained in detail.
Referring to Fig. 1, in the present embodiment, a kind of wechat small routine automatic logging method can be applicable to a kind of storage and set Standby upper, the storage equipment includes but is not limited to: personal computer, server, general purpose computer, special purpose computer, network are set Standby, embedded device, programmable device, intelligent mobile terminal, smart home device etc..
Explanation is unfolded to a kind of specific embodiment of wechat small routine automatic logging method below:
Step S101: it obtains front end and logs in state.
Step S102: do you judge that token whether there is?
Step S103: whether the token expired?
Step S104: calling wx.login () automatically and calls developer's server-side by passback parameter.
Step S105: developer's server-side returns to token and pulls back to the interface of current request, and continues earlier data and connect Mouth calls, and completes user and logs in.
State is logged in by obtaining front end, judges that token whether there is, if the token exists, illustrates user not and be the It is primary to log in, then continue to judge whether the token is expired (i.e. whether the token of local cache is expired), if the token mistake Phase calls wx.login () automatically and calls developer's server-side by passback parameter;Developer's server-side returns to token simultaneously The interface of current request is pulled back to, and continues earlier data interface calling, user is completed and logs in.In the prior art, if it is described Token is expired, then will pop up login page and user is allowed to log on, and the application rear end then can when detecting that token is expired Automatic to call wx.login () and call developer's server-side by passback parameter, developer's server-side returns to token and adjusts back To the interface of current request, and continue earlier data interface calling.It is then done directly on interface to the intuitional and experiential thinking of user It logs in, goes to log on again manually without oneself, substantially improve the interactive experience of user.
Above-mentioned steps specifically can be used such as under type:
User clicks any one wechat small routine, and system can go to obtain front end login state automatically, judges whether token deposits (whether there is token i.e. in local cache), it should be noted that if user is to log in for the first time, locally slow It is that can jump to login page prompt user at this time and log in (i.e. user first log into) there is no corresponding token in depositing.
And if token exists, this when if, can further go to judge whether the token is expired, local cache Token has a validity period, and shorter, if the token is expired, rear end executes step S104 and step automatically at this time S105.
Wherein step S104 is further comprised the steps of:
It is automatic that wx.login () is called to obtain code, call wx.getUserInfo () to obtain encryptedData iv rawData signature;
And developer's server-side is called by code and encryptedData iv rawData signature.
Step S105 is further comprised the steps of:
Developer's server-side obtains token, and transmits by way of parameter the token of newest acquisition to current request Interface completes the request of current interface.
Whole process absolutely not embodies on interface for a user, and the intuitional and experiential thinking of user is then directly to step on In record, therefore substantially improve the interactive experience of user.
Referring to Fig. 2, in the present embodiment, a kind of specific embodiment storing equipment 200 is as follows:
A kind of storage equipment 200, wherein being stored with instruction set, described instruction collection is for executing: obtaining front end and logs in state, sentences Disconnected token whether there is, if the token exists, judge whether the token is expired, automatic to adjust if the token is expired Developer's server-side is called with wx.login () and by passback parameter;Developer's server-side returns to token and pulls back to current The interface of request, and continue earlier data interface calling, it completes user and logs in.Specifically it can be used such as under type:
User clicks any one wechat small routine, and system can go to obtain front end login state automatically, judges whether token deposits (whether there is token i.e. in local cache), it should be noted that if user is to log in for the first time, locally slow It is that can jump to login page prompt user at this time and log in (i.e. user first log into) there is no corresponding token in depositing.
And if token exists, this when if, can further go to judge whether the token is expired, local cache Token has a validity period, and shorter, if the token is expired, further, described instruction collection is also used to hold Row: described " call wx.login () automatically and call developer's server-side by passback parameter " further comprises the steps of: automatic tune Code is obtained with wx.login (), wx.getUserInfo () is called to obtain encryptedData iv rawData signature;And developer's server-side is called by code and encryptedData iv rawData signature.
Further, described instruction collection is also used to execute: described " developer's server-side returns to token and pulls back to current The interface of request, and continue earlier data interface calling ", it further comprises the steps of: developer's server-side and obtains token, and pass through ginseng Several forms transmits the token of newest acquisition to the interface of current request, completes the request of current interface.
Further, described instruction collection is also used to execute: obtaining front end and logs in state, judges that token whether there is, if described Token is not present, then jumps to login page prompt user and log in.Token if it does not exist, then shows that this is the first time of user It logs in, is logged in so needing to jump to login page prompt user.
It is executed by the instruction set in storage equipment 200: obtaining front end and log in state, judge that token whether there is, if described Token exists, then illustrates user not and be to log in for the first time, then continues to judge whether the token is expired (i.e. local cache Whether token is expired), if the token is expired, wx.login () is called automatically and developer's clothes are called by passback parameter Business end;Developer's server-side returns to token and pulls back to the interface of current request, and continues earlier data interface calling, completes User logs in.In the prior art, if the token is expired, it will pop up login page and user allowed to log on, and after the application End can then call wx.login () automatically and call developer's server-side by passback parameter when detecting that token is expired, Developer's server-side returns to token and pulls back to the interface of current request, and continues earlier data interface calling.It is given on interface The intuitional and experiential thinking of user is then to be done directly login, goes to log on again manually without oneself, substantially improves the interaction body of user It tests.
It should be noted that being not intended to limit although the various embodiments described above have been described herein Scope of patent protection of the invention.Therefore, it based on innovative idea of the invention, change that embodiment described herein is carried out and is repaired Change, or using equivalent structure or equivalent flow shift made by description of the invention and accompanying drawing content, it directly or indirectly will be with Upper technical solution is used in other related technical areas, is included within scope of patent protection of the invention.

Claims (8)

1. a kind of wechat small routine automatic logging method, which is characterized in that comprising steps of
It obtains front end and logs in state, judge that token whether there is, if the token exists, judge whether the token is expired, if The token is expired, calls wx.login () automatically and calls developer's server-side by passback parameter;
Developer's server-side returns to token and pulls back to the interface of current request, and continues earlier data interface calling, completes to use Family logs in.
2. a kind of wechat small routine automatic logging method according to claim 1, which is characterized in that
Described " call wx.login () automatically and call developer's server-side by passback parameter ", further comprises the steps of:
It is automatic that wx.login () is called to obtain code, call wx.getUserInfo () to obtain encryptedData iv rawData signature;
And developer's server-side is called by code and encryptedData iv rawData signature.
3. a kind of wechat small routine automatic logging method according to claim 1, which is characterized in that
" developer's server-side returns to token and pulls back to the interface of current request, and continues earlier data interface calling ", It further comprises the steps of:
Developer's server-side obtains token, and token the connecing to current request of newest acquisition is transmitted by way of parameter Mouthful, complete the request of current interface.
4. a kind of wechat small routine automatic logging method according to claim 1, which is characterized in that further comprise the steps of:
It obtains front end and logs in state, judge that token whether there is, if the token is not present, jumps to login page prompt and use Family logs in.
5. a kind of storage equipment, wherein being stored with instruction set, which is characterized in that described instruction collection is for executing:
It obtains front end and logs in state, judge that token whether there is, if the token exists, judge whether the token is expired, if The token is expired, calls wx.login () automatically and calls developer's server-side by passback parameter;
Developer's server-side returns to token and pulls back to the interface of current request, and continues earlier data interface calling, completes to use Family logs in.
6. a kind of storage equipment according to claim 5, which is characterized in that described instruction collection is also used to execute:
Described " call wx.login () automatically and call developer's server-side by passback parameter ", further comprises the steps of:
It is automatic that wx.login () is called to obtain code, call wx.getUserInfo () to obtain encryptedData iv rawData signature;
And developer's server-side is called by code and encryptedData iv rawData signature.
7. a kind of storage equipment according to claim 5, which is characterized in that described instruction collection is also used to execute:
" developer's server-side returns to token and pulls back to the interface of current request, and continues earlier data interface calling ", It further comprises the steps of:
Developer's server-side obtains token, and token the connecing to current request of newest acquisition is transmitted by way of parameter Mouthful, complete the request of current interface.
8. a kind of storage equipment according to claim 5, which is characterized in that described instruction collection is also used to execute:
It obtains front end and logs in state, judge that token whether there is, if the token is not present, jumps to login page prompt and use Family logs in.
CN201910644241.2A 2019-07-17 2019-07-17 A kind of wechat small routine automatic logging method and storage equipment Pending CN110362986A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910644241.2A CN110362986A (en) 2019-07-17 2019-07-17 A kind of wechat small routine automatic logging method and storage equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910644241.2A CN110362986A (en) 2019-07-17 2019-07-17 A kind of wechat small routine automatic logging method and storage equipment

Publications (1)

Publication Number Publication Date
CN110362986A true CN110362986A (en) 2019-10-22

Family

ID=68219919

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910644241.2A Pending CN110362986A (en) 2019-07-17 2019-07-17 A kind of wechat small routine automatic logging method and storage equipment

Country Status (1)

Country Link
CN (1) CN110362986A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968856A (en) * 2019-12-12 2020-04-07 百度国际科技(深圳)有限公司 Login method, login device, electronic equipment and storage medium
CN111245825A (en) * 2020-01-09 2020-06-05 百度在线网络技术(北京)有限公司 Applet login method, server and electronic device
CN111258602A (en) * 2020-01-10 2020-06-09 百度在线网络技术(北京)有限公司 Information updating method and device
CN111371787A (en) * 2020-03-04 2020-07-03 广州市百果园信息技术有限公司 Login registration method, device, system, server and medium for middle station service
CN112543194A (en) * 2020-12-03 2021-03-23 武汉联影医疗科技有限公司 Mobile terminal login method and device, computer equipment and storage medium
CN113535205A (en) * 2021-07-22 2021-10-22 浪潮云信息技术股份公司 WEB component token timing update implementation method and system based on NIFI interface

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109635528A (en) * 2018-10-31 2019-04-16 武汉艺果互动科技股份有限公司 A kind of wechat small routine user log-in method, equipment and storage equipment
CN109768961A (en) * 2018-12-12 2019-05-17 平安科技(深圳)有限公司 Wechat small routine login method, device and the storage medium led to based on an account

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109635528A (en) * 2018-10-31 2019-04-16 武汉艺果互动科技股份有限公司 A kind of wechat small routine user log-in method, equipment and storage equipment
CN109768961A (en) * 2018-12-12 2019-05-17 平安科技(深圳)有限公司 Wechat small routine login method, device and the storage medium led to based on an account

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968856A (en) * 2019-12-12 2020-04-07 百度国际科技(深圳)有限公司 Login method, login device, electronic equipment and storage medium
CN110968856B (en) * 2019-12-12 2022-05-03 百度国际科技(深圳)有限公司 Login method, login device, electronic equipment and storage medium
CN111245825A (en) * 2020-01-09 2020-06-05 百度在线网络技术(北京)有限公司 Applet login method, server and electronic device
CN111245825B (en) * 2020-01-09 2022-05-10 百度在线网络技术(北京)有限公司 Applet login method, server and electronic device
CN111258602A (en) * 2020-01-10 2020-06-09 百度在线网络技术(北京)有限公司 Information updating method and device
CN111258602B (en) * 2020-01-10 2023-06-30 百度在线网络技术(北京)有限公司 Information updating method and device
CN111371787A (en) * 2020-03-04 2020-07-03 广州市百果园信息技术有限公司 Login registration method, device, system, server and medium for middle station service
CN112543194A (en) * 2020-12-03 2021-03-23 武汉联影医疗科技有限公司 Mobile terminal login method and device, computer equipment and storage medium
CN113535205A (en) * 2021-07-22 2021-10-22 浪潮云信息技术股份公司 WEB component token timing update implementation method and system based on NIFI interface

Similar Documents

Publication Publication Date Title
CN110362986A (en) A kind of wechat small routine automatic logging method and storage equipment
US10878421B2 (en) Data verified deposits
CN105389222B (en) A kind of methods, devices and systems of dynamic call native interface
CN104821954B (en) A kind of cross-platform remote procedure calling (PRC) method
CN108721898B (en) Frame rate determination method and apparatus, storage medium, and electronic apparatus
CN104967644B (en) Information push method, apparatus and system
CN110276041A (en) A kind of web data acquisition methods and system based on Google's browser plug-in
CN108228282A (en) For the method and device of Website page loading
CN106598924A (en) Form generation method and device
US20210337015A1 (en) Method and system of application development for multiple device client platforms
CN108563571A (en) Software interface test approach and system, computer readable storage medium, terminal
CN108683718A (en) Method, apparatus, electronic equipment and the storage medium that data increment synchronizes
CN110244940A (en) Optimize the method and web front-end project structure of web application system development
CN108763056A (en) A kind of automatic test bullet frame processing method and terminal
CN109684210A (en) A kind of website automation test method, device, equipment and readable storage medium storing program for executing
CN106921704A (en) Tax-control terminal Internet of Things network control method and system
CN106598682A (en) Component upgrading method and device
CN109754234A (en) A kind of polymerization method of payment and device
CN109670807A (en) It withholds control method, device, equipment and readable storage medium storing program for executing
CN107222524B (en) Open type application service integration framework
CN105959179A (en) Reverse proxy nginx testing system and method
CN105095220B (en) A kind of browser implementation method, terminal and virtualization agent device
CN107480117A (en) Automate the restoration methods and device of page table list data
CN104008137B (en) A kind of cross-system data coupling system for operation flow
CN105009115B (en) The method and apparatus for obtaining Internet resources

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20191022