Commit 37aad354 by Lee Munkyeong

ネームカード修正

parent 68bb5268
...@@ -407,7 +407,7 @@ ...@@ -407,7 +407,7 @@
</div> </div>
</nav> </nav>
<script id="my-namecard-template" type="text/template"> <script id="my-namecard-template" type="text/template">
<div style="float: right;"><i class="fa fa-times my-name-card-close" aria-hidden="true"></i></div> <div style="float: right;"><i class="fa fa-times my-name-card-close" aria-hidden="true" onclick="CHAT_UI.hideNamecard('myNamecard');"></i></div>
<div class="namecard_img"> <div class="namecard_img">
<img src="./images/user-profile.png" alt> <img src="./images/user-profile.png" alt>
<div class="namedard-img-upload" >Upload</div> <div class="namedard-img-upload" >Upload</div>
...@@ -420,7 +420,7 @@ ...@@ -420,7 +420,7 @@
</div> </div>
</script> </script>
<script id="namecard-template" type="text/template"> <script id="namecard-template" type="text/template">
<div style="float: right;"><i class="fa fa-times my-name-card-close" aria-hidden="true"></i></div> <div style="float: right;"><i class="fa fa-times my-name-card-close" aria-hidden="true" onclick="CHAT_UI.hideNamecard('userNamecard');"></i></div>
<div class="namecard_img"> <div class="namecard_img">
<img src="./images/user-profile.png" alt> <img src="./images/user-profile.png" alt>
<div class="namecard-login-id">{{name}}</div> <div class="namecard-login-id">{{name}}</div>
...@@ -432,7 +432,7 @@ ...@@ -432,7 +432,7 @@
</div> </div>
<div class="text-center"> <div class="text-center">
<button type="button" class="btn btn-primary" id="nameCardChatBtn" onclick="CHAT_UI.startChat();">{{chat}}</button> <button type="button" class="btn btn-primary" id="nameCardChatBtn" onclick="CHAT_UI.startChat('{{loginId}}','{{name}}');">{{chat}}</button>
<button type="button" class="btn btn-primary" id="nameCardVoiceBtn" onclick="CHAT_UI.startVoice();">{{voice}}</button> <button type="button" class="btn btn-primary" id="nameCardVoiceBtn" onclick="CHAT_UI.startVoice();">{{voice}}</button>
<button type="button" class="btn btn-primary" id="nameCardFavoriteBtn" onclick="CHAT_UI.changeFavorite();">{{favorite}}</button> <button type="button" class="btn btn-primary" id="nameCardFavoriteBtn" onclick="CHAT_UI.changeFavorite();">{{favorite}}</button>
</div> </div>
......
...@@ -14,11 +14,14 @@ CHAT_DB.getRoomList = function(roomType) { ...@@ -14,11 +14,14 @@ CHAT_DB.getRoomList = function(roomType) {
//ロカールDBからログインしたユーザのデータを取得する。 //ロカールDBからログインしたユーザのデータを取得する。
CHAT_DB.getMyInfo = function(input) { CHAT_DB.getMyInfo = function(input) {
var result = JSON.parse(android.getMyInfo());
CHAT.globalLoginParameter.shopMemberId = result.shopMemberId;
console.log(CHAT.globalLoginParameter.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 JSON.parse(android.getMyInfo()); return result;
} }
}; };
......
...@@ -1325,9 +1325,18 @@ CHAT_UI.refesshAllGroupSearch = function(groupId) { ...@@ -1325,9 +1325,18 @@ CHAT_UI.refesshAllGroupSearch = function(groupId) {
$('#allGroupArea').show(); $('#allGroupArea').show();
} }
CHAT_UI.startChat = function () { CHAT_UI.startChat = function (userShopMemberId,userName) {
//add Android Chat click console.log(CHAT.globalLoginParameter.shopMemberId);
console.log("ChatClick"); console.log(userShopMemberId);
CHAT_UI.showLoadingIndicator();
var userIdList = [];
userIdList.push(CHAT.globalLoginParameter.shopMemberId);
userIdList.push(userShopMemberId);
console.log(userIdList);
// 参加ユーザ名でルーム名を生成
let newRoomName = CHAT.globalLoginParameter.loginId + ',' +userName;
android.createChatRoom(chatRoomType.DM, userIdList.join(','),newRoomName);
}; };
CHAT_UI.startVoice = function () { CHAT_UI.startVoice = function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment