12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <template>
- <view class="container">
- <!-- 头部区域 -->
- <top-box v-bind:timeStamp="timeStamp"></top-box>
- <!-- 列表区域 -->
- <view class="card-box">
- <view class="card-item" v-for="(item,index) in subArr" :style="{backgroundImage:`url(${item.image})`}"></view>
- </view>
- </view>
- </template>
- <script>
- import {
- mapState
- } from 'vuex'
- export default {
- computed: {
- ...mapState('m_parent', ['parentinfo'])
- },
- data() {
- return {
- //时间戳
- timeStamp: '',
- subArr:[
- {
- image:'https://psycho-1300960840.cos.ap-chengdu.myqcloud.com/fu/TMD/banner_1.jpg',
- title:'学情分析报告',
- summary:'提供本学期孩子的全面考试成绩分析报告'
- },
- {
- image:'https://psycho-1300960840.cos.ap-chengdu.myqcloud.com/fu/TMD/banner_2.jpg',
- title:'大考诊断分析报告',
- summary:'提供本学期孩子大考分析报告'
- },
- {
- image:'https://psycho-1300960840.cos.ap-chengdu.myqcloud.com/fu/TMD/banner_3.jpg',
- title:'德育分析报告',
- summary:'提供本学期孩子德育发展全方位分析'
- }
- ]
- }
- },
- onLoad() {
- this.$getTimeStamp()
- },
- //刷新页面
- onPullDownRefresh() {
- this.$getTimeStamp()
- console.log('refresh');
- setTimeout(function() {
- uni.stopPullDownRefresh();
- }, 1000);
- },
- methods: {
-
- },
- }
- </script>
- <style lang="scss">
- .container {
- width: 100%;
- height: 100%;
- overflow-x: hidden; //隐藏多余的页面
- .home-topinfo {
- background: linear-gradient(#ffd200, $page-background-color);
- }
- .card-box {
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- margin: -50rpx 20rpx 0 20rpx;
- justify-content: space-between;
- .card-item {
- margin: 10rpx 0;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- background-size: cover;
- box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.05);
- border-radius: $card-border-radius;
- width: 100%;
- height: 300rpx;
- }
- }
- }
- </style>
|