personal_details.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <template>
  2. <view class="total-page page-box size-28">
  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 {getMemberInfo} from "@/api/user";
  54. export default {
  55. components: {
  56. EnInput
  57. },
  58. data() {
  59. return {
  60. id: 0,
  61. title: '',
  62. phoneShake: false,
  63. memberData:{
  64. 'head_img':"",
  65. 'name':"",
  66. 'nickname':"",
  67. 'phone':"",
  68. 'position_name':"",
  69. }
  70. }
  71. },
  72. onLoad(options) {
  73. this.id = options.id
  74. this.title = options.title
  75. this.getMemberInfo()
  76. uni.$on('updateMemberInfo',()=>{
  77. this.getMemberInfo()
  78. })
  79. },
  80. methods: {
  81. getMemberInfo() {
  82. getMemberInfo({
  83. 'type': 2
  84. }).then((res) => {
  85. if (res.code === 1) {
  86. this.memberData = res.data;
  87. }
  88. })
  89. },
  90. onSubmit() {
  91. this.phoneShake = true
  92. setTimeout(() => {
  93. this.phoneShake = false
  94. this.passwordShake = false
  95. this.codedShake = false
  96. }, 500)
  97. },
  98. getVerifiedCode() {},
  99. onSetMessage(id, name) {
  100. uni.navigateTo({
  101. url: `/page_subpack/system_setting/system_setting?id=${id}&title=${name}`
  102. })
  103. }
  104. }
  105. }
  106. </script>
  107. <style lang="scss" scoped>
  108. .is-hovers {
  109. background-color: #e5e5e5e5;
  110. }
  111. .is-hover_pass {
  112. background-color: #e5e5e5e5;
  113. }
  114. .input-text {
  115. display: block;
  116. width: 120rpx;
  117. text-align: right;
  118. }
  119. .input-item {
  120. height: 96rpx;
  121. padding: 28rpx 40rpx;
  122. box-sizing: border-box;
  123. .login-input {
  124. width: 100%;
  125. }
  126. }
  127. .input-item:last-child {
  128. margin-top: 30rpx;
  129. }
  130. .input-send {
  131. display: flex;
  132. justify-content: flex-start;
  133. align-items: center;
  134. .login-input {
  135. width: calc(100% - 140rpx);
  136. }
  137. .login-send {
  138. width: 140rpx;
  139. text-align: center;
  140. }
  141. }
  142. .input-but {
  143. margin-top: 40rpx;
  144. width: 100%;
  145. height: 96rpx;
  146. line-height: 96rpx;
  147. text-align: center;
  148. }
  149. </style>