Commit c32bb894 authored by 十三's avatar 十三

修复新版发货易不可达提示框bug

parent 02139431
...@@ -8,7 +8,7 @@ let domEle = { ...@@ -8,7 +8,7 @@ let domEle = {
checkBoxSelectAll: "div.bottom-operation-bar > span input.ant-checkbox-input", checkBoxSelectAll: "div.bottom-operation-bar > span input.ant-checkbox-input",
btnPrint: ".ec-print-waybill-button", btnPrint: ".ec-print-waybill-button",
modalTips:"ant-modal-confirm-title", modalTips:"ant-modal-confirm-title",
btnTipsConfirm:"ant-btn ant-btn-primary", btnTipsConfirm:"div.ant-modal-confirm-body-wrapper > div > button.ant-btn-primary",
spanWaybillTemplate: ():any=>document.getElementsByClassName("ant-modal-body")[0].getElementsByClassName("ant-select-selector")[0] , spanWaybillTemplate: ():any=>document.getElementsByClassName("ant-modal-body")[0].getElementsByClassName("ant-select-selector")[0] ,
divWaybillTemplateList: ():any=>document.getElementsByClassName("rc-virtual-list-holder-inner")[0] , divWaybillTemplateList: ():any=>document.getElementsByClassName("rc-virtual-list-holder-inner")[0] ,
radioGetNewWaybill: ():any=>document.querySelector(".ant-modal-body input.ant-radio-input") , radioGetNewWaybill: ():any=>document.querySelector(".ant-modal-body input.ant-radio-input") ,
...@@ -63,7 +63,7 @@ async function booking(waybillTemplateTitle: string, orderNo: string,shopId:stri ...@@ -63,7 +63,7 @@ async function booking(waybillTemplateTitle: string, orderNo: string,shopId:stri
if(document.getElementsByClassName(domEle.modalTips).length>0){ if(document.getElementsByClassName(domEle.modalTips).length>0){
simulateMouseClick(document.getElementsByClassName(domEle.btnTipsConfirm)[3]); simulateMouseClick(document.querySelector(domEle.btnTipsConfirm));
} }
result = await waitDialog(); result = await waitDialog();
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
let data={ let data={
action:"BookingApp", action:"BookingApp",
value:{ value:{
platform:"app", // 淘宝 app 拼多多 pdd5
wayCompanyId:1951963,// 运单号Id wayCompanyId:1951963,// 运单号Id
orderNo:"2981762426824933917"//订单号 orderNo:"2981762426824933917"//订单号
} }
...@@ -12,7 +13,7 @@ window.postMessage(data,"*") ...@@ -12,7 +13,7 @@ window.postMessage(data,"*")
//新版接口 //新版接口
let data={ let data1={
action:"BookingV2", action:"BookingV2",
value:{ value:{
waybillTemplateTitle:"【菜鸟】中通一联单 - tianpeng8888深圳布吉75512",//运单模板标题 waybillTemplateTitle:"【菜鸟】中通一联单 - tianpeng8888深圳布吉75512",//运单模板标题
...@@ -20,8 +21,27 @@ let data={ ...@@ -20,8 +21,27 @@ let data={
shopId:"27064"//店铺Id,抖店:27069,淘宝:27064,拼多多:27066,其他:27068 shopId:"27064"//店铺Id,抖店:27069,淘宝:27064,拼多多:27066,其他:27068
} }
}; };
window.postMessage(data,"*") //window.postMessage(data,"*")
let data2={
action:"BookingV2",
value:{
waybillTemplateTitle:"【抖音】圆通速递一联单 - 锐图定制广东省深圳市南岭755131",//运单模板标题
orderNo:"4993254194384877359",//订单号
shopId:"27069"//店铺Id,抖店:27069,淘宝:27064,拼多多:27066,其他:27068
}
};
//window.postMessage(data,"*")
let messageQueue=[];
messageQueue.push(data1);
messageQueue.push(data2);
function deQueue(){
if(messageQueue==0)return;
const data = messageQueue.shift();
window.postMessage(data,"*")
}
// web页面获取结果监听 // web页面获取结果监听
window.addEventListener("message",function(ev){ window.addEventListener("message",function(ev){
...@@ -29,7 +49,7 @@ window.addEventListener("message",function(ev){ ...@@ -29,7 +49,7 @@ window.addEventListener("message",function(ev){
if(ev.data.isResult){ if(ev.data.isResult){
console.log("web",ev.data) console.log("web",ev.data)
deQueue()
/* //返回结果说明 /* //返回结果说明
{ {
isResult:1,//结果标识 isResult:1,//结果标识
...@@ -49,4 +69,6 @@ window.addEventListener("message",function(ev){ ...@@ -49,4 +69,6 @@ window.addEventListener("message",function(ev){
} }
} */ } */
} }
}) })
\ No newline at end of file
deQueue();
\ No newline at end of file
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