mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2025-12-16 12:23:03 +00:00
web展示内部版本号
This commit is contained in:
@@ -213,6 +213,12 @@
|
||||
</div>
|
||||
</el-card>
|
||||
</el-row>
|
||||
|
||||
<!-- 版本号显示 -->
|
||||
<div class="version-info">
|
||||
<span class="version-text">内部版本: {{ buildVersion }}</span>
|
||||
</div>
|
||||
|
||||
<!-- 文件解析结果区下方加分享按钮 -->
|
||||
<!-- <div v-if="parseResult.code && downloadUrl" style="margin-top: 10px; text-align: right;">-->
|
||||
<!-- <el-button type="primary" @click="copyShowFileLink">分享文件直链</el-button>-->
|
||||
@@ -286,7 +292,10 @@ export default {
|
||||
|
||||
errorDialogVisible: false,
|
||||
errorDetail: null,
|
||||
errorButtonVisible: false
|
||||
errorButtonVisible: false,
|
||||
|
||||
// 版本信息
|
||||
buildVersion: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -518,6 +527,17 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
// 获取版本号
|
||||
async getBuildVersion() {
|
||||
try {
|
||||
const response = await axios.get('/v2/build-version')
|
||||
this.buildVersion = response.data.data
|
||||
} catch (error) {
|
||||
console.error('获取版本号失败:', error)
|
||||
this.buildVersion = 'unknown'
|
||||
}
|
||||
},
|
||||
|
||||
// 新增切换目录树展示模式方法
|
||||
setDirectoryViewMode(mode) {
|
||||
this.directoryViewMode = mode
|
||||
@@ -570,6 +590,9 @@ export default {
|
||||
// 获取初始统计信息
|
||||
this.getInfo()
|
||||
|
||||
// 获取版本号
|
||||
this.getBuildVersion()
|
||||
|
||||
// 自动读取剪切板
|
||||
if (this.autoReadClipboard) {
|
||||
this.getPaste()
|
||||
@@ -881,4 +904,21 @@ hr {
|
||||
.jv-container.jv-light .jv-item.jv-object {
|
||||
color: #888;
|
||||
}
|
||||
|
||||
/* 版本号显示样式 */
|
||||
.version-info {
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.version-text {
|
||||
font-size: 0.85rem;
|
||||
color: #999;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
#app.dark-theme .version-text {
|
||||
color: #666;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -52,15 +52,21 @@ module.exports = {
|
||||
events: {
|
||||
onEnd: {
|
||||
mkdir: ['./nfd-front'],
|
||||
delete: [
|
||||
{ source: './nfd-front.zip', options: { force: true } },
|
||||
{ source: '../webroot/nfd-front', options: { force: true } },
|
||||
{ source: './nfd-front/view/.git', options: { force: true } },
|
||||
{ source: './nfd-front/view/.gitignore', options: { force: true } },
|
||||
{ source: '../webroot/nfd-front/view/.git', options: { force: true } },
|
||||
{ source: '../webroot/nfd-front/view/.gitignore', options: { force: true } },
|
||||
],
|
||||
copy: [
|
||||
{ source: './nfd-front', destination: '../webroot/nfd-front' }
|
||||
],
|
||||
delete: [ //首先需要删除项目根目录下的dist.zip
|
||||
'./nfd-front.zip',
|
||||
'../webroot/nfd-front',
|
||||
],
|
||||
archive: [ //然后我们选择dist文件夹将之打包成dist.zip并放在根目录
|
||||
{source: './nfd-front', destination: './nfd-front.zip'},
|
||||
{
|
||||
source: './nfd-front', destination: './nfd-front.zip', options: {}
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user