index.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <template>
  2. <view>
  3. <view style="color: #fff;">
  4. <tn-nav-bar backgroundColor="#26B3A0" :bottomShadow="false" @rightClick="jumpScoreRed">系统设置
  5. </tn-nav-bar>
  6. <view :style="{ height: tobheight + 'px' }"></view>
  7. </view>
  8. <view class="user">
  9. <!-- 用户功能 -->
  10. <view class="com-item">
  11. <view class="com-wrap">
  12. <navigator class="cell" v-for="(item, index) in userList" :key="index"
  13. :url="hasLogin ? item.url : '/pages/user/signin'" @click="">
  14. <view class="cell-left">
  15. <i class="iconfont" :class="item.iconName"
  16. :style="{color:item.icon=='grid-fill'?'rgb(255, 202, 40)':item.icon=='question-circle-fill'?'rgb(49, 201, 232)':item.icon=='setting-fill'?'rgb(90, 199, 37)':'#26B3A0'}"></i>
  17. <view class="cell-text">{{ item.title }}</view>
  18. </view>
  19. <u-icon name="arrow-right" color="#9e9e9e" size="18"></u-icon>
  20. </navigator>
  21. </view>
  22. </view>
  23. </view>
  24. <view @click="handleLoginOut()" hover-class="hoversubmit" class="signinnow">退出登录
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. import {
  30. mapMutations,
  31. mapActions,
  32. mapState,
  33. mapGetters
  34. } from 'vuex';
  35. // import {
  36. // loginOut
  37. // } from '@/api/my/index.js'
  38. export default {
  39. components: {},
  40. data() {
  41. return {
  42. tobheight: 45,
  43. platform: this.$platform.get(),
  44. userList: [{
  45. title: '关于我们',
  46. icon: 'account-fill',
  47. path: 'collect-list',
  48. url: '/pages/user/public/agreement?type=aboutus',
  49. iconName: 'icon-guanyuwomen'
  50. },
  51. {
  52. title: '用户协议',
  53. icon: 'question-circle-fill',
  54. path: 'collect-list',
  55. url: '/pages/user/public/agreement?type=use',
  56. iconName: 'icon-yonghuxieyi'
  57. },
  58. {
  59. title: '隐私政策',
  60. icon: 'grid-fill',
  61. path: 'collect-list',
  62. url: '/pages/user/public/agreement?type=privacy',
  63. iconName: 'icon-yinsixieyi'
  64. },
  65. {
  66. title: '账号安全',
  67. icon: 'question-circle-fill',
  68. path: 'collect-list',
  69. url: '/pages/user/accountSafe/index',
  70. iconName: 'icon-zhanghaoanquan'
  71. }
  72. ],
  73. };
  74. },
  75. computed: {
  76. ...mapGetters(['hasLogin'])
  77. },
  78. onShow: function() {
  79. },
  80. async onLoad() {
  81. // let res = await sysParms({
  82. // })
  83. // console.log('系统参数返回值', res, res.msg);
  84. // if (res.code == 0) {
  85. // }
  86. },
  87. onReady() {
  88. },
  89. onUnload() {
  90. },
  91. methods: {
  92. handleLoginOut() {
  93. uni.clearStorageSync()
  94. uni.reLaunch({
  95. url: '/pages/user/signin'
  96. })
  97. },
  98. }
  99. };
  100. </script>
  101. <style lang="scss">
  102. @import './index.scss';
  103. </style>