templateC.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <template>
  2. <scroll-view scroll-x="true" class="picture">
  3. <view class="section" v-for="(item , index) in productList" @click="navigaitionTo(item)">
  4. <image :src="item.appletsImage" mode="heightFix"></image>
  5. </view>
  6. </scroll-view>
  7. </template>
  8. <script>
  9. import caimeiApi from '@/common/config/caimeiApi.js'
  10. export default{
  11. data(){
  12. return{
  13. productList:[]
  14. }
  15. },
  16. props:{
  17. pageData: {
  18. type: Object
  19. },
  20. userIdentity: {
  21. type: Number
  22. }
  23. },
  24. created() {
  25. this.initData(this.pageData);
  26. },
  27. methods:{
  28. initData(data){
  29. this.productList = data.floorImageList;
  30. },
  31. navigaitionTo(item){
  32. if (item.adsImage === '' && item.linkType === -1) {
  33. return
  34. }
  35. caimeiApi.FlooryNavigateTo(item)
  36. }
  37. }
  38. }
  39. </script>
  40. <style lang="scss">
  41. .picture{
  42. width: 750rpx;
  43. margin-left: -24rpx;
  44. white-space: nowrap;
  45. .section{
  46. display: inline-block;
  47. margin-right: 24rpx;
  48. width: 310rpx;
  49. height: 240rpx;
  50. overflow: hidden;
  51. border-radius: 16rpx;
  52. image{
  53. width: 310rpx;
  54. height: 240rpx;
  55. }
  56. &:first-child{
  57. margin-left: 24rpx;
  58. }
  59. }
  60. }
  61. </style>