下载手持机功能

This commit is contained in:
liuhanqing
2025-09-10 10:28:54 +08:00
parent 738c2e34a2
commit 94e3a9d000
8 changed files with 273 additions and 7 deletions

View File

@@ -0,0 +1,21 @@
package com.ruoyi.web.controller.system;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.Map;
@RestController
@RequestMapping("/system/app")
public class SysAppController {
@GetMapping("/version")
public AjaxResult version() {
Map<String, String> result = new HashMap<>();
result.put("downloadUrl", "/common/download?fileName=ry.apk&delete=false");
return AjaxResult.success(result);
}
}

View File

@@ -2,7 +2,7 @@ package com.ruoyi.common.utils.file;
/**
* 媒体类型工具类
*
*
* @author ruoyi
*/
public class MimeTypeUtils
@@ -16,7 +16,7 @@ public class MimeTypeUtils
public static final String IMAGE_BMP = "image/bmp";
public static final String IMAGE_GIF = "image/gif";
public static final String[] IMAGE_EXTENSION = { "bmp", "gif", "jpg", "jpeg", "png" };
public static final String[] FLASH_EXTENSION = { "swf", "flv" };
@@ -36,7 +36,10 @@ public class MimeTypeUtils
// 视频格式
"mp4", "avi", "rmvb",
// pdf
"pdf" };
"pdf",
//apk
"apk"
};
public static String getExtension(String prefix)
{

View File

@@ -49,7 +49,8 @@
"vue-qr": "^4.0.9",
"vue-router": "3.4.9",
"vuedraggable": "2.24.3",
"vuex": "3.6.0"
"vuex": "3.6.0",
"@fortawesome/fontawesome-free": "^6.5.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "4.4.6",

View File

@@ -1736,7 +1736,11 @@ export default {
barcodeInformationDelete: ' 条码信息删除 ',
barcodeInformationExport: ' 条码信息导出 ',
barcodeInformationPrint: ' 条码信息打印 '
}
},
downloadApkInfo: {
downloadApkInfo: ' 下载APK信息 '
},
downloadApk: '下载手持机'
},

View File

@@ -1736,7 +1736,11 @@ export default {
barcodeInformationDelete: ' 条码信息删除 ',
barcodeInformationExport: ' 条码信息导出 ',
barcodeInformationPrint: ' 条码信息打印 '
}
},
downloadApkInfo: {
downloadApkInfo: ' 下载APK信息 '
},
downloadApk: '下载手持机'
},

View File

@@ -1736,7 +1736,11 @@ export default {
barcodeInformationDelete: ' 条码信息删除 ',
barcodeInformationExport: ' 条码信息导出 ',
barcodeInformationPrint: ' 条码信息打印 '
}
},
downloadApkInfo: {
downloadApkInfo: ' 下载APK信息 '
},
downloadApk: '下载手持机'
},

View File

@@ -7,6 +7,7 @@ import './assets/styles/element-variables.scss'
import '@/assets/styles/index.scss' // global css
import '@/assets/styles/ruoyi.scss' // ruoyi css
import '@fortawesome/fontawesome-free/css/all.css' // font-awesome
import App from './App'
import store from './store'
import router from './router'

View File

@@ -0,0 +1,228 @@
<script>
export default {
name: 'AppDownload',
methods: {
// 下载安卓APK
handleAndroidDownload() {
this.$download.name("ry.apk",false)
}
},
data() {
return {
appInfo: {
name: '手持机APP',
version: 'v1.0.0',
size: '15.3MB',
updateTime: '2025-09-10',
description: '手持机APP是一款功能强大的移动应用,为您提供便捷的移动办公体验。支持Android平台,界面简洁美观,操作便捷。',
features: [
'入库功能:支持空托盘入库、空料箱入库、物料入库',
'出库功能:支持拣选出库、退货出库、异常出库功能',
'盘点功能:支持盘点货物功能',
'查询统计:统计任务数据',
'任务大厅功能:展示和管理各种任务的功能模块,在任务大厅中查看自己被分配的所有任务'
]
},
downloadUrls: {
android: '#',
ios: '#'
}
}
}
}
</script>
<template>
<div class="app-download-container">
<div class="app-info">
<div class="app-header">
<img src="@/assets/logo/logo.png" alt="app logo" class="app-logo">
<div class="app-meta">
<h1 class="app-name">{{ appInfo.name }}</h1>
<div class="app-version">版本:{{ appInfo.version }}</div>
<div class="app-size">大小:{{ appInfo.size }}</div>
<div class="app-update">更新时间:{{ appInfo.updateTime }}</div>
</div>
</div>
<div class="app-description">
<h2>应用介绍</h2>
<p>{{ appInfo.description }}</p>
</div>
<div class="app-features">
<h2>主要功能</h2>
<ul>
<li v-for="(feature, index) in appInfo.features" :key="index">
{{ feature }}
</li>
</ul>
</div>
<div class="download-section">
<div class="download-buttons">
<a @click="handleAndroidDownload" class="download-btn android">
<i class="fab fa-android"></i>
Android版下载
</a>
<!-- <a :href="downloadUrls.ios" class="download-btn ios">
<i class="fab fa-apple"></i>
iOS版下载
</a> -->
</div>
</div>
</div>
</div>
</template>
<style scoped lang="scss">
.app-download-container {
max-width: 1200px;
margin: 0 auto;
padding: 40px 20px;
.app-info {
background: #fff;
border-radius: 8px;
padding: 30px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
.app-header {
display: flex;
align-items: flex-start;
margin-bottom: 40px;
.app-logo {
width: 100px;
height: 100px;
border-radius: 20px;
margin-right: 24px;
}
.app-meta {
.app-name {
font-size: 24px;
font-weight: bold;
margin: 0 0 12px;
}
.app-version,
.app-size,
.app-update {
color: #666;
margin: 8px 0;
font-size: 14px;
}
}
}
h2 {
font-size: 18px;
margin: 30px 0 20px;
color: #333;
}
.app-description {
p {
color: #666;
line-height: 1.6;
}
}
.app-features {
ul {
list-style: none;
padding: 0;
li {
position: relative;
padding-left: 20px;
margin: 12px 0;
color: #666;
&:before {
content: '';
position: absolute;
left: 0;
top: 8px;
width: 6px;
height: 6px;
background: #409EFF;
border-radius: 50%;
}
}
}
}
.download-section {
margin-top: 40px;
text-align: center;
.download-buttons {
display: flex;
justify-content: center;
gap: 20px;
margin-bottom: 30px;
.download-btn {
display: flex;
align-items: center;
justify-content: center;
padding: 12px 30px;
border-radius: 25px;
color: #fff;
text-decoration: none;
font-size: 16px;
transition: all 0.3s ease;
i {
margin-right: 8px;
font-size: 20px;
}
&.android {
background: #3DDC84;
&:hover {
background: darken(#3DDC84, 10%);
}
}
&.ios {
background: #000;
&:hover {
background: #333;
}
}
}
}
.qr-codes {
display: flex;
justify-content: center;
gap: 40px;
.qr-code {
text-align: center;
.qr-image {
width: 120px;
height: 120px;
background: #f5f5f5;
margin-bottom: 10px;
}
span {
font-size: 14px;
color: #666;
}
}
}
}
}
}
</style>