set.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <view class="default_page" :style="{'height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title='设置'></cus-header>
  4. <div class="box">
  5. <div class="box-item adfacjb" @click="turnPage('/pagesMy/userInfo')">
  6. <div class="box-item-left">用户信息</div>
  7. <image class="box-item-right" :src="imgBase+'my_arrow_right.png'"></image>
  8. </div>
  9. <div class="box-item adfacjb" @click="turnPage('/pagesMy/serviceAgreement')">
  10. <div class="box-item-left">服务协议</div>
  11. <image class="box-item-right" :src="imgBase+'my_arrow_right.png'"></image>
  12. </div>
  13. <div class="box-item adfacjb" @click="turnPage('/pagesMy/privacyPolicy')">
  14. <div class="box-item-left">隐私政策</div>
  15. <image class="box-item-right" :src="imgBase+'my_arrow_right.png'"></image>
  16. </div>
  17. </div>
  18. <div class="exit" @click="exitLogin">退出登录</div>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. data(){
  24. return {
  25. userBrief:''
  26. }
  27. },
  28. onLoad() {
  29. if(uni.getStorageSync('userInfo')){
  30. const id = JSON.parse(uni.getStorageSync('userInfo')).id
  31. this.getMyInfo(id)
  32. }
  33. },
  34. methods:{
  35. getMyInfo(userId){
  36. this.$api.get(`/wx/myCount/${userId}`,this.params).then(({data:res})=>{
  37. if(res.code!==0) return this.$showToast(res.msg)
  38. this.userBrief = res.data.userBrief||'';
  39. })
  40. },
  41. turnPage(url){
  42. uni.navigateTo({
  43. url
  44. })
  45. },
  46. exitLogin(){
  47. uni.clearStorageSync();
  48. uni.reLaunch({
  49. url:'/pages/my'
  50. })
  51. }
  52. }
  53. }
  54. </script>
  55. <style scoped lang="less">
  56. .default_page{
  57. padding: 0 24rpx;
  58. box-sizing: border-box;
  59. background: #F7F7F7;
  60. .box{
  61. margin-top: 20rpx;
  62. border-radius: 24rpx;
  63. &-item{
  64. background: #FFFFFF;
  65. box-shadow: inset 0px -1px 0px 0px #EFEFEF;
  66. padding: 28rpx 24rpx;
  67. &-left{
  68. font-family: PingFangSC, PingFang SC;
  69. font-weight: 400;
  70. font-size: 30rpx;
  71. color: #002846;
  72. line-height: 42rpx;
  73. }
  74. &-right{
  75. width: 32rpx;
  76. height: 32rpx;
  77. }
  78. }
  79. }
  80. .exit{
  81. width: calc(100% - 100rpx);
  82. height: 88rpx;
  83. background: #FFFFFF;
  84. border-radius: 44rpx;
  85. font-family: PingFang-SC, PingFang-SC;
  86. font-weight: bold;
  87. font-size: 32rpx;
  88. color: #199C9C;
  89. line-height: 88rpx;
  90. text-align: center;
  91. letter-spacing: 2rpx;
  92. position: fixed;
  93. left: 50rpx;
  94. bottom: 200rpx;
  95. }
  96. }
  97. </style>