Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
game2048
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
熊东起
game2048
Commits
187d8fa1
Commit
187d8fa1
authored
Apr 24, 2020
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l
parent
b65ff0d2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
TaoBaoNet.ts
src/TaoBaoNet.ts
+4
-2
No files found.
src/TaoBaoNet.ts
View file @
187d8fa1
...
...
@@ -122,7 +122,8 @@ export function sendTbNet(netName: TbNetName, parameter: any, callback: Function
//记录数据
data
[
netName
]
=
returnData
;
if
(
returnData
)
{
if
(
!
hideMsg
&&
!
returnData
.
success
)
showToast
(
codeMsg
[
returnData
.
code
]
||
"网络异常"
)
// if (!hideMsg && !returnData.success) showToast(codeMsg[returnData.code] || "网络异常")
if
(
!
hideMsg
&&
!
returnData
.
success
)
showToast
(
returnData
.
message
||
"网络异常"
)
callback
(
returnData
.
success
,
returnData
);
}
else
{
if
(
!
hideMsg
)
showToast
(
"网络异常"
)
...
...
@@ -141,7 +142,8 @@ export function sendTbNet(netName: TbNetName, parameter: any, callback: Function
let
timeId
:
any
;
//事件回调
let
fun
=
function
(
d
)
{
if
(
!
hideMsg
&&
!
d
.
success
)
showToast
(
codeMsg
[
d
.
code
]
||
"网络异常"
)
// if (!hideMsg && !d.success) showToast(codeMsg[d.code] || "网络异常")
if
(
!
hideMsg
&&
!
d
.
success
)
showToast
(
d
.
message
||
"网络异常"
)
GDispatcher
.
removeEvent
(
netName
,
fun
);
callback
(
d
.
success
,
d
);
clearTimeout
(
timeId
);
...
...
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