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
87f38391
Commit
87f38391
authored
Jun 08, 2021
by
Kim Peace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed chat-deb with chat-deb-foriOS.js
parent
95d6a023
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
173 additions
and
0 deletions
+173
-0
public_new/js/chat-db-foriOS.js
+173
-0
public_new/js/chat-db.js
+0
-0
No files found.
public_new/js/chat-db-foriOS.js
0 → 100644
View file @
87f38391
const
NATIVE_KEY_IOS
=
{
getBeforeRoomType
:
"getBeforeRoomType"
,
getRoomType
:
"getRoomType"
,
removeFavoriteUser
:
"removeFavoriteUser"
,
addFavoriteUser
:
"addFavoriteUser"
,
removeFavoriteGroup
:
"removeFavoriteGroup"
,
addFavoriteGroup
:
"addFavoriteGroup"
,
getCollaborationJoinFlg
:
"getCollaborationJoinFlg"
,
getUserInfoList
:
"getUserInfoList"
,
createContentView
:
"createContentView"
,
getToMoveGroupId
:
"getToMoveGroupId"
,
getJoinCollaborationType
:
"getJoinCollaborationType"
,
getHostRequestFlg
:
"getHostRequestFlg"
,
getRoomList
:
"getRoomList"
,
getMyInfo
:
"getMyInfo"
,
getMessages
:
"getMessages"
,
getFavoriteUsersNotInRoom
:
"getFavoriteUsersNotInRoom"
,
getFavoriteUsers
:
"getFavoriteUsers"
,
getFavoriteGroups
:
"getFavoriteGroups"
,
getMyGroupUsers
:
"getMyGroupUsers"
,
getGroupInfo
:
"getGroupInfo"
,
getGroupInfoForAddUser
:
"getGroupInfoForAddUser"
,
getSelectedUserList
:
"getSelectedUserList"
,
getNameCardData
:
"getNameCardData"
,
getMyGroupShopMemberByName
:
"getMyGroupShopMemberByName"
,
getMyGroupShopMemberNotInRoomByName
:
"getMyGroupShopMemberNotInRoomByName"
,
getAllGroupShopMemberByName
:
"getAllGroupShopMemberByName"
,
getAllGroupShopMemberNotInRoomByName
:
"getAllGroupShopMemberNotInRoomByName"
,
getGroupByName
:
"getGroupByName"
,
getUsersInRoom
:
"getUsersInRoom"
,
getArchiveList
:
"getArchiveList"
,
getArchiveByName
:
"getArchiveByName"
,
getArchiveDetail
:
"getArchiveDetail"
,
searchMessages
:
"searchMessages"
,
getMyGroupUsersNotInRoom
:
"getMyGroupUsersNotInRoom"
,
getUserInfo
:
"getUserInfo"
,
getUserListByLoginId
:
"getUserListByLoginId"
,
};
// ios用
function
callNativeApp
(
iosKey
,
jsonData
)
{
console
.
log
(
"callNativeApp called"
);
var
result
;
try
{
var
key
=
iosKey
;
var
data
=
jsonData
;
var
payload
=
{
key
:
key
,
data
:
data
};
// payloadの形 {"type":"SJbridge","data":{"name":"abc","role":"dev"}}
// resにObjective-cからのレスポンスが返る
result
=
prompt
(
JSON
.
stringify
(
payload
));
console
.
log
(
result
);
}
catch
(
err
)
{
console
.
log
(
"The native context does not exist yet"
);
}
return
result
;
}
CHAT_DB
.
getBeforeRoomType
=
function
()
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
return
callNativeApp
(
NATIVE_KEY_IOS
.
getBeforeRoomType
,
{});
}
};
CHAT_DB
.
getRoomType
=
function
()
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
return
parseInt
(
callNativeApp
(
NATIVE_KEY_IOS
.
getRoomType
,
{}),
10
);
}
};
CHAT_DB
.
removeFavoriteUser
=
function
(
shopMemberId
)
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
var
result
=
callNativeApp
(
NATIVE_KEY_IOS
.
removeFavoriteUser
,
{
shopMemberId
:
shopMemberId
,
});
if
(
result
==
"true"
)
{
return
true
;
}
else
{
return
false
;
}
}
};
CHAT_DB
.
addFavoriteUser
=
function
(
shopMemberId
)
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
var
result
=
callNativeApp
(
NATIVE_KEY_IOS
.
addFavoriteUser
,
{
shopMemberId
:
shopMemberId
,
});
if
(
result
==
"true"
)
{
return
true
;
}
else
{
return
false
;
}
}
};
CHAT_DB
.
removeFavoriteGroup
=
function
(
groupId
)
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
var
result
=
callNativeApp
(
NATIVE_KEY_IOS
.
removeFavoriteGroup
,
{
groupId
:
groupId
,
});
if
(
result
==
"true"
)
{
return
true
;
}
else
{
return
false
;
}
}
};
CHAT_DB
.
addFavoriteGroup
=
function
(
groupId
)
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
var
result
=
callNativeApp
(
NATIVE_KEY_IOS
.
addFavoriteGroup
,
{
groupId
:
groupId
,
});
if
(
result
==
"true"
)
{
return
true
;
}
else
{
return
false
;
}
}
};
CHAT_DB
.
getCollaborationJoinFlg
=
function
()
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
return
callNativeApp
(
NATIVE_KEY_IOS
.
getCollaborationJoinFlg
,
{});
}
};
CHAT_DB
.
getUserInfoList
=
function
(
shopMemberId
)
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
return
callNativeApp
(
NATIVE_KEY_IOS
.
getUserInfoList
,
{
shopMemberId
:
shopMemberId
,
});
}
};
CHAT_DB
.
createContentView
=
function
()
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
return
parseInt
(
callNativeApp
(
NATIVE_KEY_IOS
.
createContentView
,
{}));
}
};
CHAT_DB
.
getToMoveGroupId
=
function
()
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
return
callNativeApp
(
NATIVE_KEY_IOS
.
getToMoveGroupId
,
{});
}
};
CHAT_DB
.
getJoinCollaborationType
=
function
()
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
return
parseInt
(
callNativeApp
(
NATIVE_KEY_IOS
.
getJoinCollaborationType
,
{}),
10
);
}
};
CHAT_DB
.
getHostRequestFlg
=
function
()
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
return
parseInt
(
callNativeApp
(
NATIVE_KEY_IOS
.
getHostRequestFlg
,
{}),
10
);
}
};
public_new/js/chat-db.js
View file @
87f38391
This diff is collapsed.
Click to expand it.
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