personal_details.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <template>
  2. <view class="total-page page-box size-28 task-bg">
  3. <Nav :type="1" :genre="2" :title="title" :is_fixed="true">
  4. <view class="m-30 m-b20">
  5. <view class="row-justify-sb sys-background-fff center p-30 bor-bottom-1"
  6. style="border-radius: 20rpx 20rpx 0 0;" hover-class="is-hovers">
  7. <text class="size-28 text-color-666">头像</text>
  8. <view class="row-c">
  9. <image class="wh-80 r-100 m-r10" :src="memberData.head_img" mode=""></image>
  10. <uni-icons type="forward" size="20" color="#999999"></uni-icons>
  11. </view>
  12. </view>
  13. <view class="row-justify-sb sys-background-fff bor-bottom-1 center p-30" hover-class="is-hover_pass"
  14. @click="onSetMessage(4,'修改昵称')">
  15. <text class="size-28 text-color-666">昵称</text>
  16. <view class="row-c line-34">
  17. <text class="text-color-12">{{memberData.nickname}}</text>
  18. <uni-icons type="forward" size="16" color="#999999"></uni-icons>
  19. </view>
  20. </view>
  21. <view class="row-justify-sb sys-background-fff bor-bottom-1 center p-30" hover-class="is-hover_pass"
  22. @click="onSetMessage(5,'修改姓名')">
  23. <text class="size-28 text-color-666">姓名</text>
  24. <view class="row-c line-34">
  25. <text class="text-color-12">{{memberData.name}}</text>
  26. <uni-icons type="forward" size="16" color="#999999"></uni-icons>
  27. </view>
  28. </view>
  29. <view class="row-justify-sb sys-background-fff center p-30" style="border-radius: 0 0 20rpx 20rpx;"
  30. hover-class="is-hover_pass" @click="onSetMessage(3,'修改手机号')">
  31. <text class="size-28 text-color-666">手机号</text>
  32. <view class="row-c line-34">
  33. <text class="text-color-12">{{memberData.phone}}</text>
  34. <uni-icons type="forward" size="16" color="#999999"></uni-icons>
  35. </view>
  36. </view>
  37. </view>
  38. <view class=" m-lr30 r-20">
  39. <view class="row-justify-sb sys-background-fff center p-30 r-20" hover-class="is-hover_pass"
  40. @click="onSetMessage(2,'修改密码')">
  41. <text class="size-28 text-color-666">密码</text>
  42. <view class="row-c line-34">
  43. <text class="text-color-12">去修改</text>
  44. <uni-icons type="forward" size="16" color="#999999"></uni-icons>
  45. </view>
  46. </view>
  47. </view>
  48. </Nav>
  49. </view>
  50. </template>
  51. <script>
  52. import EnInput from "@/components/en-from/en-input/index.vue";
  53. import {
  54. getMemberInfo
  55. } from "@/api/user";
  56. export default {
  57. components: {
  58. EnInput
  59. },
  60. data() {
  61. return {
  62. id: 0,
  63. title: '',
  64. phoneShake: false,
  65. memberData: {
  66. 'head_img': "",
  67. 'name': "",
  68. 'nickname': "",
  69. 'phone': "",
  70. 'position_name': "",
  71. }
  72. }
  73. },
  74. onLoad(options) {
  75. this.id = options.id
  76. this.title = options.title
  77. this.getMemberInfo()
  78. uni.$on('updateMemberInfo', () => {
  79. this.getMemberInfo()
  80. })
  81. },
  82. methods: {
  83. getMemberInfo() {
  84. getMemberInfo({
  85. 'type': 2
  86. }).then((res) => {
  87. if (res.code === 1) {
  88. this.memberData = res.data;
  89. }
  90. })
  91. },
  92. onSubmit() {
  93. this.phoneShake = true
  94. setTimeout(() => {
  95. this.phoneShake = false
  96. this.passwordShake = false
  97. this.codedShake = false
  98. }, 500)
  99. },
  100. getVerifiedCode() {},
  101. onSetMessage(id, name) {
  102. uni.navigateTo({
  103. url: `/page_subpack/system_setting/system_setting?id=${id}&title=${name}`
  104. })
  105. }
  106. }
  107. }
  108. </script>
  109. <style lang="scss" scoped>
  110. .is-hovers {
  111. background-color: #e5e5e5e5;
  112. }
  113. .is-hover_pass {
  114. background-color: #e5e5e5e5;
  115. }
  116. .input-text {
  117. display: block;
  118. width: 120rpx;
  119. text-align: right;
  120. }
  121. .input-item {
  122. height: 96rpx;
  123. padding: 28rpx 40rpx;
  124. box-sizing: border-box;
  125. .login-input {
  126. width: 100%;
  127. }
  128. }
  129. .input-item:last-child {
  130. margin-top: 30rpx;
  131. }
  132. .input-send {
  133. display: flex;
  134. justify-content: flex-start;
  135. align-items: center;
  136. .login-input {
  137. width: calc(100% - 140rpx);
  138. }
  139. .login-send {
  140. width: 140rpx;
  141. text-align: center;
  142. }
  143. }
  144. .input-but {
  145. margin-top: 40rpx;
  146. width: 100%;
  147. height: 96rpx;
  148. line-height: 96rpx;
  149. text-align: center;
  150. }
  151. </style>