Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tech
cash_management
Commits
4e9b7471
Commit
4e9b7471
authored
5 years ago
by
limh
Browse files
Options
Download
Email Patches
Plain Diff
# http接口返回值结构修改
parent
bb9605f6
master
HaoHai_1.0
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/cash/client/app/net/rpc.ts
+13
-12
src/cash/client/app/net/rpc.ts
with
13 additions
and
12 deletions
+13
-12
src/cash/client/app/net/rpc.ts
+
13
-
12
View file @
4e9b7471
...
...
@@ -4,6 +4,7 @@ import { ClientUser } from '../../../public/interface';
import
{
getAllGameInfos
,
piFetch
}
from
'
../../../public/tools
'
;
import
{
UserClientInfo
,
UserTypeArg
,
UserTypeArg_Enum
,
WalletLoginReq
}
from
'
../../../server/client/user/login_c.s
'
;
import
{
WithdrawlArg
}
from
'
../../../server/client/withdrawl/withdrawl.s
'
;
import
{
ResultCode
}
from
'
../../../server/data/interface
'
;
import
{
getStore
,
setStore
}
from
'
../store/client_store
'
;
import
{
clientPopNewMessage
,
clientShowErrorNotice
}
from
'
../utils/tools
'
;
...
...
@@ -53,8 +54,8 @@ export const updateUserInfo = async (param: ClientUser) => {
const
url
=
`
${
CASH_HTTP_URL
}
/port/setUserInfo?user=
${
JSON
.
stringify
(
getUserParam
())}
¶m=
${
JSON
.
stringify
(
arg
)}
`
;
const
r
:
any
=
await
piFetch
(
url
);
if
(
r
&&
r
.
result
===
1
)
{
return
r
.
ok
;
if
(
r
&&
r
.
res
.
result
===
ResultCode
.
SUCCESS
)
{
return
r
.
res
.
msg
;
}
else
{
clientShowErrorNotice
(
r
.
err
);
...
...
@@ -75,8 +76,8 @@ export const getGoldCoinCount = async (appid: string) => {
const
openid
=
getStore
(
'
user/openId
'
,
''
);
const
url
=
`
${
CASH_HTTP_URL
}
/port/getGoldCoin?openid=
${
openid
}
&appid=
${
appid
}
`
;
const
r
:
any
=
await
piFetch
(
url
);
if
(
r
&&
r
.
result
===
1
)
{
return
r
.
ok
;
if
(
r
&&
r
.
res
.
result
===
ResultCode
.
SUCCESS
)
{
return
r
.
res
.
msg
;
}
else
{
clientShowErrorNotice
(
r
.
err
);
...
...
@@ -97,8 +98,8 @@ export const getWithdrawNotes = async (appid: string) => {
try
{
const
url
=
`
${
CASH_HTTP_URL
}
/port/getWithdrawlLog?user=
${
JSON
.
stringify
(
getUserParam
())}
¶m=
${
appid
}
`
;
const
r
:
any
=
await
piFetch
(
url
);
if
(
r
&&
r
.
result
===
1
)
{
return
r
.
ok
;
if
(
r
&&
r
.
res
.
result
===
ResultCode
.
SUCCESS
)
{
return
r
.
res
.
msg
;
}
else
{
clientShowErrorNotice
(
r
.
err
);
...
...
@@ -125,8 +126,8 @@ export const applyWithdraw = async (appid: string, money: number) => {
const
url
=
`
${
CASH_HTTP_URL
}
/port/applyWithdrawl?user=
${
JSON
.
stringify
(
getUserParam
())}
¶m=
${
JSON
.
stringify
(
arg
)}
`
;
const
r
:
any
=
await
piFetch
(
url
);
if
(
r
&&
r
.
result
===
1
)
{
return
r
.
ok
;
if
(
r
&&
r
.
res
.
result
===
ResultCode
.
SUCCESS
)
{
return
r
.
res
.
msg
;
}
else
{
clientShowErrorNotice
(
r
.
err
);
...
...
@@ -150,8 +151,8 @@ export const isNewUser = async (appid: string) => {
try
{
const
url
=
`
${
CASH_HTTP_URL
}
/port/hasReceiveGift?user=
${
JSON
.
stringify
(
getUserParam
())}
¶m=
${
appid
}
`
;
const
r
:
any
=
await
piFetch
(
url
);
if
(
r
&&
r
.
result
===
1
)
{
return
!
r
.
ok
;
// 收过大礼包则不是新用户
if
(
r
&&
r
.
res
.
result
===
ResultCode
.
SUCCESS
)
{
return
!
r
.
res
.
msg
;
// 收过大礼包则不是新用户
}
else
{
clientShowErrorNotice
(
r
.
err
);
...
...
@@ -172,8 +173,8 @@ export const getLastWithdrawTime = async (appid: string) => {
try
{
const
url
=
`
${
CASH_HTTP_URL
}
/port/getLastWithdrawlTime?user=
${
JSON
.
stringify
(
getUserParam
())}
¶m=
${
appid
}
`
;
const
r
:
any
=
await
piFetch
(
url
);
if
(
r
&&
r
.
result
===
1
)
{
return
r
.
ok
;
// 时间戳
if
(
r
&&
r
.
res
.
result
===
ResultCode
.
SUCCESS
)
{
return
r
.
res
.
msg
;
// 时间戳
}
else
{
clientShowErrorNotice
(
r
.
err
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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
Menu
Projects
Groups
Snippets
Help