parentpage.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <template>
  2. <view class="container">
  3. <!-- 返回按钮 -->
  4. <back @click="returnMy"></back>
  5. <!-- 头部信息 -->
  6. <view class="top-info">
  7. <image class="top-avatar" :src="parentinfo.avatarUrl" size="100"></image>
  8. <view class="top-name">
  9. <text class="name">{{parentinfo.nickName}}</text>
  10. <text class="detail">账号: {{parentdetail.phoneNumber}}</text>
  11. </view>
  12. </view>
  13. <!-- 内容列表 -->
  14. <view class="card-box">
  15. <u-cell-group :border="false">
  16. <view class="i-item">
  17. <view class="t-icon t-icon-huiyuan"></view>
  18. <u-cell class="cell-box" size="large" title="我的订阅" :label="myData.subscribeLevel"
  19. :border="false"></u-cell>
  20. </view>
  21. <view class="i-item">
  22. <view class="t-icon t-icon-keji"></view>
  23. <u-cell class="cell-box" size="large" title="订阅权益" :label="myData.subscribePrivilege" :border="false"></u-cell>
  24. </view>
  25. <view class="i-item">
  26. <view class="t-icon t-icon-qingjiashenqing"></view>
  27. <u-cell class="cell-box" size="large" title="订阅时间" :label="myData.subscribeTime" :border="false">
  28. </u-cell>
  29. </view>
  30. </u-cell-group>
  31. <!-- 横向内容列表 -->
  32. <view class="title-box-name">我的孩子</view>
  33. <view style="display: flex; flex-wrap: wrap; align-items: center;margin: 0 40rpx 0 40rpx;">
  34. <view class="data-box-item" v-for="(item,index) in parentdetail.childrenList" :key="index">
  35. <view class="flex">
  36. <view class="start-tag-boy" v-show="item.gender == '男'"></view>
  37. <view class="start-tag-girl" v-show="item.gender == '女'"></view>
  38. <view class="item-text">{{item.name}}</view>
  39. </view>
  40. <view class="avatar-box">
  41. <u-avatar size="100" class="item-avatar" :src="item.avatar" mode="aspectFill"></u-avatar>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. </template>
  48. <script>
  49. import {
  50. mapState,
  51. mapMutations
  52. } from 'vuex'
  53. export default {
  54. computed: {
  55. ...mapState('m_parent', ['parentinfo', 'parentdetail','myData'])
  56. },
  57. data() {
  58. return {
  59. };
  60. },
  61. methods: {
  62. //返回成绩页面
  63. returnMy() {
  64. uni.switchTab({
  65. url: '/pages/my/my'
  66. })
  67. },
  68. },
  69. }
  70. </script>
  71. <style lang="scss">
  72. @import '@/subpkg/common/infopage.scss';
  73. .container {
  74. background: linear-gradient($color-blue, $page-background-color);
  75. }
  76. .avatar-box {
  77. margin-top: -10rpx;
  78. display: flex;
  79. align-items: center;
  80. justify-content: center;
  81. .item-avatar {
  82. width: 220rpx;
  83. height: 220rpx;
  84. }
  85. }
  86. .start-tag-boy{
  87. height: 30rpx;
  88. width: 10rpx;
  89. border-radius: 100rpx;
  90. background-image: linear-gradient($color-mixblue 60%, #FFF);
  91. }
  92. .start-tag-girl{
  93. height: 30rpx;
  94. width: 10rpx;
  95. border-radius: 100rpx;
  96. background-image: linear-gradient($color-pink 60%, #FFF);
  97. }
  98. </style>