diff --git a/expand/ert/content.js b/expand/ert/content.js index 238f144..28dc9f4 100644 --- a/expand/ert/content.js +++ b/expand/ert/content.js @@ -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) {