fix: 修复项目多个问题

- 修复 index.ux 中 showToast 属性名与方法名冲突导致 toast 功能失效
- 修复 about.ux 版权年份 2024→2026
- 修复 package.json 名称与应用名不匹配
- 修复 detail.ux/offline.ux 中 toast 使用 transform 不兼容快应用
- 修复 detail.ux/offline.ux 中 toast 文字颜色不可见(#000→#fff)
- 修复 InputMethod.ux 中乱码注释和拼写错误(tookit→toolkit)
- 修复 home.ux 底部版本文字显示旧名称
- 修复 index.ux 错误信息使用模板字符串兼容性问题
- 将 * 按钮从保存离线页改为添加收藏功能
This commit is contained in:
shuiyu1123 committed 2026-04-29 19:22:56 +08:00
1 parent ac193db635
commit 467a42bf60
7 files changed
+46 -60

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
{
"name": "腕上JM",
"name": "搜哩浏览器",
"version": "1.0.0",
"description": "",
"engines": {
+4 -4
View File
@@ -3,7 +3,7 @@
<div style="background-color:black" >
<!-- 圆屏62 -->
<div if="{{screentype==='circle'}}" style="width: 480px;height: 321px;">
<!-- 全键�-->
<!-- 全键盘 -->
<div if="{{keyboardtype!='T9'}}" style="width: 480px;height: 321px;">
<img src="/components/InputMethod/assets/full/back2.png" style="position: absolute;top:38px;left:7px;width:466px;height:52px;" @click="onBtnClick('switchCn')" show="{{numFlag}}" />
<img src="/components/InputMethod/assets/full/123.png" style="position: absolute;top:266px;left:119px;width:120px;height:48px;" @click="onBtnClick('switchNum')" show="{{downFlag==='' && !numFlag && lang==='cn'}}" />
@@ -11,7 +11,7 @@
<img src="/components/InputMethod/assets/full/A.png" style="position: absolute;top:266px;left:119px;width:120px;height:48px;" @click="onBtnClick('switchUpper')" show="{{downFlag==='' && !upperFlag && lang==='en'}}" />
<div style="position: absolute;top:38px;left:78px;width:324px;height:52px;background-color:rgb(38,38,38);border-radius: 12px;border: 3px solid #333333" show="{{downFlag===''&& !numFlag}}"></div>
<img show="{{resultList.length > 0}}" style="position: absolute;top:43px;left:355px;" src="/components/InputMethod/assets/full/down.png" @click="onBtnClick('down')" />
<!-- 带��的相对路径�aiot-tookit 2.0.4 中修�-->
<!-- 带变量的相对路径在 aiot-toolkit 2.0.4 中修复-->
<img if="{{lang==='cn'}}" src="/components/InputMethod/assets/full/cn.png" style="position: absolute;top:38px;left:7px;width:67px;height:52px;" @click="onBtnClick('lang')" show="{{downFlag==='' && !numFlag}}" />
<img if="{{lang==='en'}}" src="/components/InputMethod/assets/full/en.png" style="position: absolute;top:38px;left:7px;width:67px;height:52px;" @click="onBtnClick('lang')" show="{{downFlag==='' && !numFlag}}" />
<div style="position: absolute;top:-4px;left:78px;width:324px;" show="{{downFlag==='' && !numFlag && cval}}">
@@ -77,7 +77,7 @@
<img src="/components/InputMethod/assets/t9/a.png" style="position: absolute;top:99px;left:31px;width: 60px;height: 60px;" @click="onBtnClick('switchUpper')" show="{{downFlag==='' && !numFlag && !upperFlag && lang==='en'}}" />
<div style="position: absolute;top:35px;left:95px;width:290px;height:60px;background-color:rgb(38,38,38);border-radius: 999px;border: 3px solid #333333" show="{{downFlag===''&& !numFlag}}"></div>
<img show="{{resultList.length > 0}}" style="position: absolute;top:44px;left:338px;" src="/components/InputMethod/assets/full/down.png" @click="onBtnClick('down')" />
<!-- 带��的相对路径�aiot-tookit 2.0.4 中修�-->
<!-- 带变量的相对路径在 aiot-toolkit 2.0.4 中修复-->
<img if="{{lang==='cn'}}" src="/components/InputMethod/assets/t9/cn.png" style="position: absolute;top:35px;left:31px;width: 60px;height: 60px;" @click="onBtnClick('lang')" show="{{downFlag==='' && !numFlag}}" />
<img if="{{lang==='en'}}" src="/components/InputMethod/assets/t9/en.png" style="position: absolute;top:35px;left:31px;width: 60px;height: 60px;" @click="onBtnClick('lang')" show="{{downFlag==='' && !numFlag}}" />
<div style="position: absolute;top:-4px;left:95px;width:145px;height:40px;" show="{{downFlag==='' && !numFlag && cval}}">
@@ -260,7 +260,7 @@
</div>
</scroll>
<img show="{{resultList.length > 0}}" style="position: absolute;left: 120px;top: 57px;width: 60px;height: 40px;" src="/components/InputMethod/assets/arc/down2.png" @click="onBtnClick('down')" />
<!-- 带��的相对路径�aiot-tookit 2.0.4 中修�-->
<!-- 带变量的相对路径在 aiot-toolkit 2.0.4 中修复-->
<img if="{{lang==='cn'}}" src="/components/InputMethod/assets/arc/cn.png" style="position: absolute;top:0px;left:9px;width: 48px;height: 42px;" @click="onBtnClick('lang')" show="{{downFlag==='' && !numFlag}}" />
<img if="{{lang==='en'}}" src="/components/InputMethod/assets/arc/en.png" style="position: absolute;top:0px;left:9px;width: 48px;height: 42px;" @click="onBtnClick('lang')" show="{{downFlag==='' && !numFlag}}" />
<img src="/components/InputMethod/assets/arc/back2.png" style="position: absolute;top:0px;left:9px;width: 48px;height: 42px;" @click="onBtnClick('switchCn')" show="{{numFlag && lang==='cn'}}" />
+1 -1
View File
@@ -39,7 +39,7 @@ export default {
name: '搜哩浏览器',
version: 'v1.0.0',
description: '专为智能手表设计的轻量浏览器',
copyright: '© 2024 搜哩浏览器'
copyright: '© 2026 搜哩浏览器'
},
sections: [
{
+4 -3
View File
@@ -263,15 +263,16 @@ export default {
.toast {
position: fixed;
bottom: 80px;
left: 50%;
transform: translateX(-50%);
left: 0;
right: 0;
justify-content: center;
padding: 10px 20px;
border-radius: 20px;
background-color: rgba(48, 209, 88, 0.95);
}
.toast-text {
color: #000;
color: #fff;
font-size: 14px;
}
</style>
+1 -1
View File
@@ -57,7 +57,7 @@
<!-- 底部 -->
<div class="footer">
<text class="version">腕上JM v1.0</text>
<text class="version">搜哩浏览器 v1.0</text>
</div>
</div>
</template>
+31 -47
View File
@@ -140,7 +140,7 @@
<div class="tool-btn primary" onclick="refreshPage">
<text class="primary-icon">R</text>
</div>
<div class="tool-btn" onclick="savePage">
<div class="tool-btn" onclick="addBookmark">
<text class="tool-icon">*</text>
</div>
<div class="tool-btn" onclick="goHome">
@@ -179,7 +179,7 @@
</div>
<!-- Toast -->
<div class="toast" if="{{showToast}}">
<div class="toast" if="{{toastVisible}}">
<text class="toast-text">{{toastMsg}}</text>
</div>
</div>
@@ -348,7 +348,7 @@ export default {
],
showImageModal: false,
currentImage: null,
showToast: false,
toastVisible: false,
toastMsg: ''
},
@@ -449,7 +449,7 @@ export default {
if (response.code === 200 && response.data) {
this.parseHtml(response.data)
} else {
this.errorMsg = `错误: ${response.code}`
this.errorMsg = '错误: ' + response.code
}
this.isLoading = false
},
@@ -483,61 +483,45 @@ export default {
this.currentImage = null
},
savePage() {
if (!this.currentUrl || this.htmlElements.length === 0) {
this.showToast('无内容可保存')
addBookmark() {
if (!this.currentUrl) {
this.showToast('请先打开网页')
return
}
const safeElements = this.htmlElements.slice(0, 100).map(e => ({
type: e.type,
parts: e.parts,
text: e.text,
url: e.url,
thumbUrl: e.thumbUrl,
alt: e.alt
}))
const pageData = {
const colors = ['#0a84ff', '#30d158', '#ff375f', '#ff9f0a', '#bf5af2', '#64d2ff']
const bookmark = {
id: Date.now().toString(),
title: truncateText(this.pageTitle, 50),
name: this.pageTitle || formatDisplayUrl(this.currentUrl),
url: this.currentUrl,
elements: safeElements,
saveTime: new Date().toLocaleString()
}
let jsonStr
try {
jsonStr = JSON.stringify(pageData)
if (jsonStr.length > 100000) {
this.showToast('页面过大')
return
}
} catch (e) {
this.showToast('保存失败')
return
color: colors[Math.floor(Math.random() * colors.length)],
icon: (this.pageTitle || formatDisplayUrl(this.currentUrl)).charAt(0).toUpperCase()
}
storage.get({
key: 'offline_pages',
key: 'user_bookmarks',
success: (data) => {
let pages = []
try { pages = JSON.parse(data || '[]') } catch (e) {}
if (pages.length >= 20) pages = pages.slice(0, 19)
pages.unshift(pageData)
let bookmarks = []
try { bookmarks = JSON.parse(data || '[]') } catch (e) {}
const exists = bookmarks.some(b => b.url === this.currentUrl)
if (exists) {
this.showToast('已收藏过')
return
}
bookmarks.unshift(bookmark)
storage.set({
key: 'offline_pages',
value: JSON.stringify(pages),
success: () => this.showToast('保存成功'),
fail: () => this.showToast('保存失败')
key: 'user_bookmarks',
value: JSON.stringify(bookmarks),
success: () => this.showToast('收藏成功'),
fail: () => this.showToast('收藏失败')
})
},
fail: () => {
storage.set({
key: 'offline_pages',
value: JSON.stringify([pageData]),
success: () => this.showToast('保存成功'),
fail: () => this.showToast('保存失败')
key: 'user_bookmarks',
value: JSON.stringify([bookmark]),
success: () => this.showToast('收藏成功'),
fail: () => this.showToast('收藏失败')
})
}
})
@@ -545,8 +529,8 @@ export default {
showToast(msg) {
this.toastMsg = msg
this.showToast = true
setTimeout(() => this.showToast = false, 2000)
this.toastVisible = true
setTimeout(() => this.toastVisible = false, 2000)
}
}
</script>
+4 -3
View File
@@ -276,15 +276,16 @@ export default {
.toast {
position: fixed;
bottom: 80px;
left: 50%;
transform: translateX(-50%);
left: 0;
right: 0;
justify-content: center;
padding: 10px 20px;
border-radius: 20px;
background-color: rgba(48, 209, 88, 0.95);
}
.toast-text {
color: #000;
color: #fff;
font-size: 14px;
}
</style>