listItemD.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <view style="background-color: white;">
  3. <view class="titleview ztextfontB1">{{title}}</view>
  4. <scroll-view scroll-x="true">
  5. <view>
  6. <view class="item_list">
  7. <view v-if="mendianList.length==0" class="title textfontB3">
  8. <text>{{$t('index.fujinmeiyou')}}</text>
  9. </view>
  10. <view class="" v-for="(item,index) in mendianList" @click="mendiankl(item.id)">
  11. <view class="item_content">
  12. <imageconver :isremen="true" :isyouhui="false" :youhuinote="''" class="mainimage"
  13. :imagSrc="item.image"></imageconver>
  14. <!-- <image class="mainimage" :src="item.image=='/static/defimages/ddd.png'?item.image:baseUrl+item.image" mode="scaleToFill" @error="imageError(index)"></image> -->
  15. <view class="title textfontB3">
  16. <text>{{item.posName}}</text>
  17. </view>
  18. <view class="contentInRowS price textfontB5">
  19. <text>{{$t('index.manX')}} {{$formPr(item.posPrice)}}{{$t('locale.huobidw')}}</text>
  20. <text class="textfontB5" style="color:#00A6FF;">{{$formPr(item.juli)}}Km</text>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </scroll-view>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. props: {
  32. mendianList: '',
  33. title: ''
  34. },
  35. data() {
  36. return {
  37. baseUrl: this.$baseImagurl,
  38. };
  39. },
  40. onShow() {
  41. if ('' == this.title || null == this.title || undefined == this.title) {
  42. this.title = this.$t('index.remenct')
  43. }
  44. },
  45. methods: {
  46. mendiankl(e) {
  47. //console.log(this.mendianList);
  48. this.$emit('Emendianxuanze', e);
  49. },
  50. imageError(index) {
  51. this.mendianList[index]['image'] = '/static/defimages/ddd.png'; //默认图片
  52. },
  53. },
  54. }
  55. </script>
  56. <style lang="scss">
  57. @font-face {
  58. font-family: zrht;
  59. src: url('/uni_modules/font/zrht.otf');
  60. }
  61. .item_list {
  62. padding-left: 40rpx;
  63. padding-top: 20rpx;
  64. display: flex;
  65. flex-direction: row;
  66. justify-content: flex-start;
  67. }
  68. .item_content {
  69. background: white;
  70. width: 460rpx;
  71. height: 420rpx;
  72. margin-right: 20rpx;
  73. }
  74. .mainimage {
  75. width: 460rpx;
  76. height: 270rpx;
  77. display: block;
  78. border-radius: 16rpx;
  79. background-color: floralwhite;
  80. border: 1rpx solid lightgray;
  81. }
  82. .titleview {
  83. padding-left: 40rpx;
  84. padding-top: 16rpx;
  85. line-height: 46rpx;
  86. }
  87. .title {
  88. padding-top: 8rpx;
  89. width: 100%;
  90. text-align: left;
  91. //line-height: 30rpx;
  92. font-weight: initial
  93. }
  94. .Dishes {
  95. width: 100%;
  96. text-align: left;
  97. color: darkgray;
  98. }
  99. .price {
  100. width: 100%;
  101. text-align: left;
  102. //line-height: 28rpx;
  103. color: black;
  104. }
  105. </style>