1. Access https://login.taobao.com/member/login.jhtml;
2. Check the source code of the webpage in step 1 and see the following js code:
getQRCodeURL: "https://qrlogin.taobao.com/qrcodelogin/generateQRCode4Login.do"
Visit this link to get the following JSON format:
{"success":true,"message":"null","url":"//img.alicdn.com/tfscom/TB14G24fwrewrwerXXaAaXXXwu0bFXXX.png","lgToken":"a9fafdfdsfrtrhhfhghf8ea555d35040","adToken":" 9369101953aabff10682653ee8de6644"}
The URL is the QR code image, and the lgToken is the token that needs to be used later.
3. The source code of the web page in step 1 also has the following js code:
checkQRCodeURL: "https://qrlogin.taobao.com/qrcodelogin/qrcodeLoginCheck.do"
This link is used to check the status of the mobile phone scanning code, and the Taobao page has done a regular check
Add an lgToken, such as https://qrlogin.taobao.com/qrcodelogin/qrcodeLoginCheck.do?lgToken=8b600fe974464fsafds1f3f2eedb4a4578223&defaulturl=https%3A%2F%2Fwww.taobao.com%2F, when accessing
The following results can be obtained:
Wait for code scanning {"code":"10000","message":"login start state","success":true}
Scan code successfully {"code":"10001","message":"mobile scan QRCode success","success":true}
QR code expired {"code":"10004","message":"QRCode expired!code=1, msg=data not exist","success":true}
Confirm login { "code":"10006","success":true,"url": "https://login.taobao.com/member/loginByIm.do?uid=cntaobaolfmsfsefeererer2006&token=3c332d995fsdfdfdsfdffddfsf0876db48e65bca&time=1465969717441&asker=qrcodelogin&ask_version=1.0.0&defaulturl=https%3A%2F%2Fwww.taobao.com%2F&webpas=2db92b47591f2bba375377ea867405a01607923077"}
4. If step 3 gives you a status of "Confirm Login", you can log in by accessing the URL.
5. Strange problem: The customer reported that the scanning code login failed, but the direct scanning code to Taobao was successful, so he looked for the problem, found that it was a bug caused by the IE cache, and finally added a time random number to each request. |