index.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <template>
  2. <view class="content">
  3. <u-swiper height="200" :list="imageTopList"></u-swiper>
  4. <view class="goods">
  5. <u-section title="人气零食" :show-line="false" sub-title="更多"></u-section>
  6. <view class="goods-list">
  7. <uni-coods v-for="item in goodsList" :key="item.id" :data="item"></uni-coods>
  8. </view>
  9. <u-section title="居家生活" :show-line="false" sub-title="更多"></u-section>
  10. <view class="goods-list">
  11. <uni-coods v-for="item in goodsList" :key="item.id" :data="item"></uni-coods>
  12. </view>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. import {
  18. checkLogin
  19. } from '@/api/login.js'
  20. import {
  21. getMapStoreList
  22. } from '@/api/store.js'
  23. import {
  24. getLookUpDatas
  25. } from '@/api/data.js'
  26. import {
  27. getUnFinishedOrder
  28. } from '@/api/order.js'
  29. export default {
  30. components: {
  31. },
  32. data() {
  33. return {
  34. imageTopList:[
  35. {photo:'https://cdn.uviewui.com/uview/example/fade.jpg'},
  36. {photo:'https://cdn.uviewui.com/uview/example/fade.jpg'}
  37. ],
  38. goodsList:[
  39. {
  40. id: 21312312321,
  41. name: '啊撒旦解放拉萨酱豆腐爱丽丝反对萨拉地方就',
  42. src: 'https://cdn.uviewui.com/uview/example/fade1.jpg',
  43. price: 50
  44. },
  45. {
  46. id: 6465465465,
  47. name: '啊撒旦解放拉萨酱豆腐爱丽丝反对萨拉地方就',
  48. src: 'https://cdn.uviewui.com/uview/example/fade.jpg',
  49. price: 50
  50. },
  51. {
  52. id: 234324,
  53. name: '啊撒旦解放拉萨酱豆腐爱丽丝反对萨拉地方就',
  54. src: 'https://cdn.uviewui.com/uview/example/fade.jpg',
  55. price: 50
  56. },
  57. {
  58. id: 4453455,
  59. name: '啊撒旦解放拉萨酱豆腐爱丽丝反对萨拉地方就',
  60. src: 'https://cdn.uviewui.com/uview/example/fade.jpg',
  61. price: 50
  62. }
  63. ]
  64. }
  65. },
  66. onReady() {
  67. },
  68. onShow() {
  69. },
  70. onLoad() {
  71. },
  72. methods: {
  73. }
  74. }
  75. </script>
  76. <style lang="scss" scoped>
  77. .content {
  78. .goods{
  79. padding: 20upx 0;
  80. }
  81. .goods-list{
  82. padding: 20upx 0;
  83. display: flex;
  84. flex-wrap: wrap;
  85. justify-content: space-between;
  86. }
  87. }
  88. </style>