setup.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <template>
  2. <view class="box">
  3. <view class="main">
  4. <view class="mkBox">
  5. <view class="line">
  6. <view class="lineTitle">昵称</view>
  7. <view class="lineCont">{{ueserInfo.memberInfo.nickName}}</view>
  8. </view>
  9. <view class="line">
  10. <view class="lineTitle">手机号</view>
  11. <view class="lineCont">{{phoneNum}}</view>
  12. </view>
  13. <view class="line boderNo">
  14. <view class="lineTitle">真实姓名</view>
  15. <view class="lineCont">
  16. <input type="text" v-model="ueserInfo.memberInfo.name" value="" placeholder="请输入" class="lineinput" @blur="updateBmember"/>
  17. </view>
  18. </view>
  19. </view>
  20. <view class="mkBox">
  21. <view class="line boderNo" @click="goiphone">
  22. <view class="lineTitle">联系人管理</view>
  23. <view class="lineCont">
  24. <image src="../../static/img/jt.png" mode="" class="lineJt"></image>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="mkBox">
  29. <view class="line " @click="goTreaty">
  30. <view class="lineTitle">服务协议</view>
  31. <view class="lineCont">
  32. <image src="../../static/img/jt.png" mode="" class="lineJt"></image>
  33. </view>
  34. </view>
  35. <view class="line boderNo" @click="goIntimity">
  36. <view class="lineTitle">隐私政策</view>
  37. <view class="lineCont">
  38. <image src="../../static/img/jt.png" mode="" class="lineJt"></image>
  39. </view>
  40. </view>
  41. </view>
  42. <view class="signOut" @click="signOut">退出登录</view>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. export default {
  48. data() {
  49. return {
  50. ueserInfo:'',
  51. phoneNum:'',
  52. name:'',
  53. }
  54. },
  55. onLoad(opt) {
  56. this.ueserInfo=uni.getStorageSync("logodata");
  57. this.phoneNum = opt.phone
  58. },
  59. onShow() {
  60. },
  61. methods: {
  62. updateBmember(){
  63. if(this.name!=''){
  64. this.$http('worldKeepCar/keepCarMy/updateTmember', {
  65. name:this.name
  66. },'POST').then(res => {
  67. if(res.code==0){
  68. console.log(this.ueserInfo)
  69. uni.setStorage({
  70. key: 'logodata',
  71. data: this.ueserInfo,
  72. success: function () {}
  73. });
  74. }
  75. })
  76. }
  77. },
  78. signOut(){
  79. //uni.clearStorageSync();
  80. uni.removeStorageSync('logodata');
  81. uni.navigateTo({
  82. url:'../login/login'
  83. })
  84. },
  85. goiphone(){
  86. uni.navigateTo({
  87. url:'../iPhone/phoneList'
  88. })
  89. },
  90. goTreaty(){
  91. uni.navigateTo({
  92. url:'treaty'
  93. })
  94. },
  95. goIntimity(){
  96. uni.navigateTo({
  97. url:'intimity'
  98. })
  99. }
  100. }
  101. }
  102. </script>
  103. <style scoped>
  104. .box{
  105. min-height: 100vh;
  106. background:#F4F5F7 ;
  107. }
  108. .main{
  109. padding: 24rpx;
  110. }
  111. .mkBox{
  112. background: #FEFFFE;
  113. border-radius: 10rpx;
  114. padding: 0 22rpx;
  115. margin-bottom: 20rpx;
  116. }
  117. .line{
  118. display: flex;
  119. justify-content: space-between;
  120. padding: 30rpx 0;
  121. border-bottom: 1px solid #DDDDDD;
  122. font-size: 28rpx;
  123. color: #3C3C3C;
  124. }
  125. .lineinput{
  126. text-align: right;
  127. font-size: 28rpx;
  128. color: #3C3C3C;
  129. }
  130. .lineJt{
  131. width: 15rpx;
  132. height: 26rpx;
  133. }
  134. .boderNo{
  135. border: none;
  136. }
  137. .signOut{
  138. width: 702rpx;
  139. height: 98rpx;
  140. background: #FFFFFF;
  141. border-radius: 10rpx;
  142. font-size: 30rpx;
  143. color: #FF3B30;
  144. line-height: 98rpx;
  145. text-align: center;
  146. margin-top: 100rpx;
  147. }
  148. </style>