Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
chat_webview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abookCommunication
chat_webview
Commits
26f2d5b8
Commit
26f2d5b8
authored
Apr 25, 2021
by
Takatoshi Miura
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ios協業実装
parent
fae1ca86
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
8 deletions
+37
-8
public_new/collaboration_documents.html
+3
-1
public_new/collaboration_picture.html
+3
-1
public_new/collaboration_video.html
+3
-1
public_new/collaboration_voice.html
+3
-1
public_new/js/chat-db.js
+14
-0
public_new/js/chat-ui.js
+11
-4
No files found.
public_new/collaboration_documents.html
View file @
26f2d5b8
...
...
@@ -191,6 +191,8 @@
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
}
else
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
}
...
...
@@ -203,7 +205,7 @@
IS_ONLINE
=
isOnline
;
if
(
CHAT_UTIL
.
isIOS
())
{
collaborationJoinFlg
=
CHAT_DB
.
getCollaborationJoinFlg
();
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
collaborationJoinFlg
=
android
.
getCollaborationJoinFlg
();
console
.
log
(
collaborationJoinFlg
);
...
...
public_new/collaboration_picture.html
View file @
26f2d5b8
...
...
@@ -195,6 +195,8 @@
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
}
else
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
}
async
function
getGlobalParam
(
chatServerUrl
,
cmsServerUrl
,
platform
,
isMobile
,
isOnline
)
{
...
...
@@ -204,7 +206,7 @@
IS_MOBILE
=
isMobile
;
IS_ONLINE
=
isOnline
;
if
(
CHAT_UTIL
.
isIOS
())
{
collaborationJoinFlg
=
CHAT_DB
.
getCollaborationJoinFlg
();
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
collaborationJoinFlg
=
android
.
getCollaborationJoinFlg
();
console
.
log
(
collaborationJoinFlg
);
...
...
public_new/collaboration_video.html
View file @
26f2d5b8
...
...
@@ -193,6 +193,8 @@
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
}
else
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
}
async
function
getGlobalParam
(
chatServerUrl
,
cmsServerUrl
,
platform
,
isMobile
,
isOnline
)
{
...
...
@@ -202,7 +204,7 @@
IS_MOBILE
=
isMobile
;
IS_ONLINE
=
isOnline
;
if
(
CHAT_UTIL
.
isIOS
())
{
collaborationJoinFlg
=
CHAT_DB
.
getCollaborationJoinFlg
();
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
collaborationJoinFlg
=
android
.
getCollaborationJoinFlg
();
console
.
log
(
collaborationJoinFlg
);
...
...
public_new/collaboration_voice.html
View file @
26f2d5b8
...
...
@@ -140,6 +140,8 @@
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
}
else
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
}
async
function
getGlobalParam
(
chatServerUrl
,
cmsServerUrl
,
platform
,
isMobile
,
isOnline
)
{
...
...
@@ -149,7 +151,7 @@
IS_MOBILE
=
isMobile
;
IS_ONLINE
=
isOnline
;
if
(
CHAT_UTIL
.
isIOS
())
{
collaborationJoinFlg
=
CHAT_DB
.
getCollaborationJoinFlg
();
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
collaborationJoinFlg
=
android
.
getCollaborationJoinFlg
();
console
.
log
(
collaborationJoinFlg
);
...
...
public_new/js/chat-db.js
View file @
26f2d5b8
...
...
@@ -321,3 +321,17 @@ CHAT_DB.getContentList = function() {
return
JSON
.
parse
(
android
.
getContentList
());
}
};
CHAT_DB
.
getCollaborationJoinFlg
=
function
()
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
return
callNativeApp
(
"getCollaborationJoinFlg"
,
{});
}
};
CHAT_DB
.
getUserInfoList
=
function
(
shopMemberId
)
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
return
callNativeApp
(
"getUserInfoList"
,
{
"shopMemberId"
:
shopMemberId
});
}
};
public_new/js/chat-ui.js
View file @
26f2d5b8
...
...
@@ -1303,8 +1303,15 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
beforeDate
=
message
.
insertDate
;
if
(
message
.
messageType
==
messageType
.
COMMUNICATIONSTART
||
message
.
messageType
==
messageType
.
COMMUNICATIONEND
)
{
var
collaborationInfo
=
JSON
.
parse
(
message
.
message
);
var
userInCollaboration
=
JSON
.
parse
(
android
.
getUserInfoList
(
collaborationInfo
.
userList
));
var
collaborationInfo
;
var
userInCollaboration
;
if
(
CHAT_UTIL
.
isIOS
())
{
collaborationInfo
=
message
.
message
;
userInCollaboration
=
JSON
.
parse
(
CHAT_DB
.
getUserInfoList
(
collaborationInfo
.
userList
));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
collaborationInfo
=
JSON
.
parse
(
message
.
message
);
userInCollaboration
=
JSON
.
parse
(
android
.
getUserInfoList
(
collaborationInfo
.
userList
));
}
userInCollaboration
.
forEach
(
function
(
user
)
{
user
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
user
.
profileUrl
);
...
...
@@ -2442,7 +2449,7 @@ CHAT_UI.displayExistRoom = function(roomId) {
CHAT_UI
.
joinCollaboration
=
function
(
collaborationType
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOS
webkit
.
messageHandlers
.
joinCollaboration
.
postMessage
(
collaborationType
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
android
.
joinCollaboration
(
collaborationType
);
}
...
...
@@ -2450,7 +2457,7 @@ CHAT_UI.joinCollaboration = function(collaborationType) {
CHAT_UI
.
startCollaboration
=
function
(
collaborationType
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOS
webkit
.
messageHandlers
.
startCollaboration
.
postMessage
(
collaborationType
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
android
.
startCollaboration
(
collaborationType
);
}
...
...
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