调整
This commit is contained in:
@@ -324,7 +324,7 @@ export default {
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getAliexpressGoodsList()
|
||||
// this.getAliexpressGoodsList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -5,6 +5,13 @@
|
||||
title="弹窗消息"
|
||||
tips="点击“一键已读”之后,需要回到“卖家中心”刷新界面,弹窗即可消失"
|
||||
isShowBottomBorder>
|
||||
<template #rightBtn>
|
||||
<div class="title-right">
|
||||
<div>
|
||||
<el-button type="primary" @click="readAllMsg">一键全部已读</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</ai-title>
|
||||
<template slot="content">
|
||||
<ai-table
|
||||
@@ -93,8 +100,29 @@
|
||||
this.currentMallId = temp[0].mallId
|
||||
this.isShow = true
|
||||
},
|
||||
async readAllMsg() {
|
||||
for (let i = 0; i < this.dataList.length; i++) {
|
||||
let tempMallId = this.dataList[i].mallId
|
||||
let tempMsgList = this.dataList[i].data
|
||||
|
||||
for (let j = 0; j < tempMsgList.length; j++) {
|
||||
let res = await sendChromeAPIMessage({
|
||||
url: 'bg/quick/api/merchant/msgBox/read',
|
||||
needMallId: true,
|
||||
mallId: tempMallId,
|
||||
data: {msgId: tempMsgList[j].id}})
|
||||
if (!res.success || res.errorCode != 1000000) {
|
||||
Message.error("一个信息标记已读失败")
|
||||
}
|
||||
}
|
||||
let temp = this.tableData.filter(item => {
|
||||
return item.mallId == tempMallId
|
||||
})
|
||||
temp[0].unreadNum = 0
|
||||
}
|
||||
Message.success("消息标记已读完成,刷新卖家中心弹窗即可消失")
|
||||
},
|
||||
async readAll() {
|
||||
let check = await this.$userCheck(this.currentMallId)
|
||||
if (!this.currentMallId) {
|
||||
Message.error("请选择要标记已读的店铺")
|
||||
return
|
||||
|
||||
@@ -315,7 +315,17 @@ import { Message } from 'element-ui'
|
||||
},
|
||||
|
||||
mounted () {
|
||||
this.beforeGetList()
|
||||
this.$http.post('/api/malluser/info').then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$store.commit('setUserInfo', res.data)
|
||||
if (res.data.flag != 1) {
|
||||
Message.error('您的账号未激活或已失效,请激活后使用')
|
||||
this.$store.commit('setActiveDlgShow', true)
|
||||
return;
|
||||
}
|
||||
this.beforeGetList()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
Reference in New Issue
Block a user