mycardDetail.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <view class="container">
  3. <view class="row b-b flex">
  4. <text class="tit">卡片类型</text>
  5. <view class="input">{{ info.cards[0].type == 1 ? '时效卡' : '次卡' }}</view>
  6. </view>
  7. <view v-for="(item, index) in info.cards">
  8. <view class="row b-b flex">
  9. <text class="tit">服务类型</text>
  10. <view class="input">{{ item.name }}</view>
  11. </view>
  12. <view class="row b-b flex" v-if="info.cards[0].type != 1">
  13. <text class="tit">剩余次数</text>
  14. <view class="input">{{ item.number }}</view>
  15. </view>
  16. </view>
  17. <view class="main">
  18. <view class="title">
  19. <view class="title-left"></view>
  20. <view class="title-font">卡片详情</view>
  21. <view class="title-right"></view>
  22. </view>
  23. <view class="detail-desc"><rich-text :nodes="info.introduce"></rich-text></view>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. import { user_card_details } from '@/api/jdr.js';
  29. import { mapState, mapMutations } from 'vuex';
  30. export default {
  31. data() {
  32. return {
  33. id: '',
  34. info: '',
  35. istype: false
  36. };
  37. },
  38. computed: {
  39. // #ifdef H5
  40. ...mapState(['weichatObj']),
  41. // #endif
  42. ...mapState('user', ['userInfo'])
  43. },
  44. onLoad(opt) {
  45. this.id = opt.id;
  46. this.loadData();
  47. },
  48. methods: {
  49. loadData() {
  50. user_card_details({}, this.id).then(({ data }) => {
  51. this.info = data;
  52. });
  53. }
  54. }
  55. };
  56. </script>
  57. <style lang="scss">
  58. page,
  59. .container {
  60. min-height: 100%;
  61. height: auto;
  62. background: #ffffff;
  63. }
  64. .top {
  65. position: relative;
  66. height: 346rpx;
  67. width: 750rpx;
  68. image {
  69. width: 100%;
  70. height: 100%;
  71. }
  72. }
  73. .main {
  74. position: relative;
  75. z-index: 2;
  76. width: 750rpx;
  77. background: #ffffff;
  78. border-radius: 20rpx 20rpx 5rpx 5rpx;
  79. margin-top: -10rpx;
  80. padding: 46rpx 44rpx;
  81. .title {
  82. display: flex;
  83. justify-content: center;
  84. align-items: center;
  85. .title-font {
  86. font-size: 32rpx;
  87. font-family: ZhenyanGB;
  88. font-weight: 400;
  89. color: #bd9360;
  90. }
  91. }
  92. }
  93. .btn {
  94. width: 620rpx;
  95. height: 80rpx;
  96. background: linear-gradient(270deg, #ffe7c4, #ffce8a);
  97. border-radius: 40rpx;
  98. margin: 58rpx auto 0;
  99. font-size: 32rpx;
  100. font-family: PingFang SC;
  101. font-weight: bold;
  102. color: #9f570e;
  103. line-height: 80rpx;
  104. text-align: center;
  105. }
  106. .two {
  107. margin: 26rpx 0 0;
  108. font-size: 28rpx;
  109. text-align: center;
  110. font-family: PingFang SC;
  111. font-weight: 500;
  112. color: #999999;
  113. text {
  114. color: #ff383e;
  115. }
  116. }
  117. .row {
  118. display: flex;
  119. align-items: center;
  120. position: relative;
  121. padding: 30rpx;
  122. background: #fff;
  123. .order-status {
  124. font-size: $font-lg;
  125. color: $color-red;
  126. font-weight: 500;
  127. }
  128. .refund {
  129. font-size: 30rpx;
  130. color: $font-color-dark;
  131. }
  132. .noRefund {
  133. font-size: 30rpx;
  134. color: $font-color-light;
  135. }
  136. .tit {
  137. flex-shrink: 0;
  138. width: 120rpx;
  139. font-size: 30rpx;
  140. color: $font-color-dark;
  141. }
  142. .input {
  143. text-align: right;
  144. flex: 1;
  145. font-size: 30rpx;
  146. color: $font-color-dark;
  147. &.payColor {
  148. color: $color-red;
  149. }
  150. }
  151. .iconlocation {
  152. font-size: 36rpx;
  153. color: $font-color-light;
  154. }
  155. }
  156. </style>