Commit f079fd08 authored by 刘燕芳's avatar 刘燕芳

save

parent ec413ab4
......@@ -28,7 +28,7 @@
"*://myseller.taobao.com/*",
"*://admin.rtxmdz.com/*",
"http://localhost:10823/*",
"http://localhost:64032/*",
"http://localhost:*/*",
"*://*.rtxmdz.com/*",
"https://item.upload.taobao.com/*",
"https://sell.publish.tmall.com/*"
......
......@@ -46,6 +46,8 @@ chrome.runtime.onMessage.addListener(function (message, sender, sendResponse) {
url: tbIssueUrls,
},
function (tabs) {
console.log('如果图动力登录的账号和千牛云登录的账号不一致,则popup页面爆红tabs',tabs);
// 如果图动力登录的账号和千牛云登录的账号不一致,则popup页面爆红
tabs &&tabs.forEach((tab) => {
// chrome.tabs.update(tab.id!,{ active: true },function (tab1) {})
......@@ -123,13 +125,12 @@ chrome.tabs.onUpdated.addListener(async (tabId, changeInfo, tab) => {
// let cnaui: any = await getCookies('https://*.mmstat.com', 'cnaui')
// console.log('cookie', 'https://.mmstat.com', cnaui.value)
// userId = cnaui.value
// taIssueId&&chrome.tabs.remove(taIssueId)
chrome.tabs.query(
{
url: [tbIssueUrl],
},
async function (tabs) {
console.log('tabs', tabs)
console.log('tabs', tabs,tab)
let complete_tabs: any = []
if (tabs.length) {
complete_tabs = tabs.filter((item) => item.status === 'complete')
......@@ -140,7 +141,6 @@ chrome.tabs.onUpdated.addListener(async (tabId, changeInfo, tab) => {
}
}
)
let tuDe1 = decodeURI(userNickCookie.value)
let tuDe2 = unescape(tuDe1.replace(/\\(u[0-9a-fA-F]{4})/gm, '%$1'))
if (tuDe2.indexOf(':') != -1) tuDe2 = tuDe2.split(':')[0]
......
......@@ -58,10 +58,10 @@ async function booking(info: any) {
let msg = JSON.stringify(rJson.models);
reqMsg.msg = msg;
}
// else {
// let numIid = getUrlParam(rSuccessUrl, "primaryId");
// reqMsg.goods_id = numIid;
// }
else {
let numIid = getUrlParam(rSuccessUrl, "primaryId");
reqMsg.msg = numIid;
}
}
return reqMsg
} catch (e) {
......
......@@ -15,15 +15,16 @@ interface Message {
value: Params
}
// web页面通信
let task_id:any = null
window.addEventListener("message",function(message:any){
// console.log('web页面通信1',message,new Date());
if(message.data.action == ACTION.task){
window.postMessage({isResult:2},"*")
task_id = message.data.value.task_id
chrome.runtime.sendMessage(message.data,(ret)=>{
// console.log(2222,ret,new Date().getTime(),new Date().getSeconds());
window.postMessage({isResult:1,...ret},"*")
console.log("message ret:1",ret,message.data);
window.postMessage({isResult:1,task_id:task_id,...ret},"*")
console.log("message ret:1",task_id,ret,message.data);
})
}
})
......
......@@ -116,7 +116,7 @@ const WayBillModel = function () {
<div className="waybill-model-title" key="two">通信状态:{link?'连接成功':'连接中断'}</div>
<div className="waybill-model-title tips">{info}</div>
</div>
{/* <Button className="btn" type="primary" loading={loading} disabled={loading} onClick={ refresh }>刷新连接状态</Button> */}
<Button className="btn" type="primary" loading={loading} disabled={loading} onClick={ refresh }>刷新连接状态</Button>
</>
)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment