model_4.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <view class="mone">
  3. <template v-for="ls in cardInfo.model_imgs">
  4. <image :src="ls" class="image" mode="widthFix"></image>
  5. </template>
  6. </view>
  7. </template>
  8. <script>
  9. import {
  10. mapState,
  11. } from 'vuex';
  12. export default {
  13. props: {
  14. // 浏览数量
  15. shareNumber: {
  16. type: Number,
  17. default: 0
  18. },
  19. // 是否显示默认数据
  20. isDefault: {
  21. type: Boolean,
  22. default: true
  23. },
  24. isShare: {
  25. type: Boolean,
  26. default: false
  27. },
  28. //1为模板2为用户
  29. isLook: {
  30. type: Number,
  31. default: 0
  32. },
  33. templateDetail: {
  34. type: Object,
  35. default: () => {
  36. return {}
  37. }
  38. },
  39. },
  40. data() {
  41. return {
  42. defaults: {
  43. model_imgs: [
  44. 'https://api.myjie.cn/resource/user/user4/img1.jpg',
  45. 'https://api.myjie.cn/resource/user/user4/img3.png',
  46. 'https://api.myjie.cn/resource/user/user4/img2.jpg',
  47. ],
  48. }
  49. }
  50. },
  51. computed: {
  52. ...mapState(['baseURL']),
  53. cardInfo() {
  54. if (this.isDefault) {
  55. return this.defaults
  56. } else {
  57. console.log(this.templateDetail, 'this.templateDetail')
  58. return this.templateDetail
  59. }
  60. }
  61. },
  62. }
  63. </script>
  64. <style lang="scss" scoped>
  65. .mone {
  66. display: flex;
  67. flex-direction: column;
  68. line-height: 0;
  69. .image {
  70. border: 0px solid rgba(0,0,0,0);
  71. width: 750rpx;
  72. }
  73. }
  74. </style>