Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wfc13
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
wildfirecode13
wfc13
Commits
1c02ebf9
Commit
1c02ebf9
authored
Aug 10, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
90c7686e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
11 deletions
+18
-11
uploadSingleJs.js
project/scripts/uploadSingleJs.js
+12
-0
IndexScene.ts
project/src/scenes/IndexScene.ts
+6
-11
No files found.
project/scripts/uploadSingleJs.js
View file @
1c02ebf9
...
...
@@ -37,6 +37,7 @@ function uploadSingleJs(url) {
//单js文件上传
co
(
function
*
()
{
const
originPath
=
`/db_games/
${
url
}
/output.js`
;
var
client
=
new
OSS
({
region
:
'oss-cn-hangzhou'
,
accessKeyId
:
'LTAI4Fw25WcfcGv7FvcHoiHK'
,
...
...
@@ -51,6 +52,17 @@ function uploadSingleJs(url) {
}
if
(
originFile
.
status
===
404
)
yield
client
.
put
(
originPath
,
"./output.js"
);
const
originPath2
=
`/db_games/
${
url
}
/output.js.map`
;
var
originFile2
;
try
{
originFile2
=
yield
client
.
head
(
originPath2
);
}
catch
(
error
)
{
originFile2
=
error
;
}
if
(
originFile2
.
status
===
404
)
yield
client
.
put
(
originPath2
,
"./output.js.map"
);
})
}
...
...
project/src/scenes/IndexScene.ts
View file @
1c02ebf9
...
...
@@ -18,7 +18,7 @@ import updateShareFunc from '../share';
import
{
getPxTokenSave
,
getWebData
,
sendWebNet
,
WebNetName
}
from
'../WebNet'
;
export
class
IndexScene
extends
Scene
{
updateIndexUI
({
experienceAmount
,
yesterdayIncome
,
sumIncome
,
sevenDayAnnualization
,
assistFriendNum
,
otherExperienceAmount
,
canWithdraw
})
{
updateIndexUI
({
experienceAmount
,
yesterdayIncome
,
sumIncome
,
sevenDayAnnualization
,
assistFriendNum
,
otherExperienceAmount
,
canWithdraw
})
{
getObject
(
this
,
'index_experienceAmountTips'
).
text
=
experienceAmount
||
"0"
;
getObject
(
this
,
'index_sumIncomeTips'
).
text
=
sumIncome
||
'0'
;
getObject
(
this
,
'index_sevenDayAnnualizationTips'
).
text
=
sevenDayAnnualization
;
...
...
@@ -47,7 +47,7 @@ export class IndexScene extends Scene {
FYGE
.
Tween
.
get
(
__tmp__
,
{
loop
:
false
,
onChange
:
(
param
)
=>
{
index_experienceAmountTips
.
text
=
Math
.
ceil
(
experienceAmount
*
__tmp__
.
a
)
+
''
;
progressBar
.
value
=
percent
*
__tmp__
.
a
;
progressBar
.
value
=
percent
*
__tmp__
.
a
;
}
}).
to
({
a
:
1
},
700
)
}
...
...
@@ -102,16 +102,8 @@ export class IndexScene extends Scene {
data
=
data
||
{};
const
{
action
,
from
}
=
data
;
console
.
log
(
'IndexScene from='
,
from
,
'action='
,
action
);
if
(
action
==
'showSharePanel'
)
{
this
.
showSharePanel
();
}
// setTimeout(() => {
// showPanel(DrawPanel)
// }, 1000);
sendWebNet
(
WebNetName
.
carouselInfo
).
then
(
res
=>
{
const
template
=
'{phone}邀请1位好友,获得了{amount}体验金'
;
const
datas
=
res
.
data
.
map
(
item
=>
{
let
str
=
template
.
replace
(
'{phone}'
,
item
.
nickname
);
...
...
@@ -129,7 +121,10 @@ export class IndexScene extends Scene {
this
.
updateIndexUI
(
myWalletResult
.
data
);
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
createItem
,
{
token
:
token
}).
then
(
createItemResult
=>
{
updateShareFunc
(
'inIndexScene'
,
createItemResult
.
data
)
updateShareFunc
(
'inIndexScene'
,
createItemResult
.
data
);
if
(
action
==
'showSharePanel'
)
{
this
.
showSharePanel
();
}
});
})
...
...
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