t-w-application.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <view class="headers">
  3. <view class="headers_img">
  4. <image :src="header" mode=""></image>
  5. </view>
  6. <view class="headers_nav">
  7. <view class="headers_ul">
  8. <view class="headers_li" v-for="(item,index) in nav" :key="index" @click="getnav(item.link)">
  9. <view class="headers_li_img">
  10. <image :src="item.icon" mode=""></image>
  11. </view>
  12. <view class="headers_li_text">
  13. {{item.title}}
  14. </view>
  15. </view>
  16. </view>
  17. </view>
  18. <view class="headers_list" v-for="(item,index) in module" :key="index">
  19. <view class="headers_title">
  20. <text class="headers_title_h1">
  21. {{item.title}}
  22. </text>
  23. <!-- <text class="headers_title_h2">
  24. {{item.titles}}
  25. </text> -->
  26. </view>
  27. <view class="headers_ul" >
  28. <view class="headers_li" v-for="(items,index) in item.children" :key="index" @click="getmodule(items.link)">
  29. <view class="headers_li_img">
  30. <image :src="items.icon" mode=""></image>
  31. </view>
  32. <view class="headers_li_text">
  33. {{items.title}}
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. export default {
  42. data() {
  43. return {
  44. module:[],
  45. nav:[],
  46. header:"",
  47. };
  48. },
  49. created() {
  50. this.getworkbench()
  51. },
  52. methods:{
  53. getworkbench(){
  54. this.$api.workbench_index({
  55. }).then((res)=>{
  56. this.header=res.data.data.header
  57. this.nav=res.data.data.nav
  58. this.module=res.data.data.module
  59. })
  60. },
  61. getnav(link){
  62. console.log(link)
  63. },
  64. getmodule(link){
  65. console.log(link)
  66. }
  67. },
  68. }
  69. </script>
  70. <style>
  71. .headers{
  72. width: 100%;
  73. background-color: #F5F5F5;
  74. }
  75. .headers_img>image{
  76. width: 100%;
  77. height: 360rpx;
  78. }
  79. .headers_nav{
  80. width: 100%;
  81. background-color: #FFFFFF;
  82. margin-bottom: 25rpx;
  83. }
  84. .headers_ul{
  85. width: 100%;
  86. display: flex;
  87. flex-wrap:wrap;
  88. justify-content: space-around;
  89. margin-top: 10rpx;
  90. }
  91. .headers_ul::after{
  92. content: '';
  93. width: 25%;
  94. }
  95. .headers_title{
  96. margin-left: 40rpx;
  97. padding-top: 30rpx;
  98. padding-bottom: 5rpx;
  99. }
  100. .headers_li{
  101. width: 25%;
  102. text-align: center;
  103. margin-bottom: 25rpx;
  104. margin-top: 25rpx;
  105. }
  106. .headers_li_img>image{
  107. width: 100rpx;
  108. height: 100rpx;
  109. }
  110. .headers_li_text{
  111. font-size: 14px;
  112. }
  113. .headers_title_h1{
  114. font-weight: 800;
  115. }
  116. .headers_list{
  117. width: 100%;
  118. background-color: #fff;
  119. }
  120. </style>