Merge remote-tracking branch 'origin/master'
This commit is contained in:
@ -121,7 +121,7 @@ const loadMore = () => {
|
||||
|
||||
const getPage = async (page: any, params: any = null) => {
|
||||
loading.value = true
|
||||
let dataTemp = await getMessagePage(
|
||||
const dataTemp = await getMessagePage(
|
||||
Object.assign(
|
||||
{
|
||||
pageNo: page.pageNo,
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<div class="news-main">
|
||||
<div class="news-content">
|
||||
<el-image
|
||||
:src="article.picUrl||article.thumbUrl"
|
||||
:src="article.picUrl || article.thumbUrl"
|
||||
class="material-img"
|
||||
style="width: 100%; height: 120px"
|
||||
/>
|
||||
@ -29,7 +29,7 @@
|
||||
<div class="news-content-item">
|
||||
<div class="news-content-item-title">{{ article.title }}</div>
|
||||
<div class="news-content-item-img">
|
||||
<img :src="article.picUrl||article.thumbUrl" class="material-img" height="100%"/>
|
||||
<img :src="article.picUrl || article.thumbUrl" class="material-img" height="100%" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -106,7 +106,7 @@ watch(
|
||||
if (temp) {
|
||||
reply.value = temp
|
||||
} else {
|
||||
let newData = createEmptyReply(reply)
|
||||
const newData = createEmptyReply(reply)
|
||||
newData.type = newTab
|
||||
reply.value = newData
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="waterfall" v-loading="props.loading">
|
||||
<template v-for="item in props.list" :key="item.articleId">
|
||||
<template v-for="(item, index) in props.list" :key="index">
|
||||
<div class="waterfall-item" v-if="item.content && item.content.newsItem">
|
||||
<WxNews :articles="item.content.newsItem" />
|
||||
<!-- 操作按钮 -->
|
||||
|
||||
@ -186,7 +186,9 @@ const removeNews = async (index: number) => {
|
||||
if (activeNewsIndex.value === index) {
|
||||
activeNewsIndex.value = 0
|
||||
}
|
||||
} catch {}
|
||||
} catch {
|
||||
// empty
|
||||
}
|
||||
}
|
||||
|
||||
// 添加一个图文
|
||||
|
||||
@ -110,7 +110,9 @@ const onBeforeDialogClose = async (onDone: () => {}) => {
|
||||
try {
|
||||
await message.confirm('修改内容可能还未保存,确定关闭吗?')
|
||||
onDone()
|
||||
} catch {}
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
// ======================== 列表查询 ========================
|
||||
@ -179,7 +181,9 @@ const onPublish = async (item: Article) => {
|
||||
await MpFreePublishApi.submitFreePublish(accountId.value, mediaId)
|
||||
message.notifySuccess('发布成功')
|
||||
await getList()
|
||||
} catch {}
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
@ -190,7 +194,9 @@ const onDelete = async (item: Article) => {
|
||||
await MpDraftApi.deleteDraft(accountId.value, mediaId)
|
||||
message.notifySuccess('删除成功')
|
||||
await getList()
|
||||
} catch {}
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -97,7 +97,9 @@ const handleDelete = async (item: any) => {
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@ -101,7 +101,7 @@ const uploadVideoRef = ref<UploadInstance | null>(null)
|
||||
const submitVideo = () => {
|
||||
uploadFormRef.value?.validate((valid) => {
|
||||
if (!valid) {
|
||||
return false
|
||||
return
|
||||
}
|
||||
uploadVideoRef.value?.submit()
|
||||
})
|
||||
|
||||
@ -131,7 +131,7 @@ const onParentDragEnd = ({ oldIndex, newIndex }) => {
|
||||
}
|
||||
|
||||
// 使用一个辅助数组来模拟菜单移动,然后找到展开的二级菜单的新下标`newParent`
|
||||
let positions = new Array<boolean>(menuList.value.length).fill(false)
|
||||
const positions = new Array<boolean>(menuList.value.length).fill(false)
|
||||
positions[props.parentIndex] = true
|
||||
const [out] = positions.splice(oldIndex, 1) // 移出菜单,保存到变量out
|
||||
positions.splice(newIndex, 0, out) // 把out变量插入被移出的菜单
|
||||
|
||||
@ -217,7 +217,9 @@ const onDeleteMenu = async () => {
|
||||
activeMenu.value = {}
|
||||
showRightPanel.value = false
|
||||
activeIndex.value = MENU_NOT_SELECTED
|
||||
} catch {}
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
// ======================== 菜单编辑 ========================
|
||||
@ -267,7 +269,7 @@ const menuListToBackend = () => {
|
||||
// 将前端的 menu,转换成后端接收的 menu
|
||||
// TODO: @芋艿,需要根据后台API删除不需要的字段
|
||||
const menuToBackend = (menu: any) => {
|
||||
let result = {
|
||||
const result = {
|
||||
...menu,
|
||||
children: undefined, // 不处理子节点
|
||||
reply: undefined // 稍后复制
|
||||
|
||||
@ -99,7 +99,7 @@ const userSummaryOption = reactive({
|
||||
series: [
|
||||
{
|
||||
name: '新增用户',
|
||||
type: 'bar',
|
||||
type: 'bar' as const,
|
||||
label: {
|
||||
show: true
|
||||
},
|
||||
@ -108,7 +108,7 @@ const userSummaryOption = reactive({
|
||||
},
|
||||
{
|
||||
name: '取消关注的用户',
|
||||
type: 'bar',
|
||||
type: 'bar' as const,
|
||||
label: {
|
||||
show: true
|
||||
},
|
||||
@ -122,7 +122,7 @@ const userCumulateOption = reactive({
|
||||
data: ['累计用户量']
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
type: 'category' as const,
|
||||
data: [] as any[]
|
||||
},
|
||||
yAxis: {
|
||||
@ -132,7 +132,7 @@ const userCumulateOption = reactive({
|
||||
{
|
||||
name: '累计用户量',
|
||||
data: [] as any[], // 累计用户量的数据
|
||||
type: 'line',
|
||||
type: 'line' as const,
|
||||
smooth: true,
|
||||
label: {
|
||||
show: true
|
||||
@ -156,7 +156,7 @@ const upstreamMessageOption = reactive({
|
||||
series: [
|
||||
{
|
||||
name: '用户发送人数',
|
||||
type: 'line',
|
||||
type: 'line' as const,
|
||||
smooth: true,
|
||||
label: {
|
||||
show: true
|
||||
@ -165,7 +165,7 @@ const upstreamMessageOption = reactive({
|
||||
},
|
||||
{
|
||||
name: '用户发送条数',
|
||||
type: 'line',
|
||||
type: 'line' as const,
|
||||
smooth: true,
|
||||
label: {
|
||||
show: true
|
||||
@ -188,7 +188,7 @@ const interfaceSummaryOption = reactive({
|
||||
series: [
|
||||
{
|
||||
name: '被动回复用户消息的次数',
|
||||
type: 'bar',
|
||||
type: 'bar' as const,
|
||||
label: {
|
||||
show: true
|
||||
},
|
||||
@ -197,7 +197,7 @@ const interfaceSummaryOption = reactive({
|
||||
},
|
||||
{
|
||||
name: '失败次数',
|
||||
type: 'bar',
|
||||
type: 'bar' as const,
|
||||
label: {
|
||||
show: true
|
||||
},
|
||||
@ -205,7 +205,7 @@ const interfaceSummaryOption = reactive({
|
||||
},
|
||||
{
|
||||
name: '最大耗时',
|
||||
type: 'bar',
|
||||
type: 'bar' as const,
|
||||
label: {
|
||||
show: true
|
||||
},
|
||||
@ -213,7 +213,7 @@ const interfaceSummaryOption = reactive({
|
||||
},
|
||||
{
|
||||
name: '总耗时',
|
||||
type: 'bar',
|
||||
type: 'bar' as const,
|
||||
label: {
|
||||
show: true
|
||||
},
|
||||
@ -282,7 +282,9 @@ const initUserSummaryChart = async () => {
|
||||
userSummaryOption.series[1].data[index] = item.cancelUser
|
||||
})
|
||||
})
|
||||
} catch {}
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
/** 累计用户数据 */
|
||||
@ -300,7 +302,9 @@ const initUserCumulateChart = async () => {
|
||||
data.forEach((item, index) => {
|
||||
userCumulateOption.series[0].data[index] = item.cumulateUser
|
||||
})
|
||||
} catch {}
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
/** 消息概况数据 */
|
||||
@ -320,7 +324,9 @@ const initUpstreamMessageChart = async () => {
|
||||
upstreamMessageOption.series[0].data[index] = item.messageUser
|
||||
upstreamMessageOption.series[1].data[index] = item.messageCount
|
||||
})
|
||||
} catch {}
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
/** 接口分析数据 */
|
||||
@ -344,6 +350,8 @@ const interfaceSummaryChart = async () => {
|
||||
interfaceSummaryOption.series[2].data[index] = item.maxTimeCost
|
||||
interfaceSummaryOption.series[3].data[index] = item.totalTimeCost
|
||||
})
|
||||
} catch {}
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -139,7 +139,9 @@ const handleDelete = async (id: number) => {
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
/** 同步操作 */
|
||||
@ -149,6 +151,8 @@ const handleSync = async () => {
|
||||
await MpTagApi.syncTag(queryParams.accountId as number)
|
||||
message.success('同步标签成功')
|
||||
await getList()
|
||||
} catch {}
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
<el-table-column label="用户标识" align="center" prop="openid" width="260" />
|
||||
<el-table-column label="用户头像" min-width="80px" prop="headImageUrl">
|
||||
<template #default="scope">
|
||||
<el-avatar :src="scope.row.headImageUrl"/>
|
||||
<el-avatar :src="scope.row.headImageUrl" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="昵称" align="center" prop="nickname" />
|
||||
@ -176,7 +176,9 @@ const handleSync = async () => {
|
||||
await MpUserApi.syncUser(queryParams.accountId)
|
||||
message.success('开始从微信公众号同步粉丝信息,同步需要一段时间,建议稍后再查询')
|
||||
await getList()
|
||||
} catch {}
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
/** 初始化 */
|
||||
|
||||
Reference in New Issue
Block a user