Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_NJ_lite
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
middleLayer_for_NJ_lite
Commits
d46334f8
Commit
d46334f8
authored
Dec 09, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 支付失败的处理
parent
eb614c2c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
air.js
assets/middleLayer_for_NJ_lite/script/air.js
+1
-1
middleLayer.ts
assets/middleLayer_for_NJ_lite/script/middleLayer.ts
+22
-0
No files found.
assets/middleLayer_for_NJ_lite/script/air.js
View file @
d46334f8
...
...
@@ -319,7 +319,7 @@ export function initAir(_this) {
}
else
if
(
method
==
'
stopRecord
'
)
{
window
.
air
.
recordCallBack
(
recordMockData
);
}
else
if
(
method
==
'
startBuyToAppStore
'
)
{
window
.
air
.
startBuyToAppStoreCallBack
({
productid
:
1
,
puid
:
22
,
receiptData
:
"
HelloWorld
"
});
window
.
air
.
startBuyToAppStoreCallBack
({
productid
:
1
,
puid
:
22
,
receiptData
:
"
HelloWorld
"
,
error
:
""
});
}
else
{
console
.
error
(
`
${
method
}
方法还没有Mock数据,请联系技术支持人员添加`
);
}
...
...
assets/middleLayer_for_NJ_lite/script/middleLayer.ts
View file @
d46334f8
...
...
@@ -135,6 +135,20 @@ export default class NewClass extends middleLayerBase {
if
(
typeof
(
res
)
==
'
string
'
)
{
res
=
JSON
.
parse
(
res
);
}
if
(
res
.
error
)
{
cc
.
find
(
`buy_status_text`
,
statusWin
).
getComponent
(
cc
.
Label
).
string
=
`支付失败`
;
cc
.
find
(
`buy_status_sub_text`
,
statusWin
).
getComponent
(
cc
.
Label
).
string
=
res
.
error
;
cc
.
find
(
`buy_status_sub_text`
,
statusWin
).
active
=
true
;
setTimeout
(()
=>
{
cc
.
find
(
`buy_status_text`
,
statusWin
).
getComponent
(
cc
.
Label
).
string
=
""
;
cc
.
find
(
`buy_status_sub_text`
,
statusWin
).
getComponent
(
cc
.
Label
).
string
=
""
;
cc
.
find
(
`buy_status_sub_text`
,
statusWin
).
active
=
false
;
statusWin
.
active
=
false
;
cc
.
find
(
`middleLayer/iosActiveLayer/buyloading`
).
active
=
false
;
},
2000
);
return
;
}
const
orderData
:
any
=
await
this
.
asyncCallNetworkApiPost
(
`/api/oxford/v1/paid/ios/order/save`
,
{
productid
:
res
.
productid
,
puid
:
res
.
puid
,
...
...
@@ -724,6 +738,14 @@ export default class NewClass extends middleLayerBase {
if
(
typeof
(
res
)
==
'
string
'
)
{
res
=
JSON
.
parse
(
res
);
}
if
(
res
.
error
)
{
cc
.
find
(
`middleLayer/exception_pay_win/buy_status_text`
).
getComponent
(
cc
.
Label
).
string
=
`支付失败\n
${
res
.
error
}
`
;
setTimeout
(()
=>
{
cc
.
find
(
`middleLayer/exception_pay_win`
).
active
=
false
;
cc
.
find
(
`middleLayer/exception_pay_win/buy_status_text`
).
getComponent
(
cc
.
Label
).
string
=
"
正在处理支付订单
\n
请勿关闭App
"
;
},
2000
);
return
;
}
const
orderData
=
await
this
.
asyncCallNetworkApiPost
(
`/api/oxford/v1/paid/ios/order/save`
,
{
productid
:
res
.
productid
,
puid
:
res
.
puid
,
...
...
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