修复打包

This commit is contained in:
Searchstars
2024-12-07 23:54:31 +08:00
parent 1ec3ac689b
commit 561fe54314
6 changed files with 45 additions and 12 deletions
+2 -3
View File
@@ -1,6 +1,7 @@
const path = require('path');
const childProcess = require('child_process');
const os = require('os');
const fs = require('fs');
// 注入buildinfo
const gitCommitHash = childProcess.execSync('git rev-parse HEAD').toString().trim();
@@ -13,8 +14,6 @@ const buildInfoContent = `
export const BUILD_USER = "${username}";
`;
const fs = require('fs');
const path = require('path');
const buildInfoPath = path.resolve(__dirname, 'src/buildinfo.ts');
fs.writeFileSync(buildInfoPath, buildInfoContent, 'utf8');
@@ -36,7 +35,7 @@ module.exports = {
alias: {
'@components': path.resolve(__dirname, 'src/components'),
'@less': path.resolve(__dirname, 'src/less'),
'@buildInfo': buildInfoPath
'$buildinfo': buildInfoPath
}
}
},
+4
View File
@@ -2,6 +2,10 @@
"about": {
"title": "关于应用",
"projectOwnerShip": "项目归属",
"buildInfo": "构建信息",
"commitHash": "提交哈希",
"buildTime": "构建时间",
"builder": "构建者",
"developers": "参与开发的人员",
"moreResources": "更多资源请访问",
"disclaimer": "免责声明"
+3
View File
@@ -115,6 +115,9 @@
},
"pages/app/entry/eularead": {
"component": "eularead"
},
"pages/app/features/dynamic": {
"component": "dynamic"
}
}
}
+1 -7
View File
@@ -11,7 +11,7 @@
</div>
<text class="btntext">{{ $t("arealist.home") }}</text>
</div>
<div class="btn" style="margin-left: 35px;" onclick="GoPage('dynamic')">
<div class="btn" style="margin-left: 35px;" onclick="GoPage('app/features/dynamic')">
<div class="btnbase" style="background-color: {{colors.dynamic}}">
<image src="/common/arealist_updates.png" class="btnimg"></image>
</div>
@@ -92,12 +92,6 @@ export default {
this.colors[this.lastpage] = "#FF7DA8"
},
GoPage(pagename){
if(pagename == "dynamic"){
prompt.showToast({
message: "该功能还在开发中"
})
return
}
router.clear()
router.replace({
uri: "pages/" + pagename
@@ -23,6 +23,18 @@
margin-left: 15px;
}
.buildinfobar {
.flex-column(15px 10px);
.radius(40px);
align-items: center;
max-width: 335px;
}
.buildinfo {
.flex-row(10px);
width: 100%;
}
.developers {
.flex-column(15px 10px);
.radius(50px);
+23 -2
View File
@@ -10,7 +10,25 @@
<text class="text" style="margin-top: 22px">{{ $t("about.projectOwnerShip") }}</text>
<div class="appbar" style="margin-top: 22px">
<image class="logo" src="/common/about_projectownership.png"></image>
<text class="text" style="margin-left: 20px">AstralSight Studios</text>
<div style="margin-left: 20px; flex-direction: column">
<text class="text">AstralSight </text>
<text class="text">Studios</text>
</div>
</div>
<text class="text" style="margin-top: 22px">{{ $t("about.buildInfo") }}</text>
<div class="buildinfobar" style="margin-top: 22px">
<div class="buildinfo">
<text class="text" style="font-size: 24px">{{ $t("about.commitHash") }}</text>
<text class="text" style="font-size: 20px; max-width: 160px">{{ buildinfo.GIT_COMMIT_HASH }}</text>
</div>
<div class="buildinfo">
<text class="text" style="font-size: 24px">{{ $t("about.buildTime") }}</text>
<text class="text" style="font-size: 20px; max-width: 160px">{{ buildinfo.BUILD_TIME }}</text>
</div>
<div class="buildinfo">
<text class="text" style="font-size: 24px">{{ $t("about.builder") }}</text>
<text class="text" style="font-size: 20px; max-width: 160px">{{ buildinfo.BUILD_USER }}</text>
</div>
</div>
<text class="text" style="margin-top: 30px">{{ $t("about.developers") }}</text>
<div class="developers" style="margin-top: 15px">
@@ -47,13 +65,16 @@
</template>
<script>
import * as buildinfo from "$buildinfo"
import router from "@system.router"
export default {
private: {
version: "NA"
version: "NA",
buildinfo: buildinfo
},
onInit() {
this.version = "v" + this.$app.$def.biliclient.version
console.log(this.buildinfo)
},
OpenDisclaimer() {
router.push({