userCenterIntegralExchangeDetail.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <template>
  2. <div class="userCenterIntegralExchangeDetail">
  3. <div style="height: 45px; line-height: 42px">
  4. <div
  5. :class="informationsClass == 1 ? 'information2' : 'information1'"
  6. @click="getInformation(1)"
  7. class="cursor"
  8. >
  9. {{ $i18n.locale == 'zh' ? '商品详情' : 'Shop Detail' }}
  10. </div>
  11. <div
  12. :class="informationsClass == 2 ? 'information2' : 'information1'"
  13. @click="getInformation(2)"
  14. class="cursor"
  15. >
  16. {{ $i18n.locale == 'zh' ? '我的兑换记录' : 'My Exchange Record' }}
  17. </div>
  18. </div>
  19. <div class="backButton" @click="voteback">
  20. {{ $i18n.locale == 'zh' ? '返回' : 'Return' }}
  21. </div>
  22. <userCenterIntegralExchangeShop
  23. v-if="informationsClass == 1"
  24. ></userCenterIntegralExchangeShop>
  25. <userCenterIntegralExchangeRecord
  26. v-if="informationsClass == 2"
  27. ></userCenterIntegralExchangeRecord>
  28. </div>
  29. </template>
  30. <script>
  31. import userCenterIntegralExchangeShop from '@/views/userCenter/userCenterItem/userCenterIntegralExchangeShop'
  32. import userCenterIntegralExchangeRecord from '@/views/userCenter/userCenterItem/userCenterIntegralExchangeRecord'
  33. export default {
  34. name: 'userCenterIntegralExchangeDetail',
  35. components: {
  36. userCenterIntegralExchangeShop,
  37. userCenterIntegralExchangeRecord,
  38. },
  39. data() {
  40. return {
  41. informationsClass: 1,
  42. }
  43. },
  44. methods: {
  45. voteback() {
  46. this.$router.go(-1)
  47. },
  48. getInformation(num) {
  49. this.informationsClass = num
  50. },
  51. },
  52. }
  53. </script>
  54. <style lang="less" scoped>
  55. .userCenterIntegralExchangeDetail {
  56. width: 100%;
  57. background: #fff;
  58. min-height: 800px;
  59. }
  60. .information1 {
  61. display: inline-block;
  62. height: 100%;
  63. text-align: center;
  64. background: #f9f9f9;
  65. border-top: 3px solid #f9f9f9;
  66. color: #999;
  67. box-sizing: border-box;
  68. vertical-align: middle;
  69. font-weight: 600;
  70. padding: 0 20px;
  71. }
  72. .information1:hover {
  73. color: #ff0036;
  74. }
  75. .information2 {
  76. display: inline-block;
  77. height: 100%;
  78. text-align: center;
  79. border-top: 3px solid #2c5589;
  80. color: #2c5589;
  81. box-sizing: border-box;
  82. vertical-align: middle;
  83. font-weight: 600;
  84. padding: 0 20px;
  85. }
  86. .backButton {
  87. width: 100px;
  88. height: 30px;
  89. background-color: #b4d5ff;
  90. position: absolute;
  91. top: 6px;
  92. right: 1%;
  93. border-radius: 8px;
  94. text-align: center;
  95. line-height: 30px;
  96. cursor: pointer;
  97. }
  98. </style>