作者 whf

2019-5-27 14:21

1 body { 1 body {
2 background: #f5f5f5; 2 background: #f5f5f5;
3 } 3 }
4 -  
5 .bad-network { 4 .bad-network {
6 line-height: 38px; 5 line-height: 38px;
7 background-color: #7c858b; 6 background-color: #7c858b;
@@ -163,6 +163,11 @@ body { @@ -163,6 +163,11 @@ body {
163 text-align: center; 163 text-align: center;
164 background: #569df6; 164 background: #569df6;
165 } 165 }
  166 +.title .exitBtn{
  167 + position: absolute;
  168 + right:10px;
  169 + cursor: pointer;
  170 +}
166 #cloudMsgContainer .title{ 171 #cloudMsgContainer .title{
167 height: 90px; 172 height: 90px;
168 line-height: 90px; 173 line-height: 90px;
@@ -107,7 +107,6 @@ var SDKBridge = function (ctr, data) { @@ -107,7 +107,6 @@ var SDKBridge = function (ctr, data) {
107 switch (error.code) { 107 switch (error.code) {
108 // 账号或者密码错误, 请跳转到登录页面并提示错误 108 // 账号或者密码错误, 请跳转到登录页面并提示错误
109 case 302: 109 case 302:
110 - alert(error.message);  
111 delCookie('uid'); 110 delCookie('uid');
112 delCookie('sdktoken'); 111 delCookie('sdktoken');
113 delCookie('nickName'); 112 delCookie('nickName');
1 -$(function() {  
2 - if(readCookie('accountList')) {  
3 - var accountList = JSON.parse(readCookie('accountList'))  
4 - //判断如果是老板登录 则显示客服列表  
5 - if(readCookie('flag') == 1) {  
6 - var oDiv = $("<div id='selectWrap'></div>")  
7 - var oSpan = $("<span class='selectTitle'>客服列表</span>")  
8 - var oSelect = $("<select id='changeAccount'></select>")  
9 - for(var i = 0; i < accountList.length; i++) {  
10 - oSelect.append("<option value='" + accountList[i].token + "' uid='" + accountList[i].accid + "'>" + accountList[i].name + "</option>");  
11 - }  
12 - oDiv.prepend(oSelect)  
13 - oDiv.prepend(oSpan)  
14 - $("body").prepend(oDiv)  
15 - if(readCookie('currentSelect')) {  
16 - var uid = readCookie('currentSelect')  
17 - oSelect.find("option[uid='" + uid + "']").attr("selected", true);  
18 - }  
19 - oSelect.change(function() {  
20 - setCookie('currentSelect', oSelect.find("option:checked").attr("uid"));  
21 - YX.fn.doLogout()  
22 - setCookie('uid', oSelect.find("option:checked").attr("uid"));  
23 - setCookie('sdktoken', oSelect.val())  
24 - setTimeout(function() {  
25 - window.location.reload()  
26 - }, 500)  
27 - })  
28 - }  
29 -  
30 - } 1 +$(function () {
  2 + // if(readCookie('accountList')) {
  3 + // var accountList = JSON.parse(readCookie('accountList'))
  4 + // //判断如果是老板登录 则显示客服列表
  5 + // if(readCookie('flag') == 1) {
  6 + // var oDiv = $("<div id='selectWrap'></div>")
  7 + // var oSpan = $("<span class='selectTitle'>客服列表</span>")
  8 + // var oSelect = $("<select id='changeAccount'></select>")
  9 + // for(var i = 0; i < accountList.length; i++) {
  10 + // oSelect.append("<option value='" + accountList[i].token + "' uid='" + accountList[i].accid + "'>" + accountList[i].name + "</option>");
  11 + // }
  12 + // oDiv.prepend(oSelect)
  13 + // oDiv.prepend(oSpan)
  14 + // $("body").prepend(oDiv)
  15 + // if(readCookie('currentSelect')) {
  16 + // var uid = readCookie('currentSelect')
  17 + // oSelect.find("option[uid='" + uid + "']").attr("selected", true);
  18 + // }
  19 + // oSelect.change(function() {
  20 + // setCookie('currentSelect', oSelect.find("option:checked").attr("uid"));
  21 + // YX.fn.doLogout()
  22 + // setCookie('uid', oSelect.find("option:checked").attr("uid"));
  23 + // setCookie('sdktoken', oSelect.val())
  24 + // setTimeout(function() {
  25 + // window.location.reload()
  26 + // }, 500)
  27 + // })
  28 + // }
  29 + // }
  30 + let exitBtn = $("#exitBtn")
  31 + exitBtn.click(function () {
  32 + delCookie('uid');
  33 + delCookie('sdktoken');
  34 + delCookie('nickName');
  35 + delCookie('avatar')
  36 + delCookie('flag')
  37 + window.location.href = "../im/login.html"
  38 + })
31 }) 39 })
@@ -32,6 +32,7 @@ @@ -32,6 +32,7 @@
32 <div class="hide loading" id="loading"></div> 32 <div class="hide loading" id="loading"></div>
33 <div class="title"> 33 <div class="title">
34 <span>对客服说列表</span> 34 <span>对客服说列表</span>
  35 + <span class="exitBtn" id="exitBtn">退出</span>
35 </div> 36 </div>
36 <div class="m-devices hide">正在使用云信web版</div> 37 <div class="m-devices hide">正在使用云信web版</div>
37 <div class="panel" id="switchPanel"> 38 <div class="panel" id="switchPanel">
@@ -590,7 +591,6 @@ @@ -590,7 +591,6 @@
590 <script src="js/module/personCard.js"></script> 591 <script src="js/module/personCard.js"></script>
591 <script src="js/module/session.js"></script> 592 <script src="js/module/session.js"></script>
592 <script src="js/module/friend.js"></script> 593 <script src="js/module/friend.js"></script>
593 -  
594 <script src="js/module/team.js"></script> 594 <script src="js/module/team.js"></script>
595 <script src="js/module/dialog_team.js"></script> 595 <script src="js/module/dialog_team.js"></script>
596 <script src="js/module/cloudMsg.js"></script> 596 <script src="js/module/cloudMsg.js"></script>
@@ -601,6 +601,7 @@ @@ -601,6 +601,7 @@
601 <script src="js/module/dialog_call_method.js"></script> 601 <script src="js/module/dialog_call_method.js"></script>
602 <script src="js/main.js?v=2"></script> 602 <script src="js/main.js?v=2"></script>
603 <script src="../3rd/vue.min.js"></script> 603 <script src="../3rd/vue.min.js"></script>
  604 + <script src="js/talk.js"></script>
604 <script id="whiteboard-template" type="text/x-template"> 605 <script id="whiteboard-template" type="text/x-template">
605 <div v-show="display" class="function-box whiteboard"> 606 <div v-show="display" class="function-box whiteboard">
606 <div v-if="banner.length" class="whiteboard-banner"> 607 <div v-if="banner.length" class="whiteboard-banner">
@@ -676,7 +677,7 @@ @@ -676,7 +677,7 @@
676 <div class="dialogs"></div> 677 <div class="dialogs"></div>
677 </div> 678 </div>
678 </script> 679 </script>
679 - <!-- <script src="js/talk.js"></script> --> 680 +
680 </body> 681 </body>
681 682
682 </html> 683 </html>