cmvr-wms/scripts/projectdev/mobile-update.cjs
lixiaolong e3860a3fd9 feat(production): 优化生产任务操作权限控制与数据查询
- 添加权限检查功能,防止未授权操作
- 实现远程搜索功能优化任务选择体验
- 集成分页查询提高大数据量性能表现
- 增强批量操作界面增加搜索筛选功能
- 完善表单验证与错误处理机制
- 重构数据过滤逻辑支持多条件组合查询
2026-10-13 09:41:46 +08:00

15 lines
876 B
JavaScript

// Generates deployment artifacts from a completed web build; never changes source files.
const fs = require('fs')
const path = require('path')
const crypto = require('crypto')
const root = path.resolve(__dirname, '../..')
const bundle = path.join(root, 'android-app/app/src/main/assets/web.zip')
const output = path.join(root, 'ruoyi-ui-vue3/dist')
if (!fs.existsSync(path.join(output, 'index.html'))) throw new Error('Build web pages first')
const hash = crypto.createHash('sha256').update(fs.readFileSync(bundle)).digest('hex')
const version = `web-${hash.slice(0, 24)}`
const name = `${version}.zip`
fs.copyFileSync(bundle, path.join(output, name))
fs.writeFileSync(path.join(output, 'mobile-update.json'), JSON.stringify({ version, sha256: hash, url: `/${name}`, minimumNativeVersion: 1 }, null, 2))
console.log(`Page update: ${path.join(output, 'mobile-update.json')}`)