Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
ruitu-fahuoyi-exension
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
廖健文
ruitu-fahuoyi-exension
Commits
c32bb894
Commit
c32bb894
authored
Nov 15, 2022
by
十三
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复新版发货易不可达提示框bug
parent
02139431
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
7 deletions
+29
-7
bookingV2.ts
src/content/bookingV2.ts
+2
-2
预约接口说明.txt
预约接口说明.txt
+27
-5
No files found.
src/content/bookingV2.ts
View file @
c32bb894
...
...
@@ -8,7 +8,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"
)
,
...
...
@@ -63,7 +63,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
();
...
...
预约接口说明.txt
View file @
c32bb894
...
...
@@ -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 data
1
={
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
刘燕芳
@liuyanfang
mentioned in commit
691ba89e
·
Nov 15, 2022
mentioned in commit
691ba89e
mentioned in commit 691ba89efe297f0938122f6f003f039196e9d9ef
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment