projectlist.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <template>
  2. <view>
  3. <view class="skill-sequence-panel-content-wrapper">
  4. <ad :unit-id="adlist.bannerAd"></ad>
  5. <view class="kite-classify-cell shadow" v-for="(item, index) in curriculum" :key="index">
  6. <view :class="'nav-li bg-index' + (index + 1)">
  7. <view class="nav-name">{{ item.itemName }}</view>
  8. </view>
  9. <view class="nav-content">{{ item.itemDesc }}</view>
  10. <view @click="goDeatil" class="nav-btn shadow" :class="'bg-index' + (index + 1)">立即访问</view>
  11. </view>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. export default {
  17. data() {
  18. return {
  19. adlist:this.myad()[0],
  20. curriculum:{}
  21. }
  22. },
  23. onLoad() {
  24. this.getItemslist()
  25. },
  26. methods: {
  27. getItemslist(){
  28. this.request('loadItems', 'GET').then(res=>{
  29. console.log("res:",res)
  30. if(res){
  31. this.curriculum = res.data
  32. }
  33. })
  34. },
  35. }
  36. }
  37. </script>
  38. <style lang="scss">
  39. /*scroll-view外层*/
  40. .skill-sequence-panel-content-wrapper {
  41. position: relative;
  42. white-space: nowrap;
  43. padding: 10rpx 0 10rpx 10rpx;
  44. }
  45. /*左右渐变遮罩*/
  46. .hide-content-box {
  47. position: absolute;
  48. top: 0;
  49. height: 100%;
  50. width: 10px;
  51. z-index: 2;
  52. }
  53. .hide-content-box-left {
  54. left: 0;
  55. background-image: linear-gradient(to left, rgba(255, 255, 255, 0), #f3f3f3 60%);
  56. }
  57. .hide-content-box-right {
  58. right: 0;
  59. background-image: linear-gradient(to right, rgba(255, 255, 255, 0), #f3f3f3 60%);
  60. }
  61. .kite-classify-scroll {
  62. width: 100%;
  63. height: 380rpx;
  64. overflow: hidden;
  65. white-space: nowrap;
  66. }
  67. .kite-classify-cell {
  68. // display: inline-block;
  69. // width: 300rpx;
  70. height: 370rpx;
  71. margin-right: 25rpx;
  72. background-color: #ffffff;
  73. border-radius: 10rpx;
  74. overflow: hidden;
  75. box-shadow: 2px 2px 3px rgba(26, 26, 26, 0.2);
  76. margin-bottom: 20rpx;
  77. }
  78. .nav-li {
  79. padding: 40rpx 30rpx;
  80. width: 100%;
  81. background-image: url(https://s1.ax1x.com/2020/06/27/NyU04x.png);
  82. background-size: cover;
  83. background-position: center;
  84. position: relative;
  85. z-index: 1;
  86. }
  87. .nav-name {
  88. font-size: 28upx;
  89. text-transform: Capitalize;
  90. // margin-top: 20upx;
  91. position: relative;
  92. }
  93. .nav-name::before {
  94. content: '';
  95. position: absolute;
  96. display: block;
  97. width: 40rpx;
  98. height: 6rpx;
  99. background: #fff;
  100. bottom: 0;
  101. right: 0;
  102. opacity: 0.5;
  103. }
  104. .nav-name::after {
  105. content: '';
  106. position: absolute;
  107. display: block;
  108. width: 100rpx;
  109. height: 1px;
  110. background: #fff;
  111. bottom: 0;
  112. right: 40rpx;
  113. opacity: 0.3;
  114. }
  115. .nav-content {
  116. width: 100%;
  117. padding: 15rpx;
  118. display: inline-block;
  119. overflow-wrap: break-word;
  120. white-space: normal;
  121. }
  122. .nav-btn {
  123. width: 200rpx;
  124. height: 60rpx;
  125. margin: 8rpx auto;
  126. text-align: center;
  127. line-height: 60rpx;
  128. border-radius: 10rpx;
  129. }
  130. .bg-index1 {
  131. background-color: #19cf8a;
  132. color: #fff;
  133. }
  134. .bg-index2 {
  135. background-color: #954ff6;
  136. color: #fff;
  137. }
  138. .bg-index3 {
  139. background-color: #5177ee;
  140. color: #fff;
  141. }
  142. .bg-index4 {
  143. background-color: #f49a02;
  144. color: #fff;
  145. }
  146. .bg-index5 {
  147. background-color: #ff4f94;
  148. color: #fff;
  149. }
  150. .bg-index6 {
  151. background-color: #7fd02b;
  152. color: #fff;
  153. }
  154. .item-name {
  155. margin-bottom: 15rpx;
  156. display: -webkit-box;
  157. -webkit-box-orient: vertical;
  158. -webkit-line-clamp: 1;
  159. overflow: hidden;
  160. }
  161. </style>