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

204 lines
4.4 KiB

4 months ago
4 months ago
4 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
2 months ago
3 months ago
4 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 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. },
  68. {
  69. title: `${this.$t('pageTitle.systemSetting')}`,
  70. itemList: [
  71. // {
  72. // leftIcon: "../../static/image/center/1.svg",
  73. // text: `${this.$t('pageTitle.languageSwitch')}`,
  74. // rightIcon: ">"
  75. // },
  76. {
  77. leftIcon: "../../static/image/center/2.svg",
  78. text: `${this.$t('pageTitle.versionUpdate')}`,
  79. rightIcon: ">",
  80. type : 'versionUpdate'
  81. },
  82. {
  83. leftIcon: "../../static/image/center/3.svg",
  84. text: this.$t('pageTitle.clearCache'),
  85. rightIcon: ">",
  86. type : 'clearCache',
  87. },
  88. ]
  89. },
  90. {
  91. title: `${this.$t('pageTitle.identitySetting')}`,
  92. itemList: [
  93. {
  94. leftIcon: "../../static/image/center/1.svg",
  95. text: this.$t('pageTitle.switchIdentity'),
  96. rightIcon: ">",
  97. toUrl: '/pages_order/auth/selectionIdentity'
  98. },
  99. // {
  100. // leftIcon: "../../static/image/center/4.svg",
  101. // text: this.$t('pageTitle.addressList'),
  102. // rightIcon: ">",
  103. // toUrl: '/pages_order/center/addressListManage'
  104. // },
  105. ]
  106. }
  107. ],
  108. }
  109. },
  110. methods: {
  111. tapItem(item, index) {
  112. if (item.text === this.$t('pageTitle.languageSwitch')) {
  113. this.$refs.changeLanguage.open();
  114. }else if(item.type){
  115. this[item.type]()
  116. }else{
  117. uni.navigateTo({
  118. url: item.toUrl
  119. })
  120. }
  121. },
  122. logout(){
  123. this.$store.commit('logout')
  124. },
  125. versionUpdate(){
  126. uni.showToast({
  127. title: '您当前已经是最新版本',
  128. icon: 'none'
  129. })
  130. },
  131. clearCache(){
  132. uni.showModal({
  133. title: '确认要清理缓存吗?',
  134. success(res) {
  135. if(res.confirm){
  136. uni.showToast({
  137. title: '缓存清理成功',
  138. icon: 'none'
  139. })
  140. }
  141. }
  142. })
  143. },
  144. },
  145. }
  146. </script>
  147. <style scoped lang="scss">
  148. .page {
  149. background-color: #FFF;
  150. height: 100vh;
  151. .frame {
  152. padding: 40rpx;
  153. .content {
  154. margin-bottom: 40rpx;
  155. .title {
  156. font-size: 30rpx;
  157. color: #b0b0b0;
  158. }
  159. .item {
  160. display: flex;
  161. justify-content: space-between;
  162. align-items: center;
  163. padding: 20rpx 40rpx;
  164. .key {
  165. display: flex;
  166. justify-content: center;
  167. align-items: center;
  168. color: #333333;
  169. font-size: 32rpx;
  170. .img {
  171. width: 40rpx;
  172. height: 40rpx;
  173. }
  174. .text {
  175. margin-left: 20rpx;
  176. }
  177. }
  178. .value {
  179. color: #999999;
  180. font-size: 36rpx;
  181. }
  182. }
  183. }
  184. }
  185. }
  186. </style>