info.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <template>
  2. <view >
  3. <image mode="widthFix" src="/static/wd_bg_login.jpg" class="login_full_img"></image>
  4. <u-navbar title="我的资料" :border-bottom="false" background="{ background: '#ffffff',opacity:0.4; }" title-color="#ffffff" back-icon-color="#ffffff">
  5. </u-navbar>
  6. <view class="loginBox">
  7. <view style="display: flex;height: 160rpx;justify-content: center;" >
  8. <view style="text-align: center;">
  9. <image :src="$method.splitImgHost(form.avatar, true)" class="avatar"></image>
  10. <view class="nick">{{form.realname}}</view>
  11. <view>
  12. <view class="item">
  13. <view>我的昵称</view>
  14. <view>{{form.nickname}}<u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
  15. </view>
  16. <view class="item">
  17. <view>性别</view>
  18. <view>{{ array_sex[form.sex] }}<u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
  19. </view>
  20. <view class="item">
  21. <view>年龄</view>
  22. <view>{{ $method.getYears(form.userBirth) }}<u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
  23. </view>
  24. <view class="item">
  25. <view>关联学员身份</view>
  26. <view style="display: flex;">
  27. <view style="text-align: right;">
  28. <view>{{ form.realname }}</view>
  29. <view>{{ form.idCard }}</view>
  30. </view>
  31. <u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
  32. </view>
  33. <view class="item">
  34. <view>所在城市</view>
  35. <view>{{ form.province }}-{{ form.city }}-{{ form.district }}<u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
  36. </view>
  37. <view class="item">
  38. <view>手机号码</view>
  39. <view>{{ form.telphone }}<u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
  40. </view>
  41. <view class="item">
  42. <view>微信绑定</view>
  43. <view>nihongjiewechat<u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </template>
  51. <script>
  52. import {mapGetters} from 'vuex';
  53. export default {
  54. data() {
  55. return {
  56. form:{},
  57. array_sex: ['男', '女'],
  58. };
  59. },
  60. onShow(){
  61. this.form = this.userInfo
  62. console.log(this.form)
  63. },
  64. onLoad(option) {
  65. },
  66. methods: {
  67. },
  68. computed: {...mapGetters(['userInfo'])},
  69. watch:{
  70. userInfo(val, oldVal){//普通的watch监听
  71. if(val){
  72. this.form = this.userInfo
  73. }
  74. },
  75. }
  76. };
  77. </script>
  78. <style >
  79. page{
  80. background-color: #F0F1F5;
  81. }
  82. </style>
  83. <style scope>
  84. .item{
  85. width: 686rpx;
  86. height: 80rpx;
  87. background: #FFFFFF;
  88. border-radius: 24rpx;
  89. display: flex;
  90. color: #666666;
  91. align-items: center;
  92. justify-content: space-between;
  93. padding: 0 20rpx;
  94. margin-top: 30rpx;
  95. font-size: 24rpx;
  96. }
  97. .nick{
  98. font-size: 36rpx;
  99. font-weight: bold;
  100. color: #007AFF;
  101. margin-top: 20rpx;
  102. }
  103. .loginBox{
  104. position: relative;
  105. top: -108px;
  106. }
  107. .avatar{
  108. width: 80px;
  109. height: 80px;
  110. }
  111. .login_full_img {
  112. display: block;
  113. width: 100%;
  114. height: 280rpx !important;
  115. z-index: -999;
  116. top: 0;
  117. }
  118. .full_img {
  119. display: block;
  120. width: 100%;
  121. z-index: -999;
  122. top: 0;
  123. }
  124. .loginBtn{
  125. width: 526rpx;
  126. height: 80rpx;
  127. background: linear-gradient(90deg, #015EEA, #00C0FA);
  128. box-shadow: 0rpx 10rpx 16rpx 4rpx rgba(1, 99, 235, 0.04);
  129. border-radius: 40rpx;
  130. color: #FFFFFF;
  131. line-height: 80rpx;
  132. margin: 0 auto;
  133. margin-top: 50rpx;
  134. }
  135. </style>