replacePhone.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <view class="page">
  3. <view class="avatarinfo dis f-c a-c ">
  4. <image :src="userInfo.sysUser.headSculpture? userInfo.sysUser.headSculpture :'/static/image/avatar.png'"
  5. mode=""></image>
  6. <text class=" phone mt-3 mb-4">您的手机号:{{userInfo.sysUser.mobile}}</text>
  7. <view class="btn dis a-c j-c " @tap="authMethodShow=true">
  8. 更换手机号
  9. </view>
  10. </view>
  11. <uni-Popup :show="authMethodShow" @close='authMethodShow=false' headerTitle="验证方式">
  12. <template #content>
  13. <view class="authelement">
  14. <text class="">更换手机号需要对您的身份进行验证,请选择验证方式完成验证后即可更换新的手机号</text>
  15. <view class="btn dis a-c j-s mt-3">
  16. <view class="dis a-c j-c " @click="smsVerification">
  17. 短信验证
  18. </view>
  19. <view class="dis a-c j-c " @click="passwordValidation">
  20. 密码验证
  21. </view>
  22. </view>
  23. </view>
  24. </template>
  25. </uni-Popup>
  26. </view>
  27. </template>
  28. <script>
  29. import {
  30. mapState,
  31. mapMutations
  32. } from "vuex"
  33. export default {
  34. data() {
  35. return {
  36. authMethodShow: false, //验证方式
  37. }
  38. },
  39. onShow() {
  40. },
  41. onLoad() {
  42. },
  43. computed: {
  44. ...mapState(['userInfo']),
  45. },
  46. methods: {
  47. //短信验证
  48. smsVerification() {
  49. uni.navigateTo({
  50. url: '/pages/login/smsCode?mobile=' + this.userInfo.sysUser.mobile + '&userId=' + this.userInfo
  51. .sysUser.userId,
  52. })
  53. },
  54. //密码验证
  55. passwordValidation() {
  56. uni.navigateTo({
  57. url: '/pages/my/passwordValidation?mobile=' + this.userInfo.sysUser.mobile + '&userId=' + this
  58. .userInfo
  59. .sysUser.userId,
  60. })
  61. },
  62. }
  63. }
  64. </script>
  65. <style lang="scss" scoped>
  66. .page {
  67. background-color: #F8F8F8;
  68. height: 100vh;
  69. }
  70. .avatarinfo {
  71. padding: 50rpx 75rpx;
  72. box-sizing: border-box;
  73. background-color: #fff;
  74. image {
  75. width: 156rpx;
  76. height: 156rpx;
  77. border-radius: 50%;
  78. }
  79. .phone {
  80. font-size: 30rpx;
  81. color: #333;
  82. }
  83. .btn {
  84. width: 100%;
  85. background: #FDE935;
  86. padding: 20rpx;
  87. box-sizing: border-box;
  88. border-radius: 45rpx 45rpx 45rpx 45rpx;
  89. font-size: 36rpx;
  90. color: #1F1F1F;
  91. }
  92. }
  93. .authelement {
  94. padding: 40rpx;
  95. box-sizing: border-box;
  96. >text {
  97. font-size: 30rpx;
  98. color: #333;
  99. }
  100. .btn {
  101. view {
  102. flex: 1;
  103. padding: 20rpx;
  104. box-sizing: border-box;
  105. background: #FDE935;
  106. border-radius: 50rpx 50rpx 50rpx 50rpx;
  107. }
  108. view:last-child {
  109. margin-left: 38rpx;
  110. }
  111. }
  112. }
  113. </style>