first commit

This commit is contained in:
编码猿
2024-09-27 01:32:49 +08:00
commit 28ebe05a64
7399 changed files with 1174529 additions and 0 deletions

View File

@@ -0,0 +1,135 @@
<template>
<!-- 设置 页面 -->
<view class="content">
<HeaderTop page_title='设置'></HeaderTop>
<view class="padding-30">
<view class="padding-zy30 d-flex j-sb a-center border-bottom list" @click="to_editPassword()">
<view class="">修改密码</view>
<image src="../../static/my/right.png" mode="" class="p_right"></image>
</view>
<view class="padding-zy30 d-flex j-sb a-center border-bottom list" @click="phone_message()">
<view class="">消息提醒设置</view>
<image src="../../static/my/right.png" mode="" class="p_right"></image>
</view>
<view class="padding-zy30 d-flex j-sb a-center border-bottom list" @click="clear_cache()">
<view class="">清除缓存</view>
<view class="p_right cache_right">{{currentSize}}{{currentSizeText}}</view>
</view>
<view class="x_public_box x-bg-159 esc_login x-text-white w-90" style="line-height: 80upx;" @click="esc_login()">退出登录</view>
</view>
</view>
</template>
<script>
import HeaderTop from '../../components/HeaderTop/HeaderTop.vue'
import permission from '../../common/permission.js' //正则验证
import uploadImage from '@/common/ossutil/uploadFile.js';
export default{
data(){
return {
cache:250,
currentSize:0,
currentSizeText:'K'
}
},
comments: {
HeaderTop
},
methods:{
// 退出登录
esc_login(){
uni.navigateTo({
url:'./x_login'
})
uni.clearStorage();
},
// 清除缓存
clear_cache(){
let that = this;
uni.showModal({
title: '提示',
content: '确定清空缓存',
success: function (res) {
if (res.confirm) {
that.do_clear_cache()
} else if (res.cancel) {
}
}
});
},
do_clear_cache(){
try {
const value = uni.getStorageSync('isAuthentication');
if (value) {
let that = this
uni.clearStorage({
success: function (res) {
uni.setStorageSync('isAuthentication', value);
that.get_cache()
}
});
}
} catch (e) {
}
},
// 获取缓存
get_cache(){
let that = this
uni.getStorageInfo({
success: function (res) {
if(res.currentSize >= 1024 && res.currentSize/1024 < 1024){
that.currentSize = res.currentSize/1024
that.currentSizeText = 'M'
}
if(res.currentSize/1024 >= 1024){
that.currentSize = res.currentSize/1024/1024
that.currentSizeText = 'G'
}
if(res.currentSize < 1024 && res.currentSize > 3){
that.currentSize = res.currentSize
that.currentSizeText = 'K'
}
if(res.currentSize <= 3){
that.currentSize = '0'
that.currentSizeText = 'K'
}
}
});
},
// 个人信息
to_editPassword(){
uni.navigateTo({
url:'change_password'
})
},
phone_message(){
permission.gotoAppSetting()
}
},
created() {
this.get_cache()
}
}
</script>
<style lang="scss">
.content {
position: relative;
.list{
height: 83upx;
}
.esc_login{
line-height: 82upx;
position: absolute;
bottom:100upx;
left: 34upx;
}
}
.cache_right{
margin-right: 60upx;
}
</style>