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
21e79a8e
Commit
21e79a8e
authored
Oct 16, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
761251ff
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
89 additions
and
22 deletions
+89
-22
MainBase.ts
egret/libs/new_wx/MainBase.ts
+1
-0
friendshare.tmproject
egret/resource/TextureMerger/friendshare.tmproject
+1
-0
friendbg.png
egret/resource/assets/friend/friendbg.png
+0
-0
sharefriendwx.jpg
egret/resource/assets/sharefriendwx.jpg
+0
-0
default.res.json
egret/resource/default.res.json
+9
-0
default.thm.json
egret/resource/default.thm.json
+1
-0
FriendShareSkin.exml
egret/resource/skins/FriendShareSkin.exml
+14
-0
getFriendSharePic.ts
egret/src/getFriendSharePic.ts
+41
-0
BloodPanel.ts
egret/src/panels/BloodPanel.ts
+7
-8
BloodPanel2.ts
egret/src/panels/BloodPanel2.ts
+7
-8
FriendPanel.ts
egret/src/panels/FriendPanel.ts
+5
-6
shareCtrl3.ts
egret/src/shareCtrl3.ts
+3
-0
No files found.
egret/libs/new_wx/MainBase.ts
View file @
21e79a8e
...
@@ -169,6 +169,7 @@ export default class MainBase extends eui.UILayer {
...
@@ -169,6 +169,7 @@ export default class MainBase extends eui.UILayer {
RES
.
getResAsync
(
`nums2_fnt`
);
RES
.
getResAsync
(
`nums2_fnt`
);
if
(
!
window
[
'development'
])
{
if
(
!
window
[
'development'
])
{
RES
.
getResAsync
(
`common_json`
);
RES
.
getResAsync
(
`common_json`
);
RES
.
getResAsync
(
`friendshare_json`
);
RES
.
getResAsync
(
`inviterulepanel_json`
);
RES
.
getResAsync
(
`inviterulepanel_json`
);
}
}
else
{
else
{
...
...
egret/resource/TextureMerger/friendshare.tmproject
0 → 100644
View file @
21e79a8e
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"friendshare","version":5,"files":["../assets/sharefriend/sharefriend.png"]}
\ No newline at end of file
egret/resource/assets/friend/friendbg.png
View replaced file @
761251ff
View file @
21e79a8e
160 KB
|
W:
|
H:
152 KB
|
W:
|
H:
2-up
Swipe
Onion skin
egret/resource/assets/sharefriendwx.jpg
0 → 100644
View file @
21e79a8e
286 KB
egret/resource/default.res.json
View file @
21e79a8e
...
@@ -123,6 +123,10 @@
...
@@ -123,6 +123,10 @@
{
{
"keys"
:
"sharefriend_png"
,
"keys"
:
"sharefriend_png"
,
"name"
:
"share3"
"name"
:
"share3"
},
{
"keys"
:
"sharefriend_png"
,
"name"
:
"friendshare"
}
}
],
],
"resources"
:
[
"resources"
:
[
...
@@ -2250,6 +2254,11 @@
...
@@ -2250,6 +2254,11 @@
"url"
:
"assets/sharefriend/sharefriend.png"
,
"url"
:
"assets/sharefriend/sharefriend.png"
,
"type"
:
"image"
,
"type"
:
"image"
,
"name"
:
"sharefriend_png"
"name"
:
"sharefriend_png"
},
{
"url"
:
"assets/sharefriendwx.jpg"
,
"type"
:
"image"
,
"name"
:
"sharefriendwx_jpg"
}
}
]
]
}
}
\ No newline at end of file
egret/resource/default.thm.json
View file @
21e79a8e
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
"resource/skins/FailSkin.exml"
,
"resource/skins/FailSkin.exml"
,
"resource/skins/FriendItem2Skin.exml"
,
"resource/skins/FriendItem2Skin.exml"
,
"resource/skins/FriendItemSkin.exml"
,
"resource/skins/FriendItemSkin.exml"
,
"resource/skins/FriendShareSkin.exml"
,
"resource/skins/FriendSkin.exml"
,
"resource/skins/FriendSkin.exml"
,
"resource/skins/H5Skin.exml"
,
"resource/skins/H5Skin.exml"
,
"resource/skins/IconButtonSkin.exml"
,
"resource/skins/IconButtonSkin.exml"
,
...
...
egret/resource/skins/FriendShareSkin.exml
0 → 100644
View file @
21e79a8e
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"FriendShareSkin"
width=
"750"
height=
"1624"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Rect
width=
"750"
height=
"1624"
fillAlpha=
"0.7"
/>
<e:Image
source=
"sharefriendwx_jpg"
/>
<e:Label
id=
"lvTxt"
text=
"70"
y=
"377.58"
anchorOffsetX=
"0"
anchorOffsetY=
"0"
bold=
"true"
textAlign=
"center"
verticalAlign=
"middle"
size=
"106"
textColor=
"0xB14D00"
x=
"280"
width=
"189"
/>
<e:Group
x=
"306"
y=
"55"
>
<e:Image
id=
"avatar"
y=
"0"
width=
"140"
height=
"140"
x=
"0"
source=
""
/>
<e:Rect
id=
"avatarMask"
width=
"140"
height=
"140"
y=
"0"
ellipseWidth=
"140"
ellipseHeight=
"140"
x=
"0"
/>
</e:Group>
<e:Group
y=
"174"
horizontalCenter=
"-1"
>
<e:Image
source=
"sharefriend_png"
y=
"0"
x=
"0"
/>
<e:Label
id=
"nameTxt"
text=
"打发顺丰"
width=
"149"
verticalAlign=
"middle"
textAlign=
"center"
size=
"18"
height=
"45"
x=
"16"
/>
</e:Group>
</e:Skin>
\ No newline at end of file
egret/src/getFriendSharePic.ts
0 → 100644
View file @
21e79a8e
import
ComponentBase
from
"../libs/new_wx/components/ComponentBase"
;
import
getHomeData
from
"./getHomeData"
;
import
{
getPrintScreenData
}
from
"./getShowOffPic"
;
import
{
DataManager
}
from
"../libs/tw/manager/DataManager"
;
import
{
getNick
}
from
"./mapScene/MapScene"
;
import
Loading
from
"../libs/new_wx/components/Loading"
;
class
FriendWxShare
extends
ComponentBase
{
start
()
{
const
data
=
getHomeData
();
this
[
'lvTxt'
].
text
=
data
.
levels
.
length
==
0
?
1
:
data
.
levels
.
length
;
this
[
'avatar'
].
mask
=
this
[
'avatarMask'
];
const
{
data
:
user
}
=
DataManager
.
ins
.
getData
(
'hc_userInfo'
);
this
[
'avatar'
].
source
=
user
.
avatar
;
this
[
'nameTxt'
].
text
=
getNick
(
user
.
nickname
);
}
get
skinKey
()
{
return
'FriendShare'
}
}
const
img
:
any
=
document
.
getElementById
(
'pic'
);
img
.
style
.
display
=
'none'
;
export
const
getFriendShareUrl
=
async
(
parent
?:
egret
.
DisplayObjectContainer
)
=>
{
return
new
Promise
(
async
(
r
)
=>
{
const
pic
:
egret
.
Texture
=
await
RES
.
getResAsync
(
'sharefriendwx_jpg'
);
const
showoff
=
new
FriendWxShare
();
showoff
.
loadSkin
();
showoff
.
start
();
if
(
parent
)
parent
.
addChild
(
showoff
);
showoff
.
visible
=
false
;
img
.
style
.
display
=
'block'
;
Loading
.
instace
.
show
();
setTimeout
(()
=>
{
const
base64
=
getPrintScreenData
(
showoff
,
0
,
0
,
pic
.
textureWidth
,
parent
.
stage
.
stageHeight
);
img
.
src
=
base64
;
Loading
.
instace
.
hide
();
},
200
);
})
}
\ No newline at end of file
egret/src/panels/BloodPanel.ts
View file @
21e79a8e
import
wait
from
"../../libs/new_tc/wait"
;
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
getHomeData
,
{
BLOOD_NUMS_MAX
}
from
"../getHomeData"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
SceneCtrl
from
"../../libs/new_wx/ctrls/sceneCtrl"
;
import
SceneCtrl
from
"../../libs/new_wx/ctrls/sceneCtrl"
;
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
import
{
getlogItem
}
from
"../Main"
;
import
{
updateMainTimer
}
from
"../../libs/new_wx/MainBase"
;
import
wait
from
"../../libs/new_tc/wait"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
{
showShare
}
from
"../shareCtrl"
;
import
getHomeData
,
{
BLOOD_NUMS_MAX
}
from
"../getHomeData"
;
import
{
getShareUrl
}
from
"../getSharePic"
;
import
{
iswx
}
from
"../iswx"
;
import
{
iswx
}
from
"../iswx"
;
import
getShowOffPic
from
"../getShowOffPic"
;
import
{
getlogItem
}
from
"../Main"
;
import
getSharePic
,
{
getShareUrl
}
from
"../getSharePic"
;
import
CountDown
from
"../mapScene/CountDown"
;
import
CountDown
from
"../mapScene/CountDown"
;
import
{
updateMainTimer
}
from
"../../libs/new_wx/MainBase
"
;
import
{
showShare
}
from
"../shareCtrl
"
;
export
default
class
BloodPanel
extends
Panel
{
export
default
class
BloodPanel
extends
Panel
{
start
(
data
)
{
start
(
data
)
{
...
...
egret/src/panels/BloodPanel2.ts
View file @
21e79a8e
import
wait
from
"../../libs/new_tc/wait"
;
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
getHomeData
,
{
BLOOD_NUMS_MAX
}
from
"../getHomeData"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
SceneCtrl
from
"../../libs/new_wx/ctrls/sceneCtrl"
;
import
SceneCtrl
from
"../../libs/new_wx/ctrls/sceneCtrl"
;
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
import
{
getlogItem
}
from
"../Main"
;
import
{
updateMainTimer
}
from
"../../libs/new_wx/MainBase"
;
import
wait
from
"../../libs/new_tc/wait"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
{
showShare
}
from
"../shareCtrl"
;
import
getHomeData
,
{
BLOOD_NUMS_MAX
}
from
"../getHomeData"
;
import
{
getShareUrl
}
from
"../getSharePic"
;
import
{
iswx
}
from
"../iswx"
;
import
{
iswx
}
from
"../iswx"
;
import
getShowOffPic
from
"../getShowOffPic"
;
import
{
getlogItem
}
from
"../Main"
;
import
getSharePic
,
{
getShareUrl
}
from
"../getSharePic"
;
import
CountDown
from
"../mapScene/CountDown"
;
import
CountDown
from
"../mapScene/CountDown"
;
import
{
updateMainTimer
}
from
"../../libs/new_wx/MainBase
"
;
import
{
showShare
}
from
"../shareCtrl
"
;
export
default
class
BloodPanel2
extends
Panel
{
export
default
class
BloodPanel2
extends
Panel
{
start
(
data
)
{
start
(
data
)
{
...
...
egret/src/panels/FriendPanel.ts
View file @
21e79a8e
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
FriendItemRenderer
from
"./FriendItemRenderer"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
{
getNick
}
from
"../mapScene/MapScene
"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager
"
;
import
{
iswx
}
from
"../iswx"
;
import
{
iswx
}
from
"../iswx"
;
import
{
getShareUrl
}
from
"../getSharePic"
;
import
{
getNick
}
from
"../mapScene/MapScene"
;
import
{
showShare
}
from
"../shareCtrl"
;
import
{
showShare3
}
from
"../shareCtrl3"
;
import
{
showShare3
}
from
"../shareCtrl3"
;
import
FriendItemRenderer
from
"./FriendItemRenderer"
;
import
{
getFriendShareUrl
}
from
"../getFriendSharePic"
;
export
default
class
FriendPanel
extends
Panel
{
export
default
class
FriendPanel
extends
Panel
{
public
list
:
eui
.
List
;
public
list
:
eui
.
List
;
...
@@ -84,7 +83,7 @@ export default class FriendPanel extends Panel {
...
@@ -84,7 +83,7 @@ export default class FriendPanel extends Panel {
console
.
log
(
'onTapInvite'
);
console
.
log
(
'onTapInvite'
);
if
(
iswx
())
{
if
(
iswx
())
{
getShareUrl
(
this
.
stage
);
get
Friend
ShareUrl
(
this
.
stage
);
}
else
}
else
showShare3
();
showShare3
();
}
}
...
...
egret/src/shareCtrl3.ts
View file @
21e79a8e
...
@@ -7,6 +7,7 @@ import { DataManager } from "../libs/tw/manager/DataManager";
...
@@ -7,6 +7,7 @@ import { DataManager } from "../libs/tw/manager/DataManager";
import
{
getNick
}
from
"./mapScene/MapScene"
;
import
{
getNick
}
from
"./mapScene/MapScene"
;
import
{
getPrintScreenData
}
from
"./getShowOffPic"
;
import
{
getPrintScreenData
}
from
"./getShowOffPic"
;
import
{
NetManager
}
from
"../libs/tw/manager/NetManager"
;
import
{
NetManager
}
from
"../libs/tw/manager/NetManager"
;
import
Loading
from
"../libs/new_wx/components/Loading"
;
const
img
:
any
=
document
.
getElementById
(
'pic'
);
const
img
:
any
=
document
.
getElementById
(
'pic'
);
img
.
style
.
display
=
'none'
;
img
.
style
.
display
=
'none'
;
...
@@ -50,12 +51,14 @@ class Share3 extends ComponentBase {
...
@@ -50,12 +51,14 @@ class Share3 extends ComponentBase {
//channel 1 好友 2 朋友圈
//channel 1 好友 2 朋友圈
shareFunc
(
channel
:
string
)
{
shareFunc
(
channel
:
string
)
{
Loading
.
instace
.
show
();
const
base64
=
getPrintScreenData
(
this
[
'pic'
],
0
,
0
,
579
,
864
);
const
base64
=
getPrintScreenData
(
this
[
'pic'
],
0
,
0
,
579
,
864
);
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;
// img.src = base64;
callShareApi
(
data
.
data
,
channel
);
callShareApi
(
data
.
data
,
channel
);
Loading
.
instace
.
hide
();
},
base64
);
},
base64
);
}
}
...
...
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