部分描述

This commit is contained in:
xiangheng
2024-06-13 14:22:19 +08:00
parent 4a5c2853e5
commit 1bde62f68a
4 changed files with 21 additions and 26 deletions

View File

@@ -41,10 +41,10 @@
- 素材管理 - 素材管理
- 网站设置 - 网站设置
- 图库管理 - 图库管理
- 代码生成器:一键生成前后端业务代码 - 代码生成器:一键生成前端、后端、app代码
- 审批流:基于`LogicFlow``VForm 3`,整体流程已实现,需要细化 - 审批流:基于`LogicFlow``VForm 3`,整体流程已实现,需要细化
<img border="0" src="./docs/assets/menu.png" height="1000px" alt="alipay" title="alipay"/> <img border="0" src="./docs/assets/menu.png" height="1000px" />
![](./docs/assets/genCode.png) ![](./docs/assets/genCode.png)
![](./docs/assets/flow.png) ![](./docs/assets/flow.png)

View File

@@ -1,5 +1,6 @@
import { execaCommand } from 'execa' import { execaCommand } from 'execa'
import path from 'path' import path from 'path'
import fsExtra from 'fs-extra' import fsExtra from 'fs-extra'
const { existsSync, remove, copy } = fsExtra const { existsSync, remove, copy } = fsExtra
const cwd = process.cwd() const cwd = process.cwd()
@@ -12,22 +13,22 @@ const goProjectPath = path.resolve(cwd, '../server')
async function build_go() { async function build_go() {
await execaCommand('swag fmt', { await execaCommand('swag fmt', {
stdio: 'inherit', stdio: 'inherit',
encoding: 'utf-8', encoding: 'utf8',
cwd: goProjectPath cwd: goProjectPath
}) })
await execaCommand('swag init', { await execaCommand('swag init', {
stdio: 'inherit', stdio: 'inherit',
encoding: 'utf-8', encoding: 'utf8',
cwd: goProjectPath cwd: goProjectPath
}) })
await execaCommand('goreleaser release --snapshot --clean', { await execaCommand('goreleaser release --snapshot --clean', {
stdio: 'inherit', stdio: 'inherit',
encoding: 'utf-8', encoding: 'utf8',
cwd: goProjectPath cwd: goProjectPath
}) })
} }
async function build_frontend() { async function build_frontend() {
await execaCommand('vite build', { stdio: 'inherit', encoding: 'utf-8', cwd }) await execaCommand('npm run prod', { stdio: 'inherit', encoding: 'utf8', cwd })
if (existsSync(releasePath)) { if (existsSync(releasePath)) {
await remove(releasePath) await remove(releasePath)
} }
@@ -35,12 +36,17 @@ async function build_frontend() {
try { try {
await copyFile(distPath, releasePath) await copyFile(distPath, releasePath)
} catch (error) { } catch (error) {
console.log(`\n ${error}`) console.log(error)
} }
console.log(`文件已复制 ==> ${releaseRelativePath}`) console.log(`文件已复制 ==> ${releaseRelativePath}`)
} }
async function build() { async function build() {
await Promise.allSettled([build_go(), build_frontend()]) try {
console.log('开始打包')
await Promise.allSettled([build_go(), build_frontend()])
} catch (error) {
console.log(error)
}
} }
function copyFile(sourceDir, targetDir) { function copyFile(sourceDir, targetDir) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {

4
x_admin_app/README.md Normal file
View File

@@ -0,0 +1,4 @@
# 搭配打包工具
简化打包安卓/ios App、 更改版本号、 wifi调试等
https://www.npmjs.com/package/@adtkcn/hb-cli

View File

@@ -2,8 +2,8 @@
"name": "x_admin_app", "name": "x_admin_app",
"appid": "__UNI__FB29F21", "appid": "__UNI__FB29F21",
"description": "", "description": "",
"versionName": "1.0.2", "versionName": "1.0.3",
"versionCode": 102, "versionCode": 103,
"transformPx": false, "transformPx": false,
"app-plus": { "app-plus": {
"compatible": { "compatible": {
@@ -86,22 +86,7 @@
} }
}, },
"nvueLaunchMode": "", "nvueLaunchMode": "",
"nativePlugins": { "nativePlugins": {}
"usb-serial-for-uniapp": {
"__plugin_info__": {
"name": "usb-serial-for-uniapp",
"description": "uniapp的USB串口通信插件驱动基于开源项目usb-serial-for-android无需ROOT支持OTG USB串口、CP210X、CH34X等",
"platforms": "Android",
"url": "https://ext.dcloud.net.cn/plugin?id=13935",
"android_package_name": "uni.UNIFB29F21",
"ios_bundle_id": "",
"isCloud": true,
"bought": 1,
"pid": "13935",
"parameters": {}
}
}
}
}, },
"quickapp": {}, "quickapp": {},
"mp-weixin": { "mp-weixin": {