Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wfs_export
Overview
Overview
Details
Activity
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
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yexing
wfs_export
Commits
8ca54d41
Commit
8ca54d41
authored
Dec 24, 2025
by
yexing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加速上传
parent
cf92a603
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
25 deletions
+19
-25
plugin/.version
+2
-2
plugin/dist.crx
+0
-0
plugin/dist/js/background.js
+1
-1
plugin/dist/js/main.js
+7
-10
plugin/dist/manifest.json
+2
-2
plugin/src/main.js
+6
-9
plugin/src/upload.js
+1
-1
No files found.
plugin/.version
View file @
8ca54d41
3.4.9
3.5.0
\ No newline at end of file
\ No newline at end of file
plugin/dist.crx
View file @
8ca54d41
No preview for this file type
plugin/dist/js/background.js
View file @
8ca54d41
...
@@ -19631,7 +19631,7 @@
...
@@ -19631,7 +19631,7 @@
if
(
options
.
isCheck
&&
!
await
checkLog
(
fn
))
return
;
if
(
options
.
isCheck
&&
!
await
checkLog
(
fn
))
return
;
const
insert
=
await
retry
(
const
insert
=
await
retry
(
async
()
=>
upload
(
url
,
data
,
options
.
headers
),
async
()
=>
upload
(
url
,
data
,
options
.
headers
),
{
delayMs
:
1000
*
60
*
1.5
,
retries
:
10
}
{
delayMs
:
1000
*
10
,
retries
:
10
}
);
);
if
(
insert
)
await
checkLog
(
fn
,
true
);
if
(
insert
)
await
checkLog
(
fn
,
true
);
}
}
...
...
plugin/dist/js/main.js
View file @
8ca54d41
...
@@ -1285,7 +1285,7 @@ var G = (function (exports) {
...
@@ -1285,7 +1285,7 @@ var G = (function (exports) {
if
(
options
.
isCheck
&&
!
await
checkLog
(
fn
))
return
;
if
(
options
.
isCheck
&&
!
await
checkLog
(
fn
))
return
;
const
insert
=
await
retry
(
const
insert
=
await
retry
(
async
()
=>
upload
(
url
,
data
,
options
.
headers
),
async
()
=>
upload
(
url
,
data
,
options
.
headers
),
{
delayMs
:
1000
*
60
*
1.5
,
retries
:
10
}
{
delayMs
:
1000
*
10
,
retries
:
10
}
);
);
if
(
insert
)
await
checkLog
(
fn
,
true
);
if
(
insert
)
await
checkLog
(
fn
,
true
);
}
}
...
@@ -1308,7 +1308,7 @@ var G = (function (exports) {
...
@@ -1308,7 +1308,7 @@ var G = (function (exports) {
let
tasks
=
await
createTasks
(
uri
,
fromDate
,
toDate
);
let
tasks
=
await
createTasks
(
uri
,
fromDate
,
toDate
);
tasks
=
sn
?
[
tasks
.
at
(
sn
)]
:
tasks
;
tasks
=
sn
?
[
tasks
.
at
(
sn
)]
:
tasks
;
let
moment
=
2000
,
idx
=
0
,
len
=
tasks
.
length
;
let
moment
=
2000
,
idx
=
0
,
len
=
tasks
.
length
;
const
allData
=
[],
allFn
=
[],
zipFn
=
`
${
Task
.
partnerId
}
#
${
key
}
#
${
fromDate
}
_
${
toDate
}
.zip`
;
const
allData
=
[],
allFn
=
[],
allUp
=
[],
zipFn
=
`
${
Task
.
partnerId
}
#
${
key
}
#
${
fromDate
}
_
${
toDate
}
.zip`
;
const
isSingle
=
uri
==
TABLE
.
PAYMENT
.
uri
;
const
isSingle
=
uri
==
TABLE
.
PAYMENT
.
uri
;
for
(
const
task
of
tasks
)
{
for
(
const
task
of
tasks
)
{
const
pf
=
`
${
++
idx
}
/
${
len
}
`
;
const
pf
=
`
${
++
idx
}
/
${
len
}
`
;
...
@@ -1337,18 +1337,14 @@ var G = (function (exports) {
...
@@ -1337,18 +1337,14 @@ var G = (function (exports) {
const
route
=
data
.
__route
;
const
route
=
data
.
__route
;
delete
data
.
__route
;
delete
data
.
__route
;
const
headers
=
{
'Content-Type'
:
'application/json'
};
const
headers
=
{
'Content-Type'
:
'application/json'
};
await
uploadFile
(
fn
,
data
,
{
isJson
,
headers
,
route
});
allUp
.
push
(
uploadFile
(
fn
,
data
,
{
isJson
,
headers
,
route
}));
if
(
isDownload
)
{
console
.
log
(
data
);
// const blob = new Blob([data], { "type": "application/json" });
// downloadFile(fn, blob);
console
.
log
(
data
);
}
}
else
{
}
else
{
if
(
isSingle
)
{
if
(
isSingle
)
{
const
zip
=
await
createZip
([
data
],
[
fn
]);
const
zip
=
await
createZip
([
data
],
[
fn
]);
const
form
=
new
FormData
();
const
form
=
new
FormData
();
form
.
append
(
"zipfile"
,
zip
,
fn
);
form
.
append
(
"zipfile"
,
zip
,
fn
);
a
wait
uploadFile
(
fn
,
form
);
a
llUp
.
push
(
uploadFile
(
fn
,
form
)
);
}
else
{
}
else
{
allData
.
push
(
data
);
allData
.
push
(
data
);
allFn
.
push
(
fn
);
allFn
.
push
(
fn
);
...
@@ -1361,9 +1357,10 @@ var G = (function (exports) {
...
@@ -1361,9 +1357,10 @@ var G = (function (exports) {
const
zip
=
await
createZip
(
allData
,
allFn
);
const
zip
=
await
createZip
(
allData
,
allFn
);
const
form
=
new
FormData
();
const
form
=
new
FormData
();
form
.
append
(
"zipfile"
,
zip
,
zipFn
);
form
.
append
(
"zipfile"
,
zip
,
zipFn
);
a
wait
uploadFile
(
zipFn
,
form
,
{
isCheck
:
true
}
);
a
llUp
.
push
(
uploadFile
(
zipFn
,
form
,
{
isCheck
:
true
})
);
isDownload
&&
downloadFile
(
zipFn
,
zip
);
isDownload
&&
downloadFile
(
zipFn
,
zip
);
}
}
await
Promise
.
all
(
allUp
);
addLog
(
`
${
name
}
运行完成`
);
addLog
(
`
${
name
}
运行完成`
);
}
}
if
(
typeof
chrome
!==
'undefined'
&&
chrome
.
runtime
)
{
if
(
typeof
chrome
!==
'undefined'
&&
chrome
.
runtime
)
{
...
...
plugin/dist/manifest.json
View file @
8ca54d41
{
"name"
:
"WalmartExports"
,
"description"
:
"导出沃尔玛报表"
,
"version"
:
"3.4.9"
,
"manifest_version"
:
3
,
"background"
:{
"service_worker"
:
"./js/background.js"
},
"permissions"
:[
"tabs"
,
"activeTab"
,
"scripting"
,
"notifications"
,
"storage"
,
"alarms"
],
"action"
:{
"default_title"
:
"WalmartExports"
,
"default_popup"
:
"popup.html"
,
"default_icon"
:{
"16"
:
"icon.png"
,
"32"
:
"icon.png"
,
"48"
:
"icon.png"
,
"128"
:
"icon.png"
}},
"icons"
:{
"16"
:
"icon.png"
,
"32"
:
"icon.png"
,
"48"
:
"icon.png"
,
"128"
:
"icon.png"
},
"web_accessible_resources"
:[{
"resources"
:[
"src/main.js"
],
"matches"
:[
"<all_urls>"
]}],
"host_permissions"
:[
"https://seller.walmart.com/*"
,
"https://advertising.walmart.com/*"
,
"https://login.account.wal-mart.com/*"
,
"https://marketplace.walmartapis.com/*"
,
"https://walmart.meinuosha.com/*"
],
"content_scripts"
:[{
"matches"
:[
"https://seller.walmart.com/*"
,
"https://advertising.walmart.com/*"
,
"https://login.account.wal-mart.com/*"
,
"https://marketplace.walmartapis.com/*"
,
"https://walmart.meinuosha.com/*"
],
"js"
:[
"./js/main.js"
]}]}
{
"name"
:
"WalmartExports"
,
"description"
:
"导出沃尔玛报表"
,
"version"
:
"3.5.0"
,
"manifest_version"
:
3
,
"background"
:{
"service_worker"
:
"./js/background.js"
},
"permissions"
:[
"tabs"
,
"activeTab"
,
"scripting"
,
"notifications"
,
"storage"
,
"alarms"
],
"action"
:{
"default_title"
:
"WalmartExports"
,
"default_popup"
:
"popup.html"
,
"default_icon"
:{
"16"
:
"icon.png"
,
"32"
:
"icon.png"
,
"48"
:
"icon.png"
,
"128"
:
"icon.png"
}},
"icons"
:{
"16"
:
"icon.png"
,
"32"
:
"icon.png"
,
"48"
:
"icon.png"
,
"128"
:
"icon.png"
},
"web_accessible_resources"
:[{
"resources"
:[
"src/main.js"
],
"matches"
:[
"<all_urls>"
]}],
"host_permissions"
:[
"https://seller.walmart.com/*"
,
"https://advertising.walmart.com/*"
,
"https://login.account.wal-mart.com/*"
,
"https://marketplace.walmartapis.com/*"
,
"https://walmart.meinuosha.com/*"
],
"content_scripts"
:[{
"matches"
:[
"https://seller.walmart.com/*"
,
"https://advertising.walmart.com/*"
,
"https://login.account.wal-mart.com/*"
,
"https://marketplace.walmartapis.com/*"
,
"https://walmart.meinuosha.com/*"
],
"js"
:[
"./js/main.js"
]}]}
\ No newline at end of file
\ No newline at end of file
plugin/src/main.js
View file @
8ca54d41
...
@@ -24,7 +24,7 @@ export async function run(options = {}) {
...
@@ -24,7 +24,7 @@ export async function run(options = {}) {
let
tasks
=
await
createTasks
(
uri
,
fromDate
,
toDate
);
let
tasks
=
await
createTasks
(
uri
,
fromDate
,
toDate
);
tasks
=
sn
?
[
tasks
.
at
(
sn
)]
:
tasks
;
tasks
=
sn
?
[
tasks
.
at
(
sn
)]
:
tasks
;
let
moment
=
2000
,
idx
=
0
,
len
=
tasks
.
length
;
let
moment
=
2000
,
idx
=
0
,
len
=
tasks
.
length
;
const
allData
=
[],
allFn
=
[],
zipFn
=
`
${
Task
.
partnerId
}
#
${
key
}
#
${
fromDate
}
_
${
toDate
}
.zip`
;
const
allData
=
[],
allFn
=
[],
allUp
=
[],
zipFn
=
`
${
Task
.
partnerId
}
#
${
key
}
#
${
fromDate
}
_
${
toDate
}
.zip`
;
const
isSingle
=
uri
==
TABLE
.
PAYMENT
.
uri
;
const
isSingle
=
uri
==
TABLE
.
PAYMENT
.
uri
;
for
(
const
task
of
tasks
)
{
for
(
const
task
of
tasks
)
{
const
pf
=
`
${
++
idx
}
/
${
len
}
`
;
const
pf
=
`
${
++
idx
}
/
${
len
}
`
;
...
@@ -53,18 +53,14 @@ export async function run(options = {}) {
...
@@ -53,18 +53,14 @@ export async function run(options = {}) {
const
route
=
data
.
__route
;
const
route
=
data
.
__route
;
delete
data
.
__route
;
delete
data
.
__route
;
const
headers
=
{
'Content-Type'
:
'application/json'
}
const
headers
=
{
'Content-Type'
:
'application/json'
}
await
uploadFile
(
fn
,
data
,
{
isJson
,
headers
,
route
});
allUp
.
push
(
uploadFile
(
fn
,
data
,
{
isJson
,
headers
,
route
}));
if
(
isDownload
)
{
console
.
log
(
data
);
// const blob = new Blob([data], { "type": "application/json" });
// downloadFile(fn, blob);
console
.
log
(
data
);
}
}
else
{
}
else
{
if
(
isSingle
)
{
if
(
isSingle
)
{
const
zip
=
await
createZip
([
data
],
[
fn
]);
const
zip
=
await
createZip
([
data
],
[
fn
]);
const
form
=
new
FormData
();
const
form
=
new
FormData
();
form
.
append
(
"zipfile"
,
zip
,
fn
);
form
.
append
(
"zipfile"
,
zip
,
fn
);
a
wait
uploadFile
(
fn
,
form
);
a
llUp
.
push
(
uploadFile
(
fn
,
form
)
);
}
else
{
}
else
{
allData
.
push
(
data
);
allData
.
push
(
data
);
allFn
.
push
(
fn
);
allFn
.
push
(
fn
);
...
@@ -77,9 +73,10 @@ export async function run(options = {}) {
...
@@ -77,9 +73,10 @@ export async function run(options = {}) {
const
zip
=
await
createZip
(
allData
,
allFn
);
const
zip
=
await
createZip
(
allData
,
allFn
);
const
form
=
new
FormData
();
const
form
=
new
FormData
();
form
.
append
(
"zipfile"
,
zip
,
zipFn
);
form
.
append
(
"zipfile"
,
zip
,
zipFn
);
a
wait
uploadFile
(
zipFn
,
form
,
{
isCheck
:
true
}
);
a
llUp
.
push
(
uploadFile
(
zipFn
,
form
,
{
isCheck
:
true
})
);
isDownload
&&
downloadFile
(
zipFn
,
zip
);
isDownload
&&
downloadFile
(
zipFn
,
zip
);
}
}
await
Promise
.
all
(
allUp
);
addLog
(
`
${
name
}
运行完成`
);
addLog
(
`
${
name
}
运行完成`
);
}
}
if
(
typeof
chrome
!==
'undefined'
&&
chrome
.
runtime
)
{
if
(
typeof
chrome
!==
'undefined'
&&
chrome
.
runtime
)
{
...
...
plugin/src/upload.js
View file @
8ca54d41
...
@@ -43,7 +43,7 @@ export async function uploadFile(fn, data, options = {}) {
...
@@ -43,7 +43,7 @@ export async function uploadFile(fn, data, options = {}) {
if
(
options
.
isCheck
&&
!
await
checkLog
(
fn
))
return
;
if
(
options
.
isCheck
&&
!
await
checkLog
(
fn
))
return
;
const
insert
=
await
retry
(
const
insert
=
await
retry
(
async
()
=>
upload
(
url
,
data
,
options
.
headers
),
async
()
=>
upload
(
url
,
data
,
options
.
headers
),
{
delayMs
:
1000
*
60
*
1.5
,
retries
:
10
}
{
delayMs
:
1000
*
10
,
retries
:
10
}
);
);
if
(
insert
)
await
checkLog
(
fn
,
true
);
if
(
insert
)
await
checkLog
(
fn
,
true
);
}
}
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