butlerType.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <view class="container">
  3. <uni-card :title="istitle" class="cardBox">
  4. <uni-list border class="list">
  5. <uni-list-item v-for="(item, index) in dataList" :key="index" :ellipsis="1" :title="item.typeName" link clickable @click="listItemBtn(item)" ></uni-list-item>
  6. </uni-list>
  7. </uni-card>
  8. </view>
  9. </template>
  10. <script>
  11. import request from '../../api/cms.js';
  12. export default {
  13. data() {
  14. return {
  15. dataList: []
  16. }
  17. },
  18. onShow: function() {},
  19. async mounted() {
  20. const res = await request.getsublist({ alias: 'hgjfc' });
  21. this.dataList = res.data;
  22. },
  23. methods: {
  24. listItemBtn(e) {
  25. uni.navigateTo({ url: `/pages/property/butler?alias=${e.alias}` });
  26. }
  27. }
  28. }
  29. </script>
  30. <style>
  31. .container {
  32. width: 100%;
  33. height: 100vh;
  34. overflow-y: auto;
  35. background-size: 100% 100%;
  36. }
  37. .box {
  38. display: flex;
  39. flex-wrap: wrap;
  40. }
  41. .imgBox {
  42. width: 30%;
  43. height: 36vw;
  44. margin-left: 2.5%;
  45. margin-top: 5px;
  46. }
  47. .imgs {
  48. display: block;
  49. width: 100%;
  50. height: 90%;
  51. border: 2px solid #CD7F32;
  52. }
  53. .name {
  54. width: 100%;
  55. display: block;
  56. text-align: center;
  57. color: #fff;
  58. }
  59. .uni-section {
  60. background-color: transparent !important;
  61. margin-top: 20px;
  62. }
  63. .uni-section-header {
  64. padding: 0 10px !important;
  65. }
  66. .uni-section__content-title {
  67. color: #fff !important;
  68. }
  69. </style>