Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
crazyflirt
Project
Overview
Details
Activity
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
Shawn Wang
crazyflirt
Commits
7b730bf7
Commit
7b730bf7
authored
May 06, 2018
by
Shawn Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分享
parent
022672e7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
2 deletions
+26
-2
Main.ts
fe/src/Main.ts
+11
-2
Platform.ts
fe/src/Platform.ts
+8
-0
platform.js
fe_wxgame/platform.js
+7
-0
No files found.
fe/src/Main.ts
View file @
7b730bf7
...
...
@@ -70,6 +70,15 @@ class Main extends egret.DisplayObjectContainer {
})
console
.
log
(
userInfo
);
platform
.
onShareAppMessage
((...
args
)
=>
{
return
{
title
:
"恶魔妈妈买面膜"
,
imageUrl
:
"https://ws3.sinaimg.cn/large/006tKfTcly1fr102d837jj31kw11un5h.jpg"
}
})
platform
.
showShareMenu
({
withShareTicket
:
false
})
platform
.
connectSocket
({
url
:
"ws://192.168.50.118:9090"
,
header
:
{
...
...
@@ -77,11 +86,11 @@ class Main extends egret.DisplayObjectContainer {
},
method
:
"GET"
,
success
:
(...
args
)
=>
{
console
.
error
(
"success"
)
console
.
error
(
"
connectSocket
success"
)
console
.
error
(
args
)
},
fail
:
(...
args
)
=>
{
console
.
error
(
"fail"
)
console
.
error
(
"
connectSocket
fail"
)
console
.
error
(
args
)
}
})
...
...
fe/src/Platform.ts
View file @
7b730bf7
...
...
@@ -19,6 +19,8 @@ declare interface Platform {
sendSocketMessage
(
callback
):
void
request
(
options
):
void
exitMiniProgram
(
options
):
void
onShareAppMessage
(
callback
):
any
showShareMenu
(
options
):
any
}
class
DebugPlatform
implements
Platform
{
...
...
@@ -66,6 +68,12 @@ class DebugPlatform implements Platform {
exitMiniProgram
(
options
){
}
onShareAppMessage
(
callback
){
}
showShareMenu
(
options
){
}
}
...
...
fe_wxgame/platform.js
View file @
7b730bf7
...
...
@@ -69,6 +69,13 @@ class WxgamePlatform {
exitMiniProgram
(
options
){
wx
.
exitMiniProgram
(
options
)
}
onShareAppMessage
(
callback
){
return
wx
.
onShareAppMessage
(
callback
)
}
showShareMenu
(
options
){
wx
.
showShareMenu
(
options
)
}
}
...
...
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