subscribecenter.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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-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. font-size: 26rpx;
  142. color: #b4986b;
  143. }
  144. .btn-box {
  145. width: 270rpx;
  146. display: flex;
  147. align-items: center;
  148. justify-content: space-between;
  149. .border-box {
  150. border-radius: 100rpx;
  151. border: 1rpx solid #7e5320;
  152. padding: 10rpx;
  153. .btn-text {
  154. font-size: 26rpx;
  155. color: #7e5320;
  156. }
  157. }
  158. }
  159. }
  160. .flex {
  161. display: flex;
  162. align-items: center;
  163. }
  164. .line {
  165. height: 4rpx;
  166. width: 100%;
  167. background-color: #333;
  168. }
  169. .t-icon {
  170. height: 40rpx;
  171. width: 40rpx;
  172. background-repeat: no-repeat;
  173. }
  174. .circle-box{
  175. display: flex;
  176. justify-content: center;
  177. align-items: center;
  178. width: 80rpx;
  179. height: 80rpx;
  180. border-radius: 50%;
  181. background-color: #FFF;
  182. .t-icon {
  183. height: 80rpx;
  184. width: 80rpx;
  185. background-repeat: no-repeat;
  186. }
  187. }
  188. .border-right{
  189. margin-left: 120rpx;
  190. height: 500rpx;
  191. width: 500rpx;
  192. border-radius: 50%;
  193. border: 1px solid #b4986b;
  194. }
  195. </style>