subscribecenter.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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>
  9. <view class="flex">
  10. <view class="t-icon t-icon-huiyuan1"></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. {
  64. icon: 't-icon t-icon-huiyuan',
  65. text: '测试测试1'
  66. },
  67. {
  68. icon: 't-icon t-icon-shangou',
  69. text: '测试测试2'
  70. },
  71. {
  72. icon: 't-icon t-icon-xunzhang',
  73. text: '测试测试3'
  74. }
  75. ],
  76. image: 'https://ouch-cdn2.icons8.com/TkDU4uToX9e3o75BLBT0mMcvbRy6Ffw8EZrdODM7kbU/rs:fit:256:171/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9zdmcvMjM5/L2IxYTNmM2Q4LTdj/NjktNGQ2NC04ZjIz/LTJjZGM4ZDJmYWEw/ZC5zdmc.png'
  77. };
  78. },
  79. onLoad() {
  80. this.setEndTime()
  81. },
  82. methods: {
  83. setEndTime() {
  84. this.endTime = this.myData.subscribeTime.split('-')[1]
  85. }
  86. }
  87. }
  88. </script>
  89. <style lang="scss">
  90. .bg1 {
  91. position: fixed;
  92. left: 50%;
  93. right: 50%;
  94. transform: translate(-50%, -50%);
  95. width: 1900rpx;
  96. height: 1700rpx;
  97. border-radius: 50%;
  98. background-color: #404148;
  99. z-index: -1;
  100. }
  101. .bg2 {
  102. position: fixed;
  103. left: 50%;
  104. right: 50%;
  105. transform: translate(-50%, -50%);
  106. width: 1950rpx;
  107. height: 1750rpx;
  108. border-radius: 50%;
  109. background-color: #979797;
  110. z-index: -2;
  111. }
  112. .bg3 {
  113. position: fixed;
  114. left: 50%;
  115. right: 50%;
  116. margin-top: 100%;
  117. transform: translate(-50%, -50%);
  118. width: 70%;
  119. height: 60%;
  120. background-size: contain;
  121. background-repeat: no-repeat;
  122. z-index: -3;
  123. }
  124. .vipcard {
  125. position: relative;
  126. top: 20rpx;
  127. left: 50rpx;
  128. width: 100%;
  129. height: 300rpx;
  130. background: linear-gradient(to right, #f8e4bf, #e1bc87);
  131. border-radius: $card-border-radius;
  132. padding: 50rpx;
  133. overflow: hidden;
  134. .card-title {
  135. margin-left: 20rpx;
  136. font-size: 50rpx;
  137. font-weight: bold;
  138. color: #7e5320;
  139. }
  140. .card-detail {
  141. margin-top: 20rpx;
  142. font-size: 26rpx;
  143. color: #b4986b;
  144. }
  145. .btn-box {
  146. width: 270rpx;
  147. margin-top: 80rpx;
  148. display: flex;
  149. align-items: center;
  150. justify-content: space-between;
  151. .border-box {
  152. border-radius: 100rpx;
  153. border: 1rpx solid #7e5320;
  154. padding: 10rpx;
  155. .btn-text {
  156. font-size: 26rpx;
  157. color: #7e5320;
  158. }
  159. }
  160. }
  161. }
  162. .flex {
  163. display: flex;
  164. align-items: center;
  165. }
  166. .line {
  167. height: 4rpx;
  168. width: 100%;
  169. background-color: #333;
  170. }
  171. .t-icon {
  172. height: 40rpx;
  173. width: 40rpx;
  174. background-repeat: no-repeat;
  175. }
  176. .circle-box{
  177. display: flex;
  178. justify-content: center;
  179. align-items: center;
  180. width: 80rpx;
  181. height: 80rpx;
  182. border-radius: 50%;
  183. background-color: #FFF;
  184. .t-icon {
  185. height: 80rpx;
  186. width: 80rpx;
  187. background-repeat: no-repeat;
  188. }
  189. }
  190. .border-right{
  191. margin-left: 120rpx;
  192. height: 500rpx;
  193. width: 500rpx;
  194. border-radius: 50%;
  195. border: 1px solid #b4986b;
  196. }
  197. </style>