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
e9d86996
Commit
e9d86996
authored
Oct 11, 2020
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fk
parent
6ab30f55
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
58 deletions
+53
-58
workspace.xml
.idea/workspace.xml
+31
-39
Tools.ts
src/Tools.ts
+22
-19
No files found.
.idea/workspace.xml
View file @
e9d86996
This diff is collapsed.
Click to expand it.
src/Tools.ts
View file @
e9d86996
...
...
@@ -36,7 +36,7 @@ export class Tools {
}
public
static
async
getAppData
()
{
const
{
data
}
=
await
sendTbNet
(
TbNetName
.
getAppData
);
const
{
data
}
=
await
sendTbNet
(
TbNetName
.
getAppData
);
Tools
.
globalData
=
data
;
}
...
...
@@ -110,13 +110,16 @@ export class Tools {
this
.
propInfo
[
type
]
-=
1
;
sendTbNet
(
TbNetName
.
getToolsInfo
,
{},
(
st
,
rt
)
=>
{
if
(
!
st
)
return
;
this
.
propInfo
.
booms
=
+
rt
.
data
.
tools
.
booms
;
this
.
propInfo
.
steps
=
+
rt
.
data
.
tools
.
steps
;
this
.
propInfo
.
hammers
=
+
rt
.
data
.
tools
.
hammers
;
if
(
!
st
)
{
resolve
(
true
);
return
;
}
this
.
propInfo
.
booms
=
Tools
.
propInfo
.
booms
=
+
rt
.
data
.
tools
.
booms
;
this
.
propInfo
.
steps
=
Tools
.
propInfo
.
steps
=
+
rt
.
data
.
tools
.
steps
;
this
.
propInfo
.
hammers
=
Tools
.
propInfo
.
hammers
=
+
rt
.
data
.
tools
.
hammers
;
resolve
(
true
);
}
);
resolve
(
true
)
}
else
{
// reject()
resolve
(
false
)
...
...
@@ -146,11 +149,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
,
...
...
@@ -159,10 +162,10 @@ export class Tools {
tbMy
.
getFileSystemManager
().
readFile
({
filePath
:
i
,
// encoding: "utf8",
success
:
function
(
r
)
{
success
:
function
(
r
)
{
},
fail
:
function
(
res
)
{
fail
:
function
(
res
)
{
}
})
...
...
@@ -306,11 +309,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
();
});
...
...
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