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

179 lines
3.8 KiB

11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months 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. import {
  35. navigateTo
  36. } from "@/utils/utils";
  37. export default {
  38. name: "systemSet",
  39. components: {
  40. ChangeLanguage,
  41. tabber,
  42. topbar
  43. },
  44. data() {
  45. return {
  46. list: [{
  47. title: `${this.$t('pageTitle.accountSetting')}`,
  48. itemList: [
  49. // text: `${this.$t('pageTitle.switchAccount')}`
  50. {
  51. leftIcon: "../../static/image/center/1.svg",
  52. text: `${this.$t('pageTitle.switchAccount')}`,
  53. rightIcon: ">"
  54. },
  55. {
  56. leftIcon: "../../static/image/center/2.svg",
  57. text: `${this.$t('pageTitle.changePassword')}`,
  58. rightIcon: ">"
  59. },
  60. {
  61. leftIcon: "../../static/image/center/3.svg",
  62. text: this.$t('pageTitle.logout'),
  63. rightIcon: ">",
  64. type : 'logout',
  65. },
  66. {
  67. leftIcon: "../../static/image/center/4.svg",
  68. text: this.$t('pageTitle.addressList'),
  69. rightIcon: ">",
  70. toUrl: '/pages_order/center/addressListManage'
  71. },
  72. ]
  73. },
  74. {
  75. title: `${this.$t('pageTitle.systemSetting')}`,
  76. itemList: [{
  77. leftIcon: "../../static/image/center/1.svg",
  78. text: `${this.$t('pageTitle.languageSwitch')}`,
  79. rightIcon: ">"
  80. },
  81. {
  82. leftIcon: "../../static/image/center/2.svg",
  83. text: `${this.$t('pageTitle.versionUpdate')}`,
  84. rightIcon: ">"
  85. },
  86. {
  87. leftIcon: "../../static/image/center/3.svg",
  88. text: this.$t('pageTitle.clearCache'),
  89. rightIcon: ">"
  90. },
  91. ]
  92. },
  93. {
  94. title: `${this.$t('pageTitle.identitySetting')}`,
  95. itemList: [{
  96. leftIcon: "../../static/image/center/1.svg",
  97. text: this.$t('pageTitle.switchIdentity'),
  98. rightIcon: ">"
  99. }, ]
  100. }
  101. ],
  102. }
  103. },
  104. methods: {
  105. tapItem(item, index) {
  106. if (item.text === this.$t('pageTitle.languageSwitch')) {
  107. this.$refs.changeLanguage.open();
  108. }else if(item.type){
  109. this[item.type]()
  110. }else{
  111. uni.navigateTo({
  112. url: item.toUrl
  113. })
  114. }
  115. },
  116. logout(){
  117. this.$store.commit('logout')
  118. },
  119. },
  120. }
  121. </script>
  122. <style scoped lang="scss">
  123. .page {
  124. background-color: #FFF;
  125. height: 100vh;
  126. .frame {
  127. padding: 40rpx;
  128. .content {
  129. margin-bottom: 40rpx;
  130. .title {
  131. font-size: 30rpx;
  132. color: #b0b0b0;
  133. }
  134. .item {
  135. display: flex;
  136. justify-content: space-between;
  137. align-items: center;
  138. padding: 20rpx 40rpx;
  139. .key {
  140. display: flex;
  141. justify-content: center;
  142. align-items: center;
  143. color: #333333;
  144. font-size: 32rpx;
  145. .img {
  146. width: 40rpx;
  147. height: 40rpx;
  148. }
  149. .text {
  150. margin-left: 20rpx;
  151. }
  152. }
  153. .value {
  154. color: #999999;
  155. font-size: 36rpx;
  156. }
  157. }
  158. }
  159. }
  160. }
  161. </style>