InfoItem.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <!-- Detailinfo.vue -->
  2. <template>
  3. <view class="div ui-detail-info" v-if="detailInfo">
  4. <view class="div info-header ui-flex">
  5. <text class="h3">{{ detailInfo.pgoods_name }}</text>
  6. </view>
  7. <view class="div price">
  8. <text class="span current-price"><text class="i price-number">{{ detailInfo.pgoods_points }}</text>积分</text>
  9. <text class="span old-price">¥{{ detailInfo.pgoods_price }}</text>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. import { mapState, mapMutations } from 'vuex'
  15. export default {
  16. data () {
  17. return {
  18. isShowDesc: false // 商品简介是否显示更多
  19. }
  20. },
  21. computed: {
  22. ...mapState({
  23. detailInfo: state => state.pointsgoods.detailInfo,
  24. currentProductId: state => state.pointsgoods.currentProductId,
  25. user: state => state.member.info
  26. })
  27. },
  28. created () {
  29. },
  30. methods: {
  31. ...mapMutations({
  32. changeIndex: 'changeIndex'
  33. })
  34. }
  35. }
  36. </script>
  37. <style lang="scss" scoped>
  38. .ui-detail-info {
  39. padding: 0 $pageSpace;
  40. background: #ffffff;
  41. margin-bottom: $modelSpace;
  42. .ui-flex {
  43. display: flex;
  44. justify-content: space-between;
  45. align-content: center;
  46. align-items: center;
  47. flex-basis: 100%;
  48. width: auto;
  49. }
  50. .info-header {
  51. padding-top: 0.4rem;
  52. .h3 {
  53. color: #333;
  54. font-size:$subFontSize;
  55. padding: 0;
  56. margin: 0;
  57. font-weight: normal;
  58. line-height:1rem;
  59. flex:1;
  60. }
  61. .div {
  62. display: flex;
  63. justify-content: space-between;
  64. align-content: center;
  65. align-items: center;
  66. .img {
  67. width: 1.2rem;
  68. height: 1.2rem;
  69. vertical-align: middle;
  70. margin-left: 0.75rem;
  71. flex-shrink: 0;
  72. }
  73. }
  74. .span {
  75. width: 1.5rem;
  76. height: 0.9rem;
  77. line-height: 0.9rem;
  78. text-align: center;
  79. background: $primaryColor;
  80. border-radius: 0.1rem;
  81. font-size:$fontSize;
  82. color: rgba(255, 255, 255, 1);
  83. display: inline-block;
  84. margin-right: 0.5rem;
  85. }
  86. }
  87. .price {
  88. padding-bottom: 0.4rem;
  89. display: flex;
  90. align-items: baseline;
  91. .span {
  92. display: block;
  93. font-weight: normal;
  94. &.current-price {
  95. font-size:$fontSize;
  96. color: $primaryColor;
  97. line-height: 1rem;
  98. .price-number{font-size:$h1;font-weight: bold;margin-right:.2rem;}
  99. }
  100. &.num{
  101. font-size:$fontSize;
  102. color:#666;
  103. }
  104. &.old-price {
  105. font-size:$fontSize;
  106. color: rgba(164, 170, 179, 1);
  107. line-height: 1rem;
  108. text-decoration: line-through;
  109. margin-left: 0.3rem;
  110. }
  111. }
  112. }
  113. .info-sub {
  114. border-bottom: 0.5px solid #e8eaed;
  115. padding-bottom: 0.75rem;
  116. .p {
  117. padding: 0;
  118. margin: 0;
  119. color: $primaryColor;
  120. font-size:$fontSize;
  121. &.ui-clip {
  122. display: -webkit-box;
  123. overflow: hidden;
  124. }
  125. }
  126. .img {
  127. width: 0.4rem;
  128. height: 0.2rem;
  129. margin-left: 0.5rem;
  130. }
  131. }
  132. }
  133. </style>