shop-activity.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <template>
  2. <view class="content">
  3. <view class="cu-list menu-avatar" v-if="!$isEmpty(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 style="margin-top: 300rpx;" class="center flex flex-direction" v-else>
  48. <image style="width: 236rpx;height: 176rpx;" src="@/static/icon/empty5.png" ></image>
  49. <text style="font-weight: 300;margin-top: 10rpx;">暂无活动</text>
  50. </view>
  51. </view>
  52. </template>
  53. <script>
  54. export default {
  55. props:{
  56. shopId: String
  57. },
  58. data() {
  59. return {
  60. list:[]
  61. }
  62. },
  63. created() {
  64. this.fetchList()
  65. },
  66. methods: {
  67. fetchList(){
  68. let params={
  69. launchId:this.shopId,
  70. launchType:'SHOP',
  71. auditStatus:'PASS'
  72. }
  73. this.$api.activity.list(params).then(res=>{
  74. this.list=res.data.records
  75. })
  76. },
  77. goDetail(id){
  78. }
  79. }
  80. }
  81. </script>
  82. <style lang="scss" scoped>
  83. .cu-avatar {
  84. font-variant: small-caps;
  85. margin: 0;
  86. padding: 0;
  87. display: inline-flex;
  88. text-align: center;
  89. justify-content: center;
  90. align-items: center;
  91. background-color: #FFFFFF;
  92. color: #ffffff;
  93. white-space: nowrap;
  94. background-size: cover;
  95. background-position: center;
  96. vertical-align: middle;
  97. }
  98. .tag-bg {
  99. background-color: #FFA66D;
  100. color: #FFFFFF;
  101. }
  102. .cu-list>.cu-item .move {
  103. position: absolute;
  104. right: 0rpx;
  105. display: -webkit-box;
  106. display: -webkit-flex;
  107. display: flex;
  108. width: 170rpx;
  109. height: 100%;
  110. -webkit-transform: translateX(100%);
  111. transform: translateX(100%);
  112. }
  113. .cu-list.menu-avatar>.cu-item .content {
  114. position: absolute;
  115. left: 220rpx;
  116. height: 90%;
  117. width: calc(100% - 96rpx - 60rpx - 100rpx - 20rpx);
  118. display: flex;
  119. justify-content: space-between;
  120. flex-direction: column;
  121. }
  122. .cu-list.menu-avatar>.cu-item .action {
  123. width: 60rpx;
  124. text-align: center;
  125. }
  126. .cu-list.menu-avatar>.cu-item {
  127. position: relative;
  128. display: -webkit-box;
  129. display: -webkit-flex;
  130. display: flex;
  131. padding-right: 10rpx;
  132. height: 180rpx;
  133. background-color: #ffffff;
  134. -webkit-box-pack: end;
  135. -webkit-justify-content: flex-end;
  136. justify-content: flex-end;
  137. -webkit-box-align: center;
  138. -webkit-align-items: center;
  139. align-items: center;
  140. }
  141. .cu-list>.cu-item.move-cur {
  142. transform: translateX(-160upx)
  143. }
  144. .cu-list.menu-avatar>.cu-item>.cu-avatar {
  145. position: absolute;
  146. left: 10rpx;
  147. }
  148. .cu-avatar.xl {
  149. border-radius: 10rpx;
  150. width: 200rpx;
  151. height: 90%;
  152. }
  153. .sub-title {
  154. margin-top: 5rpx;
  155. color: #6C6C6C;
  156. font-size: 24rpx;
  157. }
  158. </style>