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
c4fdb88a
Commit
c4fdb88a
authored
Aug 09, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
8ca3aed9
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
15 deletions
+22
-15
alreadyAcquired.do.json
project/mock/webNet/wallet/alreadyAcquired.do.json
+1
-1
Main.ts
project/src/Main.ts
+2
-2
prize.ts
project/src/panels/prize.ts
+2
-2
IndexScene.ts
project/src/scenes/IndexScene.ts
+3
-3
NewbieScene.ts
project/src/scenes/NewbieScene.ts
+0
-1
ShareScene.ts
project/src/scenes/ShareScene.ts
+1
-2
share.ts
project/src/share.ts
+13
-4
No files found.
project/mock/webNet/wallet/alreadyAcquired.do.json
View file @
c4fdb88a
{
{
"code"
:
null
,
"code"
:
null
,
"data"
:
1
,
"data"
:
0
,
"message"
:
null
,
"message"
:
null
,
"success"
:
true
"success"
:
true
}
}
\ No newline at end of file
project/src/Main.ts
View file @
c4fdb88a
...
@@ -9,7 +9,7 @@ import { IndexScene } from "./scenes/IndexScene";
...
@@ -9,7 +9,7 @@ import { IndexScene } from "./scenes/IndexScene";
import
{
NewbieScene
}
from
"./scenes/NewbieScene"
;
import
{
NewbieScene
}
from
"./scenes/NewbieScene"
;
import
{
ShareScene
}
from
"./scenes/ShareScene"
;
import
{
ShareScene
}
from
"./scenes/ShareScene"
;
import
{
SkinJson
}
from
"./SkinJson"
;
import
{
SkinJson
}
from
"./SkinJson"
;
import
updateShare
from
"./share"
;
import
updateShare
Func
from
"./share"
;
import
{
destroyWebNetData
,
sendWebNet
,
WebNetName
}
from
"./WebNet"
;
import
{
destroyWebNetData
,
sendWebNet
,
WebNetName
}
from
"./WebNet"
;
...
@@ -78,7 +78,7 @@ export class Main {
...
@@ -78,7 +78,7 @@ export class Main {
const
alreadyAcquiredResult
=
await
sendWebNet
(
WebNetName
.
alreadyAcquired
)
const
alreadyAcquiredResult
=
await
sendWebNet
(
WebNetName
.
alreadyAcquired
)
if
(
!
alreadyAcquiredResult
.
data
)
{
if
(
!
alreadyAcquiredResult
.
data
)
{
updateShare
(
'inNewbieScene'
,
''
);
updateShare
Func
(
'inNewbieScene'
,
''
);
changeScene
(
NewbieScene
);
changeScene
(
NewbieScene
);
}
}
else
{
else
{
...
...
project/src/panels/prize.ts
View file @
c4fdb88a
...
@@ -5,7 +5,7 @@ import getObject from "../common/getObject";
...
@@ -5,7 +5,7 @@ import getObject from "../common/getObject";
import
{
ProgressBarS
}
from
"../common/ProgressBarS"
;
import
{
ProgressBarS
}
from
"../common/ProgressBarS"
;
import
{
showShareMask
}
from
"../common/ShareMask"
;
import
{
showShareMask
}
from
"../common/ShareMask"
;
import
{
IndexScene
}
from
"../scenes/IndexScene"
;
import
{
IndexScene
}
from
"../scenes/IndexScene"
;
import
updateShare
from
"../share"
;
import
updateShare
Func
from
"../share"
;
import
{
getPxTokenSave
,
sendWebNet
,
WebNetName
}
from
"../WebNet"
;
import
{
getPxTokenSave
,
sendWebNet
,
WebNetName
}
from
"../WebNet"
;
export
class
PrizePanel
extends
Panel
{
export
class
PrizePanel
extends
Panel
{
amountTxt
:
FYGE
.
TextField
;
amountTxt
:
FYGE
.
TextField
;
...
@@ -43,7 +43,7 @@ export class PrizePanel extends Panel {
...
@@ -43,7 +43,7 @@ export class PrizePanel extends Panel {
getPxTokenSave
().
then
(
token
=>
{
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
createItem
,{
token
:
token
}).
then
(
createItemResult
=>
{
sendWebNet
(
WebNetName
.
createItem
,{
token
:
token
}).
then
(
createItemResult
=>
{
updateShare
(
'inPrizePanel'
,
createItemResult
.
data
)
updateShare
Func
(
'inPrizePanel'
,
createItemResult
.
data
)
});
});
})
})
...
...
project/src/scenes/IndexScene.ts
View file @
c4fdb88a
...
@@ -14,7 +14,7 @@ import { DrawPanel } from '../panels/draw';
...
@@ -14,7 +14,7 @@ import { DrawPanel } from '../panels/draw';
import
{
RulePanel
}
from
'../panels/rule'
;
import
{
RulePanel
}
from
'../panels/rule'
;
import
{
ShareFailPanel
}
from
'../panels/share_fail'
;
import
{
ShareFailPanel
}
from
'../panels/share_fail'
;
import
{
ShareSuccessPanel
}
from
'../panels/share_success'
;
import
{
ShareSuccessPanel
}
from
'../panels/share_success'
;
import
updateShare
from
'../share'
;
import
updateShare
Func
from
'../share'
;
import
{
getPxTokenSave
,
getWebData
,
sendWebNet
,
WebNetName
}
from
'../WebNet'
;
import
{
getPxTokenSave
,
getWebData
,
sendWebNet
,
WebNetName
}
from
'../WebNet'
;
export
class
IndexScene
extends
Scene
{
export
class
IndexScene
extends
Scene
{
...
@@ -96,7 +96,7 @@ export class IndexScene extends Scene {
...
@@ -96,7 +96,7 @@ export class IndexScene extends Scene {
// }, 1000);
// }, 1000);
sendWebNet
(
WebNetName
.
carouselInfo
).
then
(
res
=>
{
sendWebNet
(
WebNetName
.
carouselInfo
).
then
(
res
=>
{
console
.
log
(
'carouselInfo '
,
res
);
const
template
=
'{phone}邀请1位好友,获得了{amount}体验金'
;
const
template
=
'{phone}邀请1位好友,获得了{amount}体验金'
;
const
datas
=
res
.
data
.
map
(
item
=>
{
const
datas
=
res
.
data
.
map
(
item
=>
{
...
@@ -115,7 +115,7 @@ export class IndexScene extends Scene {
...
@@ -115,7 +115,7 @@ export class IndexScene extends Scene {
this
.
updateIndexUI
(
myWalletResult
.
data
);
this
.
updateIndexUI
(
myWalletResult
.
data
);
getPxTokenSave
().
then
(
token
=>
{
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
createItem
,
{
token
:
token
}).
then
(
createItemResult
=>
{
sendWebNet
(
WebNetName
.
createItem
,
{
token
:
token
}).
then
(
createItemResult
=>
{
updateShare
(
'inIndexScene'
,
createItemResult
.
data
,
)
updateShare
Func
(
'inIndexScene'
,
createItemResult
.
data
)
});
});
})
})
...
...
project/src/scenes/NewbieScene.ts
View file @
c4fdb88a
...
@@ -60,7 +60,6 @@ export class NewbieScene extends Scene {
...
@@ -60,7 +60,6 @@ export class NewbieScene extends Scene {
super
.
initUi
();
super
.
initUi
();
sendWebNet
(
WebNetName
.
carouselInfo
).
then
(
res
=>
{
sendWebNet
(
WebNetName
.
carouselInfo
).
then
(
res
=>
{
console
.
log
(
'carouselInfo '
,
res
);
const
template
=
'{phone}邀请了1位好友,获得了{amount}体验金'
;
const
template
=
'{phone}邀请了1位好友,获得了{amount}体验金'
;
const
datas
=
res
.
data
.
map
(
item
=>
{
const
datas
=
res
.
data
.
map
(
item
=>
{
...
...
project/src/scenes/ShareScene.ts
View file @
c4fdb88a
...
@@ -33,8 +33,7 @@ export class ShareScene extends Scene {
...
@@ -33,8 +33,7 @@ export class ShareScene extends Scene {
const
query
=
getQueryParams
();
const
query
=
getQueryParams
();
sendWebNet
(
WebNetName
.
carouselInfo
).
then
(
res
=>
{
sendWebNet
(
WebNetName
.
carouselInfo
).
then
(
res
=>
{
console
.
log
(
'carouselInfo '
,
res
);
const
template
=
'{phone}邀请1位好友,获得了{amount}体验金'
;
const
template
=
'{phone}邀请1位好友,获得了{amount}体验金'
;
const
datas
=
res
.
data
.
map
(
item
=>
{
const
datas
=
res
.
data
.
map
(
item
=>
{
let
str
=
template
.
replace
(
'{phone}'
,
item
.
nickname
);
let
str
=
template
.
replace
(
'{phone}'
,
item
.
nickname
);
...
...
project/src/share.ts
View file @
c4fdb88a
...
@@ -4,12 +4,21 @@
...
@@ -4,12 +4,21 @@
// }
// }
import
{
start
,
WeixinMini
}
from
'@spark/share'
import
{
start
,
WeixinMini
,
updateShare
}
from
'@spark/share'
start
([
WeixinMini
],
(
way
,
success
,
payload
)
=>
{
start
([
WeixinMini
],
(
way
,
success
,
payload
)
=>
{
console
.
log
(
'分享'
+
success
?
'成功'
:
'失败'
)
console
.
log
(
'分享'
+
success
?
'成功'
:
'失败'
)
})
})
;
const
updateShare
=
(...
args
)
=>
{}
const
updateShareFunc
=
(
type
,
code
)
=>
{
export
default
updateShare
console
.
log
(
'updateShare'
,
'type='
,
type
,
'code='
,
code
)
\ No newline at end of file
updateShare
({
title
:
'title'
,
//分享标题
content
:
'content'
,
//分享内容
url
:
'url'
,
//分享链接
thumbnail
:
'thumbnail'
,
//分享缩略图
});
}
export
default
updateShareFunc
;
\ No newline at end of file
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