- 落地手机端双形态适配框架:同名布局+资源限定符(layout/手机、 layout-sw600dp/平板)自动切换,DeviceUtil 设备形态判定,7个 手机版公共组件(PhoneSearchBar/StatusTab/DataLayout/FilterPanel/ BottomBar/StatBox/KvItem) - 完成「国际出港移库」「国际出港出库交接」两页手机端适配,新增 各自详情页(IntExpMoveDetailActivity/IntExpOutHandoverDetailActivity) - 手机端首页菜单接入"出港移库""出库交接"入口 - 修复手机端进入页面先横屏后转竖屏的闪屏问题:Manifest 全项目 192 处改为 screenOrientation="unspecified",由 BaseActivity 按设备形态运行时锁定方向 - 修复该方案的中间版本在平板端引入的回归(先竖后横 + UI放大1.6倍) - AutoSize 补充手机竖屏 390×844 设计基准 - 修复 CHANGELOG.md 因脚本异常导致的内容重复损坏(膨胀至12万行), 恢复正常结构并补充本次变更记录 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
134 lines
4.5 KiB
HTML
134 lines
4.5 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||
<title>拍照上传</title>
|
||
<script src="https://modao.cc/agent-py/static/source/js/tailwindcss.js"></script>
|
||
<script src="https://modao.cc/agent-py/static/source/js/iconify-icon.min.js"></script>
|
||
<style>
|
||
@font-face {
|
||
font-family: 'PingFang SC';
|
||
src: local('PingFang SC');
|
||
}
|
||
body {
|
||
font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||
background-color: #e2e8f0;
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
min-height: 100vh;
|
||
margin: 0;
|
||
}
|
||
.phone-container {
|
||
width: 375px;
|
||
height: 812px;
|
||
background-color: #f5f6fa;
|
||
position: relative;
|
||
overflow: hidden;
|
||
display: flex;
|
||
flex-direction: column;
|
||
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
|
||
border: 8px solid #1a1a1a;
|
||
border-radius: 40px;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
|
||
<div class="phone-container">
|
||
<!-- 状态栏 -->
|
||
<div class="h-10 w-full flex justify-between items-center px-8 flex-none bg-[#2563EB] text-white">
|
||
<span class="text-xs font-semibold">09:41</span>
|
||
<div class="flex gap-1 items-center">
|
||
<iconify-icon icon="mdi:signal" width="14"></iconify-icon>
|
||
<iconify-icon icon="mdi:wifi" width="14"></iconify-icon>
|
||
<iconify-icon icon="mdi:battery" width="18"></iconify-icon>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 顶部导航栏 -->
|
||
<div class="bg-[#2563EB] text-white h-12 flex items-center justify-between px-4 flex-none">
|
||
<div class="flex items-center" onclick="closeWin()">
|
||
<iconify-icon icon="mdi:chevron-left" width="28"></iconify-icon>
|
||
<span class="text-sm font-bold -ml-1">返回</span>
|
||
</div>
|
||
<h1 class="text-lg font-medium">拍照上传</h1>
|
||
<div class="w-16"></div>
|
||
</div>
|
||
|
||
<!-- 内容区域 -->
|
||
<div class="flex-1 overflow-y-auto p-4 bg-[#f5f6fa]">
|
||
<div class="bg-white rounded-xl p-5 shadow">
|
||
<div class="flex justify-between items-center mb-4">
|
||
<h2 class="text-lg font-bold">运单照片上传</h2>
|
||
</div>
|
||
|
||
<div id="previewWrap" class="grid grid-cols-3 gap-2 mb-4 min-h-[100px]"></div>
|
||
|
||
<input type="file" id="fileInput" accept="image/*" capture="camera" multiple class="hidden">
|
||
|
||
<div class="flex gap-3">
|
||
<button class="flex-1 bg-blue-600 text-white py-2 rounded" onclick="fileInput.click()">
|
||
拍照/上传
|
||
</button>
|
||
<button class="flex-1 bg-green-600 text-white py-2 rounded" onclick="submitPhotos()">
|
||
确认提交
|
||
</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script>
|
||
const awb = sessionStorage.getItem('currentAwb');
|
||
const fileInput = document.getElementById('fileInput');
|
||
const previewWrap = document.getElementById('previewWrap');
|
||
let fileList = [];
|
||
|
||
// 选择图片
|
||
fileInput.onchange = function () {
|
||
for (let file of this.files) {
|
||
const url = URL.createObjectURL(file);
|
||
fileList.push({ file, url });
|
||
renderPreview();
|
||
}
|
||
};
|
||
|
||
// 渲染预览
|
||
function renderPreview() {
|
||
previewWrap.innerHTML = '';
|
||
fileList.forEach((item, idx) => {
|
||
const div = document.createElement('div');
|
||
div.className = 'relative border rounded h-20 overflow-hidden';
|
||
div.innerHTML = `
|
||
<img src="${item.url}" class="w-full h-full object-cover">
|
||
<button onclick="delImg(${idx})"
|
||
class="absolute top-1 right-1 w-5 h-5 bg-red-500 text-white rounded-full text-xs flex items-center justify-center">
|
||
×
|
||
</button>
|
||
`;
|
||
previewWrap.appendChild(div);
|
||
});
|
||
}
|
||
|
||
// 删除
|
||
function delImg(index) {
|
||
fileList.splice(index, 1);
|
||
renderPreview();
|
||
}
|
||
|
||
// 提交
|
||
function submitPhotos() {
|
||
const urls = fileList.map(item => item.url);
|
||
sessionStorage.setItem('uploadedPhotos', JSON.stringify(urls));
|
||
closeWin();
|
||
}
|
||
|
||
function closeWin() {
|
||
window.close();
|
||
}
|
||
</script>
|
||
|
||
</body>
|
||
</html> |