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
629a0b7a
Commit
629a0b7a
authored
Aug 11, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
4fbaa156
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
13 deletions
+34
-13
Main.ts
project/src/Main.ts
+1
-2
getShareUrl.ts
project/src/getShareUrl.ts
+3
-1
IndexScene.ts
project/src/scenes/IndexScene.ts
+15
-1
NewbieScene.ts
project/src/scenes/NewbieScene.ts
+2
-1
share.ts
project/src/share.ts
+13
-8
No files found.
project/src/Main.ts
View file @
629a0b7a
...
...
@@ -29,7 +29,7 @@ init(window['CFG'].projectId, null,{
const
isShare
=
()
=>
{
const
query
=
getQueryParams
();
console
.
log
(
'query'
,
query
);
return
query
&&
query
.
sxbankIsSharePage
==
1
;
return
query
&&
query
.
code
;
};
/**
...
...
@@ -92,7 +92,6 @@ export class Main {
const
alreadyAcquiredResult
=
await
sendWebNet
(
WebNetName
.
alreadyAcquired
)
if
(
!
alreadyAcquiredResult
.
data
)
{
updateShareFunc
(
'inNewbieScene'
,
''
);
showWaiting
();
await
RES
.
loadGroup
(
"svga"
);
console
.
log
(
"svga加载完成"
);
...
...
project/src/getShareUrl.ts
View file @
629a0b7a
...
...
@@ -12,3 +12,5 @@ export const getShareUrl = (queryParams) => {
export
const
getAutoPrizeUrl
=
()
=>
{
return
getShareUrl
({
autoprize
:
1
})
}
export
const
getHomePage
=
()
=>
{
return
base
}
\ No newline at end of file
project/src/scenes/IndexScene.ts
View file @
629a0b7a
...
...
@@ -56,10 +56,24 @@ export class IndexScene extends Scene {
onclick_index_drawBtn
()
{
showWaiting
();
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
withDraw
,
{
token
:
token
}).
then
(
res
=>
{
sendWebNet
(
WebNetName
.
withDraw
,
{
token
:
token
}
,
null
,
true
).
then
(
res
=>
{
hideWaiting
();
if
(
res
.
success
)
showPanel
(
DrawPanel
,
res
.
data
);
else
{
switch
(
res
.
code
)
{
case
'200017'
:
showToast
(
'已提现过了'
);
break
;
case
'200010'
:
showToast
(
'收益未满7天不能提现'
);
break
;
default
:
showToast
(
res
.
message
||
'网络异常~'
)
break
;
}
}
});
});
}
...
...
project/src/scenes/NewbieScene.ts
View file @
629a0b7a
...
...
@@ -10,6 +10,7 @@ import Mask from "../common/Mask";
import
{
hideShareMask
}
from
"../common/ShareMask"
;
import
{
PrizePanel
}
from
"../panels/prize"
;
import
{
RulePanel
}
from
"../panels/rule"
;
import
updateShareFunc
from
"../share"
;
import
{
getPxTokenSave
,
sendWebNet
,
WebNetName
}
from
"../WebNet"
;
import
{
IndexScene
}
from
"./IndexScene"
;
let
prize
;
...
...
@@ -29,7 +30,7 @@ export class NewbieScene extends Scene {
async
start
(
data
)
{
super
.
start
();
updateShareFunc
(
'inNewbieScene'
,
''
);
window
[
'__loading__'
].
over
();
const
query
=
getQueryParams
();
...
...
project/src/share.ts
View file @
629a0b7a
...
...
@@ -4,22 +4,27 @@
// }
import
{
start
,
WeixinMini
,
updateShare
}
from
'@spark/share'
import
{
getShareUrl
}
from
'./getShareUrl'
;
let
ready
=
0
;
import
{
start
,
WeixinMini
,
updateShare
}
from
'@spark/share'
import
{
get
HomePage
,
get
ShareUrl
}
from
'./getShareUrl'
;
let
ready
=
0
;
start
([
WeixinMini
],
(
way
,
success
,
payload
)
=>
{
console
.
log
(
'分享'
+
success
?
'成功'
:
'失败'
);
ready
=
1
;
ready
=
1
;
});
const
updateShareFunc
=
(
type
,
code
)
=>
{
if
(
ready
==
0
)
const
updateShareFunc
=
(
type
,
code
)
=>
{
if
(
ready
==
0
)
console
.
log
(
'分享组件没有准备成功'
);
console
.
log
(
'updateShare'
,
'type='
,
type
,
'ready='
,
ready
,
'url='
,
getShareUrl
({
code
:
code
,
sxbankIsSharePage
:
1
}));
let
url
=
getHomePage
();
if
(
code
)
{
url
=
getShareUrl
({
code
:
code
})
}
console
.
log
(
'updateShare'
,
'type='
,
type
,
'ready='
,
ready
,
'url='
,
url
);
updateShare
({
title
:
'title'
,
//分享标题
content
:
'content'
,
//分享内容
url
:
'url'
,
//分享链接
url
:
url
,
//分享链接
thumbnail
:
'thumbnail'
,
//分享缩略图
});
...
...
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