listItemD.vue 2.5 KB

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