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
b21ae6da
Commit
b21ae6da
authored
Apr 03, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
f8186d2e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
16 deletions
+22
-16
ruleBg.png
egret/resource/assets/rule/ruleBg.png
+0
-0
sharefriendwx.jpg
egret/resource/assets/sharefriendwx.jpg
+0
-0
FriendShareSkin.exml
egret/resource/skins/FriendShareSkin.exml
+8
-7
RuleSkin.exml
egret/resource/skins/RuleSkin.exml
+3
-3
getFriendSharePic.ts
egret/src/getFriendSharePic.ts
+10
-5
FriendPanel.ts
egret/src/panels/FriendPanel.ts
+1
-1
No files found.
egret/resource/assets/rule/ruleBg.png
View replaced file @
f8186d2e
View file @
b21ae6da
111 KB
|
W:
|
H:
99.1 KB
|
W:
|
H:
2-up
Swipe
Onion skin
egret/resource/assets/sharefriendwx.jpg
View replaced file @
f8186d2e
View file @
b21ae6da
190 KB
|
W:
|
H:
188 KB
|
W:
|
H:
2-up
Swipe
Onion skin
egret/resource/skins/FriendShareSkin.exml
View file @
b21ae6da
...
@@ -3,13 +3,14 @@
...
@@ -3,13 +3,14 @@
<e:Rect
width=
"750"
height=
"1624"
fillAlpha=
"0.7"
/>
<e:Rect
width=
"750"
height=
"1624"
fillAlpha=
"0.7"
/>
<e:Image
source=
"sharefriendwx_jpg"
/>
<e:Image
source=
"sharefriendwx_jpg"
/>
<e:Label
id=
"lvTxt0"
text=
"120"
y=
"319.99"
anchorOffsetX=
"0"
anchorOffsetY=
"0"
bold=
"true"
textAlign=
"center"
verticalAlign=
"middle"
size=
"106"
textColor=
"0xB14D00"
x=
"280"
width=
"189"
visible=
"false"
/>
<e:Label
id=
"lvTxt0"
text=
"120"
y=
"319.99"
anchorOffsetX=
"0"
anchorOffsetY=
"0"
bold=
"true"
textAlign=
"center"
verticalAlign=
"middle"
size=
"106"
textColor=
"0xB14D00"
x=
"280"
width=
"189"
visible=
"false"
/>
<e:Group
x=
"
306"
y=
"-8.7
"
>
<e:Group
x=
"
288.77"
y=
"322.83
"
>
<e:Image
id=
"avatar"
y=
"0"
width=
"1
40"
height=
"14
0"
x=
"0"
source=
""
/>
<e:Image
id=
"avatar"
y=
"0"
width=
"1
50"
height=
"15
0"
x=
"0"
source=
""
/>
<e:Rect
id=
"avatarMask"
width=
"1
40"
height=
"140"
y=
"0"
ellipseWidth=
"140"
ellipseHeight=
"14
0"
x=
"0"
/>
<e:Rect
id=
"avatarMask"
width=
"1
50"
height=
"150"
y=
"0"
ellipseWidth=
"150"
ellipseHeight=
"15
0"
x=
"0"
/>
</e:Group>
</e:Group>
<e:Group
y=
"
123.99"
horizontalCenter=
"-1
"
>
<e:Group
y=
"
432.91"
horizontalCenter=
"-8.5
"
>
<e:Image
source=
"sharefriend_png"
y=
"0"
x=
"0
"
/>
<e:Image
y=
"0"
x=
"0"
source=
"commom_share1_png
"
/>
<e:Label
id=
"nameTxt"
text=
"打发顺丰"
width=
"1
49"
verticalAlign=
"middle"
textAlign=
"center"
size=
"18"
height=
"45"
x=
"16
"
/>
<e:Label
id=
"nameTxt"
text=
"打发顺丰"
width=
"1
88"
verticalAlign=
"middle"
textAlign=
"center"
size=
"18"
height=
"42"
horizontalCenter=
"0"
y=
"20
"
/>
</e:Group>
</e:Group>
<e:BitmapLabel
id=
"lvTxt"
y=
"328.38"
text=
"150"
font=
"sharenums_fnt"
horizontalCenter=
"0"
/>
<e:BitmapLabel
id=
"lvTxt"
y=
"666.23"
text=
"150"
font=
"sharenums_fnt"
horizontalCenter=
"127.5"
rotation=
"5"
/>
<e:Label
id=
"ranktxt"
text=
"我在好友中排名第X"
width=
"399"
size=
"25"
height=
"48"
x=
"175.04"
y=
"770.02"
scaleX=
"1"
scaleY=
"1"
textAlign=
"center"
verticalAlign=
"middle"
/>
</e:Skin>
</e:Skin>
\ No newline at end of file
egret/resource/skins/RuleSkin.exml
View file @
b21ae6da
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"RuleSkin"
width=
"750"
height=
"1
624
"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Skin
class=
"RuleSkin"
width=
"750"
height=
"1
206
"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Image
id=
"ruleBg"
source=
"ruleBg_png"
horizontalCenter=
"0.5"
verticalCenter=
"-23
1"
/>
<e:Image
id=
"ruleBg"
source=
"ruleBg_png"
horizontalCenter=
"0.5"
y=
"25
1"
/>
<e:Scroller
id=
"scroller"
width=
"545"
x=
"104.76"
height=
"507"
y=
"377.2"
>
<e:Scroller
id=
"scroller"
width=
"545"
x=
"104.76"
height=
"507"
y=
"377.2"
>
<e:Group
id=
"group"
width=
"100%"
>
<e:Group
id=
"group"
width=
"100%"
>
<e:Label
id=
"labContent"
width=
"100%"
text=
""
lineSpacing=
"10"
size=
"30"
multiline=
"true"
textColor=
"0xa54615"
/>
<e:Label
id=
"labContent"
width=
"100%"
text=
""
lineSpacing=
"10"
size=
"30"
multiline=
"true"
textColor=
"0xa54615"
/>
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
</e:layout>
</e:layout>
</e:Group>
</e:Group>
</e:Scroller>
</e:Scroller>
<e:Button
id=
"closeBtn"
label=
""
x=
"6
14"
y=
"280
"
>
<e:Button
id=
"closeBtn"
label=
""
x=
"6
04.91"
y=
"246.67
"
>
<e:skinName>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"closeCommonBtn_png"
source.down=
"closeCommonBtn_png"
source.disabled=
"closeCommonBtn_png"
/>
<e:Image
width=
"100%"
height=
"100%"
source=
"closeCommonBtn_png"
source.down=
"closeCommonBtn_png"
source.disabled=
"closeCommonBtn_png"
/>
...
...
egret/src/getFriendSharePic.ts
View file @
b21ae6da
...
@@ -6,8 +6,9 @@ import { getNick } from "./mapScene/MapScene";
...
@@ -6,8 +6,9 @@ import { getNick } from "./mapScene/MapScene";
import
Loading
from
"../libs/new_wx/components/Loading"
;
import
Loading
from
"../libs/new_wx/components/Loading"
;
class
FriendWxShare
extends
ComponentBase
{
class
FriendWxShare
extends
ComponentBase
{
start
()
{
start
(
rank
)
{
const
data
=
getHomeData
();
const
data
=
getHomeData
();
this
[
'ranktxt'
].
text
=
`我在好友中排名第
${
rank
}
`
;
this
[
'lvTxt'
].
text
=
data
.
levels
.
length
==
0
?
1
:
data
.
levels
.
length
;
this
[
'lvTxt'
].
text
=
data
.
levels
.
length
==
0
?
1
:
data
.
levels
.
length
;
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'
);
...
@@ -20,19 +21,23 @@ class FriendWxShare extends ComponentBase {
...
@@ -20,19 +21,23 @@ class FriendWxShare extends ComponentBase {
const
img
:
any
=
document
.
getElementById
(
'pic'
);
const
img
:
any
=
document
.
getElementById
(
'pic'
);
img
.
style
.
display
=
'none'
;
img
.
style
.
display
=
'none'
;
export
const
getFriendShareUrl
=
async
(
parent
?:
egret
.
DisplayObjectContainer
)
=>
{
export
const
getFriendShareUrl
=
async
(
parent
?:
egret
.
DisplayObjectContainer
,
rank
?
)
=>
{
return
new
Promise
(
async
(
r
)
=>
{
return
new
Promise
(
async
(
r
)
=>
{
const
pic
:
egret
.
Texture
=
await
RES
.
getResAsync
(
'sharefriendwx_jpg'
);
const
pic
:
egret
.
Texture
=
await
RES
.
getResAsync
(
'sharefriendwx_jpg'
);
const
showoff
=
new
FriendWxShare
();
const
showoff
=
new
FriendWxShare
();
showoff
.
loadSkin
();
showoff
.
loadSkin
();
showoff
.
start
();
showoff
.
start
(
rank
);
if
(
parent
)
parent
.
addChild
(
showoff
);
if
(
parent
)
{
parent
.
addChild
(
showoff
);
showoff
.
y
=
showoff
.
stage
.
stageHeight
/
2
-
showoff
.
height
/
2
;
};
showoff
.
visible
=
false
;
showoff
.
visible
=
false
;
img
.
style
.
display
=
'block'
;
img
.
style
.
display
=
'block'
;
Loading
.
instace
.
show
();
Loading
.
instace
.
show
();
setTimeout
(()
=>
{
setTimeout
(()
=>
{
const
base64
=
getPrintScreenData
(
showoff
,
0
,
0
,
pic
.
textureWidth
,
parent
.
stage
.
stageHeight
);
const
base64
=
getPrintScreenData
(
showoff
,
0
,
(
showoff
.
height
-
showoff
.
stage
.
stageHeight
)
/
2
,
pic
.
textureWidth
,
parent
.
stage
.
stageHeight
);
img
.
src
=
base64
;
img
.
src
=
base64
;
Loading
.
instace
.
hide
();
Loading
.
instace
.
hide
();
},
200
);
},
200
);
...
...
egret/src/panels/FriendPanel.ts
View file @
b21ae6da
...
@@ -89,7 +89,7 @@ export default class FriendPanel extends Panel {
...
@@ -89,7 +89,7 @@ export default class FriendPanel extends Panel {
console
.
log
(
'onTapInvite'
);
console
.
log
(
'onTapInvite'
);
if
(
iswx
())
{
if
(
iswx
())
{
getFriendShareUrl
(
this
.
stage
);
getFriendShareUrl
(
this
.
stage
,
this
.
rank
);
}
else
}
else
showShare3
(
this
.
rank
);
showShare3
(
this
.
rank
);
// showShareCodePanel(CodeChannels.RankPlay);//mmp,排行榜的分享又不要口令了
// showShareCodePanel(CodeChannels.RankPlay);//mmp,排行榜的分享又不要口令了
...
...
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