card.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <template>
  2. <view class="content">
  3. <view class="cu-list menu-avatar" v-if="list">
  4. <view @click="goDetail(item)" hover-class="none"
  5. style="margin: 15rpx 10rpx 15rpx 15rpx;border-radius: 20rpx 0 0 20rpx;padding: 10rpx;" class=" cu-item"
  6. v-for="(item,index) in list" :key="index">
  7. <image class="cu-avatar xl" :src="item.poster" mode="aspectFill"></image>
  8. <view class="content">
  9. <view class="flex-direction flex">
  10. <text class="text-cut-1" style="width: 96%;font-size: 32rpx;">{{item.title}}</text>
  11. <view class="flex" style="width: 96%;" v-if="item.auditStatus.includes('WAITING')">
  12. <view class="center" style="margin-bottom: -4rpx;">
  13. <u-icon name="coupon" color="#ff7001" size="30"></u-icon>
  14. </view>
  15. <view class="">
  16. <text class="sub-title text-cut-1 margin-left-10">{{item.discount * 10}}折</text>
  17. </view>
  18. </view>
  19. <view v-else class="flex" style="width: 96%;">
  20. <text class="sub-title text-cut-1">{{item.intro}}</text>
  21. </view>
  22. </view>
  23. <view style="width: 90%;" class="margin-bottom-10 text-cut-1" v-if="item.labelKey">
  24. <u-tag color="#FF9447" style="margin-left: 10rpx;" :key="index1"
  25. v-for="(item1,index1) in item.labelKey.split(',')" :text="item1" size="mini"
  26. type="warning " mode="plain" />
  27. </view>
  28. </view>
  29. <view v-if="item.auditStatus.includes('WAITING')"
  30. style="position: absolute;right: 10rpx;bottom: 10rpx;font-size: 26rpx;">
  31. <view class="center" style="color: #EF9944;">
  32. <text>待审核</text>
  33. <text class="cuIcon-right"></text>
  34. </view>
  35. </view>
  36. <view v-else style="position: absolute;right: 10rpx;bottom: 10rpx;font-size: 26rpx;">
  37. <view class="center" style="color: #EF9944;">
  38. <u-icon name="coupon" color="#ff7001" size="30"></u-icon>
  39. <text style="margin-left: 6rpx;">{{item.discount * 10}}折</text>
  40. </view>
  41. </view>
  42. <view v-if="current==2&&index==0" style="position: absolute;right: 0rpx;top: 0rpx;">
  43. <image style="width: 80rpx;height: 80rpx;" src="@/static/icon/enable.png" mode=""></image>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </template>
  49. <script>
  50. export default {
  51. props:{
  52. list: Array
  53. },
  54. data() {
  55. return {
  56. }
  57. },
  58. methods: {
  59. goDetail(item){
  60. uni.navigateTo({
  61. url:"/pages/activity/detail?id="+item.id
  62. })
  63. }
  64. }
  65. }
  66. </script>
  67. <style lang="scss" scoped>
  68. .cu-avatar {
  69. font-variant: small-caps;
  70. margin: 0;
  71. padding: 0;
  72. display: inline-flex;
  73. text-align: center;
  74. justify-content: center;
  75. align-items: center;
  76. background-color: #FFFFFF;
  77. color: #ffffff;
  78. white-space: nowrap;
  79. background-size: cover;
  80. background-position: center;
  81. vertical-align: middle;
  82. }
  83. .tag-bg {
  84. background-color: #FFA66D;
  85. color: #FFFFFF;
  86. }
  87. .cu-list>.cu-item .move {
  88. position: absolute;
  89. right: 0rpx;
  90. display: -webkit-box;
  91. display: -webkit-flex;
  92. display: flex;
  93. width: 170rpx;
  94. height: 100%;
  95. -webkit-transform: translateX(100%);
  96. transform: translateX(100%);
  97. }
  98. .cu-list.menu-avatar>.cu-item .content {
  99. position: absolute;
  100. left: 220rpx;
  101. height: 90%;
  102. width: calc(100% - 96rpx - 60rpx - 100rpx - 20rpx);
  103. display: flex;
  104. justify-content: space-between;
  105. flex-direction: column;
  106. }
  107. .cu-list.menu-avatar>.cu-item .action {
  108. width: 60rpx;
  109. text-align: center;
  110. }
  111. .cu-list.menu-avatar>.cu-item {
  112. position: relative;
  113. display: -webkit-box;
  114. display: -webkit-flex;
  115. display: flex;
  116. padding-right: 10rpx;
  117. height: 180rpx;
  118. background-color: #ffffff;
  119. -webkit-box-pack: end;
  120. -webkit-justify-content: flex-end;
  121. justify-content: flex-end;
  122. -webkit-box-align: center;
  123. -webkit-align-items: center;
  124. align-items: center;
  125. }
  126. .cu-list>.cu-item.move-cur {
  127. transform: translateX(-160upx)
  128. }
  129. .cu-list.menu-avatar>.cu-item>.cu-avatar {
  130. position: absolute;
  131. left: 10rpx;
  132. }
  133. .cu-avatar.xl {
  134. border-radius: 10rpx;
  135. width: 200rpx;
  136. height: 90%;
  137. }
  138. .sub-title {
  139. margin-top: 5rpx;
  140. color: #6C6C6C;
  141. font-size: 24rpx;
  142. }
  143. </style>