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
5f8689e5
Commit
5f8689e5
authored
Jan 05, 2023
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 二维码显示
parent
9ca09b25
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
middleLayer.ts
assets/middleLayer_for_NJ_lite/script/middleLayer.ts
+4
-2
No files found.
assets/middleLayer_for_NJ_lite/script/middleLayer.ts
View file @
5f8689e5
...
@@ -122,7 +122,8 @@ export default class NewClass extends middleLayerBase {
...
@@ -122,7 +122,8 @@ export default class NewClass extends middleLayerBase {
const
statusWin
=
cc
.
find
(
`middleLayer/androidActiveLayer/buy_status_win`
);
const
statusWin
=
cc
.
find
(
`middleLayer/androidActiveLayer/buy_status_win`
);
cc
.
find
(
`buy_result_text`
,
statusWin
).
getComponent
(
cc
.
Label
).
string
=
`请使用微信扫码二维码付款`
;
cc
.
find
(
`buy_result_text`
,
statusWin
).
getComponent
(
cc
.
Label
).
string
=
`请使用微信扫码二维码付款`
;
// 生成二维码
// 生成二维码
let
icon
=
cc
.
find
(
`qrcode`
,
statusWin
).
getComponent
(
cc
.
Sprite
);
const
qrcode
=
cc
.
find
(
`qrcode`
,
statusWin
);
qrcode
.
active
=
false
;
// 加载远程网络图片
// 加载远程网络图片
const
kidInfo
=
await
this
.
getUserBaseInfo
();
const
kidInfo
=
await
this
.
getUserBaseInfo
();
const
userId
=
kidInfo
.
parent_id
;
const
userId
=
kidInfo
.
parent_id
;
...
@@ -132,7 +133,8 @@ export default class NewClass extends middleLayerBase {
...
@@ -132,7 +133,8 @@ export default class NewClass extends middleLayerBase {
const
baseUrl
=
await
this
.
getBaseUrl
();
const
baseUrl
=
await
this
.
getBaseUrl
();
cc
.
loader
.
load
({
url
:
`
${
baseUrl
}
/api/wxpay/v1/oxfordlite/qrcode?productid=
${
productid
}
&puid=
${
puid
}
&payuuid=
${
payuuid
}
`
,
type
:
"
png
"
},
(
err
,
text
)
=>
{
cc
.
loader
.
load
({
url
:
`
${
baseUrl
}
/api/wxpay/v1/oxfordlite/qrcode?productid=
${
productid
}
&puid=
${
puid
}
&payuuid=
${
payuuid
}
`
,
type
:
"
png
"
},
(
err
,
text
)
=>
{
icon
.
spriteFrame
=
new
cc
.
SpriteFrame
(
text
);
qrcode
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
new
cc
.
SpriteFrame
(
text
);
qrcode
.
active
=
true
;
});
});
statusWin
.
active
=
true
;
statusWin
.
active
=
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