index.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <template>
  2. <view class="page" :style="{'height':h+'px'}">
  3. <view class="left">
  4. <view class="item" :class="[(index===nIndex)?'active':'',index===(nIndex+1)?'rtb':'']"
  5. v-for="(item,index) in navList" :key="index" @click="changeType(index)">
  6. {{item.name}}
  7. </view>
  8. </view>
  9. <view class="right">
  10. <block v-if="solutionList.length">
  11. <u-list class="ulist" @scrolltolower="scrolltolower">
  12. <u-list-item class="item" v-for="(item, index) in solutionList" :key="index" @click="toDetails(item)">
  13. <view class="top">
  14. <image :src="item.img"></image>
  15. </view>
  16. <view class="text">
  17. {{item.name}}
  18. </view>
  19. </u-list-item>
  20. </u-list>
  21. </block>
  22. <block v-else></block>
  23. </view>
  24. <tabbar :tabbarIndex="1"></tabbar>
  25. </view>
  26. </template>
  27. <script>
  28. export default {
  29. data(){
  30. return {
  31. navList:[
  32. {name:'全部'},
  33. {name:'智慧楼宇'},
  34. {name:'总部园区'},
  35. {name:'产业园区'},
  36. {name:'工业园区'},
  37. {name:'智慧校园'},
  38. {name:'智慧场馆'},
  39. {name:'公共交通'},
  40. {name:'智慧文旅'},
  41. {name:'城市服务'},
  42. {name:'住宅社区'},
  43. {name:'3D可视化'},
  44. {name:'智慧运维'},
  45. {name:'智慧安防'},
  46. {name:'楼宇自控'},
  47. {name:'能耗管理'},
  48. {name:'智能照明'},
  49. {name:'智慧通行'},
  50. {name:'智能环卫'},
  51. {name:'智慧电梯'},
  52. {name:'应急指挥'},
  53. {name:'资产管理'}
  54. ],
  55. nIndex:0,
  56. solutionList:[],
  57. isOver:false
  58. }
  59. },
  60. onLoad() {
  61. this.getList();
  62. },
  63. methods:{
  64. changeType(index){
  65. this.nIndex = index;
  66. },
  67. scrolltolower() {
  68. if (this.isOver) return;
  69. this.getList();
  70. },
  71. getList(){
  72. this.solutionList = [
  73. {
  74. img:'../../static/imgs/home_default.png',
  75. name:'智慧园商业解决方案'
  76. },
  77. {
  78. img:'../../static/imgs/home_default.png',
  79. name:'智慧园商业解决方案'
  80. },
  81. {
  82. img:'../../static/imgs/home_default.png',
  83. name:'智慧园商业解决方案'
  84. },
  85. {
  86. img:'../../static/imgs/home_default.png',
  87. name:'智慧园商业解决方案'
  88. },
  89. {
  90. img:'../../static/imgs/home_default.png',
  91. name:'智慧园商业解决方案'
  92. },
  93. {
  94. img:'../../static/imgs/home_default.png',
  95. name:'智慧园商业解决方案'
  96. },
  97. {
  98. img:'../../static/imgs/home_default.png',
  99. name:'智慧园商业解决方案'
  100. },
  101. {
  102. img:'../../static/imgs/home_default.png',
  103. name:'智慧园商业解决方案'
  104. }
  105. ];
  106. }
  107. }
  108. }
  109. </script>
  110. <style scoped lang="less">
  111. .page{
  112. background: #FFFFFF;
  113. box-sizing: border-box;
  114. display: flex;
  115. .left{
  116. width: 168rpx;
  117. height: 100%;
  118. overflow-y: auto;
  119. .item{
  120. width: 100%;
  121. height: 98rpx;
  122. background: #F3F4F8;
  123. display: flex;
  124. align-items: center;
  125. justify-content: center;
  126. overflow: hidden;
  127. white-space: nowrap;
  128. text-overflow: ellipsis;
  129. font-family: PingFangSC, PingFang SC;
  130. font-weight: 400;
  131. font-size: 26rpx;
  132. color: #9D9DA0;
  133. line-height: 37rpx;
  134. &.active{
  135. background: #FFFFFF;
  136. font-weight: bold;
  137. color: #1460CA;
  138. }
  139. &.rtb{
  140. border-top-right-radius: 16rpx;
  141. }
  142. }
  143. }
  144. .right{
  145. width: calc(100% - 168rpx);
  146. padding: 0 24rpx 20rpx;
  147. box-sizing: border-box;
  148. .ulist{
  149. height: 100% !important;
  150. ::v-deep .uni-scroll-view-content>uni-view{
  151. display: flex;
  152. flex-direction: row;
  153. justify-content: space-between;
  154. flex-wrap: wrap;
  155. }
  156. .item{
  157. width: calc(50% - 13rpx);
  158. margin-top: 20rpx;
  159. border-radius: 12rpx 12rpx 0rpx 0rpx;
  160. background: #FFFFFF;
  161. .top{
  162. width: 100%;
  163. height: 186rpx;
  164. background: #D8D8D8;
  165. border-radius: 12rpx 12rpx 0rpx 0rpx;
  166. image{
  167. width: 100%;
  168. height: 100%;
  169. border-radius: 12rpx 12rpx 0rpx 0rpx;
  170. }
  171. }
  172. .text{
  173. width: 100%;
  174. padding: 16rpx 10rpx;
  175. box-sizing: border-box;
  176. overflow: hidden;
  177. text-overflow: ellipsis;
  178. white-space: nowrap;
  179. font-family: PingFang-SC, PingFang-SC;
  180. font-weight: bold;
  181. font-size: 24rpx;
  182. color: #111111;
  183. line-height: 24rpx;
  184. }
  185. }
  186. }
  187. }
  188. }
  189. </style>