更新download下载

This commit is contained in:
chorblack
2026-02-28 19:10:59 +08:00
parent 64d23ad549
commit c24dd18079
2 changed files with 242 additions and 230 deletions

View File

@@ -2,73 +2,76 @@
<div class="page" @swipe="ban"> <div class="page" @swipe="ban">
<image src="/common/bg.png"></image> <image src="/common/bg.png"></image>
<image <image
style="position: absolute;top: 0;left: 0;" style="position: absolute; top: 0; left: 0"
if="{{trueEnd}}" if="{{trueEnd}}"
src="/common/ATRI_TrueEnding.png" src="/common/ATRI_TrueEnding.png"></image>
></image>
<text <text
class="btn" class="btn"
style="top: 150px;" style="top: 150px"
if="{{trueEnd}}" if="{{trueEnd}}"
@click="loadRecoveryData('TE')" @click="loadRecoveryData('TE')">
>TRUE END</text TRUE END
> </text>
<text class="btn" style="top: 200px;" @click="toPage('detail')">START</text> <text class="btn" style="top: 200px" @click="toPage('detail')">START</text>
<text class="btn" style="top: 250px;" @click="toRecovery()">LOAD</text> <text class="btn" style="top: 250px" @click="toRecovery()">LOAD</text>
<text class="btn" style="top: 300px;" @click="toSettings()">SYSTEM</text> <text class="btn" style="top: 300px" @click="toSettings()">SYSTEM</text>
<text class="btn" style="top: 350px;" @click="exit">EXIT</text> <text class="btn" style="top: 350px" @click="exit">EXIT</text>
<div <div
class="page" class="page"
style="position: absolute;background-color: #ffffff;" style="position: absolute; background-color: #ffffff"
if="{{recovery}}" if="{{recovery}}"
@swipe="back()" @swipe="back()">
>
<scroll scroll-y="true" bounces="true" class="scroll1 page"> <scroll scroll-y="true" bounces="true" class="scroll1 page">
<text <text
class="menu-btn" class="menu-btn"
for="{{recoveryData}}" for="{{recoveryData}}"
style="font-size: 30px;" style="font-size: 30px"
@click="loadRecoveryData($idx)" @click="loadRecoveryData($idx)">
>存档{{ $idx + 1 }}</text 存档{{ $idx + 1 }}
> </text>
</scroll> </scroll>
</div> </div>
<div <div
class="page" class="page"
style="position: absolute;background-color: #ffffff;flex-wrap: nowrap;flex-direction: column;align-items: center;justify-content: center;" style="
position: absolute;
background-color: #ffffff;
flex-wrap: nowrap;
flex-direction: column;
align-items: center;
justify-content: center;
"
if="{{tips}}" if="{{tips}}"
@swipe="ban()" @swipe="ban()">
>
<text class="font24">在"SYSTEM"中调整显示速度和文字大小</text> <text class="font24">在"SYSTEM"中调整显示速度和文字大小</text>
<text class="font24">游戏中左滑进入菜单,右滑返回</text> <text class="font24">游戏中左滑进入菜单,右滑返回</text>
<text class="font24" style="color: #ff0000;" <text class="font24" style="color: #ff0000">
>请先到SYSTEM界面下载文本和图像资源</text 请先到SYSTEM界面下载文本和图像资源
> </text>
<text class="font24">---------------</text> <text class="font24">---------------</text>
<text class="font24">移植:@chorblack</text> <text class="font24">移植:@chorblack</text>
<text class="font24">感谢:@Wxz226@liuyuze61</text> <text class="font24">感谢:@Wxz226@liuyuze61</text>
<text class="font24">---------------</text> <text class="font24">---------------</text>
<text class="font24" style="color: #00a2ff;" @click="closeTips()" <text class="font24" style="color: #00a2ff" @click="closeTips()">
>确定</text 确定
> </text>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import router from '@blueos.app.appmanager.router'; import router from '@blueos.app.appmanager.router'
import storage from '@blueos.storage.storage'; import storage from '@blueos.storage.storage'
import prompt from '@blueos.window.prompt'; import prompt from '@blueos.window.prompt'
export default {
export default {
data: { data: {
recovery: false, recovery: false,
recoveryData: [], recoveryData: [],
settingsPage: false, settingsPage: false,
settings: { settings: {
textSpeed: 40, textSpeed: 40,
textSize: 22 textSize: 22,
}, },
showText: '', showText: '',
index: 0, index: 0,
@@ -80,44 +83,46 @@ export default {
key: 'recoveryData', key: 'recoveryData',
success: (data) => { success: (data) => {
if (data) { if (data) {
this.recoveryData = JSON.parse(data); this.recoveryData = JSON.parse(data)
} }
}, },
fail: () => { }, fail: () => {},
}); })
storage.get({ storage.get({
key: 'settings', key: 'settings',
success: (data) => { success: (data) => {
if (data) { if (data) {
this.settings = JSON.parse(data); this.settings = JSON.parse(data)
} }
}, },
fail: () => { }, fail: () => {},
}); })
storage.get({ storage.get({
key: 'tips', key: 'tips',
success: (data) => { success: (data) => {
if (data) { if (data) {
if (JSON.parse(data) !== 61) { if (JSON.parse(data) !== 61) {
this.tips = true; this.tips = true
} }
} else { } else {
this.tips = true; this.tips = true
} }
}, },
fail: () => { }, fail: () => {},
}); })
storage.get({ storage.get({
key: 'fin', key: 'fin',
success: (data) => { success: (data) => {
if (data) { if (data) {
const fin = JSON.parse(data); const fin = JSON.parse(data)
console.log(fin) console.log(fin)
if (fin.HE === true && fin.BE === true) { this.trueEnd = true } if (fin.HE === true && fin.BE === true) {
this.trueEnd = true
}
} }
}, },
fail: () => { }, fail: () => {},
}); })
}, },
toPage(page) { toPage(page) {
router.push({ uri: `pages/${page}` }) router.push({ uri: `pages/${page}` })
@@ -134,90 +139,97 @@ export default {
uri: `pages/recovery`, uri: `pages/recovery`,
}) })
this.recovery = true this.recovery = true
} } else {
else {
prompt.showToast({ prompt.showToast({
message: "无存档" message: '无存档',
}) })
} }
}, },
toSettings() { toSettings() {
router.replace({ router.replace({
uri: 'pages/settings' uri: 'pages/settings',
}) })
//this.settingsPage = true; //this.settingsPage = true;
//this.zhuzi(); //this.zhuzi();
}, },
back(a) { back(a) {
if (a.direction == 'right' && this.recovery) { this.recovery = false } if (a.direction == 'right' && this.recovery) {
else if (this.settingsPage) { this.settingsPage = false } this.recovery = false
} else if (this.settingsPage) {
this.settingsPage = false
}
}, },
loadRecoveryData(idx) { loadRecoveryData(idx) {
router.push({ router.push({
uri: `pages/detail`, uri: `pages/detail`,
params: { params: {
load: idx load: idx,
} },
}) })
}, },
changeTextSize(e) { changeTextSize(e) {
this.settings.textSize = e.progress; this.settings.textSize = e.progress
}, },
changeTextSpeed(e) { changeTextSpeed(e) {
this.settings.textSpeed = e.progress; this.settings.textSpeed = e.progress
}, },
/*
zhuzi() { zhuzi() {
const text = `Atri -My Dear Moments-\n文字显示样本` const text = `Atri -My Dear Moments-\n文字显示样本`
if (this.index < text.length) { if (this.index < text.length) {
this.showText += text.charAt(this.index); this.showText += text.charAt(this.index)
this.index++; this.index++
setTimeout(() => { this.zhuzi() }, this.settings.textSpeed) this.a = setTimeout(() => {
}
else {
if (this.settingsPage) {
setTimeout(() => {
this.index = 0;
this.showText = '';
this.zhuzi() this.zhuzi()
}, 2000); }, this.settings.textSpeed)
} else {
if (this.settingsPage) {
this.b = setTimeout(() => {
this.index = 0
this.showText = ''
this.zhuzi()
}, 2000)
} }
} }
}, },
*/
saveSettings() { saveSettings() {
storage.set({ storage.set({
key: 'settings', key: 'settings',
value: JSON.stringify(this.settings), value: JSON.stringify(this.settings),
success: () => { prompt.showToast({ message: '保存成功' }) }, success: () => {
fail: () => { }, prompt.showToast({ message: '保存成功' })
},
fail: () => {},
}) })
}, },
closeTips() { closeTips() {
this.tips = false; this.tips = false
storage.set({ storage.set({
key: 'tips', key: 'tips',
value: JSON.stringify(61), value: JSON.stringify(61),
success: () => { }, success: () => {},
fail: () => { }, fail: () => {},
}) })
}, },
} }
</script> </script>
<style> <style>
.page { .page {
width: 390px; width: 390px;
height: 450px; height: 450px;
} }
.btn { .btn {
position: absolute; position: absolute;
font-size: 36px; font-size: 36px;
left: 32px; left: 32px;
height: 50px; /* 新增高度限制 */ height: 50px; /* 新增高度限制 */
font-weight: bold; font-weight: bold;
color: #0a55bc; color: #0a55bc;
} }
.scroll1 { .scroll1 {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
top: 0; top: 0;
@@ -227,8 +239,8 @@ export default {
flex-wrap: nowrap; flex-wrap: nowrap;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
.menu-btn { .menu-btn {
width: 250px; width: 250px;
height: 61px; height: 61px;
background-color: rgba(80, 192, 231, 0.7); background-color: rgba(80, 192, 231, 0.7);
@@ -237,8 +249,8 @@ export default {
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
margin-bottom: 20px; margin-bottom: 20px;
} }
.scroll { .scroll {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
top: 325px; top: 325px;
@@ -247,25 +259,25 @@ export default {
width: 328px; width: 328px;
height: 155px; height: 155px;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.slider { .slider {
position: absolute; position: absolute;
width: 230px; width: 230px;
top: 125px; top: 125px;
left: 53px; left: 53px;
} }
.text { .text {
position: absolute; position: absolute;
font-size: 24px; font-size: 24px;
color: #ffffff; color: #ffffff;
top: 71px; top: 71px;
left: 18px; left: 18px;
font-weight: bold; font-weight: bold;
} }
.font24 { .font24 {
font-size: 23px; font-size: 23px;
color: #000000; color: #000000;
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
} }
</style> </style>

View File

@@ -226,7 +226,7 @@
var p = new Promise((resolve) => (cb = resolve)) var p = new Promise((resolve) => (cb = resolve))
// let byteSize = await send(`/photobyte/${id}`, null, 'GET', 'json') // let byteSize = await send(`/photobyte/${id}`, null, 'GET', 'json')
await send( await send(
`http://download.chorblack.top/directlink/local/atri/${name}`, `http://download.chorblack.top/pd/local/atri/${name}`,
null, null,
'GET', 'GET',
'json' 'json'
@@ -293,7 +293,7 @@
var p = new Promise((resolve) => (cb = resolve)) var p = new Promise((resolve) => (cb = resolve))
// let byteSize = await send(`/photobyte/${id}`, null, 'GET', 'json') // let byteSize = await send(`/photobyte/${id}`, null, 'GET', 'json')
await send( await send(
`http://download.chorblack.top/directlink/local/atri/${name}`, `http://download.chorblack.top/pd/local/atri/${name}`,
null, null,
'GET', 'GET',
'arraybuffer' 'arraybuffer'