center.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <template>
  2. <view class="pages">
  3. <!-- <u-navbar
  4. title="我的"
  5. :placeholder="true"
  6. :autoBack="true"
  7. :safeAreaInsetTop="true"
  8. >
  9. </u-navbar> -->
  10. <view class="top u-flex">
  11. <view class="userinfo u-flex">
  12. <img class="defaultavatar" src="../static/img/defaultavatar.png" alt="">
  13. <view class="text">
  14. <view class="name">{{vuex_user_info.username}}</view>
  15. <view class="dept">
  16. <text>{{vuex_member_info.dept}}</text>
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="page-wrap">
  22. <view class="tool-wrap">
  23. <u-cell-group :border="false">
  24. <u-cell
  25. title="核销记录"
  26. value=""
  27. center
  28. :isLink="true"
  29. :border="true"
  30. icon="/static/img/center-icon-1.png"
  31. url="/center/checklist"
  32. :customStyle="cellCustomStyle"
  33. ></u-cell>
  34. <u-cell
  35. title="修改密码"
  36. value=""
  37. center
  38. :isLink="true"
  39. :border="true"
  40. icon="/static/img/center-icon-2.png"
  41. url="/center/resetpass"
  42. :customStyle="cellCustomStyle"
  43. ></u-cell>
  44. <u-cell
  45. title="退出登录"
  46. value=""
  47. center
  48. :isLink="true"
  49. :border="true"
  50. @click="logOut"
  51. icon="/static/img/center-icon-3.png"
  52. :customStyle="cellCustomStyle"
  53. ></u-cell>
  54. </u-cell-group>
  55. </view>
  56. </view>
  57. <tabbar :tabbarIndexProps='2' />
  58. </view>
  59. </template>
  60. <script>
  61. import { systemInfo } from "@/mixin.js";
  62. import tabbar from "../components/tabbar.vue";
  63. export default {
  64. components:{
  65. tabbar
  66. },
  67. mixins:[systemInfo],
  68. data() {
  69. return {
  70. staticUrl:this.$commonConfig.staticUrl,
  71. memberInfo:{},
  72. cellCustomStyle:{
  73. 'background-color':'#fff',
  74. 'border-radius':'8rpx',
  75. 'margin-bottom':'14rpx',
  76. }
  77. }
  78. },
  79. onShow() {
  80. this.getMemberInfo()
  81. },
  82. onLoad() {
  83. this.getSystemInfo();
  84. },
  85. methods: {
  86. getMemberInfo(){
  87. this.$u.api.memberInfo({id:this.vuex_member_info.id}).then(res=>{
  88. this.memberInfo = res.data;
  89. this.$u.vuex('vuex_member_info', res.data);
  90. }).catch(err=>{
  91. console.log('memberInfo',err.data);
  92. })
  93. },
  94. logOut(){
  95. this.$u.vuex('vuex_user_info', {});
  96. this.getMemberInfo()
  97. }
  98. }
  99. }
  100. </script>
  101. <style>
  102. page{
  103. background-color: #fff;
  104. }
  105. </style>
  106. <style lang="scss" scoped>
  107. .top{
  108. color: #fff;
  109. height: 280rpx;
  110. background: url(../static/img/center-bg.png) no-repeat;
  111. position: relative;
  112. padding: 50rpx 30rpx;
  113. box-sizing: border-box;
  114. align-items: end;
  115. .userinfo{
  116. text-align: left;
  117. .defaultavatar{
  118. width: 110rpx;
  119. height: 110rpx;
  120. }
  121. .text{
  122. margin-left: 32rpx;
  123. font-size: 26rpx;
  124. font-family: PingFangSC-Regular, PingFang SC;
  125. font-weight: 400;
  126. color: #FFFFFF;
  127. line-height: 36rpx;
  128. .name{
  129. font-size: 34rpx;
  130. font-weight: 600;
  131. color: #FFFFFF;
  132. line-height: 48rpx;
  133. margin-bottom: 8rpx;
  134. }
  135. }
  136. }
  137. }
  138. .tool-wrap{
  139. margin-top: 20rpx;
  140. /deep/ .u-cell__body{
  141. padding-left: 0;
  142. }
  143. }
  144. </style>