裂变星小程序-25.03.04
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.3 KiB

  1. <template>
  2. <view class="page">
  3. <navbar title="设置" leftClick @leftClick="$utils.navigateBack" />
  4. <view class="content">
  5. <view class="card flex operate" @click="$refs.popup.open('user_ys')">
  6. <text>隐私政策</text>
  7. <uv-icon name="arrow-right" color="#000000" size="28rpx"></uv-icon>
  8. </view>
  9. <button v-if="isLogined" plain class="btn-logout" @click="onLogout">退出登录</button>
  10. </view>
  11. <configPopup ref="popup"></configPopup>
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. data() {
  17. return {
  18. isLogined: false
  19. }
  20. },
  21. onShow() {
  22. this.isLogined = !!uni.getStorageSync('token')
  23. },
  24. methods: {
  25. onLogout() {
  26. this.$store.commit('logout')
  27. }
  28. },
  29. }
  30. </script>
  31. <style scoped lang="scss">
  32. .page {
  33. background-color: $uni-bg-color;
  34. position: relative;
  35. width: 100vw;
  36. height: 100vh;
  37. }
  38. .content {
  39. padding: 20rpx;
  40. }
  41. .operate {
  42. padding: 28rpx 22rpx 28rpx 20rpx;
  43. justify-content: space-between;
  44. color: #1B1B1B;
  45. font-weight: 500;
  46. font-size: 32rpx;
  47. }
  48. .btn-logout {
  49. width: calc(100% - 40rpx);
  50. height: 90rpx;
  51. background-color: $uni-bg-color-highlight;
  52. color: $uni-text-color-highlight;
  53. font-size: 36rpx;
  54. border-radius: 45rpx;
  55. position: absolute;
  56. left: 20rpx;
  57. bottom: 159rpx;
  58. }
  59. </style>