Ver código fonte

修改弹窗层级

zhengjinyi 1 ano atrás
pai
commit
4706b55294

+ 11 - 0
src/main/resources/static/js/common/serviceapi/user.service.js

@@ -434,6 +434,17 @@ var UserApi = {
                 callback(res);
             });
         },
+        getClubBehaviorInfo: function (params, callback) {//站内消息点击统计
+            Http.AjaxService({
+                url: '/user/login/clubBehaviorInfo',
+                type:'get',
+                data:params,
+                json:false,
+                isHost:true
+            }).then(function (res) {
+                callback(res);
+            });
+        },
         getAuthClubMessageList: function (params, callback) {//机构消息通知列表
             Http.AjaxService({
                 url: '/user/login/auth/ClubMessageList',

+ 1 - 0
src/main/resources/static/js/mixins/router.config.js

@@ -29,6 +29,7 @@ const includeList = [
     { title:'帮助中心',url:'/help/1003.html',pageLabel:'帮助中心',pageType:24 },
     { title:'帮助中心',url:'/help/1026.html',pageLabel:'帮助中心',pageType:24 },
     { title:'机构个人中心',url:'/user/dashboard.html',pageLabel:'机构个人中心',pageType:25 },
+    { title:'机构升级',url:'/user/setting/upgrade.html',pageLabel:'机构升级',pageType:72 },
     { title:'机构编辑资料',url:'/user/setting/information.html',pageLabel:'机构编辑资料',pageType:26 },
     { title:'机构站内消息',url:'/user/message/list.html',pageLabel:'机构站内消息',pageType:27 },
     { title:'超级会员',url:'/user/member.html',pageLabel:'超级会员',pageType:28 },

+ 17 - 15
src/main/resources/static/js/user-center/message.js

@@ -5,6 +5,7 @@ var helpSuggestion = new Vue({
     data: {
         btnLoading: false,
         isRequset:true,
+        userId:0,
         mssageTabBarIndex:0,
         mssageTabBar: [
             {messageType: '',text: '全部消息',bages:0},
@@ -65,28 +66,28 @@ var helpSuggestion = new Vue({
         }
     },
     methods: {
-         toPagination: function (pageNum) {//点击切换分页
+         toPagination (pageNum) {//点击切换分页
             if (pageNum <= this.pageTotal) {
                 this.listQuery.pageNum = pageNum;
                 this. getAuthClubMessageList();
             }
         },
-        checkNum: function () {//输入跳转分页
+        checkNum () {//输入跳转分页
             if (this.pageInput > this.pageTotal) {
                 this.pageInput = this.pageTotal;
             } else if (this.pageInput < 1) {
                 this.pageInput = 1;
             }
         },
-        changeTabsFn:function(index,messageType){//点击Tab切换消息通知
+        changeTabsFn(index,messageType){//点击Tab切换消息通知
             this.mssageTabBarIndex = index;
             this.listQuery.messageType = messageType;
             this.listQuery.pageNum = 1;
             this.messagesList = [];
             this. getAuthClubMessageList();
         },
-        getAuthClubMessageCount:function(){//查询tabs数量
-            var _self = this;
+        getAuthClubMessageCount(){//查询tabs数量
+            const _self = this;
             UserApi.getAuthClubMessageCount({commonId:_self.listQuery.commonId},function (response) {
                 var data = response.data;
                 _self.mssageTabBar[0].bages = _self.allCount = data.count;
@@ -98,8 +99,8 @@ var helpSuggestion = new Vue({
                 _self.mssageTabBar[6].bages = data.activityCount;
             })
         },
-        getAuthClubMessageList:function(){
-            var _self = this;
+        getAuthClubMessageList(){
+            const _self = this;
             UserApi.getAuthClubMessageList(_self.listQuery,function (response) {
                 if(response.code == 0){
                     _self.isRequset = false;
@@ -133,8 +134,8 @@ var helpSuggestion = new Vue({
         checkedContains(arr, val) {// 校验
             return arr.some(item => item === val)
         },
-        checkedItemFn:function(item){ //单选
-            var _self = this;
+        checkedItemFn(item){ //单选
+            const _self = this;
             if(event.target.checked){
                 if(!_self.checkedContains(_self.checklist,item.id)){
                     _self.checklist.push(item.id);
@@ -149,8 +150,8 @@ var helpSuggestion = new Vue({
                _self.isCheckedAll=false;
             }
         },
-        checkedAllFn: function () { //全選
-            var _self = this;
+        checkedAllFn () { //全選
+            const _self = this;
             _self.isCheckedAll = !_self.isCheckedAll;
             if (_self.isCheckedAll) {
                 _self.checklist = [];
@@ -171,11 +172,11 @@ var helpSuggestion = new Vue({
              var _this =this;
             if(this.allCount === 0){
                 CAIMEI.dialog('暂无消息');
-            }else if(_this.checklist.length==0){
+            }else if(_this.checklist.length===0){
                 CAIMEI.dialog('请勾选未读消息');
             }else{
                 UserApi.authDeleteMessage({id:_this.msgId},function (res) {
-                    if (res.code==0){
+                    if (res.code===0){
                       CAIMEI.dialog('刪除成功');
                       setTimeout(function (){
                           _this.getAuthClubMessageList();
@@ -192,11 +193,11 @@ var helpSuggestion = new Vue({
             console.log(_this.msgId);
             if(this.allCount === 0){
                 CAIMEI.dialog('暂无未读消息');
-            }else if(_this.checklist.length==0){
+            }else if(_this.checklist.length=== 0){
                 CAIMEI.dialog('请勾选未读消息');
             }else {
                 UserApi.authUpdateRead({userType:1,Id:_this.msgId},function (res) {
-                    if(res.code==0){
+                    if(res.code=== 0){
                         CAIMEI.dialog('标记已读成功');
                         setTimeout(function (){
                             _this.getAuthClubMessageCount();
@@ -212,6 +213,7 @@ var helpSuggestion = new Vue({
     mounted: function () {
         var _self=this;
         if(globalUserData){
+            this.userId = globalUserData.userId
             this.listQuery.commonId = globalUserData.clubId;
             this.getAuthClubMessageCount()
             this.getAuthClubMessageList();

+ 13 - 1
src/main/resources/static/js/user-center/mixins/noticeMixin.js

@@ -128,6 +128,7 @@ var noticeMixin = function () {// 通知消息
                         let linkJumpMap = {
                             1:payLinkMap[onlinePayFlag]
                         }
+                        this.getClubBehaviorInfo(linkJumpMap[orderMessageType])
                         window.open(linkJumpMap[orderMessageType]);
                     }
                 }else{
@@ -138,6 +139,7 @@ var noticeMixin = function () {// 通知消息
                         5:'/user/order/logistics.html?orderId='+orderId,
                         6:'/user/order/detail.html?orderId='+orderId
                     }
+                    this.getClubBehaviorInfo(linkJumpMap[orderMessageType])
                     window.open(linkJumpMap[orderMessageType]);
                 }
             },
@@ -153,6 +155,7 @@ var noticeMixin = function () {// 通知消息
                     4:'/user/member.html',
                     6:'/user/setting/upgrade.html',
                 }
+                this.getClubBehaviorInfo(linkJumpMap[accountType])
                 window.open(linkJumpMap[accountType]);
             },
             handleServeClick($event){
@@ -166,10 +169,12 @@ var noticeMixin = function () {// 通知消息
                     2:`/user/coupon-collection.html`,
                     3:`/user/coupon.html`,
                 }
+                this.getClubBehaviorInfo(linkJumpMap[couponMessageType])
                 window.open(linkJumpMap[couponMessageType]);
             },
             handleArticleClick($event) {
                 const id = Number($event[0].attributes[0].value);
+                this.getClubBehaviorInfo(`/info/detail-${id}-1.html`)
                 window.open(`/info/detail-${id}-1.html`);
             },
             handleActivityClick($event) {
@@ -177,7 +182,14 @@ var noticeMixin = function () {// 通知消息
                 if (link) {
                     window.open(link);
                 }
-            }
+            },
+            getClubBehaviorInfo(link){//站内消息点击统计
+                const _self = this;
+                UserApi.getClubBehaviorInfo({userId:_self.userId,link:link,accessType:2 },function (response) {
+                    console.log('<========>','站内消息点击统计成功')
+                })
+            },
+
         }
     };
 }();