217 lines
4.1 KiB
Vue
217 lines
4.1 KiB
Vue
<script setup>
|
||
// 数据中心
|
||
import {
|
||
reactive
|
||
} from 'vue';
|
||
//
|
||
import apex from '@/components/header/apex.vue'
|
||
|
||
// 图表数据
|
||
const chartData = reactive({
|
||
categories: ["1", "2", "3", "4", "5", "6", '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17',
|
||
'18', '19', '20'
|
||
],
|
||
series: [{
|
||
name: "浏览推流",
|
||
data: [15, 14, 50, 37, 17, 38]
|
||
}, ]
|
||
})
|
||
// 配置项
|
||
const opts = reactive({
|
||
color: ["#C2ECFF", "#FFD2D2", "#C2FFCC", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", "#ea7ccc"],
|
||
padding: [0, 35, 0, 0],
|
||
touchMoveLimit: 24,
|
||
enableScroll: true,
|
||
legend: {
|
||
padding: 20,
|
||
margin: 30,
|
||
position: 'top',
|
||
backgroundColor: 'rgb(0,0,0)',
|
||
fontColor: '#fff',
|
||
itemGap: 10,
|
||
},
|
||
xAxis: {
|
||
titleFontSize: 16,
|
||
disableGrid: true,
|
||
scrollShow: true,
|
||
itemCount: 10,
|
||
showTitle: true,
|
||
title: '秒数',
|
||
},
|
||
yAxis: {
|
||
data: [{
|
||
min: 0,
|
||
titleFontSize: 16,
|
||
title: '人数',
|
||
}],
|
||
showTitle: true,
|
||
},
|
||
extra: {
|
||
column: {
|
||
type: "group",
|
||
width: 5,
|
||
activeBgColor: "#000000",
|
||
activeBgOpacity: 0.08
|
||
},
|
||
}
|
||
})
|
||
|
||
/**
|
||
* 跳转
|
||
* @param {Object} url 路径参数
|
||
*/
|
||
function link(url) {
|
||
uni.navigateTo({
|
||
url,
|
||
})
|
||
}
|
||
</script>
|
||
|
||
<template>
|
||
<view class="app">
|
||
<!-- 顶部 -->
|
||
<view class="apex ptb30 plr30 bfff">
|
||
<view class="rows">
|
||
<view class="title c333 f36 b">统计中心</view>
|
||
</view>
|
||
<!-- 查看时间 -->
|
||
<view class="line mt20 c999 f26">统计时间:2024.12.08 18:00</view>
|
||
</view>
|
||
|
||
<!-- 视频详情 -->
|
||
<view class="video df mtb20 ptb20 plr30 bfff">
|
||
<image class="poster br10" src="/static/openPage.png" mode=""></image>
|
||
<view class="info df fdc jcsb f1 ml30">
|
||
<view class="title t2hd f34 c111">我上传了一个视频,这里是视频标题</view>
|
||
<view class="desc t2hd f28 c666">视频简介</view>
|
||
<view class="time f26 c999">2024年11月20日</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="container">
|
||
<view class="rows">
|
||
<view class="title">流量统计</view>
|
||
</view>
|
||
|
||
<view class="charts">
|
||
<qiun-data-charts type="column" :opts="opts" :chartData="chartData" :ontouch="true" />
|
||
</view>
|
||
</view>
|
||
|
||
<view class="container">
|
||
<view class="title">数据统计</view>
|
||
|
||
<view class="dataList">
|
||
<view class="main">
|
||
<view class="item tac">
|
||
<view class="key">推流消耗榴莲果</view>
|
||
<view class="value">10</view>
|
||
</view>
|
||
<!-- 点击订单 显示推广产生的订单列表 -->
|
||
<view class="item tac">
|
||
<view class="key">产生订单数量</view>
|
||
<view class="value">10</view>
|
||
</view>
|
||
<!-- 增加明细列表 商品详情 订单号 显示分享收益详情 获取了多少积分/余额 -->
|
||
<view class="item tac">
|
||
<view class="key">商家推广返利</view>
|
||
<view class="value">10</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="container">
|
||
<view class="main rows" @click="link('/pages/index/dataCenter/pushDetailUser')">
|
||
<view class="key">推流的用户</view>
|
||
<uni-icons type="right" />
|
||
</view>
|
||
</view>
|
||
|
||
<view class="fill" style="height: 30rpx;"></view>
|
||
</view>
|
||
</template>
|
||
|
||
<style lang="scss" scoped>
|
||
// 页面标题
|
||
.apex {
|
||
border-bottom: 2rpx solid #eee;
|
||
}
|
||
|
||
// 视频
|
||
.video {
|
||
|
||
.poster {
|
||
height: 288rpx;
|
||
width: 162rpx;
|
||
}
|
||
}
|
||
|
||
// 锁
|
||
.lock {
|
||
background-color: #FF9B27;
|
||
|
||
.lockImg {
|
||
display: none;
|
||
}
|
||
|
||
.unlockImg {
|
||
display: block;
|
||
}
|
||
|
||
&.active {
|
||
background-color: #ddd;
|
||
|
||
.lockImg {
|
||
display: block;
|
||
}
|
||
|
||
.unlockImg {
|
||
display: none;
|
||
}
|
||
}
|
||
}
|
||
|
||
// 内容
|
||
.container {
|
||
margin: 30rpx;
|
||
padding: 30rpx 20rpx;
|
||
background-color: #fff;
|
||
border-radius: 20rpx;
|
||
|
||
// 标题
|
||
.title {
|
||
margin: 0 30rpx;
|
||
font-size: 30rpx;
|
||
font-weight: bold;
|
||
}
|
||
|
||
// 图表
|
||
.charts {
|
||
height: 700rpx;
|
||
}
|
||
|
||
// 数据列表
|
||
.dataList {
|
||
margin-top: 30rpx;
|
||
|
||
.main {
|
||
display: grid;
|
||
grid-template-columns: repeat(2, 1fr);
|
||
grid-gap: 20rpx;
|
||
}
|
||
|
||
.item {
|
||
padding: 30rpx 0;
|
||
background-color: #f8f8f8;
|
||
border-radius: 20rpx;
|
||
|
||
.value {
|
||
margin-top: 10rpx;
|
||
font-size: 40rpx;
|
||
font-weight: bold;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
</style> |