Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
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
wildfirecode13
xiaoxiaole
Commits
f8186d2e
Commit
f8186d2e
authored
Apr 03, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
bafe6b43
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
12 deletions
+14
-12
Share3Skin.exml
egret/resource/skins/Share3Skin.exml
+3
-3
FriendPanel.ts
egret/src/panels/FriendPanel.ts
+2
-2
shareCtrl3.ts
egret/src/shareCtrl3.ts
+9
-7
No files found.
egret/resource/skins/Share3Skin.exml
View file @
f8186d2e
...
@@ -2,11 +2,11 @@
...
@@ -2,11 +2,11 @@
<e:Skin
class=
"Share2Skin"
width=
"750"
height=
"1624"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Skin
class=
"Share2Skin"
width=
"750"
height=
"1624"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<w:Config
id=
"16cd6d4c8ff"
/>
<w:Config
id=
"16cd6d4c8ff"
/>
<e:Rect
width=
"750"
height=
"1624"
fillAlpha=
"0.7"
/>
<e:Rect
width=
"750"
height=
"1624"
fillAlpha=
"0.7"
/>
<e:Group
id=
"pic"
x=
"86"
y=
"46"
>
<e:Group
id=
"pic"
x=
"86"
y=
"46"
width=
"600"
height=
"963"
>
<e:Group
y=
"0"
x=
"0"
>
<e:Group
y=
"0"
x=
"0"
>
<e:Image
x=
"0"
y=
"0"
source=
"sharefriend_jpg"
scaleX=
"0.8"
scaleY=
"0.8"
/>
<e:Image
x=
"0"
y=
"0"
source=
"sharefriend_jpg"
scaleX=
"0.8"
scaleY=
"0.8"
/>
<e:Label
id=
"lvTxt1"
text=
"120"
y=
"286.58"
anchorOffsetX=
"0"
anchorOffsetY=
"0"
bold=
"true"
textAlign=
"center"
verticalAlign=
"middle"
size=
"90"
textColor=
"0xb14d00"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Label
id=
"lvTxt1"
text=
"120"
y=
"286.58"
anchorOffsetX=
"0"
anchorOffsetY=
"0"
bold=
"true"
textAlign=
"center"
verticalAlign=
"middle"
size=
"90"
textColor=
"0xb14d00"
horizontalCenter=
"0"
visible=
"false"
/>
<e:BitmapLabel
rotation=
"5"
id=
"lvTxt"
y=
"37
2.86"
text=
"123456
"
font=
"sharenums_fnt"
horizontalCenter=
"103.5"
scaleX=
"0.8"
scaleY=
"0.8"
/>
<e:BitmapLabel
rotation=
"5"
id=
"lvTxt"
y=
"37
1.34"
text=
"123
"
font=
"sharenums_fnt"
horizontalCenter=
"103.5"
scaleX=
"0.8"
scaleY=
"0.8"
/>
</e:Group>
</e:Group>
<e:Group
x=
"236.86"
y=
"44.78"
>
<e:Group
x=
"236.86"
y=
"44.78"
>
<e:Image
id=
"avatar"
y=
"44.85"
width=
"130"
height=
"130"
x=
"-7.82"
source=
""
/>
<e:Image
id=
"avatar"
y=
"44.85"
width=
"130"
height=
"130"
x=
"-7.82"
source=
""
/>
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
<e:Label
id=
"nameTxt"
text=
"打发顺丰"
width=
"149"
verticalAlign=
"middle"
textAlign=
"center"
size=
"18"
height=
"35"
x=
"12.96"
y=
"15.64"
/>
<e:Label
id=
"nameTxt"
text=
"打发顺丰"
width=
"149"
verticalAlign=
"middle"
textAlign=
"center"
size=
"18"
height=
"35"
x=
"12.96"
y=
"15.64"
/>
</e:Group>
</e:Group>
</e:Group>
</e:Group>
<e:Label
id=
"ranktxt"
text=
"我在好友中排名第X"
width=
"350"
verticalAlign=
"middle"
textAlign=
"center"
size=
"22"
height=
"42"
x=
"122.03999999999999"
y=
"448.02"
scaleX=
"1"
scaleY=
"1"
/>
</e:Group>
</e:Group>
<e:Group
id=
"inviteGroup"
x=
"0"
bottom=
"0"
locked=
"true"
>
<e:Group
id=
"inviteGroup"
x=
"0"
bottom=
"0"
locked=
"true"
>
<e:Image
source=
"朋友圈中间分享蒙层1_jpg"
y=
"0"
x=
"0"
/>
<e:Image
source=
"朋友圈中间分享蒙层1_jpg"
y=
"0"
x=
"0"
/>
...
@@ -38,5 +39,4 @@
...
@@ -38,5 +39,4 @@
</e:Button>
</e:Button>
</e:Group>
</e:Group>
</e:Group>
</e:Group>
<e:Label
id=
"ranktxt"
text=
"我在好友中排名第X"
width=
"350"
verticalAlign=
"middle"
textAlign=
"center"
size=
"18"
height=
"42"
x=
"208.04"
y=
"492.5"
/>
</e:Skin>
</e:Skin>
\ No newline at end of file
egret/src/panels/FriendPanel.ts
View file @
f8186d2e
...
@@ -37,7 +37,7 @@ export default class FriendPanel extends Panel {
...
@@ -37,7 +37,7 @@ export default class FriendPanel extends Panel {
`第<font color=0xfff000><b>
${
userRank
.
levelNum
}
</b></font>关`
);
`第<font color=0xfff000><b>
${
userRank
.
levelNum
}
</b></font>关`
);
this
.
score
.
textFlow
=
(
new
egret
.
HtmlTextParser
).
parser
(
this
.
score
.
textFlow
=
(
new
egret
.
HtmlTextParser
).
parser
(
`<font color=0xfff000><b>
${
userRank
.
maxScore
}
</b></font>分`
);
`<font color=0xfff000><b>
${
userRank
.
maxScore
}
</b></font>分`
);
this
[
'rankTxt'
].
text
=
userRank
.
rank
this
.
rank
=
this
[
'rankTxt'
].
text
=
userRank
.
rank
;
this
[
'star'
].
text
=
`X
${
userRank
.
stars
}
`
this
[
'star'
].
text
=
`X
${
userRank
.
stars
}
`
}
}
...
@@ -91,7 +91,7 @@ export default class FriendPanel extends Panel {
...
@@ -91,7 +91,7 @@ export default class FriendPanel extends Panel {
if
(
iswx
())
{
if
(
iswx
())
{
getFriendShareUrl
(
this
.
stage
);
getFriendShareUrl
(
this
.
stage
);
}
else
}
else
showShare3
();
showShare3
(
this
.
rank
);
// showShareCodePanel(CodeChannels.RankPlay);//mmp,排行榜的分享又不要口令了
// showShareCodePanel(CodeChannels.RankPlay);//mmp,排行榜的分享又不要口令了
}
}
...
...
egret/src/shareCtrl3.ts
View file @
f8186d2e
...
@@ -13,7 +13,8 @@ const img: any = document.getElementById('pic');
...
@@ -13,7 +13,8 @@ const img: any = document.getElementById('pic');
img
.
style
.
display
=
'none'
;
img
.
style
.
display
=
'none'
;
class
Share3
extends
ComponentBase
{
class
Share3
extends
ComponentBase
{
start
()
{
start
(
rank
)
{
this
[
'ranktxt'
].
text
=
`我在好友中排名第
${
rank
}
`
;
this
[
'avatar'
].
mask
=
this
[
'avatarMask'
];
this
[
'avatar'
].
mask
=
this
[
'avatarMask'
];
const
{
data
:
user
}
=
DataManager
.
ins
.
getData
(
'hc_userInfo'
);
const
{
data
:
user
}
=
DataManager
.
ins
.
getData
(
'hc_userInfo'
);
this
[
'avatar'
].
source
=
user
.
avatar
;
this
[
'avatar'
].
source
=
user
.
avatar
;
...
@@ -52,11 +53,12 @@ class Share3 extends ComponentBase {
...
@@ -52,11 +53,12 @@ class Share3 extends ComponentBase {
//channel 1 好友 2 朋友圈
//channel 1 好友 2 朋友圈
shareFunc
(
channel
:
string
)
{
shareFunc
(
channel
:
string
)
{
Loading
.
instace
.
show
();
Loading
.
instace
.
show
();
const
base64
=
getPrintScreenData
(
this
[
'pic'
],
0
,
0
,
579
,
864
);
const
base64
=
getPrintScreenData
(
this
[
'pic'
],
0
,
0
,
600
,
963
);
console
.
log
(
base64
);
// img.src = base64;
NetManager
.
ins
.
imgUrl
((
success
)
=>
{
NetManager
.
ins
.
imgUrl
((
success
)
=>
{
const
data
=
DataManager
.
ins
.
getData
(
'imgURL'
);
const
data
=
DataManager
.
ins
.
getData
(
'imgURL'
);
img
.
src
=
data
.
data
;
img
.
src
=
data
.
data
;
// img.src = base64;
callShareApi
(
data
.
data
,
channel
);
callShareApi
(
data
.
data
,
channel
);
Loading
.
instace
.
hide
();
Loading
.
instace
.
hide
();
},
base64
);
},
base64
);
...
@@ -69,17 +71,17 @@ class Share3 extends ComponentBase {
...
@@ -69,17 +71,17 @@ class Share3 extends ComponentBase {
let
inited
=
false
;
let
inited
=
false
;
let
_share
:
Share3
;
let
_share
:
Share3
;
const
initShare
=
()
=>
{
const
initShare
=
(
rank
)
=>
{
const
layer
=
layers
.
shareLayer
;
const
layer
=
layers
.
shareLayer
;
const
share
=
new
Share3
();
const
share
=
new
Share3
();
share
.
loadSkin
();
share
.
loadSkin
();
share
.
start
();
share
.
start
(
rank
);
layer
.
addChild
(
share
);
layer
.
addChild
(
share
);
_share
=
share
;
_share
=
share
;
};
};
export
const
showShare3
=
()
=>
{
export
const
showShare3
=
(
rank
)
=>
{
if
(
!
inited
)
{
if
(
!
inited
)
{
initShare
();
initShare
(
rank
);
inited
=
true
;
inited
=
true
;
}
}
...
...
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