homepageL.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <div class="allPage">
  3. <div class="packageL">
  4. <topPage @cutUrl="cutUrl" :CocoFlowList="CocoFlowList" ref="topPageRef"></topPage>
  5. <div style="height: 30px;width: 100%;"></div>
  6. <botPage :hotApp="hotApp" ref="botPageRef"></botPage>
  7. </div>
  8. </div>
  9. </template>
  10. <script>
  11. import topPage from '../components/topPage'
  12. import botPage from '../components/botPage'
  13. import { mapGetters } from 'vuex';
  14. import { API_CONFIG } from "@/common/apiConfig";
  15. export default {
  16. props:['urlAddress'],
  17. computed: {
  18. ...mapGetters(['userinfo']),
  19. },
  20. components:{
  21. topPage,
  22. botPage
  23. },
  24. data() {
  25. return {
  26. CocoFlowList:[],
  27. hotApp:[],
  28. }
  29. },
  30. methods: {
  31. getData(){
  32. let params = [
  33. {
  34. functionName: API_CONFIG.ajax_allApp.functionName, // 调用存储过程的名称
  35. uid: this.userinfo.userid, //组织id
  36. cn: this.userinfo.schoolArea ? this.userinfo.schoolArea : this.userinfo.orgArea, //学校id
  37. },
  38. ];
  39. // 发起请求
  40. this.$ajax
  41. .post(API_CONFIG.baseUrl, params)
  42. .then((res) => {
  43. console.log(res);
  44. let data = res.data
  45. this.CocoFlowList = data[0]
  46. this.hotApp = [data[1],data[2],data[3],data[4],]
  47. })
  48. .catch((err) => {
  49. console.error("请求失败,错误信息:", err);
  50. });
  51. },
  52. cutUrl(val){
  53. this.$emit('update:urlAddress',val)
  54. },
  55. },
  56. }
  57. </script>
  58. <style scoped>
  59. .allPage{
  60. width: 100%;
  61. justify-content: center;
  62. height: 100%;
  63. overflow: auto;
  64. }
  65. .packageL{
  66. padding: 24px;
  67. box-sizing: border-box;
  68. margin: auto;
  69. max-width: 1280px;
  70. }
  71. /* 整个滚动条轨道 */
  72. ::-webkit-scrollbar {
  73. width: 10px; /* 垂直滚动条宽度 */
  74. height: 10px; /* 水平滚动条高度 */
  75. }
  76. /* 滚动条轨道背景 */
  77. ::-webkit-scrollbar-track {
  78. background: #f1f1f1;
  79. border-radius: 5px;
  80. }
  81. /* 滚动条滑块 */
  82. ::-webkit-scrollbar-thumb {
  83. background: #888;
  84. border-radius: 5px;
  85. }
  86. /* 鼠标悬停时的滑块 */
  87. ::-webkit-scrollbar-thumb:hover {
  88. background: #555;
  89. }
  90. </style>