forked from cuiocean/ZY-Player-APP
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
1,751 additions
and
854 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,110 @@ | ||
<template> | ||
<view class="me"> | ||
<view class="status_bar"></view> | ||
<view class="logo"> | ||
<img src="static/images/logo.png" alt=""> | ||
</view> | ||
<view class="name"> | ||
ZY Player Andriod | ||
</view> | ||
<u-cell-group> | ||
<u-cell-item title="清空收藏夹" value="清空收藏夹数据" :arrow="false" @click="itemClickEvent(i)"></u-cell-item> | ||
<u-cell-item title="重置软件" value="清空所有数据, 慎点" :arrow="false" @click="itemClickEvent(i)"></u-cell-item> | ||
<u-cell-item title="版本更新" value="0.1.0" :arrow="false" @click="itemClickEvent(i)"></u-cell-item> | ||
<u-cell-item title="关于" value="" :arrow="false" @click="itemClickEvent(i)"></u-cell-item> | ||
<view class="me"> | ||
<view class="status_bar"></view> | ||
<view class="logo"> | ||
<img src="static/images/logo.png" alt="" /> | ||
</view> | ||
<view class="name"> ZY Player Andriod </view> | ||
<u-cell-group> | ||
<u-cell-item | ||
title="清空收藏夹" | ||
value="清空收藏夹数据" | ||
:arrow="false" | ||
@click="clearStar()" | ||
></u-cell-item> | ||
<u-cell-item | ||
title="重置软件" | ||
value="清空所有数据, 慎点" | ||
:arrow="false" | ||
@click="resetApp()" | ||
></u-cell-item> | ||
<u-cell-item | ||
title="版本更新" | ||
value="0.1.0" | ||
:arrow="false" | ||
@click="itemClickEvent(i)" | ||
></u-cell-item> | ||
<u-cell-item | ||
title="关于" | ||
value="" | ||
:arrow="false" | ||
@click="itemClickEvent(i)" | ||
></u-cell-item> | ||
</u-cell-group> | ||
<view class="tips"> | ||
所有资源来自网上, 该软件不参与任何制作, 上传, 储存等内容, 禁止传播违法资源. 该软件仅供学习参考, 请于安装后24小时内删除. | ||
</view> | ||
</view> | ||
<view class="tips"> | ||
所有资源来自网上, 该软件不参与任何制作, 上传, 储存等内容, | ||
禁止传播违法资源. 该软件仅供学习参考, 请于安装后24小时内删除. | ||
</view> | ||
<u-toast ref="uToast" /> | ||
<u-modal v-model="modalShow" :content="modalContent" @confirm="resetAppconfirm" :mask-close-able="true" show-cancel-button @cancel="resetAppCancel"></u-modal> | ||
</view> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
data() { | ||
return { | ||
import db from "../../utils/database.js"; | ||
export default { | ||
data() { | ||
return { | ||
modalShow: false, | ||
modalContent: '' | ||
}; | ||
}, | ||
methods: { | ||
async clearStar() { | ||
const res = await db.removeAll('star') | ||
if (res.flag) { | ||
this.$refs.uToast.show({ title: '清空收藏夹数据成功', type: 'success', duration: '2300' }) | ||
} else { | ||
this.$refs.uToast.show({ title: '清空收藏夹数据失败', type: 'warning', duration: '2300' }) | ||
} | ||
}, | ||
methods: { | ||
itemClickEvent(item) {} | ||
} | ||
} | ||
async resetApp() { | ||
this.modalContent = '重置软件会清空:收藏夹数据,历史记录,导入的视频源等。恢复默认设置,以及默认的视频源。' | ||
this.modalShow = true | ||
}, | ||
async resetAppconfirm () { | ||
const c = await db.clearDB() | ||
if (c.flag) { | ||
const res = await db.reset() | ||
if (res.flag) { | ||
this.$refs.uToast.show({ title: '软件重置成功', type: 'success', duration: '2300' }) | ||
} | ||
} else { | ||
this.$refs.uToast.show({ title: '软件重置失败', type: 'warning', duration: '2300' }) | ||
} | ||
this.modalShow = false | ||
}, | ||
resetAppCancel () { | ||
this.modalShow = false | ||
}, | ||
itemClickEvent(item) {}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.me{ | ||
.status_bar { | ||
.me { | ||
.status_bar { | ||
height: var(--status-bar-height); | ||
width: 100%; | ||
} | ||
.logo{ | ||
margin-top: 10px; | ||
width: 100%; | ||
text-align: center; | ||
img{ | ||
width: 26%; | ||
} | ||
} | ||
.name{ | ||
margin-top: 10px; | ||
text-align: center; | ||
font-size: 20px; | ||
margin-bottom: 10px; | ||
} | ||
.tips{ | ||
color: #ff4445; | ||
padding: 15px; | ||
} | ||
.logo { | ||
margin-top: 10px; | ||
width: 100%; | ||
text-align: center; | ||
img { | ||
width: 26%; | ||
} | ||
} | ||
.name { | ||
margin-top: 10px; | ||
text-align: center; | ||
font-size: 20px; | ||
margin-bottom: 10px; | ||
} | ||
.tips { | ||
color: #ff4445; | ||
padding: 15px; | ||
} | ||
} | ||
</style> |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.