index.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <template>
  2. <view class="member-container">
  3. <view class="header dir-top-wrap cross-center">
  4. <view class="title">会员充值</view>
  5. <text class="tips">会员指定短剧无限观看、xxx 等特权</text>
  6. </view>
  7. <view class="content main-left">
  8. <view
  9. v-for="(item,index) in vip"
  10. :key="index"
  11. class="item dir-top-wrap cross-center main-center"
  12. :class="{active: activeIndex === index}"
  13. @click="activeIndex = index"
  14. >
  15. <view class="border" />
  16. <view v-if="activeIndex === index" class="selected">已选择</view>
  17. <text class="day">7天</text>
  18. <text class="price">¥29</text>
  19. </view>
  20. </view>
  21. <view class="free main-center cross-center" @click="$u.route('/pages/member/free')">
  22. 查看 <text>免费片单</text>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. export default {
  28. data() {
  29. return {
  30. vip: [1, 2, 3],
  31. activeIndex: 0
  32. }
  33. },
  34. computed: {},
  35. methods: {}
  36. }
  37. </script>
  38. <style lang="scss" scoped>
  39. .member-container{
  40. padding: 20rpx 0;
  41. font-size: 30rpx;
  42. .header{
  43. color: $primary-color;
  44. margin-top: 50rpx;
  45. .title{
  46. position: relative;
  47. font-size: 42rpx;
  48. font-weight: 600;
  49. width: 100%;
  50. text-align: center;
  51. &:before,&:after{
  52. content: "";
  53. background: url("/static/image/member-line-bg.png") no-repeat;
  54. background-size: 100%;
  55. position: absolute;
  56. top: 50%;
  57. left: 60rpx;
  58. width: 200rpx;
  59. height: 20rpx;
  60. }
  61. &:after{
  62. transform: rotate(180deg);
  63. right: 60rpx;
  64. left: unset;
  65. top: 20%;
  66. }
  67. }
  68. .tips{
  69. color: $dark-color;
  70. font-size: 26rpx;
  71. margin-top: 20rpx;
  72. }
  73. }
  74. .content{
  75. padding: 0 20rpx;
  76. margin-top: 80rpx;
  77. .item{
  78. color: $default-color;
  79. margin-left: 20rpx;
  80. flex: 1;
  81. height: 300rpx;
  82. position: relative;
  83. .border{
  84. position: absolute;
  85. top: 0;
  86. left: 0;
  87. right: 0;
  88. bottom: 0;
  89. z-index: 0;
  90. border: 4rpx solid $info-color;
  91. border-radius: 10rpx;
  92. overflow: hidden;
  93. }
  94. &.active .border{
  95. border: unset;
  96. &:after{
  97. content: "";
  98. position: absolute;
  99. top: 0;
  100. left: 0;
  101. right: 0;
  102. bottom: 0;
  103. border: 4rpx solid;
  104. border-image: linear-gradient(222deg, #6EEBE8, #FF74B9) 1;
  105. z-index: 0;
  106. }
  107. }
  108. .selected{
  109. position: absolute;
  110. top: -20rpx;
  111. background: url("/static/image/member-selected-bg.png") no-repeat;
  112. background-size: 100%;
  113. text-align: center;
  114. width: 120rpx;
  115. height: 40rpx;
  116. font-size: 24rpx;
  117. line-height: 40rpx;
  118. left: 20rpx;
  119. z-index: 1;
  120. }
  121. &:first-child{
  122. margin-left: 0;
  123. }
  124. .day{
  125. font-size: 32rpx;
  126. margin-bottom: 80rpx;
  127. }
  128. .price{
  129. font-size: 38rpx;
  130. color: $primary-color;
  131. }
  132. }
  133. }
  134. .free{
  135. background: #1B1E32;
  136. width: 100%;
  137. padding: 20rpx 0;
  138. color: $info-color;
  139. text-align: center;
  140. font-size: 26rpx;
  141. margin-top: 60px;
  142. text{
  143. color: $dark-color;
  144. }
  145. }
  146. }
  147. </style>