闪购店获取手机号

This commit is contained in:
Lenovo 2024-08-08 15:49:00 +08:00
parent e2d83247f6
commit 0f2b88f86f
1 changed files with 7 additions and 2 deletions

View File

@ -107,7 +107,7 @@ document.addEventListener("mouseup", function(e) {
}
if (location.host === 'shangoue.meituan.com') {
var cookies = document.cookie
var systype
var phone = localStorage.getItem('phone')
var username
var result = window.prompt('请输入需要绑定的系统登录账户', '')
username = result
@ -118,7 +118,12 @@ document.addEventListener("mouseup", function(e) {
xhr.open('POST', 'https://youshi.bj.cn/prod-api/mt/cookies', true)
//xhr.open('POST', 'http://localhost/dev-api/mt/cookies', true)
xhr.setRequestHeader("Content-Type","application/json")
var sendData = {'bingType': 1, 'cookie': cookies, 'userName': username, 'account': null, 'password': null, 'wmPoiName': wmPoiName}
var sendData
if (phone !== null && phone !== 'null') {
sendData = {'bingType': 1, 'cookie': cookies, 'userName': username, 'account': phone, 'password': null, 'wmPoiName': wmPoiName}
}else{
sendData = {'bingType': 1, 'cookie': cookies, 'userName': username, 'account': null, 'password': null, 'wmPoiName': wmPoiName}
}
xhr.send(JSON.stringify(sendData))
xhr.onreadystatechange = function () {
if (xhr.readyState === 4 && xhr.status === 200) {