|
@@ -30,15 +30,16 @@ var vm = new Vue({
|
|
|
},
|
|
|
created() {
|
|
|
this.getList()
|
|
|
- this.kfContacts()
|
|
|
- this.kfData()
|
|
|
+ // this.kfContacts()
|
|
|
+ // this.kfData()
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 获取所有栏目列表数据(包括未读数量)
|
|
|
getList (msgType) {
|
|
|
var _this = this
|
|
|
var type = msgType !== null && msgType !== undefined ? Number(msgType) : -1
|
|
|
var params = {
|
|
|
- isColumn: true,
|
|
|
+ isColumn: type === -1,
|
|
|
isColumnNewMsg: false,
|
|
|
isMsgList: true,
|
|
|
msgType: type,
|
|
@@ -58,7 +59,9 @@ var vm = new Vue({
|
|
|
_this.loading = false
|
|
|
}, 300)
|
|
|
if(res.code === 0) {
|
|
|
- _this.counts = res.column || []
|
|
|
+ if(_this.counts.length ===0 && res.column.length > 0){
|
|
|
+ _this.counts = res.column || []
|
|
|
+ }
|
|
|
_this.tabsList.lists = []
|
|
|
_this.tabsList.lasts = $.isEmptyObject(res.last) ? false : res.last
|
|
|
_this.tabsList.lists = $.isEmptyObject(res.data) ? false : res.data
|
|
@@ -70,31 +73,31 @@ var vm = new Vue({
|
|
|
})
|
|
|
},
|
|
|
// 私信显示、隐藏
|
|
|
- kfContacts() {
|
|
|
- const _this = this
|
|
|
- $.post({
|
|
|
- url: '/jyapi/social/obtainShunt',// 分流
|
|
|
- type: 'POST',
|
|
|
- data: JSON.stringify({type: 'PC', isFind: true}),
|
|
|
- contentType: 'application/json',
|
|
|
- success: function (res) {
|
|
|
- _this.shuntData = res.data
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
+ // kfContacts() {
|
|
|
+ // const _this = this
|
|
|
+ // $.post({
|
|
|
+ // url: '/jyapi/social/obtainShunt',// 分流
|
|
|
+ // type: 'POST',
|
|
|
+ // data: JSON.stringify({type: 'PC', isFind: true}),
|
|
|
+ // contentType: 'application/json',
|
|
|
+ // success: function (res) {
|
|
|
+ // _this.shuntData = res.data
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // },
|
|
|
// 私信数量
|
|
|
- kfData() {
|
|
|
- const _this = this
|
|
|
- $.ajax({
|
|
|
- type: 'POST',
|
|
|
- url: '/jyapi/message/messageCount',
|
|
|
- data: JSON.stringify({userType: 2}),
|
|
|
- contentType: 'application/json',
|
|
|
- success: function (res) {
|
|
|
- _this.kfCount = res.count
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
+ // kfData() {
|
|
|
+ // const _this = this
|
|
|
+ // $.ajax({
|
|
|
+ // type: 'POST',
|
|
|
+ // url: '/jyapi/message/messageCount',
|
|
|
+ // data: JSON.stringify({userType: 2}),
|
|
|
+ // contentType: 'application/json',
|
|
|
+ // success: function (res) {
|
|
|
+ // _this.kfCount = res.count
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // },
|
|
|
kfHref() {
|
|
|
// 跳转到会话列表(不传userId右侧展示为缺省页)
|
|
|
location.href = '/page_pc_social/customer?mini=1'
|
|
@@ -105,7 +108,12 @@ var vm = new Vue({
|
|
|
},
|
|
|
tabClick(val) {
|
|
|
this.tabsList.offset = 1
|
|
|
- this.getList(val.name)
|
|
|
+ if(val.name !== '999'){
|
|
|
+ this.getList(val.name)
|
|
|
+ } else {
|
|
|
+ this.kfHref()
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
onPageChange(page) {
|
|
|
this.tabsList.offset = page
|