tabCoupon.vue 818 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <view>
  3. <u-subsection :list="list" mode="subsection" :current="current" @change="sectionChange"></u-subsection>
  4. <u-empty mode="coupon" text=" ">
  5. </u-empty>
  6. <div class="history" @click="handleToHistoryCoupon">
  7. 查看历史券
  8. </div>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. data() {
  14. return {
  15. list: ['优惠券', '免房券'],
  16. current: 0,
  17. }
  18. },
  19. onLoad(options){
  20. console.log(options);
  21. if (options.cur) {
  22. this.current = options.cur
  23. }
  24. },
  25. methods: {
  26. sectionChange(e) {
  27. this.current = e
  28. },
  29. handleToHistoryCoupon(){
  30. uni.navigateTo({
  31. url: '/components/historyCoupon/historyCoupon'
  32. })
  33. }
  34. }
  35. }
  36. </script>
  37. <style lang="scss" scoped>
  38. .history{
  39. color: #00AAFF;
  40. text-align: center;
  41. }
  42. </style>