2023-12-30 17:40:20 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="setting-container">
|
2023-12-31 21:31:56 +08:00
|
|
|
|
<el-text size="small">当前版本:{{ version }}</el-text>
|
2023-12-30 17:40:20 +08:00
|
|
|
|
<div class="buttom">
|
|
|
|
|
|
<div class="tips">
|
|
|
|
|
|
<el-text size="small">版本功能说明</el-text>
|
|
|
|
|
|
<el-tooltip placement="top">
|
|
|
|
|
|
<template #content>
|
2023-12-31 21:31:56 +08:00
|
|
|
|
<div v-html="desc"></div>
|
2023-12-30 17:40:20 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
<el-icon>
|
|
|
|
|
|
<QuestionFilled />
|
|
|
|
|
|
</el-icon>
|
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2023-12-31 21:31:56 +08:00
|
|
|
|
import { defineComponent, reactive, toRefs, onMounted } from 'vue';
|
2023-12-30 17:40:20 +08:00
|
|
|
|
import { ElMessage } from 'element-plus'
|
|
|
|
|
|
import { request } from '@/api/api'
|
|
|
|
|
|
import { QuestionFilled } from '@element-plus/icons-vue'
|
|
|
|
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
|
|
components: {
|
|
|
|
|
|
QuestionFilled,
|
|
|
|
|
|
},
|
|
|
|
|
|
props: {
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
},
|
|
|
|
|
|
setup() {
|
|
|
|
|
|
const state = reactive({
|
2023-12-31 21:31:56 +08:00
|
|
|
|
version: '',
|
|
|
|
|
|
desc: '',
|
2023-12-30 17:40:20 +08:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
const handleChange = async () => {
|
|
|
|
|
|
let postData = { old_passwd: state.oldPasswd, new_passwd: state.newPasswd };
|
|
|
|
|
|
const rsp = await request.post('/settings/setpasswd', postData);
|
|
|
|
|
|
if (await rsp.data.code == 200) {
|
|
|
|
|
|
let msg = await rsp.data.msg;
|
|
|
|
|
|
ElMessage({ message: msg, type: 'success' })
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-12-31 21:31:56 +08:00
|
|
|
|
|
|
|
|
|
|
const getAbout = async () => {
|
|
|
|
|
|
let params = { params: { section: "about" } };
|
|
|
|
|
|
const rsp = await request.get('/settings/getsetting', params);
|
|
|
|
|
|
if (await rsp.data.code == 200) {
|
|
|
|
|
|
let data = await rsp.data.data;
|
|
|
|
|
|
state.version = data.version;
|
|
|
|
|
|
state.desc = data.desc.replace(/\n/g, '<br />');
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
getAbout();
|
|
|
|
|
|
})
|
|
|
|
|
|
|
2023-12-30 17:40:20 +08:00
|
|
|
|
return {
|
|
|
|
|
|
...toRefs(state), handleChange
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
:deep(.el-input .el-input__wrapper) {
|
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.el-button) {
|
|
|
|
|
|
float: right !important;
|
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.setting-container {
|
|
|
|
|
|
width: 200px;
|
|
|
|
|
|
margin: 50px auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.buttom {
|
|
|
|
|
|
margin-top: 30px;
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|