推广小程序前端代码
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.

134 lines
3.4 KiB

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