铝交易,微信公众号
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.

166 lines
3.5 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="page">
  3. <navbar :title="$t('pageTitle.systemSettings')" leftClick @leftClick="$utils.navigateBack" />
  4. <view class="frame">
  5. <view class="content" v-for="(item, index) in list" :key="index">
  6. <view class="title">{{ item.title }}</view>
  7. <view class="item" v-for="(item2, index) in item.itemList" :key="index" @click="tapItem(item2, index)">
  8. <view class="key">
  9. <view class="img">
  10. <img :src="item2.leftIcon" style="width: 100%; height: 100%;" />
  11. </view>
  12. <view class="text">
  13. {{ item2.text }}
  14. </view>
  15. </view>
  16. <view class="value">
  17. {{ item.rightIcon }}
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. <!-- 语言切换 -->
  23. <!--<view style="padding: 20rpx;"-->
  24. <!-- @click="$refs.changeLanguage.open()">-->
  25. <!-- {{ $t('pages.index.index.language') }}-->
  26. <!--</view>-->
  27. <changeLanguage ref="changeLanguage" />
  28. </view>
  29. </template>
  30. <script>
  31. import topbar from "@/components/base/topbar.vue";
  32. import tabber from "@/components/base/tabbar.vue";
  33. import ChangeLanguage from "@/components/base/changeLanguage.vue";
  34. export default {
  35. name: "systemSet",
  36. components: {
  37. ChangeLanguage,
  38. tabber,
  39. topbar
  40. },
  41. data() {
  42. return {
  43. list: [{
  44. title: `${this.$t('pageTitle.accountSetting')}`,
  45. itemList: [
  46. // text: `${this.$t('pageTitle.switchAccount')}`
  47. {
  48. leftIcon: "../static/center/1.svg",
  49. text: `${this.$t('pageTitle.switchAccount')}`,
  50. rightIcon: ">"
  51. },
  52. {
  53. leftIcon: "../static/center/2.svg",
  54. text: `${this.$t('pageTitle.forgotPasswordPage')}`,
  55. rightIcon: ">"
  56. },
  57. {
  58. leftIcon: "../static/center/2.svg",
  59. text: this.$t('pageTitle.logout'),
  60. rightIcon: ">",
  61. type : 'logout',
  62. },
  63. ]
  64. },
  65. {
  66. title: `${this.$t('pageTitle.systemSetting')}`,
  67. itemList: [{
  68. leftIcon: "../static/center/1.svg",
  69. text: `${this.$t('pageTitle.languageSwitch')}`,
  70. rightIcon: ">"
  71. },
  72. {
  73. leftIcon: "../static/center/2.svg",
  74. text: `${this.$t('pageTitle.versionUpdate')}`,
  75. rightIcon: ">"
  76. },
  77. {
  78. leftIcon: "../static/center/2.svg",
  79. text: this.$t('pageTitle.clearCache'),
  80. rightIcon: ">"
  81. },
  82. ]
  83. },
  84. {
  85. title: `${this.$t('pageTitle.identitySetting')}`,
  86. itemList: [{
  87. leftIcon: "../static/center/2.svg",
  88. text: this.$t('pageTitle.switchIdentity'),
  89. rightIcon: ">"
  90. }, ]
  91. }
  92. ],
  93. }
  94. },
  95. methods: {
  96. tapItem(item, index) {
  97. if (item.text === this.$t('pageTitle.languageSwitch')) {
  98. this.$refs.changeLanguage.open();
  99. }else if(item.type){
  100. this[item.type]()
  101. }
  102. },
  103. logout(){
  104. this.$store.commit('logout')
  105. },
  106. },
  107. }
  108. </script>
  109. <style scoped lang="scss">
  110. .page {
  111. background-color: #FFF;
  112. height: 100vh;
  113. .frame {
  114. padding: 40rpx;
  115. .content {
  116. margin-bottom: 40rpx;
  117. .title {
  118. font-size: 30rpx;
  119. color: #b0b0b0;
  120. }
  121. .item {
  122. display: flex;
  123. justify-content: space-between;
  124. align-items: center;
  125. padding: 20rpx 40rpx;
  126. .key {
  127. display: flex;
  128. justify-content: center;
  129. align-items: center;
  130. color: #333333;
  131. font-size: 32rpx;
  132. .img {
  133. width: 40rpx;
  134. height: 40rpx;
  135. }
  136. .text {
  137. margin-left: 20rpx;
  138. }
  139. }
  140. .value {
  141. color: #999999;
  142. font-size: 36rpx;
  143. }
  144. }
  145. }
  146. }
  147. }
  148. </style>