subscribepage.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <template>
  2. <view class="container">
  3. <!-- 返回按钮 -->
  4. <back text="订阅中心" color="#FFF"></back>
  5. <view class="bg1"></view>
  6. <view class="bg2"></view>
  7. <view class="vipcard" style="display: flex; align-items: center;">
  8. <view style="height: 100%; display: flex; flex-direction: column; justify-content: space-around;">
  9. <view class="flex">
  10. <view class="t-icon t-icon-huiyuan2"></view>
  11. <view class="card-title">{{myData.subscribeLevel}}</view>
  12. </view>
  13. <view class="card-detail">{{endTime}} 到期</view>
  14. <view class="card-detail">{{myData.subscribePrivilege}}</view>
  15. <view class="btn-box">
  16. <view class="border-box">
  17. <view class="btn-text">升级版本</view>
  18. </view>
  19. <view class="border-box">
  20. <view class="btn-text">订阅续费</view>
  21. </view>
  22. </view>
  23. </view>
  24. <view class="flex">
  25. <view class="border-right"></view>
  26. <view class="border-right" style="margin-left: -480rpx;"></view>
  27. <view class="border-right" style="margin-left: -480rpx;"></view>
  28. <view class="border-right" style="margin-left: -480rpx;"></view>
  29. <view class="border-right" style="margin-left: -480rpx;"></view>
  30. <view class="border-right" style="margin-left: -480rpx;"></view>
  31. <view class="border-right" style="margin-left: -480rpx;"></view>
  32. <view class="border-right" style="margin-left: -480rpx;"></view>
  33. <view class="border-right" style="margin-left: -480rpx;"></view>
  34. </view>
  35. </view>
  36. <view class="flex" style="margin: 50rpx 0 0 50rpx;">
  37. <u-tag text="专属功能" color="#fff" bgColor="#333" borderColor="#333" shape="circle"></u-tag>
  38. <view class="line"></view>
  39. </view>
  40. <view class="flex" style="margin: 50rpx 0 0 50rpx;justify-content: space-around;">
  41. <view class="flex" style="flex-direction: column;" v-for="(item,index) in data" :key="index">
  42. <view class="circle-box">
  43. <view :class="item.icon"></view>
  44. </view>
  45. <view style="color: #FFF; font-size: 28rpx;margin-top: 20rpx;">{{item.text}}</view>
  46. </view>
  47. </view>
  48. <!-- <view class="bg3" :style="{backgroundImage: `url(${image})`}"></view> -->
  49. </view>
  50. </template>
  51. <script>
  52. import {
  53. mapState
  54. } from 'vuex'
  55. export default {
  56. computed: {
  57. ...mapState('m_parent', ['myData'])
  58. },
  59. data() {
  60. return {
  61. endTime: '',
  62. data: [{
  63. icon: 't-icon t-icon-huiyuan',
  64. text: '测试测试1'
  65. },
  66. {
  67. icon: 't-icon t-icon-shangou',
  68. text: '测试测试2'
  69. },
  70. {
  71. icon: 't-icon t-icon-xunzhang',
  72. text: '测试测试3'
  73. }
  74. ],
  75. // image: 'https://ouch-cdn2.icons8.com/TkDU4uToX9e3o75BLBT0mMcvbRy6Ffw8EZrdODM7kbU/rs:fit:256:171/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9zdmcvMjM5/L2IxYTNmM2Q4LTdj/NjktNGQ2NC04ZjIz/LTJjZGM4ZDJmYWEw/ZC5zdmc.png'
  76. };
  77. },
  78. onLoad() {
  79. this.setEndTime()
  80. },
  81. methods: {
  82. setEndTime() {
  83. this.endTime = this.myData.subscribeTime.split('-')[1]
  84. }
  85. }
  86. }
  87. </script>
  88. <style lang="scss">
  89. .bg1 {
  90. position: fixed;
  91. left: 50%;
  92. right: 50%;
  93. transform: translate(-50%, -50%);
  94. width: 1900rpx;
  95. height: 1700rpx;
  96. border-radius: 50%;
  97. background-color: #404148;
  98. z-index: -1;
  99. }
  100. .bg2 {
  101. position: fixed;
  102. left: 50%;
  103. right: 50%;
  104. transform: translate(-50%, -50%);
  105. width: 1950rpx;
  106. height: 1750rpx;
  107. border-radius: 50%;
  108. background-color: #979797;
  109. z-index: -2;
  110. }
  111. .bg3 {
  112. position: fixed;
  113. left: 50%;
  114. right: 50%;
  115. margin-top: 100%;
  116. transform: translate(-50%, -50%);
  117. width: 70%;
  118. height: 60%;
  119. background-size: contain;
  120. background-repeat: no-repeat;
  121. z-index: -3;
  122. }
  123. .vipcard {
  124. position: relative;
  125. top: 20rpx;
  126. left: 50rpx;
  127. width: 100%;
  128. height: 300rpx;
  129. background: linear-gradient(to right, #f8e4bf, #e1bc87);
  130. border-radius: $card-border-radius;
  131. padding: 50rpx;
  132. overflow: hidden;
  133. .t-icon {
  134. height: 40rpx;
  135. width: 80rpx;
  136. background-repeat: no-repeat;
  137. }
  138. .card-title {
  139. margin-left: 20rpx;
  140. font-size: 50rpx;
  141. font-weight: bold;
  142. color: #7e5320;
  143. }
  144. .card-detail {
  145. font-size: 26rpx;
  146. color: #b4986b;
  147. }
  148. .btn-box {
  149. width: 270rpx;
  150. display: flex;
  151. align-items: center;
  152. justify-content: space-between;
  153. .border-box {
  154. border-radius: 100rpx;
  155. border: 1rpx solid #7e5320;
  156. padding: 10rpx 15rpx;
  157. .btn-text {
  158. font-size: 26rpx;
  159. color: #7e5320;
  160. }
  161. }
  162. }
  163. }
  164. .flex {
  165. display: flex;
  166. align-items: center;
  167. }
  168. .line {
  169. height: 4rpx;
  170. width: 100%;
  171. background-color: #333;
  172. }
  173. .circle-box {
  174. display: flex;
  175. justify-content: center;
  176. align-items: center;
  177. width: 80rpx;
  178. height: 80rpx;
  179. border-radius: 50%;
  180. background-color: #FFF;
  181. .t-icon {
  182. height: 80rpx;
  183. width: 80rpx;
  184. background-repeat: no-repeat;
  185. }
  186. }
  187. .border-right {
  188. margin-left: 120rpx;
  189. height: 500rpx;
  190. width: 500rpx;
  191. border-radius: 50%;
  192. border: 1px solid #b4986b;
  193. }
  194. </style>