推广小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

133 lines
3.2 KiB

2 months ago
2 months ago
2 months ago
2 months ago
3 weeks ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
2 months ago
2 months ago
1 month ago
1 month ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month ago
1 month ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
  1. <template>
  2. <view class="cardList">
  3. <view class="container" @click="toOrderDetails(item)" v-for="(item, index) in cardListData" :key="index">
  4. <view class="head">
  5. <text class="orderTime">下单时间{{item.createTime}}</text>
  6. <text class="orderStatus" :class="item.state === 'U' ? 'active' : ''">{{item.stateText}}</text>
  7. </view>
  8. <view class="content cardStyle_" :class="['U','S'].includes(item.state) ? 'content_border' : ''">
  9. <view class="left">
  10. <image :src="getImage(item)" mode="aspectFill">
  11. </view>
  12. <view class="right">
  13. <view class="detailed">
  14. <view class="title">{{item.title}}</view>
  15. <view class="date">{{item.startTime}}</view>
  16. <view class="address">{{item.address}}</view>
  17. </view>
  18. <view class="price"><text>总计</text>¥{{item.payPrice}}</view>
  19. </view>
  20. </view>
  21. <view class="button-sp-area">
  22. <!-- <button @click.stop="skip(item,4)" v-if="item.state == 0" :style="{background: '#492623;', color: '#FF3E3F',margin:'0 30rpx 0 0'}"
  23. class="mini-btn" size="mini">立即支付</button> -->
  24. <button @click.stop="skip(item,0)" v-if="item.state == 1" :style="{background: '#34312E;', color: '#AFAFAF',margin:'0 30rpx 0 0'}"
  25. class="mini-btn" size="mini">取消活动</button>
  26. <button @click.stop="skip(item,1)"
  27. v-if="item.state == 1"
  28. :style="{background: '#492623;', color: '#FF3E3F',margin:'0 30rpx 0 0'}"
  29. class="mini-btn" size="mini">活动签到</button>
  30. <button @click.stop="skip(item,2)" v-if="item.state == 2 && item.isPj == 'N'" :style="{background: '#492623;', color: '#FF3E3F',margin:'0 30rpx 0 0'}"
  31. class="mini-btn" size="mini">评价活动</button>
  32. <button @click.stop="skip(item,3)" v-if="item.state == 2" :style="{background: '#49361D;', color: '#FFB245',margin:'0 30rpx 0 0'}"
  33. class="mini-btn" size="mini">开具发票</button>
  34. </view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. export default {
  40. props: {
  41. cardListData: {
  42. type: Array,
  43. default: []
  44. },
  45. },
  46. data() {
  47. return {
  48. };
  49. },
  50. components: {
  51. },
  52. computed: {},
  53. watch: {
  54. },
  55. created() {
  56. },
  57. mounted() {},
  58. methods: {
  59. skip(val, type) {
  60. this.$emit('btnClick', val, type)
  61. },
  62. toOrderDetails(val) {
  63. this.$emit('toOrderDetails', val)
  64. },
  65. getImage(item){
  66. return item.image && item.image.split(',')[0]
  67. },
  68. }
  69. };
  70. </script>
  71. <style scoped lang="scss">
  72. .cardList {
  73. padding: 10rpx 32rpx 0;
  74. .container {
  75. margin-top: 31rpx;
  76. padding: 25rpx 0;
  77. border-radius: 20rpx;
  78. background: $uni-color-card-background;
  79. .head {
  80. display: flex;
  81. justify-content: space-between;
  82. padding: 0 35rpx 28rpx;
  83. border-bottom: 1px solid #2A2A2A;
  84. .orderTime {
  85. font-size: 25rpx;
  86. color: $uni-text-color-grey;
  87. }
  88. .orderStatus {
  89. font-size: 26rpx;
  90. color: #ccc;
  91. }
  92. }
  93. .content_border {
  94. border-bottom: 1px solid #2A2A2A;
  95. }
  96. .button-sp-area {
  97. text-align: right;
  98. padding-top: 20rpx;
  99. .mini-btn {
  100. width: 166rpx;
  101. height: 53rpx;
  102. line-height: 53rpx;
  103. font-size: 24rpx;
  104. border-radius: 50rpx;
  105. margin-left: 20rpx;
  106. background-color: #34312E;
  107. color: #AFAFAF;
  108. }
  109. }
  110. }
  111. }
  112. .active {
  113. color: $uni-color-primary !important;
  114. }
  115. </style>