detail-vip.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <template>
  2. <view class="detail-vip" @click="nav">
  3. <image class="bg" src="../image/S-VIP-BG.png"></image>
  4. <view class="content dir-left-nowrap">
  5. <view class="item icon">
  6. <image class="icon" src="../image/v-logo.png"></image>
  7. </view>
  8. <view class="item text dir-top-nowrap">
  9. <text class="big text">开通{{name}}超级会员,立省更多</text>
  10. <text class="small text">超值全场{{discount == 0 ? '免费': discount + '折'}}!</text>
  11. </view>
  12. <view class="item button">
  13. <view class="button">
  14. 立即开通
  15. </view>
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. export default {
  22. name: 'detail-vip',
  23. props: {
  24. discount: String,
  25. name: String,
  26. },
  27. methods: {
  28. nav() {
  29. uni.navigateTo({
  30. url: `/plugins/vip_card/index/index`,
  31. })
  32. }
  33. }
  34. }
  35. </script>
  36. <style scoped lang="scss">
  37. .detail-vip {
  38. position: relative;
  39. width: #{750upx};
  40. height: #{120upx};
  41. padding: #{0 24upx};
  42. background-color: #ffffff;
  43. .bg {
  44. width: 100%;
  45. height: #{120upx};
  46. border-radius: #{14upx};
  47. }
  48. .content {
  49. position: absolute;
  50. top: 0;
  51. left: #{24upx};
  52. width: calc(100% - #{48upx});
  53. height: #{120upx};
  54. }
  55. .item {
  56. height: 100%;
  57. .icon {
  58. width: #{60upx};
  59. height: #{60upx};
  60. margin: #{36upx 0 0 26upx};
  61. }
  62. .text {
  63. color: #e9ceb9;
  64. }
  65. .big {
  66. font-size: #{26upx};
  67. line-height: 1;
  68. margin-top: #{30upx};
  69. margin-bottom: #{12upx};
  70. word-break: break-all;
  71. text-overflow: ellipsis;
  72. display: -webkit-box;
  73. -webkit-box-orient: vertical;
  74. -webkit-line-clamp: 1;
  75. overflow: hidden;
  76. white-space: normal;
  77. }
  78. .small {
  79. font-size: #{21upx};
  80. line-height: 1;
  81. }
  82. }
  83. .item.icon {
  84. width: #{115upx};
  85. }
  86. .item.text {
  87. width: #{417upx};
  88. }
  89. .item.button {
  90. width: #{170upx};
  91. .button {
  92. width: #{120upx};
  93. height: #{48upx};
  94. text-align: center;
  95. border-radius: #{24upx};
  96. background: linear-gradient(to right, #fbdec8, #f3be94);
  97. font-size: #{24upx};
  98. line-height: 2;
  99. color: #342e25;
  100. margin-top: #{36upx};
  101. }
  102. }
  103. }
  104. </style>