72 lines
1.4 KiB
Vue
72 lines
1.4 KiB
Vue
<template>
|
|
<view class="container">
|
|
<view class="status_bar">
|
|
<!-- 这里是状态栏 -->
|
|
</view>
|
|
<uni-list>
|
|
<uni-list-item v-for="item in games" >
|
|
<big-img-cell :g-data="item" v-on:cellClicked = 'onClick'></big-img-cell>
|
|
</uni-list-item>
|
|
</uni-list>
|
|
</view>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { Component, Vue } from 'vue-property-decorator'
|
|
import BigImgCell from '@/components/BigImgCell/index.vue'
|
|
import { IGameInfo } from '@/modules/gameinfo'
|
|
|
|
@Component({
|
|
name: 'Index',
|
|
components: {
|
|
BigImgCell
|
|
}
|
|
})
|
|
|
|
export default class extends Vue{
|
|
|
|
private games: IGameInfo[] = []
|
|
|
|
onLoad() {
|
|
console.log(uni.getSystemInfoSync().statusBarHeight)
|
|
for (let i = 0; i < 10; i++) {
|
|
this.games.push({
|
|
gameId: i + '',
|
|
banner: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/094a9dc0-50c0-11eb-b680-7980c8a877b8.jpg',
|
|
name: '测试游戏' + i,
|
|
ename: 'test game ' + i
|
|
})
|
|
}
|
|
|
|
}
|
|
onClick(e: any) {
|
|
uni.navigateTo({
|
|
url: '/pages/info/index',
|
|
animationType: 'pop-in',
|
|
animationDuration: 200})
|
|
}
|
|
actionsClick(text: string) {
|
|
uni.showToast({
|
|
title: text,
|
|
icon: 'none'
|
|
})
|
|
}
|
|
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
big-img-cell {
|
|
width: 100%;
|
|
}
|
|
.uni-list-item-box {
|
|
padding: 0!important;
|
|
}
|
|
.status_bar {
|
|
height: var(--status-bar-height);
|
|
width: 100%;
|
|
}
|
|
|
|
|
|
</style>
|