mirror of
https://github.com/silenty4ng/k5web
synced 2025-04-19 08:39:56 +00:00
update
This commit is contained in:
parent
14b5b5b0f4
commit
43af220237
2 changed files with 16 additions and 23 deletions
|
@ -29,7 +29,7 @@
|
|||
</template>
|
||||
</a-list-item>
|
||||
</a-list>
|
||||
<t-pagination style="margin: 10px;" :total="state.total" :current="state.page" showPageNumber :showPageSize="false" />
|
||||
<t-pagination @change="loadit" style="margin: 10px;" :total="state.total" :current="state.page" :pageSize="12" showPageNumber :showPageSize="false" />
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
@ -128,18 +128,15 @@
|
|||
})
|
||||
|
||||
onMounted(async ()=>{
|
||||
const resp : any = await axios.get("https://k5.vicicode.com/wsapi/list?type=0&page=" + state.page + "&t=" + Date.now())
|
||||
state.total = resp.total
|
||||
state.nowpage = resp.data
|
||||
loadit({current: 1})
|
||||
})
|
||||
|
||||
watch(state, async (n, o)=>{
|
||||
if(n.page != o.page){
|
||||
const resp : any = await axios.get("https://k5.vicicode.com/wsapi/list?type=0&page=" + state.page + "&t=" + Date.now())
|
||||
state.total = resp.total
|
||||
state.nowpage = resp.data
|
||||
}
|
||||
})
|
||||
const loadit = async (page: any) => {
|
||||
state.page = page.current
|
||||
const resp : any = await axios.get("https://k5.vicicode.com/wsapi/list?type=0&limit=12&page=" + page.current + "&t=" + Date.now())
|
||||
state.total = resp.total
|
||||
state.nowpage = resp.data
|
||||
}
|
||||
|
||||
const showPanel = async () => {
|
||||
state.refLoading = true;
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
</t-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<t-pagination style="margin: 10px;" :total="state.total" :current="state.page" :pageSize="12" showPageNumber :showPageSize="false" />
|
||||
<t-pagination @change="loadit" style="margin: 10px;" :total="state.total" :current="state.page" :pageSize="12" showPageNumber :showPageSize="false" />
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
@ -140,11 +140,15 @@
|
|||
})
|
||||
|
||||
onMounted(async ()=>{
|
||||
const resp : any = await axios.get("https://k5.vicicode.com/wsapi/list?type=1&limit=12&page=" + state.page + "&t=" + Date.now())
|
||||
state.total = resp.total
|
||||
state.nowpage = resp.data
|
||||
loadit({current: 1})
|
||||
})
|
||||
|
||||
const loadit = async (page: any) => {
|
||||
state.page = page.current
|
||||
const resp : any = await axios.get("https://k5.vicicode.com/wsapi/list?type=1&limit=12&page=" + page.current + "&t=" + Date.now())
|
||||
state.total = resp.total
|
||||
state.nowpage = resp.data
|
||||
}
|
||||
|
||||
const showPanel = async () => {
|
||||
state.refLoading = true;
|
||||
|
@ -204,14 +208,6 @@
|
|||
const refit = () => {
|
||||
showPanel()
|
||||
}
|
||||
|
||||
watch(state, async (n, o)=>{
|
||||
if(n.page != o.page){
|
||||
const resp : any = await axios.get("https://k5.vicicode.com/wsapi/list?type=1&limit=12&page=" + state.page + "&t=" + Date.now())
|
||||
state.total = resp.total
|
||||
state.nowpage = resp.data
|
||||
}
|
||||
})
|
||||
|
||||
const useImg = (url:any) => {
|
||||
router.push({
|
||||
|
|
Loading…
Add table
Reference in a new issue