userInfo.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <view class="content">
  3. <view class=" topBox">
  4. <navigator url="/pages/user/set/setImg" class="headbox bb dfsb">
  5. <image :src="userInfo.userInfo.avatar" mode=""></image>
  6. <text class="fontbase flex1">修改头像</text>
  7. <u-icon size="10" color="#999" name="arrow-right"></u-icon>
  8. </navigator>
  9. <navigator url="/pages/user/set/set?type=1" class="ordtype pd30 bb dffs">
  10. <text class="oneTe fontbase">手机号</text>
  11. <text class="textgrey fontbase flex1">{{ userInfo.userInfo.phone || '手机号' }}</text>
  12. <u-icon size="10" color="#999" name="arrow-right"></u-icon>
  13. </navigator>
  14. </view>
  15. <view class="userCenter">
  16. <view class="order">
  17. <navigator url="/pages/user/set/set?type=2" class="ordtype bb dffs">
  18. <text class="oneTe flex1 fontbase">修改昵称</text>
  19. <text class="textgrey fontmid">{{ userInfo.userInfo.nickname || '昵称' }}</text>
  20. <u-icon size="10" color="#999" name="arrow-right"></u-icon>
  21. </navigator>
  22. <navigator url="/pages/user/set/set?type=3" class="ordtype bb dffs">
  23. <text class="oneTe flex1 fontbase">学校信息</text>
  24. <text class="textgrey fontmid">{{ userInfo.userInfo.school || '学校信息' }}</text>
  25. <u-icon size="10" color="#999" name="arrow-right"></u-icon>
  26. </navigator>
  27. <!-- "is_pay_pass": 1, //是否设置支付密码: 0=未设置 1=已设置 -->
  28. <view @click="navTo()" class="ordtype bb dffs">
  29. <text class="oneTe flex1 fontbase">支付密码</text>
  30. <u-icon size="10" color="#999" name="arrow-right"></u-icon>
  31. </view>
  32. <navigator url="/pages/user/address/address" class="ordtype bb dffs">
  33. <text class="oneTe flex1 fontbase">我的收货地址</text>
  34. <u-icon size="10" color="#999" name="arrow-right"></u-icon>
  35. </navigator>
  36. </view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. import { mapState, mapActions } from 'vuex';
  42. import { pathToBase64 } from '@/common/tool/pathToBase64.js';
  43. export default {
  44. data() {
  45. return {
  46. };
  47. },
  48. computed: {
  49. ...mapState({ userInfo: state => state.userInfo })
  50. },
  51. methods: {
  52. navTo(){
  53. let type = this.userInfo.userInfo.is_pay_pass==1?6:4;
  54. uni.navigateTo({
  55. url:'/pages/user/set/set?type=' +type
  56. })
  57. },
  58. }
  59. };
  60. </script>
  61. <style lang="scss">
  62. .content {
  63. padding-top: 20rpx;
  64. .topBox {
  65. width: 100%;
  66. margin: 20rpx auto;
  67. background-color: #fff;
  68. .oneTe {
  69. margin-right: 109rpx;
  70. }
  71. }
  72. .headbox {
  73. padding: 25rpx 30rpx;
  74. align-items: center;
  75. image {
  76. width: 110rpx;
  77. height: 110rpx;
  78. background-color: #fafafa;
  79. border-radius: 50%;
  80. margin-right: 35rpx;
  81. }
  82. }
  83. }
  84. .userCenter {
  85. .order {
  86. margin-bottom: 20rpx;
  87. background-color: #fff;
  88. .ordtype {
  89. padding: 30rpx;
  90. align-items: center;
  91. .flext {
  92. flex: 1;
  93. font-size: 30rpx;
  94. line-height: 30rpx;
  95. color: $textcom;
  96. }
  97. input,
  98. .putin {
  99. flex: 1;
  100. color: #666;
  101. font-size: 30rpx;
  102. }
  103. .oneTe {
  104. width: 30%;
  105. }
  106. }
  107. }
  108. }
  109. </style>