interactive.vue 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <template>
  2. <view class="container">
  3. <!-- 头部区域 -->
  4. <top-box :timeStamp="timeStamp"></top-box>
  5. <!-- 记录模块 -->
  6. <interactive-box></interactive-box>
  7. <!-- 列表区域 -->
  8. <view class="card-box">
  9. <view class="card-item" v-for="(item,index) in subArr" :style="{backgroundImage:`url(${item.image})`}"></view>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. import {
  15. mapState
  16. } from 'vuex'
  17. export default {
  18. computed: {
  19. ...mapState('m_parent', ['parentinfo'])
  20. },
  21. data() {
  22. return {
  23. //时间戳
  24. timeStamp: '',
  25. subArr:[
  26. {
  27. image:'https://psycho-1300960840.cos.ap-chengdu.myqcloud.com/fu/TMD/banner_1.jpg',
  28. title:'学情分析报告',
  29. summary:'提供本学期孩子的全面考试成绩分析报告'
  30. },
  31. {
  32. image:'https://psycho-1300960840.cos.ap-chengdu.myqcloud.com/fu/TMD/banner_2.jpg',
  33. title:'大考诊断分析报告',
  34. summary:'提供本学期孩子大考分析报告'
  35. },
  36. {
  37. image:'https://psycho-1300960840.cos.ap-chengdu.myqcloud.com/fu/TMD/banner_3.jpg',
  38. title:'德育分析报告',
  39. summary:'提供本学期孩子德育发展全方位分析'
  40. }
  41. ]
  42. }
  43. },
  44. onLoad() {
  45. this.timeStamp = (new Date()).format("hh:mm")
  46. },
  47. //刷新页面
  48. onPullDownRefresh() {
  49. this.timeStamp = (new Date()).format("hh:mm")
  50. console.log('refresh');
  51. setTimeout(function() {
  52. uni.stopPullDownRefresh();
  53. }, 1000);
  54. },
  55. methods: {
  56. },
  57. }
  58. </script>
  59. <style lang="scss">
  60. @import '@/pages/common/mainpage.scss';
  61. .home-topinfo {
  62. background: linear-gradient($color-green, $page-background-color) !important;
  63. }
  64. .container {
  65. width: 100%;
  66. height: 100%;
  67. overflow-x: hidden; //隐藏多余的页面
  68. .card-box {
  69. display: flex;
  70. flex-direction: row;
  71. flex-wrap: wrap;
  72. margin: 0 20rpx 20rpx 20rpx;
  73. justify-content: space-between;
  74. .card-item {
  75. margin: 10rpx 0;
  76. display: flex;
  77. flex-direction: column;
  78. justify-content: space-between;
  79. background-size: cover;
  80. box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.06);
  81. border-radius: $card-border-radius;
  82. width: 100%;
  83. height: 300rpx;
  84. }
  85. }
  86. }
  87. </style>