Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
babycare_xiaoxiao
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
王剑峰
babycare_xiaoxiao
Commits
681b143e
Commit
681b143e
authored
Jul 20, 2020
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l
parent
de939ebd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
Tools.ts
src/Tools.ts
+11
-11
CreditsOutPanel.ts
src/panels/CreditsOutPanel.ts
+1
-1
No files found.
src/Tools.ts
View file @
681b143e
...
...
@@ -108,7 +108,7 @@ export class Tools {
*/
public
static
consumerTools
(
type
:
PropType
):
Promise
<
boolean
>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
sendTbNet
(
TbNetName
.
consumerTools
,
{
type
},
(
s
,
res
)
=>
{
sendTbNet
(
TbNetName
.
consumerTools
,
{
type
},
(
s
,
res
)
=>
{
if
(
s
)
{
//修改道具数量
this
.
gameData
.
tools
=
res
.
data
.
tools
;
...
...
@@ -153,8 +153,8 @@ export class Tools {
this
.
gameData
.
tools
=
res
.
data
.
tools
;
return
true
;
//可根据gameData修改视图
}
else
{
//如果code积分不足,弹出赚积分弹窗
待写code TODO
if
(
res
.
code
==
""
)
{
//如果code积分不足,弹出赚积分弹窗
if
(
res
.
code
==
"
730005
"
)
{
showPanel
(
CreditsOutPanel
)
}
else
{
showToast
(
res
.
message
||
"网络开小差了,请重试"
)
...
...
@@ -171,11 +171,11 @@ export class Tools {
var
tbMy
=
my
if
(
!
tbMy
)
return
;
//@ts-ignore
const
{
cloud
}
=
getApp
();
const
{
cloud
}
=
getApp
();
//测试地址//到时云存储传一个小json,,改路径
var
url
=
"cloud://B4F0300E5148F478B506DEDC26EA4C6C//butterfly0.svga"
;
//获取临时地址
var
urls
=
await
cloud
.
file
.
getTempFileURL
({
fileId
:
[
url
]
})
var
urls
=
await
cloud
.
file
.
getTempFileURL
({
fileId
:
[
url
]
})
url
=
urls
[
0
].
url
.
replace
(
'-internal'
,
''
);
tbMy
.
downloadFile
({
url
:
url
,
...
...
@@ -184,10 +184,10 @@ export class Tools {
tbMy
.
getFileSystemManager
().
readFile
({
filePath
:
i
,
// encoding: "utf8",
success
:
function
(
r
)
{
success
:
function
(
r
)
{
},
fail
:
function
(
res
)
{
fail
:
function
(
res
)
{
}
})
...
...
@@ -331,11 +331,11 @@ export class Tools {
showTime
:
number
=
300
)
{
Tween
.
get
(
target
)
.
set
({
alpha
:
0
,
visible
:
true
})
.
to
({
alpha
:
1
},
showTime
,
Ease
.
quadIn
)
.
set
({
alpha
:
0
,
visible
:
true
})
.
to
({
alpha
:
1
},
showTime
,
Ease
.
quadIn
)
.
wait
(
time
)
.
to
({
alpha
:
0
},
showTime
,
Ease
.
quadOut
)
.
set
({
alpha
:
0
,
visible
:
false
})
.
to
({
alpha
:
0
},
showTime
,
Ease
.
quadOut
)
.
set
({
alpha
:
0
,
visible
:
false
})
.
call
(()
=>
{
call
();
});
...
...
src/panels/CreditsOutPanel.ts
View file @
681b143e
...
...
@@ -17,7 +17,7 @@ export class CreditsOutPanel extends Panel {
super
.
initEvents
();
this
.
earnBtn
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
()
=>
{
Tools
.
btnDelay
(
this
);
sendTbNet
(
TbNetName
.
navigateToOutside
,
{
url
:
""
})
//TODO 路径待写
sendTbNet
(
TbNetName
.
navigateToOutside
,
{
url
:
""
})
//TODO
赚积分
路径待写
},
this
)
}
removeEvents
()
{
...
...
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