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.

73 lines
1.3 KiB

10 months ago
  1. <template>
  2. <view class="setting">
  3. <u-navbar
  4. :title="$t('page.setting.title')"
  5. :safeAreaInsetTop="false"
  6. placeholder
  7. @leftClick="leftClick"
  8. >
  9. </u-navbar>
  10. <view class="line">
  11. <u-cell class="celi"
  12. url="updatePassword"
  13. :title="$t('page.setting.updatePassword.title')"
  14. isLink></u-cell>
  15. <u-cell class="celi"
  16. url="updatePayPassword"
  17. :title="$t('page.setting.updatePayPassword.title')"
  18. isLink></u-cell>
  19. <u-cell class="celi"
  20. @click="logout"
  21. :title="$t('page.setting.logout')"
  22. isLink></u-cell>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. export default {
  28. data() {
  29. return {
  30. };
  31. },
  32. methods : {
  33. leftClick(){
  34. uni.switchTab({
  35. url: '/pages/user/user'
  36. })
  37. },
  38. logout(){
  39. localStorage.removeItem('token')
  40. localStorage.removeItem('uid')
  41. localStorage.removeItem('account')
  42. localStorage.removeItem('money')
  43. uni.$u.toast(this.$t('success-operation'))
  44. setTimeout(()=>{
  45. uni.navigateTo({
  46. url: '/pages/login/login'
  47. })
  48. },500)
  49. }
  50. }
  51. }
  52. </script>
  53. <style lang="scss" scoped>
  54. .setting{
  55. .line{
  56. background-color: #fff;
  57. margin-top: 10px;
  58. .celi{
  59. // background-color: #F8F8F8;
  60. border-radius: 10px;
  61. padding: 5px 10px;
  62. }
  63. }
  64. }
  65. </style>