parentInfo.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. <template>
  2. <view class="page-view" style="width: 100vw;height: 100vh;">
  3. <top-return text="个人信息" color="#FFF"></top-return>
  4. <view class="detail-image"
  5. :style="{backgroundImage:`linear-gradient(to top, #f3f4f9, rgba(255, 255, 255, 0) 60%),url(${image})`}">
  6. </view>
  7. <!-- 个人头部信息 -->
  8. <view class="top-info">
  9. <image class="top-avatar" :src="parentInfo.avatarUrl"></image>
  10. <view class="top-name">
  11. <text class="name">{{parentInfo.nickName}}</text>
  12. <view class="tag-fill">
  13. <view class="t-icon t-icon-lianmengzhuanjia"></view>
  14. <view class="tag-text" style="color: #4169E1;font-size: 28rpx;">{{phoneNumber}} 绑定手机</view>
  15. </view>
  16. </view>
  17. </view>
  18. <!-- 卡片信息 -->
  19. <view class="main-card">
  20. <view class="flex-row">
  21. <view class="t-icon t-icon-huangguan"></view>
  22. <view class="flex-column">
  23. <view class="subtitle">我的订阅</view>
  24. <view class="title">{{userData.subscribeLevel}}</view>
  25. </view>
  26. </view>
  27. <view class="flex-row" style="margin-top: 50rpx;">
  28. <view class="t-icon t-icon-jiesuo"></view>
  29. <view class="flex-column">
  30. <view class="subtitle">订阅时间</view>
  31. <view class="title">{{userData.subscribeTime}}</view>
  32. </view>
  33. </view>
  34. <view class="flex-row" style="margin-top: 50rpx;">
  35. <view class="t-icon t-icon-quanxian"></view>
  36. <view class="flex-column">
  37. <view class="subtitle">订阅权益</view>
  38. <view class="title">{{userData.subscribePrivilege}}</view>
  39. </view>
  40. </view>
  41. <view class="card-view" style="margin-top: 40rpx;">
  42. <view class="flex-column-box" style="margin:0 auto 0 -40rpx;">
  43. <view class="column-title">孩子名片</view>
  44. <view class="bottom-tag"></view>
  45. </view>
  46. </view>
  47. <view class="card-box">
  48. <view class="card" v-for="(item,index) in childrenData" :key="index" @click="navChildInfo(index)">
  49. <image class="avatar" :src="item.gender==='M'?'/static/default_icons/boy_avatar.svg':item.gender===null?'/static/default_icons/boy_avatar.svg':'/static/default_icons/girl_avatar.svg'"></image>
  50. <view class="card-info">
  51. <view class="flex-baseline">
  52. <view class="YS-title">{{item.name}}</view>
  53. <view class="card-title">{{item.periodName}}学段</view>
  54. </view>
  55. <view class="flex-row">
  56. <view class="t-icon t-icon-xuewei1"></view>
  57. <view class="card-subtitle">{{item.schoolName}}</view>
  58. <view class="t-icon t-icon-zhengceguizhang2" style="margin-left: 20rpx;"></view>
  59. <view class="card-subtitle">{{item.className}}</view>
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. </template>
  67. <script>
  68. import {
  69. mapState
  70. } from 'vuex'
  71. export default {
  72. computed: {
  73. ...mapState('m_parent', ['parentInfo', 'phoneNumber', 'userData', 'childrenData']),
  74. },
  75. data() {
  76. return {
  77. image: 'https://image.meiye.art/pic_1628493294944',
  78. };
  79. },
  80. methods: {
  81. //孩子名片
  82. navChildInfo(index) {
  83. uni.navigateTo({
  84. url: `/subpkg/mine/childInfo?index=${index}`
  85. })
  86. },
  87. },
  88. }
  89. </script>
  90. <style lang="scss">
  91. .flex-column {
  92. display: flex;
  93. flex-direction: column;
  94. height: 80rpx;
  95. justify-content: space-between;
  96. }
  97. .detail-image {
  98. position: fixed;
  99. width: 100%;
  100. height: 800rpx;
  101. }
  102. .top-info {
  103. display: flex;
  104. align-items: center;
  105. margin-top: 180rpx;
  106. .top-avatar {
  107. margin-left: 50rpx;
  108. width: 140rpx;
  109. height: 140rpx;
  110. border-radius: 100%;
  111. border: 6rpx solid #FFF;
  112. box-shadow: 0 10rpx 20rpx rgba(0, 0, 0, 0.2);
  113. z-index: 55;
  114. }
  115. .top-name {
  116. margin-left: 50rpx;
  117. height: 130rpx;
  118. display: flex;
  119. flex-direction: column;
  120. justify-content: space-around;
  121. font-weight: bold;
  122. .name {
  123. color: $title;
  124. font-size: 45rpx;
  125. font-weight: bold;
  126. z-index: 55;
  127. }
  128. .t-icon {
  129. width: 32rpx;
  130. height: 32rpx;
  131. margin-right: 5rpx;
  132. }
  133. }
  134. }
  135. .main-card {
  136. display: flex;
  137. flex-direction: column;
  138. padding: 80rpx 80rpx 0 80rpx;
  139. position: relative;
  140. background-color: #FFF;
  141. height: 100%;
  142. top: 80rpx;
  143. left: 50rpx;
  144. border-radius: 50rpx;
  145. border-bottom-left-radius: 0;
  146. z-index: 55;
  147. .title {
  148. line-height: 32rpx;
  149. font-size: 32rpx;
  150. font-weight: 400;
  151. color: $title;
  152. }
  153. .subtitle {
  154. line-height: 28rpx;
  155. font-size: 28rpx;
  156. color: $subtitle;
  157. font-weight: 400;
  158. }
  159. .t-icon {
  160. margin-right: 30rpx;
  161. width: 80rpx;
  162. height: 80rpx;
  163. }
  164. }
  165. .flex-column-box {
  166. display: flex;
  167. flex-direction: column;
  168. .column-title {
  169. line-height: 35rpx;
  170. font-size: 32rpx;
  171. font-weight: bold;
  172. color: $title;
  173. }
  174. }
  175. .card-box {
  176. display: flex;
  177. align-items: center;
  178. flex-wrap: wrap; //元素换行
  179. .card {
  180. width: 100%;
  181. margin: 10rpx 0 10rpx 0;
  182. padding: 20rpx;
  183. display: flex;
  184. align-items: center;
  185. border: 2rpx solid #f3f4f9;
  186. background-color: #FFFFFF;
  187. border-radius: $border-radius;
  188. z-index: 99;
  189. .card-title {
  190. margin-left: 20rpx;
  191. font-size: 28rpx;
  192. color: $title;
  193. }
  194. .card-subtitle {
  195. line-height: 26rpx;
  196. font-size: 26rpx;
  197. color: $subtitle;
  198. }
  199. .avatar {
  200. width: 100rpx;
  201. height: 100rpx;
  202. }
  203. }
  204. }
  205. .tag-fill {
  206. background-color: #d8deff;
  207. width: fit-content;
  208. z-index: 99;
  209. }
  210. .card-info {
  211. display: flex;
  212. flex-direction: column;
  213. margin-left: 30rpx;
  214. height: 100rpx;
  215. justify-content: space-around;
  216. .t-icon {
  217. width: 32rpx;
  218. height: 32rpx;
  219. margin-right: 5rpx;
  220. }
  221. }
  222. </style>