setting.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <view class="content">
  3. <u-cell-group>
  4. <u-cell size="large" title="邀请与推广" :isLink="true" @click="toinvite"></u-cell>
  5. <u-cell size="large" title="账号安全" :isLink="true" @click="toaccount"></u-cell>
  6. <u-cell size="large" title="推送通知" :isLink="true" @click="totuisong"></u-cell>
  7. <u-cell size="large" title="用户协议" :isLink="true" @click="toxieyi('user')"></u-cell>
  8. <u-cell size="large" title="隐私政策" :isLink="true" @click="toxieyi('yinsi')"></u-cell>
  9. <u-cell size="large" title="个人信息收集清单" :isLink="true" @click="toxieyi('geren')"></u-cell>
  10. <u-cell size="large" title="开源软件声明" :isLink="true" @click="toxieyi('shengming')"></u-cell>
  11. <u-cell size="large" title="错误反馈" :isLink="true" @click="toerror"></u-cell>
  12. <u-cell size="large" title="清除缓存" :isLink="true" @click="toclean"></u-cell>
  13. <u-cell size="large" title="软件更新" :value="version" :isLink="false"></u-cell>
  14. <u-cell size="large" title="关于忆象" :isLink="true" @click="toabout"></u-cell>
  15. </u-cell-group>
  16. <view class="btn" @click="exit">
  17. 退出登录
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. import $api from '@/static/js/api.js'
  23. export default {
  24. data() {
  25. return {
  26. version: ''
  27. }
  28. },
  29. onLoad() {
  30. this.version = plus.runtime.version;
  31. },
  32. methods: {
  33. exit() {
  34. uni.showModal({
  35. title: '提示',
  36. content: '是否确定退出登录',
  37. success: function(res) {
  38. if (res.confirm) {
  39. uni.removeStorageSync('token')
  40. uni.removeStorageSync('userid')
  41. uni.$u.toast('您已退出登录');
  42. uni.reLaunch({
  43. url: '/pages/login/index'
  44. })
  45. } else if (res.cancel) {
  46. }
  47. }
  48. });
  49. },
  50. toxieyi(type) {
  51. uni.navigateTo({
  52. url: '/pageC/xieyi?type=' + type
  53. })
  54. },
  55. toclean() {
  56. uni.clearStorageSync();
  57. },
  58. totuisong() {
  59. uni.navigateTo({
  60. url: '/pageC/tuisong'
  61. })
  62. },
  63. toabout() {
  64. uni.navigateTo({
  65. url: '/pageC/about'
  66. })
  67. },
  68. toerror() {
  69. uni.navigateTo({
  70. url: '/pageC/error'
  71. })
  72. },
  73. toaccount() {
  74. uni.navigateTo({
  75. url: '/pageC/account'
  76. })
  77. },
  78. toinvite() {
  79. uni.navigateTo({
  80. url: '/pageC/invite-list'
  81. })
  82. },
  83. }
  84. }
  85. </script>
  86. <style lang="scss">
  87. .content {
  88. background: #FFFFFF;
  89. padding: 0 24rpx;
  90. .btn {
  91. width: 702rpx;
  92. height: 88rpx;
  93. background: #00B0B0;
  94. border-radius: 44rpx;
  95. font-size: 32rpx;
  96. font-family: PingFangSC, PingFang SC;
  97. font-weight: 500;
  98. color: #FFFFFF;
  99. line-height: 88rpx;
  100. text-align: center;
  101. margin: 62rpx 0 0;
  102. }
  103. }
  104. </style>