52 lines
1.1 KiB
Vue
52 lines
1.1 KiB
Vue
<template>
|
|
<view>
|
|
<!-- <view class="nav">生产经营数据</view> -->
|
|
<view class="placeholder">生产经营数据</view>
|
|
<trq-data></trq-data>
|
|
<yy-data></yy-data>
|
|
</view>
|
|
</template>
|
|
|
|
<script setup>
|
|
import {
|
|
formatDate,
|
|
getDateAfterDays
|
|
} from '@/utils/dateTime.js';
|
|
const res = wx.getSystemInfoSync();
|
|
const statusHeight = res.statusBarHeight; //状态栏高度
|
|
const cusnavbarheight = statusHeight + 44 + 'px';
|
|
|
|
import trqData from './ribaoshuju/trqRbsj.vue';
|
|
import yyData from './ribaoshuju/yyRbsj.vue';
|
|
|
|
const strDate = (() => {
|
|
const now = new Date();
|
|
if (now.getHours() < 11) {
|
|
return formatDate(getDateAfterDays(now, -1)).toString(); //11点之前 头一天的数据
|
|
} else {
|
|
return formatDate(now).toString();
|
|
}
|
|
})
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.nav {
|
|
width: calc(100% - 60rpx);
|
|
padding: 0 30rpx;
|
|
height: v-bind(cusnavbarheight);
|
|
|
|
font-size: 24rpx;
|
|
color: #ffffff;
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
z-index: 99;
|
|
background-image: url('../../static/my/navbg.png');
|
|
background-repeat: no-repeat;
|
|
background-size: 750rpx 458rpx;
|
|
}
|
|
|
|
.placeholder {
|
|
height: v-bind(cusnavbarheight);
|
|
}
|
|
</style> |