card.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <template>
  2. <view class="">
  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. current:Number,
  53. list: Array,
  54. },
  55. data() {
  56. return {}
  57. },
  58. methods: {
  59. goDetail(item) {
  60. let joinRecordId=item.joinRecordId?item.joinRecordId:null
  61. let params={
  62. id:item.id,
  63. joinRecordId,
  64. current:this.current
  65. }
  66. uni.navigateTo({
  67. url: "/pages/activity/detail" + this.$u.queryParams(params)
  68. })
  69. }
  70. }
  71. }
  72. </script>
  73. <style lang="scss" scoped>
  74. .cu-avatar {
  75. font-variant: small-caps;
  76. margin: 0;
  77. padding: 0;
  78. display: inline-flex;
  79. text-align: center;
  80. justify-content: center;
  81. align-items: center;
  82. background-color: #FFFFFF;
  83. color: #ffffff;
  84. white-space: nowrap;
  85. background-size: cover;
  86. background-position: center;
  87. vertical-align: middle;
  88. }
  89. .tag-bg {
  90. background-color: #FFA66D;
  91. color: #FFFFFF;
  92. }
  93. .cu-list>.cu-item .move {
  94. position: absolute;
  95. right: 0rpx;
  96. display: -webkit-box;
  97. display: -webkit-flex;
  98. display: flex;
  99. width: 170rpx;
  100. height: 100%;
  101. -webkit-transform: translateX(100%);
  102. transform: translateX(100%);
  103. }
  104. .cu-list.menu-avatar>.cu-item .content {
  105. position: absolute;
  106. left: 220rpx;
  107. height: 90%;
  108. width: calc(100% - 96rpx - 60rpx - 100rpx - 20rpx);
  109. display: flex;
  110. justify-content: space-between;
  111. flex-direction: column;
  112. }
  113. .cu-list.menu-avatar>.cu-item .action {
  114. width: 60rpx;
  115. text-align: center;
  116. }
  117. .cu-list.menu-avatar>.cu-item {
  118. position: relative;
  119. display: -webkit-box;
  120. display: -webkit-flex;
  121. display: flex;
  122. padding-right: 10rpx;
  123. height: 180rpx;
  124. background-color: #ffffff;
  125. -webkit-box-pack: end;
  126. -webkit-justify-content: flex-end;
  127. justify-content: flex-end;
  128. -webkit-box-align: center;
  129. -webkit-align-items: center;
  130. align-items: center;
  131. }
  132. .cu-list>.cu-item.move-cur {
  133. transform: translateX(-160upx)
  134. }
  135. .cu-list.menu-avatar>.cu-item>.cu-avatar {
  136. position: absolute;
  137. left: 10rpx;
  138. }
  139. .cu-avatar.xl {
  140. border-radius: 10rpx;
  141. width: 200rpx;
  142. height: 90%;
  143. }
  144. .sub-title {
  145. margin-top: 5rpx;
  146. color: #6C6C6C;
  147. font-size: 24rpx;
  148. }
  149. </style>