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
6 changed files
with
575 additions
and
50 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
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,29 +1,45 @@ | ||
<template> | ||
<view> | ||
<u-cell-group> | ||
<u-cell-item v-for="i in 50" :key="i" title="电影名称" value="资源来源" :arrow="false" @click="openDetail"></u-cell-item> | ||
</u-cell-group> | ||
</view> | ||
<view> | ||
<u-cell-group> | ||
<u-cell-item | ||
v-for="(i, j) in starList" | ||
:key="j" | ||
:title="i.name" | ||
:value="i.type" | ||
:arrow="false" | ||
@click="openDetail(i)" | ||
></u-cell-item> | ||
</u-cell-group> | ||
</view> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
data() { | ||
return { | ||
site: 'kaka', | ||
id: 'haha' | ||
} | ||
}, | ||
methods: { | ||
openDetail (item) { | ||
const url = `/pages/detail/detail?site=${this.site}&id=${this.id}&name=${item.label}&url=${item.value}` | ||
this.$u.route({url: url}) | ||
} | ||
}, | ||
onLoad() {} | ||
} | ||
import db from "../../utils/database.js"; | ||
export default { | ||
data() { | ||
return { | ||
starList: [], | ||
}; | ||
}, | ||
methods: { | ||
openDetail(item) { | ||
const site = item.key.split("-")[0]; | ||
const id = item.key.split("-")[1]; | ||
const url = `/pages/detail/detail?site=${site}&id=${id}`; | ||
this.$u.route({ url: url }); | ||
}, | ||
async getAllStar() { | ||
const res = await db.getAll("star"); | ||
if (res.flag) { | ||
this.starList = res.data; | ||
} | ||
}, | ||
}, | ||
onLoad() { | ||
this.getAllStar(); | ||
}, | ||
onTabItemTap() { | ||
this.getAllStar(); | ||
} | ||
}; | ||
</script> | ||
|
||
<style> | ||
</style> |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.