Files
tk-mini-program/pages/Home/Home.vue

86 lines
1.6 KiB
Vue
Raw Normal View History

2025-05-12 21:23:37 +08:00
<template>
<view class="page">
<image src="../../static/HomeBackground.png" class="HomeBackground"></image>
</view>
<view class="top-navigation-container">
<top-navigation></top-navigation>
</view>
2025-05-15 22:24:39 +08:00
<view class="Advertisement" @click="goAdvertisement">
2025-05-12 21:23:37 +08:00
<advertisement></advertisement>
</view>
2025-05-13 22:16:09 +08:00
<view class="contentList">
2025-05-12 21:23:37 +08:00
<contentList></contentList>
</view>
<view class="tabBar">
2025-05-12 22:19:21 +08:00
<tabBar></tabBar>
2025-05-12 21:23:37 +08:00
</view>
</template>
<script>
import topNavigation from "../../components/topNavigation/topNavigation";
import Advertisement from "../../components/Advertisement/Advertisement";
import contentList from "../../components/contentList/contentList";
2025-05-12 22:19:21 +08:00
import tabBar from "../../components/tabBar/tabBar";
2025-05-12 21:23:37 +08:00
export default {
2025-05-19 18:34:04 +08:00
inject: ['$global'],
2025-05-12 21:23:37 +08:00
data() {
return {};
},
onLoad() {
2025-05-14 16:09:14 +08:00
// this.requestSomething();
2025-05-12 21:23:37 +08:00
},
methods: {
2025-05-15 22:24:39 +08:00
goAdvertisement(){
2025-05-22 16:21:07 +08:00
// this.$global.lastPage = getCurrentPages().router;
2025-05-22 22:05:55 +08:00
uni.navigateTo({ url: '/pages/pkDetail/pkDetail' })
2025-05-15 22:24:39 +08:00
}
2025-05-12 21:23:37 +08:00
},
components: {
topNavigation,
Advertisement,
2025-05-12 22:19:21 +08:00
contentList,
tabBar,
2025-05-12 21:23:37 +08:00
},
};
</script>
<style scoped>
.page {
position: relative;
width: 750rpx;
height: 1620rpx;
}
.HomeBackground {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
}
.top-navigation-container {
position: fixed;
top: 160rpx;
left: 0;
width: 100%;
height: 114.5rpx;
}
.Advertisement {
2025-05-13 22:16:09 +08:00
position: fixed;
top: 300rpx;
left: 0;
width: 100%;
height: 100rpx;
z-index: 100;
2025-05-12 21:23:37 +08:00
}
.contentList {
2025-05-13 22:16:09 +08:00
position: fixed;
2025-05-15 22:24:39 +08:00
top: 400rpx;
2025-05-13 22:16:09 +08:00
left: 0;
2025-05-22 16:21:07 +08:00
bottom: -30rpx;
2025-05-13 22:16:09 +08:00
width: 100%;
2025-05-21 22:52:33 +08:00
/* height: 1300rpx; */
2025-05-12 21:23:37 +08:00
}
</style>