index.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <view class="order-content-wrap">
  3. <!-- 导航-->
  4. <view class="service-order-tab-bar">
  5. <view class="service-order-tab-item" :class="{ active: currentServiceTab === 'orderTab1' }"
  6. @click="changeServiceTab('orderTab1')">
  7. <text :class="{ underline: currentServiceTab === 'orderTab1' }">可使用</text>
  8. </view>
  9. <view class="service-order-tab-item" :class="{ active: currentServiceTab === 'orderTab2' }"
  10. @click="changeServiceTab('orderTab2')">
  11. <text :class="{ underline: currentServiceTab === 'orderTab2' }">已使用</text>
  12. </view>
  13. <view class="service-order-tab-item" :class="{ active: currentServiceTab === 'orderTab3' }"
  14. @click="changeServiceTab('orderTab3')">
  15. <text :class="{ underline: currentServiceTab === 'orderTab3' }">已过期</text>
  16. </view>
  17. </view>
  18. <view class="custom-line"></view>
  19. <!-- 当前订单-->
  20. <view class="service-order">
  21. <!-- 门店列表 -->
  22. <view v-if="countsList.length > 0" v-for="(item, index) in countsList"
  23. class="store-wrap bg-img">
  24. <view class="row-list">
  25. <view class="store-content">
  26. <view class="h-left-content">
  27. <view class="h-text">
  28. <view class="money">¥{{ item.discountsPrice }}</view>
  29. <view class="desc">{{ item.name }}</view>
  30. </view>
  31. </view>
  32. <view class="h-center-content">
  33. <view class="title">
  34. <text class="h-value">门店通用</text>
  35. </view>
  36. <view class="title">
  37. 使用平台:<text v-if="item.strategyType == '0'">全平台</text>
  38. <text v-else-if="item.strategyType == '1'">个人优惠卷</text>
  39. </view>
  40. <view class="title">
  41. 有效时间:{{ this.dateFormat(item.startTime) }}~{{ this.dateFormat(item.endTime) }}
  42. </view>
  43. </view>
  44. <view class="h-right-content">
  45. <view class="h-btn">
  46. <view @click="gotoUseCoupon()" v-if="item.state == 0" class="h-btn-value-use">立即使用</view>
  47. <!-- <view @click="gotoReceiveCoupon()" v-else-if="index == 1" class="h-btn-value-receive">立即领取</view> -->
  48. <view v-else-if="item.state == 1" class="h-btn-img">
  49. <image src="../../static/coupon/u2109.png" mode=""></image>
  50. </view>
  51. <view v-else class="h-btn-img">
  52. <image src="../../static/coupon/u2108.png" mode=""></image>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. <view v-else class="footer">
  60. <view class="">---暂无数据---</view>
  61. </view>
  62. <view v-if="countsList.length > 0" class="footer">
  63. <view class="">---到底了---</view>
  64. </view>
  65. </view>
  66. </view>
  67. </template>
  68. <script>
  69. export default {
  70. data() {
  71. return {
  72. currentServiceTab: 'orderTab1', // 当前选中的 Tab
  73. reqParm: {
  74. auth: true,
  75. type: 0 // 我的优惠卷列表(0未使用, 1已使用, 2已过期 null查询全部)
  76. },
  77. countsList: []
  78. };
  79. },
  80. onLoad() {
  81. },
  82. methods: {
  83. // 切换菜单
  84. changeServiceTab(tab) {
  85. if (tab == 'orderTab1') { //全部
  86. this.reqParm.type = '0';
  87. } else if (tab == 'orderTab2') {
  88. this.reqParm.type = '1';
  89. } else if (tab == 'orderTab3') {
  90. this.reqParm.type = '2';
  91. }
  92. },
  93. }
  94. }
  95. </script>
  96. <style scoped lang="scss">
  97. @import '/common/css/common.css';
  98. @import './index.rpx.scss';
  99. </style>