Forráskód Böngészése

Merge branch 'dev/v4.8.49_zsy' of qmx/jy into feature/v4.8.49

zhangsiya 2 éve
szülő
commit
3d7f6503a7

+ 2 - 0
src/web/staticres/frontRouter/pc/mesgCenter/css/index-pc.css

@@ -151,6 +151,8 @@
   border-radius: 10px;
   font-size: 12px;
   color: #fff;
+  min-width:18px;
+  text-align: center;
 }
 .main-mesg .tabs-mesg .el-tabs .el-tabs__item .msg-label .words {
   font-size: 14px;

+ 8 - 2
src/web/staticres/frontRouter/pc/mesgCenter/js/index-pc.js

@@ -7,7 +7,7 @@ var vm = new Vue({
       loading: false,
       activeName: '-1',
       counts: [],
-      kfCount: 0,
+      // kfCount: 0,
       shuntData: {},
       shunted: true,
       imgSrcObj: {},
@@ -126,12 +126,13 @@ var vm = new Vue({
         headers: {'Content-Type': 'application/json'},
         success: function () {
           window.__canNextReadMessageStatus = false
-          _this.getList(_this.activeName)
           if(message){
             message.getMessageList()
           }
           if (url) {
             location.href = url
+          } else {
+            _this.getList(_this.activeName)
           }
         }
       })
@@ -159,6 +160,8 @@ var vm = new Vue({
         this.readed(item.id, item.link)
       } else {
         window.__canNextReadMessageStatus = false
+        console.dir(777777)
+        console.dir(item.link)
         if (item.link) {
           location.href = item.link
         }
@@ -167,6 +170,9 @@ var vm = new Vue({
     // 清楚未读
     cleanNoRead() {
       var _this = this
+      if(!this.unread) {
+        return
+      }
       $.ajax({
         url: '/jyapi/messageCenter/ClearUnreadMsg',
         type: 'POST',

+ 12 - 17
src/web/staticres/js/pc-message-new.js

@@ -4,12 +4,12 @@ var vmMesg = new Vue({
   delimiters: ['${', '}'],
   data: function () {
     return {
-      imgArrs:  ['quanbu', 'huodong', 'fuwu', 'dingyue', 'xiangmu', 'qiye', 'fenxi', 'xitong'],
       lists: [],
       timer: null,
       totalNum: 0,
       // 轮播时间间隔
       rollingTiming: 10000,
+      typeObj: {}
     }
   },
   computed: {
@@ -21,9 +21,10 @@ var vmMesg = new Vue({
     getList: function() {
       var _this = this
       var params =  {
-        isColumn: false,
+        isColumn: true,
         isColumnNewMsg: false,
         isMsgList: true,
+        isContainLetter: false,
         msgType: -1,
         isRead: 0,
         offset: 1,
@@ -36,13 +37,19 @@ var vmMesg = new Vue({
         dataType: 'json',
         headers: {'Content-Type': 'application/json'},
         success:function (res) {
+          if(res.column){
+            for (var item of res.column) {
+              if (item.msg_type !== -1) {
+                _this.$set(_this.typeObj, item.msg_type, item.name)
+              }
+            }
+          }
           if (res.data) {
             var resList = res.data || []
             _this.totalNum = res.unread || 0
             _this.rollingTiming = res.rollingTiming ?  res.rollingTiming * 1000 : 10000
             resList.forEach(function(v) {
-              v.msg_type_text = _this.msgType(v.msg_type)
-              v.createtime = dateTime(v.createtime, 'hh:mm')
+              v.createtime = dateMatter(v.createtime)
             });
             // 封装成二维数组(用于轮播两条为单位)
             var arr = []
@@ -83,25 +90,13 @@ var vmMesg = new Vue({
       } else {
         if(item.link) {
           // 跳转链接
-          window.location.href = item.link
+          location.href = item.link
         } else {
           // 消息中心
           location.href = '/swordfish/frontPage/messageCenter/sess/index'
         }
       }
     },
-    msgType: function(val) {
-      var obj = {
-        '1': '活动优惠',
-        '2': '服务通知',
-        '3': '订阅消息',
-        '4': '项目动态 ',
-        '5': '企业动态',
-        '6': '分析报告 ',
-        '7': '系统通知',
-      }
-      return obj[val]
-    },
     // 消息统计
    clickMessage(msgLogId) {
       $.ajax({

+ 2 - 0
src/web/staticres/public-pc/css/header-nav.css

@@ -668,6 +668,8 @@
   border-radius: 10px;
   font-size: 12px;
   color: #fff;
+  min-width:18px;
+  text-align: center;
 }
 
 /* 滚动条样式 */

+ 1 - 1
src/web/templates/common/pchead.html

@@ -205,7 +205,7 @@
 <!-- defer表示最后执行 -->
 <!--不展示强推消息-->
 <!--<script defer src='{{Msg "seo" "cdn"}}/common-module/ad/js/msgbuoy.js?v={{Msg "seo" "version"}}'></script>-->
-<script defer src='{{Msg "seo" "cdn"}}/common-module/message-tip/js/msgbuoy.js?v={{Msg "seo" "version"}}'></script>
+<!--<script defer src='{{Msg "seo" "cdn"}}/common-module/message-tip/js/msgbuoy.js?v={{Msg "seo" "version"}}'></script>-->
 <script>
   var Activedatastring = 'register'
   var ActivedataType = 'jy-pc-'+ Activedatastring+ '-login'

+ 5 - 3
src/web/templates/frontRouter/pc/messageCenter/sess/index.html

@@ -24,10 +24,12 @@
             <div class="title-row">
                 <h3>消息中心</h3>
                 <p class="flex">
-                    <span class="handle-span flex" @click="jumpPushPage">
+                    <span class="handle-span flex" >
                         <span class="desc">推送设置页面可进行消息接收渠道的管理</span>
-                        <img class="push-icon" src="/images/pc/msg_export.png" alt="">
-                        <span>推送设置</span>
+                        <span class="flex" @click="jumpPushPage">
+                            <img class="push-icon" src="/images/pc/msg_export.png" alt="">
+                            <span>推送设置</span>
+                        </span>
                     </span>
                     <span class="handle-span flex" @click="cleanNoRead">
                        <img class="clean-icon" :src="unread > 0 ? '/images/pc/msg_clean.png' : '/images/pc/msg_no_clean.png'" alt="">

+ 1 - 1
src/web/templates/pc/index.html

@@ -80,7 +80,7 @@
                     <el-carousel-item class="l-msg" v-for="(tempList, index) in lists" :key="'msg_' + index">
                         <div class="words" v-for="item in tempList" :key="item.id">
                             <img class="icon_voice" src="/images/pc/icon_voice.png"  />
-                            <h3>${item.msg_type_text}</h3>
+                            <h3>${typeObj[item.msg_type]}</h3>
                             <span class="title" @click="titleGoto(item)">${item.title}</span>
                             <p>${item.createtime}</p>
                         </div>

+ 5 - 1
src/web/templates/pc/messageDetail.html

@@ -82,8 +82,12 @@
   }
   function getList () {
     var _this = this
+    const msgLogId = getUrlParam('msgLogId')
+    if(!msgLogId) {
+      return
+    }
     var params =  {
-      msgLogId: getUrlParam('msgLogId') ? Number(getUrlParam('msgLogId')) : null
+      msgLogId: Number(msgLogId)
     }
     $.ajax({
       url: '/jyapi/messageCenter/messageDetail',