Commit a7b3e6dd by xinla

短链

1 parent b7c1c7c8
......@@ -68,6 +68,7 @@ export default {
submit() {
this.$refs['form'].validate((validate) => {
if (validate) {
this.form.type = this.form.touchType
this.loading = true
;(this.form.id ? update : add)(this.form)
.then((res) => {
......
<script>
import { touchTypeDict } from './components/mixin'
import { touchTypeDict } from './mixin'
export default {
name: '',
components: {},
......
// 短链移动端样式预览
<script>
import { touchTypeDict } from './components/mixin'
import { touchTypeDict } from './mixin'
export default {
name: '',
components: {},
props: {
data: {
type: Object,
default: {},
},
},
data() {
......@@ -24,9 +25,8 @@ export default {
<template>
<div>
<div class="title">预览</div>
<PhoneTemplate :title="touchTypeDict[data.touchType].previewMobileTitle">
<div class="g-title">预览</div>
<PhoneTemplate v-if="touchTypeDict[data.touchType]" :title="touchTypeDict[data.touchType].previewMobileTitle">
<template v-if="data.touchType == 0">
<div class="mask" style="position: absolute">
<div class="cc ac g-card g-pad20" style="width: 70%">公众号文章示例</div>
......
......@@ -5,19 +5,17 @@ export default {
components: {
TimeSearchTitle: () => import('@/components/common/TimeSearchTitle'),
PhonePreview: () => import('./components/PhonePreview.vue'),
ChartLine: () => import('@/components/ChartLine'),
},
data() {
return {
loading: false,
form: {},
data: [],
data: {},
xData: [],
series: [],
}
},
computed: {
ChartLine: () => import('@/components/ChartLine'),
},
computed: {},
watch: {},
created() {
let id = this.$route.query.id
......@@ -96,9 +94,9 @@ export default {
getLineAnalysis(query).then(({ data }) => {
this.series = []
this.xData = data.map((e) => e.xtime)
this.series.push(data.map((e) => e.addCnt))
this.series.push(data.map((e) => e.lostCnt))
this.series.push(data.map((e) => e.netCnt))
this.series.push(data.map((e) => e.pvTodayCount))
this.series.push(data.map((e) => e.uvTodayCount))
this.series.push(data.map((e) => e.openTodayCount))
})
},
},
......@@ -108,27 +106,27 @@ export default {
<template>
<div>
<div class="fxbw">
<div style="width: 40%">
<div style="width: 58%">
<div class="g-title">短链内容</div>
<div class="g-card g-pad20">
<div class="title">短链内容</div>
<Add :form="data" />
</div>
<div class="g-title">数据趋势</div>
<div class="g-card g-pad20">
<CardGroupIndex :data="cardData"></CardGroupIndex>
<div>
<TimeSearchTitle @search="getLineAnalysis"></TimeSearchTitle>
</div>
<ChartLine
:xData="xData"
:legend="['访问总数(pv)', '访问总人数(uv)', '小程序打开数']"
:series="series"></ChartLine>
</div>
</div>
<div class="g-card g-pad20" style="width: 40%; margin-top: 0">
<PhonePreview :data="data" />
</div>
</div>
<div class="g-card g-pad20">
<div class="title">数据趋势</div>
<CardGroupIndex :data="cardData"></CardGroupIndex>
<div>
<TimeSearchTitle @search="getLineAnalysis"></TimeSearchTitle>
</div>
<ChartLine
:xData="xData"
:legend="['访问总数(pv)', '访问总人数(uv)', '小程序打开数']"
:series="series"></ChartLine>
</div>
</div>
</template>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!