|
@@ -15,6 +15,58 @@
|
|
|
charset="utf-8"></script>
|
|
|
{{include "/common/js.html"}}
|
|
|
<title>通知</title>
|
|
|
+ <style>
|
|
|
+ .app-layout-content-b {
|
|
|
+ padding-top: 76px;
|
|
|
+ }
|
|
|
+ .msg-box {
|
|
|
+ position: fixed;
|
|
|
+ top: 21.33333vw;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
+ z-index: 2;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ padding: 16px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ background-color: #fff;
|
|
|
+ min-height: 44px;
|
|
|
+ }
|
|
|
+ .msg-box > img {
|
|
|
+ width: 44px;
|
|
|
+ height: 44px;
|
|
|
+ border-radius: 50%;
|
|
|
+ margin-right: 12px;
|
|
|
+ flex-shrink: 0;
|
|
|
+ }
|
|
|
+ .msg-box .t-b-box {
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: space-between;
|
|
|
+ }
|
|
|
+ .msg-box .content-box {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 13px;
|
|
|
+ line-height: 20px;
|
|
|
+ color: #5F5E64;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ .content-box .highlight-text {
|
|
|
+ font-size: 16px;
|
|
|
+ line-height: 24px;
|
|
|
+ color: #171826;
|
|
|
+ }
|
|
|
+ .content-box .time-text {
|
|
|
+ font-size: 12px;
|
|
|
+ line-height: 18px;
|
|
|
+ text-align: right;
|
|
|
+ color: #9B9CA3;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
</head>
|
|
|
<body>
|
|
|
<!--头部start-->
|
|
@@ -24,7 +76,21 @@
|
|
|
<span></span></div>
|
|
|
<div class="app-layout-content-b">
|
|
|
<!--头部end-->
|
|
|
-
|
|
|
+ <!--S-固定客服-->
|
|
|
+ <div class="fixed-box msg-box">
|
|
|
+ <img src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/me/images/logo_work.png?v={{Msg "seo" "version"}}"/>
|
|
|
+ <div class="t-b-box">
|
|
|
+ <div class="content-box">
|
|
|
+ <span class="highlight-text">人工客服</span>
|
|
|
+ <span class="time-text">1天前</span>
|
|
|
+ </div>
|
|
|
+ <div class="content-box">
|
|
|
+ <div class="">消息回复只能显示1行 多了不需要显显显...</div>
|
|
|
+ <div class="badge-number" style="display:none;"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!--E-固定客服-->
|
|
|
<div class="noticeMain">
|
|
|
<!--信息空start-->
|
|
|
<div class="empty">
|
|
@@ -47,6 +113,67 @@
|
|
|
FastClick.attach(document.body);
|
|
|
}, false);
|
|
|
}
|
|
|
+ function getOfflineMessageCount () {
|
|
|
+ try {
|
|
|
+ var nowPlatform = 'h5';
|
|
|
+ (function (w, d, e, x) {
|
|
|
+ w[e] = function () { w.cbk = w.cbk || []; w.cbk.push(arguments); }
|
|
|
+ x = d.createElement('script');
|
|
|
+ x.async = true;
|
|
|
+ x.id = 'zhichiScript';
|
|
|
+ x.className="zhiCustomBtn";
|
|
|
+ // wxh5、app、pc
|
|
|
+ x.src = 'https://' + nowPlatform + '-jianyu.sobot.com/chat/frame/v2/entrance.js?sysnum=9d1e3980f91e4b75b8f04e2d206a4c76';
|
|
|
+ window.xxx = x
|
|
|
+ d.body.appendChild(x);
|
|
|
+ })(window, document, 'zc');
|
|
|
+ $.post("/jypay/user/getSimpleData?t="+new Date().getTime(),{},function(r){
|
|
|
+ console.log(r, 'r')
|
|
|
+ var ajaxUserInfo = {
|
|
|
+ headImage: '',
|
|
|
+ nickName: '默认昵称',
|
|
|
+ userId: '',
|
|
|
+ }
|
|
|
+
|
|
|
+ if (r) {
|
|
|
+ Object.keys(ajaxUserInfo).forEach(function (v) {
|
|
|
+ if (r[v] && r[v] !== '') {
|
|
|
+ ajaxUserInfo[v] = r[v]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ zc('config', {
|
|
|
+ custom:true,
|
|
|
+ top_bar_flag: 0,
|
|
|
+ auto_expand: false,
|
|
|
+ show_face: 1,
|
|
|
+ async: 0,
|
|
|
+ photo_flag: false,
|
|
|
+ partnerid: ajaxUserInfo.userId,
|
|
|
+ face: ajaxUserInfo.headImage
|
|
|
+ })
|
|
|
+ console.log('获取未读消息')
|
|
|
+ zc('receive_message',function(res){
|
|
|
+ console.log(res, 'res receive_message')
|
|
|
+ })
|
|
|
+ zc('zhichiReceive',function(res){
|
|
|
+ console.log(res, 'res zhichiReceive')
|
|
|
+ })
|
|
|
+ zc("offline_message_count",function(res){
|
|
|
+ console.log(res, 'offline_message_count')
|
|
|
+ if (res && res.size && res.size > 0) {
|
|
|
+ $(".badge-number").text(res.size).show()
|
|
|
+ } else {
|
|
|
+ $(".badge-number").hide()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ } catch (e) {
|
|
|
+ console.log('error: ',e)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ getOfflineMessageCount()
|
|
|
</script>
|
|
|
<script type="text/javascript">
|
|
|
localStorage.removeItem("redSpotLastAjaxTime");
|