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
f079fd08
Commit
f079fd08
authored
Mar 21, 2024
by
刘燕芳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save
parent
ec413ab4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
12 deletions
+13
-12
manifest.json
manifest.json
+1
-1
index.ts
src/background/index.ts
+3
-3
bookingV2.ts
src/content/bookingV2.ts
+4
-4
index.ts
src/content/index.ts
+4
-3
index.tsx
src/popup/components/WayBillModel/index.tsx
+1
-1
No files found.
manifest.json
View file @
f079fd08
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
"*://myseller.taobao.com/*"
,
"*://myseller.taobao.com/*"
,
"*://admin.rtxmdz.com/*"
,
"*://admin.rtxmdz.com/*"
,
"http://localhost:10823/*"
,
"http://localhost:10823/*"
,
"http://localhost:
64032
/*"
,
"http://localhost:
*
/*"
,
"*://*.rtxmdz.com/*"
,
"*://*.rtxmdz.com/*"
,
"https://item.upload.taobao.com/*"
,
"https://item.upload.taobao.com/*"
,
"https://sell.publish.tmall.com/*"
"https://sell.publish.tmall.com/*"
...
...
src/background/index.ts
View file @
f079fd08
...
@@ -46,6 +46,8 @@ chrome.runtime.onMessage.addListener(function (message, sender, sendResponse) {
...
@@ -46,6 +46,8 @@ chrome.runtime.onMessage.addListener(function (message, sender, sendResponse) {
url
:
tbIssueUrls
,
url
:
tbIssueUrls
,
},
},
function
(
tabs
)
{
function
(
tabs
)
{
console
.
log
(
'如果图动力登录的账号和千牛云登录的账号不一致,则popup页面爆红tabs'
,
tabs
);
// 如果图动力登录的账号和千牛云登录的账号不一致,则popup页面爆红
// 如果图动力登录的账号和千牛云登录的账号不一致,则popup页面爆红
tabs
&&
tabs
.
forEach
((
tab
)
=>
{
tabs
&&
tabs
.
forEach
((
tab
)
=>
{
// chrome.tabs.update(tab.id!,{ active: true },function (tab1) {})
// chrome.tabs.update(tab.id!,{ active: true },function (tab1) {})
...
@@ -123,13 +125,12 @@ chrome.tabs.onUpdated.addListener(async (tabId, changeInfo, tab) => {
...
@@ -123,13 +125,12 @@ chrome.tabs.onUpdated.addListener(async (tabId, changeInfo, tab) => {
// let cnaui: any = await getCookies('https://*.mmstat.com', 'cnaui')
// let cnaui: any = await getCookies('https://*.mmstat.com', 'cnaui')
// console.log('cookie', 'https://.mmstat.com', cnaui.value)
// console.log('cookie', 'https://.mmstat.com', cnaui.value)
// userId = cnaui.value
// userId = cnaui.value
// taIssueId&&chrome.tabs.remove(taIssueId)
chrome
.
tabs
.
query
(
chrome
.
tabs
.
query
(
{
{
url
:
[
tbIssueUrl
],
url
:
[
tbIssueUrl
],
},
},
async
function
(
tabs
)
{
async
function
(
tabs
)
{
console
.
log
(
'tabs'
,
tabs
)
console
.
log
(
'tabs'
,
tabs
,
tab
)
let
complete_tabs
:
any
=
[]
let
complete_tabs
:
any
=
[]
if
(
tabs
.
length
)
{
if
(
tabs
.
length
)
{
complete_tabs
=
tabs
.
filter
((
item
)
=>
item
.
status
===
'complete'
)
complete_tabs
=
tabs
.
filter
((
item
)
=>
item
.
status
===
'complete'
)
...
@@ -140,7 +141,6 @@ chrome.tabs.onUpdated.addListener(async (tabId, changeInfo, tab) => {
...
@@ -140,7 +141,6 @@ chrome.tabs.onUpdated.addListener(async (tabId, changeInfo, tab) => {
}
}
}
}
)
)
let
tuDe1
=
decodeURI
(
userNickCookie
.
value
)
let
tuDe1
=
decodeURI
(
userNickCookie
.
value
)
let
tuDe2
=
unescape
(
tuDe1
.
replace
(
/
\\(
u
[
0-9a-fA-F
]{4})
/gm
,
'%$1'
))
let
tuDe2
=
unescape
(
tuDe1
.
replace
(
/
\\(
u
[
0-9a-fA-F
]{4})
/gm
,
'%$1'
))
if
(
tuDe2
.
indexOf
(
':'
)
!=
-
1
)
tuDe2
=
tuDe2
.
split
(
':'
)[
0
]
if
(
tuDe2
.
indexOf
(
':'
)
!=
-
1
)
tuDe2
=
tuDe2
.
split
(
':'
)[
0
]
...
...
src/content/bookingV2.ts
View file @
f079fd08
...
@@ -58,10 +58,10 @@ async function booking(info: any) {
...
@@ -58,10 +58,10 @@ async function booking(info: any) {
let
msg
=
JSON
.
stringify
(
rJson
.
models
);
let
msg
=
JSON
.
stringify
(
rJson
.
models
);
reqMsg
.
msg
=
msg
;
reqMsg
.
msg
=
msg
;
}
}
//
else {
else
{
//
let numIid = getUrlParam(rSuccessUrl, "primaryId");
let
numIid
=
getUrlParam
(
rSuccessUrl
,
"primaryId"
);
// reqMsg.goods_id
= numIid;
reqMsg
.
msg
=
numIid
;
//
}
}
}
}
return
reqMsg
return
reqMsg
}
catch
(
e
)
{
}
catch
(
e
)
{
...
...
src/content/index.ts
View file @
f079fd08
...
@@ -15,15 +15,16 @@ interface Message {
...
@@ -15,15 +15,16 @@ interface Message {
value
:
Params
value
:
Params
}
}
// web页面通信
// web页面通信
let
task_id
:
any
=
null
window
.
addEventListener
(
"message"
,
function
(
message
:
any
){
window
.
addEventListener
(
"message"
,
function
(
message
:
any
){
// console.log('web页面通信1',message,new Date());
// console.log('web页面通信1',message,new Date());
if
(
message
.
data
.
action
==
ACTION
.
task
){
if
(
message
.
data
.
action
==
ACTION
.
task
){
window
.
postMessage
({
isResult
:
2
},
"*"
)
window
.
postMessage
({
isResult
:
2
},
"*"
)
task_id
=
message
.
data
.
value
.
task_id
chrome
.
runtime
.
sendMessage
(
message
.
data
,(
ret
)
=>
{
chrome
.
runtime
.
sendMessage
(
message
.
data
,(
ret
)
=>
{
// console.log(2222,ret,new Date().getTime(),new Date().getSeconds());
// console.log(2222,ret,new Date().getTime(),new Date().getSeconds());
window
.
postMessage
({
isResult
:
1
,...
ret
},
"*"
)
window
.
postMessage
({
isResult
:
1
,
task_id
:
task_id
,
...
ret
},
"*"
)
console
.
log
(
"message ret:1"
,
ret
,
message
.
data
);
console
.
log
(
"message ret:1"
,
task_id
,
ret
,
message
.
data
);
})
})
}
}
})
})
...
...
src/popup/components/WayBillModel/index.tsx
View file @
f079fd08
...
@@ -116,7 +116,7 @@ const WayBillModel = function () {
...
@@ -116,7 +116,7 @@ const WayBillModel = function () {
<
div
className=
"waybill-model-title"
key=
"two"
>
通信状态:
{
link
?
'连接成功'
:
'连接中断'
}
</
div
>
<
div
className=
"waybill-model-title"
key=
"two"
>
通信状态:
{
link
?
'连接成功'
:
'连接中断'
}
</
div
>
<
div
className=
"waybill-model-title tips"
>
{
info
}
</
div
>
<
div
className=
"waybill-model-title tips"
>
{
info
}
</
div
>
</
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
>
</>
</>
)
)
}
}
...
...
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