Commit 691ba89e authored by liuyanfang's avatar liuyanfang

Squashed commit of the following:

commit c32bb894
Author: 十三 <mike427@qq.com>
Date:   Tue Nov 15 10:52:02 2022 +0800

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

commit 02139431
Author: liuyanfang <1534792876/@qq.com>
Date:   Mon Nov 14 14:38:10 2022 +0800

    bug修改

commit be64338c
Author: liuyanfang <1534792876/@qq.com>
Date:   Mon Nov 14 14:12:51 2022 +0800

    修复bug
parent 2674ab89
......@@ -10,7 +10,7 @@ let domEle = {
checkBoxSelectAll: "div.bottom-operation-bar > span input.ant-checkbox-input",
btnPrint: ".ec-print-waybill-button",
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] ,
divWaybillTemplateList: ():any=>document.getElementsByClassName("rc-virtual-list-holder-inner")[0] ,
radioGetNewWaybill: ():any=>document.querySelector(".ant-modal-body input.ant-radio-input") ,
......@@ -70,7 +70,7 @@ async function booking(waybillTemplateTitle: string, orderNo: string,shopId:stri
if(document.getElementsByClassName(domEle.modalTips).length>0){
simulateMouseClick(document.getElementsByClassName(domEle.btnTipsConfirm)[3]);
simulateMouseClick(document.querySelector(domEle.btnTipsConfirm));
}
result = await waitDialog();
......
......@@ -4,6 +4,7 @@
let data={
action:"BookingApp",
value:{
platform:"app", // 淘宝 app 拼多多 pdd5
wayCompanyId:1951963,// 运单号Id
orderNo:"2981762426824933917"//订单号
}
......@@ -12,7 +13,7 @@ window.postMessage(data,"*")
//新版接口
let data={
let data1={
action:"BookingV2",
value:{
waybillTemplateTitle:"【菜鸟】中通一联单 - tianpeng8888深圳布吉75512",//运单模板标题
......@@ -20,8 +21,27 @@ let data={
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页面获取结果监听
window.addEventListener("message",function(ev){
......@@ -29,7 +49,7 @@ window.addEventListener("message",function(ev){
if(ev.data.isResult){
console.log("web",ev.data)
deQueue()
/* //返回结果说明
{
isResult:1,//结果标识
......@@ -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