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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
200 additions
and
151 deletions
+200
-151
public_new/js/chat-db-foriOS.js
+173
-0
public_new/js/chat-db.js
+27
-151
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
includeJs
(
"./chat-db-foriOS.js"
);
// 名前空間
var
CHAT_DB
=
{};
// 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
;
}
//ロカールDBからルーム一覧情報を取得
CHAT_DB
.
getRoomList
=
function
(
roomType
,
keyWord
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"getRoomList"
,
{
roomType
:
roomType
,
keyWord
:
keyWord
})
callNativeApp
(
NATIVE_KEY_IOS
.
getRoomList
,
{
roomType
:
roomType
,
keyWord
:
keyWord
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
return
JSON
.
parse
(
android
.
getRoomList
(
roomType
,
keyWord
));
...
...
@@ -32,7 +16,7 @@ CHAT_DB.getRoomList = function (roomType, keyWord) {
CHAT_DB
.
callGetRoomList
=
function
(
roomType
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"getRoomList"
,
{
roomType
:
roomType
}));
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getRoomList
,
{
roomType
:
roomType
}));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getRoomList
(
roomType
));
...
...
@@ -42,7 +26,7 @@ CHAT_DB.callGetRoomList = function (roomType) {
//ロカールDBからログインしたユーザのデータを取得する。
CHAT_DB
.
getMyInfo
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"getMyInfo"
,
{}));
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getMyInfo
,
{}));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getMyInfo
());
...
...
@@ -51,7 +35,7 @@ CHAT_DB.getMyInfo = function () {
CHAT_DB
.
getMessages
=
function
(
roomId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"getMessages"
,
{
roomId
:
roomId
}));
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getMessages
,
{
roomId
:
roomId
}));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getMessageList
(
roomId
));
...
...
@@ -60,7 +44,7 @@ CHAT_DB.getMessages = function (roomId) {
CHAT_DB
.
getFavoriteUsersNotInRoom
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"getFavoriteUsersNotInRoom"
,
{}));
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getFavoriteUsersNotInRoom
,
{}));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getFavoriteUsersNotInRoom
());
...
...
@@ -69,7 +53,7 @@ CHAT_DB.getFavoriteUsersNotInRoom = function () {
CHAT_DB
.
getFavoriteUsers
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"getFavoriteUsers"
,
{}));
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getFavoriteUsers
,
{}));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getFavoriteUsers
());
...
...
@@ -78,7 +62,7 @@ CHAT_DB.getFavoriteUsers = function () {
CHAT_DB
.
getFavoriteGroups
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"getFavoriteGroups"
,
{}));
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getFavoriteGroups
,
{}));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getFavoriteGroups
());
...
...
@@ -87,7 +71,7 @@ CHAT_DB.getFavoriteGroups = function () {
CHAT_DB
.
getMyGroupUsers
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"getMyGroupUsers"
,
{}));
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getMyGroupUsers
,
{}));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getMyGroupUsers
());
...
...
@@ -96,7 +80,7 @@ CHAT_DB.getMyGroupUsers = function () {
CHAT_DB
.
getGroupInfo
=
function
(
groupId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"getGroupInfo"
,
{
groupId
:
groupId
}));
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getGroupInfo
,
{
groupId
:
groupId
}));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getGroupInfo
(
groupId
));
...
...
@@ -106,7 +90,7 @@ CHAT_DB.getGroupInfo = function (groupId) {
CHAT_DB
.
getGroupInfoForAddUser
=
function
(
groupId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"getGroupInfoForAddUser"
,
{
groupId
:
groupId
})
callNativeApp
(
NATIVE_KEY_IOS
.
getGroupInfoForAddUser
,
{
groupId
:
groupId
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
...
...
@@ -116,7 +100,7 @@ CHAT_DB.getGroupInfoForAddUser = function (groupId) {
CHAT_DB
.
loadSelectedUsers
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"getSelectedUserList"
,
{}));
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getSelectedUserList
,
{}));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
console
.
log
(
JSON
.
parse
(
android
.
getSelectedUserList
()));
...
...
@@ -127,7 +111,7 @@ CHAT_DB.loadSelectedUsers = function () {
CHAT_DB
.
getNameCardData
=
function
(
shopMemberId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"getNameCardData"
,
{
shopMemberId
:
shopMemberId
})
callNativeApp
(
NATIVE_KEY_IOS
.
getNameCardData
,
{
shopMemberId
:
shopMemberId
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
return
JSON
.
parse
(
android
.
getNameCardData
(
shopMemberId
));
...
...
@@ -137,7 +121,7 @@ CHAT_DB.getNameCardData = function (shopMemberId) {
CHAT_DB
.
getMyGroupShopMemberByName
=
function
(
shopMemberName
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"getMyGroupShopMemberByName"
,
{
callNativeApp
(
NATIVE_KEY_IOS
.
getMyGroupShopMemberByName
,
{
shopMemberName
:
shopMemberName
,
})
);
...
...
@@ -150,7 +134,7 @@ CHAT_DB.getMyGroupShopMemberByName = function (shopMemberName) {
CHAT_DB
.
getMyGroupShopMemberNotInRoomByName
=
function
(
shopMemberName
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"getMyGroupShopMemberNotInRoomByName"
,
{
callNativeApp
(
NATIVE_KEY_IOS
.
getMyGroupShopMemberNotInRoomByName
,
{
shopMemberName
:
shopMemberName
,
})
);
...
...
@@ -165,7 +149,7 @@ CHAT_DB.getMyGroupShopMemberNotInRoomByName = function (shopMemberName) {
CHAT_DB
.
getAllGroupShopMemberByName
=
function
(
shopMemberName
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"getAllGroupShopMemberByName"
,
{
callNativeApp
(
NATIVE_KEY_IOS
.
getAllGroupShopMemberByName
,
{
shopMemberName
:
shopMemberName
,
})
);
...
...
@@ -178,7 +162,7 @@ CHAT_DB.getAllGroupShopMemberByName = function (shopMemberName) {
CHAT_DB
.
getAllGroupShopMemberNotInRoomByName
=
function
(
shopMemberName
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"getAllGroupShopMemberNotInRoomByName"
,
{
callNativeApp
(
NATIVE_KEY_IOS
.
getAllGroupShopMemberNotInRoomByName
,
{
shopMemberName
:
shopMemberName
,
})
);
...
...
@@ -193,7 +177,7 @@ CHAT_DB.getAllGroupShopMemberNotInRoomByName = function (shopMemberName) {
CHAT_DB
.
getGroupByName
=
function
(
groupName
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"getGroupByName"
,
{
groupName
:
groupName
})
callNativeApp
(
NATIVE_KEY_IOS
.
getGroupByName
,
{
groupName
:
groupName
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
...
...
@@ -203,7 +187,7 @@ CHAT_DB.getGroupByName = function (groupName) {
CHAT_DB
.
getUsersInRoom
=
function
(
roomId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"getUsersInRoom"
,
{
roomId
:
roomId
}));
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getUsersInRoom
,
{
roomId
:
roomId
}));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getUsersInRoom
(
roomId
));
...
...
@@ -213,7 +197,7 @@ CHAT_DB.getUsersInRoom = function (roomId) {
// アーカイブ一覧
CHAT_DB
.
getArchiveList
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"getArchiveList"
,
{}));
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getArchiveList
,
{}));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
return
JSON
.
parse
(
android
.
getArchiveList
());
}
...
...
@@ -231,7 +215,7 @@ CHAT_DB.updateArchiveList = function () {
CHAT_DB
.
getArchiveByName
=
function
(
archiveName
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"getArchiveByName"
,
{
archiveName
:
archiveName
})
callNativeApp
(
NATIVE_KEY_IOS
.
getArchiveByName
,
{
archiveName
:
archiveName
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
return
JSON
.
parse
(
android
.
getArchiveListByName
(
archiveName
));
...
...
@@ -242,7 +226,7 @@ CHAT_DB.getArchiveByName = function (archiveName) {
CHAT_DB
.
getArchiveDetail
=
function
(
archiveId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"getArchiveDetail"
,
{
archiveId
:
archiveId
})
callNativeApp
(
NATIVE_KEY_IOS
.
getArchiveDetail
,
{
archiveId
:
archiveId
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
return
JSON
.
parse
(
android
.
getArchiveDetail
(
archiveId
));
...
...
@@ -260,7 +244,7 @@ CHAT_DB.updateArchiveDetail = function (archiveId) {
CHAT_DB
.
searchMessages
=
function
(
keyword
,
userList
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"searchMessages"
,
{
keyWord
:
keyword
,
userList
:
userList
})
callNativeApp
(
NATIVE_KEY_IOS
.
searchMessages
,
{
keyWord
:
keyword
,
userList
:
userList
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
return
JSON
.
parse
(
android
.
searchMessages
(
keyword
,
userList
));
...
...
@@ -269,7 +253,7 @@ CHAT_DB.searchMessages = function (keyword, userList) {
CHAT_DB
.
getMyGroupUsersNotInRoom
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"getMyGroupUsersNotInRoom"
,
{}));
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getMyGroupUsersNotInRoom
,
{}));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getMyGroupUsersNotInRoom
());
...
...
@@ -279,7 +263,7 @@ CHAT_DB.getMyGroupUsersNotInRoom = function () {
CHAT_DB
.
getUserInfo
=
function
(
shopMemberId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"getUserInfo"
,
{
shopMemberId
:
shopMemberId
})
callNativeApp
(
NATIVE_KEY_IOS
.
getUserInfo
,
{
shopMemberId
:
shopMemberId
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
...
...
@@ -287,72 +271,6 @@ CHAT_DB.getUserInfo = function (shopMemberId) {
}
};
CHAT_DB
.
getBeforeRoomType
=
function
()
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
return
callNativeApp
(
"getBeforeRoomType"
,
{});
}
};
CHAT_DB
.
getRoomType
=
function
()
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
return
parseInt
(
callNativeApp
(
"getRoomType"
,
{}),
10
);
}
};
CHAT_DB
.
removeFavoriteUser
=
function
(
shopMemberId
)
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
var
result
=
callNativeApp
(
"removeFavoriteUser"
,
{
shopMemberId
:
shopMemberId
,
});
if
(
result
==
"true"
)
{
return
true
;
}
else
{
return
false
;
}
}
};
CHAT_DB
.
addFavoriteUser
=
function
(
shopMemberId
)
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
var
result
=
callNativeApp
(
"addFavoriteUser"
,
{
shopMemberId
:
shopMemberId
,
});
if
(
result
==
"true"
)
{
return
true
;
}
else
{
return
false
;
}
}
};
CHAT_DB
.
removeFavoriteGroup
=
function
(
groupId
)
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
var
result
=
callNativeApp
(
"removeFavoriteGroup"
,
{
groupId
:
groupId
});
if
(
result
==
"true"
)
{
return
true
;
}
else
{
return
false
;
}
}
};
CHAT_DB
.
addFavoriteGroup
=
function
(
groupId
)
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
var
result
=
callNativeApp
(
"addFavoriteGroup"
,
{
groupId
:
groupId
});
if
(
result
==
"true"
)
{
return
true
;
}
else
{
return
false
;
}
}
};
CHAT_DB
.
getContentList
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO ローカルDBからダウンロード済のコンテンツを取得
...
...
@@ -365,7 +283,7 @@ CHAT_DB.getUserListByLoginId = function (loginIdList) {
console
.
log
(
loginIdList
);
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
"getUserListByLoginId"
,
{
callNativeApp
(
NATIVE_KEY_IOS
.
getUserListByLoginId
,
{
loginIdList
:
loginIdList
.
join
(
","
),
})
);
...
...
@@ -373,45 +291,3 @@ CHAT_DB.getUserListByLoginId = function (loginIdList) {
return
JSON
.
parse
(
android
.
getUserListByLoginId
(
loginIdList
.
join
(
","
)));
}
};
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
});
}
};
CHAT_DB
.
createContentView
=
function
()
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
return
parseInt
(
callNativeApp
(
"createContentView"
,
{}));
}
};
CHAT_DB
.
getToMoveGroupId
=
function
()
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
return
callNativeApp
(
"getToMoveGroupId"
,
{});
}
};
CHAT_DB
.
getJoinCollaborationType
=
function
()
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
return
parseInt
(
callNativeApp
(
"getJoinCollaborationType"
,
{}),
10
);
}
};
CHAT_DB
.
getHostRequestFlg
=
function
()
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
return
parseInt
(
callNativeApp
(
"getHostRequestFlg"
,
{}),
10
);
}
};
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