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
1984f4df
Commit
1984f4df
authored
Mar 31, 2021
by
Takatoshi Miura
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db連携中
parent
f92daabd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
11 deletions
+28
-11
public_new/js/chat-db.js
+28
-11
No files found.
public_new/js/chat-db.js
View file @
1984f4df
...
@@ -5,19 +5,35 @@ var CHAT_DB = {};
...
@@ -5,19 +5,35 @@ var CHAT_DB = {};
//ロカールDBからルーム一覧情報を取得
//ロカールDBからルーム一覧情報を取得
CHAT_DB
.
getRoomList
=
function
(
roomType
)
{
CHAT_DB
.
getRoomList
=
function
(
roomType
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOS処理追加必要
return
JSON
.
parse
(
iosRoomList
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getRoomList
(
roomType
));
return
JSON
.
parse
(
android
.
getRoomList
(
roomType
));
}
}
};
};
var
iosRoomList
;
CHAT_DB
.
getIosRoomList
=
function
(
roomList
)
{
iosRoomList
=
roomList
;
CHAT_DB
.
getRoomList
(
0
);
};
CHAT_DB
.
callGetRoomList
=
function
(
roomType
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
webkit
.
messageHandlers
.
getRoomList
.
postMessage
({
roomType
});
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getRoomList
(
roomType
));
}
}
//ロカールDBからログインしたユーザのデータを取得する。
//ロカールDBからログインしたユーザのデータを取得する。
CHAT_DB
.
getMyInfo
=
function
(
input
)
{
CHAT_DB
.
getMyInfo
=
function
(
input
)
{
var
result
=
JSON
.
parse
(
android
.
getMyInfo
());
var
result
=
JSON
.
parse
(
android
.
getMyInfo
());
CHAT
.
globalLoginParameter
.
shopMemberId
=
result
.
shopMemberId
;
CHAT
.
globalLoginParameter
.
shopMemberId
=
result
.
shopMemberId
;
if
(
CHAT_UTIL
.
isIOS
())
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOS処理追加必要
//TODO IOS処理追加必要
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
//String形式をJsonに変更してReturn
return
result
;
return
result
;
...
@@ -107,10 +123,6 @@ CHAT_DB.getGroupByName = function(groupName) {
...
@@ -107,10 +123,6 @@ CHAT_DB.getGroupByName = function(groupName) {
// アーカイブ一覧
// アーカイブ一覧
var
iosArchiveList
;
var
iosArchiveList
;
getIosArchiveList
=
function
(
archiveList
)
{
iosArchiveList
=
archiveList
;
CHAT_UI
.
refreshArchiveScreen
();
};
CHAT_DB
.
callGetArchiveList
=
function
()
{
CHAT_DB
.
callGetArchiveList
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
if
(
CHAT_UTIL
.
isIOS
())
{
...
@@ -121,6 +133,11 @@ CHAT_DB.callGetArchiveList = function() {
...
@@ -121,6 +133,11 @@ CHAT_DB.callGetArchiveList = function() {
}
}
};
};
CHAT_DB
.
getIosArchiveList
=
function
(
archiveList
)
{
iosArchiveList
=
archiveList
;
CHAT_UI
.
refreshArchiveScreen
();
};
CHAT_DB
.
getArchiveList
=
function
()
{
CHAT_DB
.
getArchiveList
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
iosArchiveList
);
return
JSON
.
parse
(
iosArchiveList
);
...
@@ -140,10 +157,6 @@ CHAT_DB.updateArchiveList = function() {
...
@@ -140,10 +157,6 @@ CHAT_DB.updateArchiveList = function() {
// アーカイブ一覧検索
// アーカイブ一覧検索
var
iosSearchArchiveList
;
var
iosSearchArchiveList
;
var
searchWord
;
var
searchWord
;
getIosSearchArchiveList
=
function
(
archiveList
)
{
iosSearchArchiveList
=
archiveList
;
ARCHIVE_UI
.
refreshSearchScreen
(
searchWord
);
};
CHAT_DB
.
callGetArchiveByName
=
function
(
keyword
)
{
CHAT_DB
.
callGetArchiveByName
=
function
(
keyword
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
if
(
CHAT_UTIL
.
isIOS
())
{
...
@@ -155,10 +168,14 @@ CHAT_DB.callGetArchiveByName = function(keyword) {
...
@@ -155,10 +168,14 @@ CHAT_DB.callGetArchiveByName = function(keyword) {
}
}
};
};
CHAT_DB
.
getIosSearchArchiveList
=
function
(
archiveList
)
{
iosSearchArchiveList
=
archiveList
;
ARCHIVE_UI
.
refreshSearchScreen
(
searchWord
);
};
CHAT_DB
.
getArchiveByName
=
function
(
archiveName
)
{
CHAT_DB
.
getArchiveByName
=
function
(
archiveName
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
iosSearchArchiveList
);
return
JSON
.
parse
();
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
// TODO
// TODO
}
}
...
...
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