Commit 37aad354 by Lee Munkyeong

ネームカード修正

parent 68bb5268
......@@ -407,7 +407,7 @@
</div>
</nav>
<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">
<img src="./images/user-profile.png" alt>
<div class="namedard-img-upload" >Upload</div>
......@@ -420,7 +420,7 @@
</div>
</script>
<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">
<img src="./images/user-profile.png" alt>
<div class="namecard-login-id">{{name}}</div>
......@@ -432,7 +432,7 @@
</div>
<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="nameCardFavoriteBtn" onclick="CHAT_UI.changeFavorite();">{{favorite}}</button>
</div>
......
......@@ -14,11 +14,14 @@ CHAT_DB.getRoomList = function(roomType) {
//ロカールDBからログインしたユーザのデータを取得する。
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()) {
//TODO IOS処理追加必要
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getMyInfo());
return result;
}
};
......
......@@ -1325,9 +1325,18 @@ CHAT_UI.refesshAllGroupSearch = function(groupId) {
$('#allGroupArea').show();
}
CHAT_UI.startChat = function () {
//add Android Chat click
console.log("ChatClick");
CHAT_UI.startChat = function (userShopMemberId,userName) {
console.log(CHAT.globalLoginParameter.shopMemberId);
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 () {
......
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