style-one.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <view class="style-one" :class="list.length === 0 ? '' : 'padding'">
  3. <!-- 赵 张 朱 陶 宋 范 姚 金 冯 -->
  4. <image class="item" v-for="(it, k) in list" :key="k" @click="r(it)" :src="it.big_pic_url"></image>
  5. <view class="no-empty main-center" v-if="list.length === 0">
  6. <n background="#f7f7f7" title="该分类下无相关内容哦~"></n>
  7. </view>
  8. </view>
  9. </template>
  10. <script>
  11. import n from '../../components/page-component/app-no-goods/app-no-goods.vue';
  12. export default {
  13. name: 'style-one',
  14. props: ['list'],
  15. components: {'n': n},
  16. methods: {
  17. r(i) {
  18. console.log("测试..."+i);
  19. uni.navigateTo({url: i.page_url});
  20. }
  21. }
  22. }
  23. </script>
  24. <style scoped lang="scss">
  25. .style-one {
  26. width: 750upx;
  27. background-color: #ffffff;
  28. }
  29. .padding {
  30. padding:0 24upx 24upx 24upx;
  31. }
  32. .item {
  33. width: 702upx;
  34. height: 212upx;
  35. margin-top: 20upx;
  36. }
  37. .no-empty {
  38. width: 100%;
  39. margin-top: 150upx;
  40. background-color: #f7f7f7;
  41. }
  42. </style>