闪购店获取手机号
This commit is contained in:
parent
e2d83247f6
commit
0f2b88f86f
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue