center.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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_member_info.name}}</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/addcredits"
  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/minuscredits"
  42. :customStyle="cellCustomStyle"
  43. ></u-cell>
  44. <u-cell
  45. title="修改密码"
  46. value=""
  47. center
  48. :isLink="true"
  49. :border="true"
  50. icon="/static/img/center-icon-3.png"
  51. url="/center/resetpass"
  52. :customStyle="cellCustomStyle"
  53. ></u-cell>
  54. <u-cell
  55. title="退出登录"
  56. value=""
  57. center
  58. :isLink="true"
  59. :border="true"
  60. @click="logOut"
  61. icon="/static/img/logout.svg"
  62. :customStyle="cellCustomStyle"
  63. ></u-cell>
  64. </u-cell-group>
  65. </view>
  66. </view>
  67. <tabbar :tabbarIndexProps='2' />
  68. </view>
  69. </template>
  70. <script>
  71. import { systemInfo } from "@/mixin.js";
  72. import tabbar from "../components/tabbar.vue";
  73. export default {
  74. components:{
  75. tabbar
  76. },
  77. mixins:[systemInfo],
  78. data() {
  79. return {
  80. staticUrl:this.$commonConfig.staticUrl,
  81. memberInfo:{},
  82. cellCustomStyle:{
  83. 'background-color':'#fff',
  84. 'border-radius':'8rpx',
  85. 'margin-bottom':'14rpx',
  86. }
  87. }
  88. },
  89. onShow() {
  90. this.getMemberInfo()
  91. },
  92. onLoad() {
  93. this.getSystemInfo();
  94. },
  95. methods: {
  96. getMemberInfo(){
  97. this.$u.api.memberInfo({id:this.vuex_member_info.id}).then(res=>{
  98. this.memberInfo = res.data;
  99. this.$u.vuex('vuex_member_info', res.data);
  100. }).catch(err=>{
  101. console.log('memberInfo',err.data);
  102. })
  103. },
  104. logOut(){
  105. this.$u.vuex('vuex_user_info', {});
  106. this.getMemberInfo()
  107. }
  108. }
  109. }
  110. </script>
  111. <style>
  112. page{
  113. background-color: #fff;
  114. }
  115. </style>
  116. <style lang="scss" scoped>
  117. .top{
  118. color: #fff;
  119. height: 280rpx;
  120. background: url(../static/img/center-bg.png) no-repeat;
  121. background-size: 100% 100%;
  122. position: relative;
  123. padding: 50rpx 30rpx;
  124. box-sizing: border-box;
  125. align-items: end;
  126. .userinfo{
  127. text-align: left;
  128. .defaultavatar{
  129. width: 110rpx;
  130. height: 110rpx;
  131. }
  132. .text{
  133. margin-left: 32rpx;
  134. font-size: 26rpx;
  135. font-family: PingFangSC-Regular, PingFang SC;
  136. font-weight: 400;
  137. color: #FFFFFF;
  138. line-height: 36rpx;
  139. .name{
  140. font-size: 34rpx;
  141. font-weight: 600;
  142. color: #FFFFFF;
  143. line-height: 48rpx;
  144. margin-bottom: 8rpx;
  145. }
  146. }
  147. }
  148. }
  149. .tool-wrap{
  150. margin-top: 20rpx;
  151. /deep/ .u-cell__body{
  152. padding-left: 0;
  153. }
  154. }
  155. </style>