| | |
| | | <template> |
| | | <view class="pages-my"> |
| | | <view class="group"> |
| | | <view class="item line" @click="clickAppVersion"> |
| | | <view>App版本:</view> |
| | | <view class="item line" @click="clickAppVersion"> |
| | | <view>{{translate('app_version')}}</view> |
| | | <view class="right">{{app_version}}</view> |
| | | <a> |
| | | <uni-icons class="icon" type="right" size="24" color="#888"></uni-icons> |
| | | </a> |
| | | </view> |
| | | <view class="item line" @click="clickLanguage"> |
| | | <view>语言切换:</view> |
| | | <view>{{translate('language_switch')}}</view> |
| | | <view class="right">{{languageStr}}</view> |
| | | <a > |
| | | <a> |
| | | <uni-icons class="icon" type="right" size="24" color="#888"></uni-icons> |
| | | </a> |
| | | </view> |
| | |
| | | </view> |
| | | --> |
| | | <view class="item line" @click="clickClearCache"> |
| | | <view>清除缓存:</view> |
| | | <view>{{translate('clear_cache')}}</view> |
| | | <view class="right">{{cacheSizeStr}}</view> |
| | | <a > |
| | | <a> |
| | | <uni-icons class="icon" type="right" size="24" color="#888"></uni-icons> |
| | | </a> |
| | | </view> |
| | | <view class="item line" @click="clickHelp"> |
| | | <view>帮助与反馈:</view> |
| | | <view class="item line" @click="clickHelp"> |
| | | <view>{{translate('help_and_feedback')}}</view> |
| | | <view class="right"></view> |
| | | <a> |
| | | <uni-icons class="icon" type="right" size="24" color="#888"></uni-icons> |
| | |
| | | <view class="button-group"> |
| | | <!-- <button class="button" @click="clickModifyPassword">修改密码</button> |
| | | <button class="button" @click="clickChangeAccount">切换账号</button> --> |
| | | <a-button class="button" type="ghost" @click="clickExitAccount">退出登录</a-button> |
| | | <a-button class="button" type="ghost" @click="clickExitAccount">{{translate('exit_login')}}</a-button> |
| | | </view> |
| | | <view> |
| | | <uni-popup ref="refPopupMenu" background-color="transparent" maskBackgroundColor="rgba(0, 0, 0, 0.2)"> |
| | |
| | | name: "中文简体" |
| | | }, { |
| | | value: "zh-Hant", |
| | | name: "中文繁体" |
| | | name: " 中文繁體" |
| | | }, { |
| | | value: "en", |
| | | name: "English" |
| | |
| | | }, |
| | | onLoad() { |
| | | // this.loadData() |
| | | |
| | | uni.setNavigationBarTitle({ |
| | | title:this.translate('my') |
| | | }) |
| | | }, |
| | | computed: { |
| | | cacheSizeStr() { |
| | |
| | | _this.setData({ |
| | | cache_size: res.currentSize |
| | | }) |
| | | console.log('当前缓存大小:', res, 'KB'); |
| | | }, |
| | | fail: (err) => { |
| | | console.error('获取缓存信息失败:', err); |
| | | }, |
| | | complete: () => { |
| | | console.log('缓存信息获取完成'); |
| | | }, |
| | | fail: (err) => {}, |
| | | complete: () => {}, |
| | | }); |
| | | }, |
| | | bindLanguageChange(e) { |
| | |
| | | }, |
| | | clickAppVersion() { |
| | | uni.navigateTo({ |
| | | url: "/pages/my/version-update" |
| | | url: "/pages/version/app-update" |
| | | }) |
| | | }, |
| | | clickPrivacyPolicy() { |
| | |
| | | }, |
| | | clickLanguage() { |
| | | |
| | | this.$refs.refPopupMenu.open("right") |
| | | uni.navigateTo({ |
| | | url: "/pages/my/language" |
| | | }) |
| | | //this.$refs.refPopupMenu.open("right") |
| | | }, |
| | | clickClearCache() { |
| | | try { |
| | |
| | | uni.clearStorageSync(); |
| | | session.setValue("vehicles", list) |
| | | session.setValue("login_info", info) |
| | | showToast("清除缓存成功!") |
| | | showToast(this.translate('clear_cache_success')) |
| | | this.loadCache() |
| | | } catch (e) { |
| | | // error |
| | |
| | | clickUserAgreement() { |
| | | |
| | | }, |
| | | |
| | | |
| | | clickModifyPassword() { |
| | | |
| | | }, |
| | |
| | | }, |
| | | clickExitAccount() { |
| | | uni.reLaunch({ |
| | | url: "/pages/login/index" |
| | | url: "/pages/login/index?flag=1" |
| | | }) |
| | | }, |
| | | |
| | | translate(t) { |
| | | if (typeof this.$t == "function") return this.$t(`page.${t}`) |
| | | else return t; |
| | | }, |
| | | } |
| | | } |
| | | </script> |