first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1 @@
597b9df1-5d1c-4593-997e-d02f9d47b4be

View File

@@ -0,0 +1,51 @@
// index.js
const {
index,
util
} = getApp().globalData
Page({
data: {
recruit: [
{ type: 1, title: '失物招领', src: '../../images/index-icon/release.png' },
{ type: 2, title: '寻物寻事', src: '../../images/index-icon/search.png' },
],
movies: [{
url: '../../images/Rotating/3.jpg'
},
{
url: '../../images/Rotating/news.png'
},
{
url: '../../images/Rotating/1.jpg'
},
{
url: '../../images/Rotating/2.jpg'
}
],
noticeList: []
},
onLoad() {
this.getNotice();
// if (typeof wx.getStorageSync('user') == "object" ) {
// }
},
enterSearch() {
wx.navigateTo({
url: '/pages/search/search',
})
},
enterPush(e) {
wx.navigateTo({
url: `/pages/push/push?id=${e.currentTarget.dataset.id}`,
})
},
async getNotice() {
let res = await index.notice();
this.setData({
noticeList: res
})
}
})

View File

@@ -0,0 +1,4 @@
{
"usingComponents": {
}
}

View File

@@ -0,0 +1,47 @@
<view class="index">
<view class="banner">
<swiper indicator-dots='true' autoplay='true' interval='3000' duration='1000' circular='true' class="swip">
<swiper-item wx:for="{{movies}}" wx:for-index="index" wx:key="*this">
<image src='{{item.url}}' mode='widthFix'></image>
</swiper-item>
</swiper>
</view>
<view class="content">
<view class="search" bindtap="enterSearch">
<image src="../../images/index-icon/search.png"></image>
<text>搜索更多..</text>
</view>
<view class="push">
<view class="recruit" wx:for="{{ recruit }}"
data-id="{{ item.type }}" bindtap="enterPush"
wx:key="type">
<view class="recruit_action">
<image src="{{ item.src }}"></image>
<view class="add">+发布</view>
</view>
<view class="recruit_tips">{{ item.title }}</view>
</view>
</view>
<view class="tips_text">tps:听说点击小飞机和放大镜,会进入神秘世界...</view>
<view class="hot_news">
<view class="news_title">
<image src="../../images/index-icon/announcement.png"></image>
<text>最新消息</text>
</view>
<view class="news_content">
<view class="news_item" wx:for="{{noticeList}}" wx:key="notice_id">
<view class="icon"></view>
<text>{{ item.notice_text }}</text>
</view>
</view>
</view>
</view>
</view>

View File

@@ -0,0 +1,136 @@
.banner {
background-color: #ffd23c;
height: 400rpx;
border-bottom-right-radius: 80rpx;
border-bottom-left-radius: 80rpx;
padding-top: 30rpx;
box-sizing: border-box;
}
.content {
padding: 0 30rpx;
}
.swip {
box-shadow: 4rpx 4rpx 8rpx rgba(0, 0, 0, 0.3);
margin: 0 auto;
height: 280rpx;
width: 650rpx;
border-radius: 20rpx;
overflow: hidden;
}
.swip image {
width: 100%;
}
.search {
display: flex;
width: 100%;
background-color: #fff;
height: 90rpx;
margin: 0 auto;
margin-top: -40rpx;
border-radius: 60rpx;
align-items: center;
border: 1px solid #e2e2e2;
line-height: 90rpx;
}
.search image {
width: 50rpx;
height: 50rpx;
margin-left: 20rpx;
}
.search text {
padding-left: 30rpx;
color: #b6b6b6;
font-size: 30rpx;
flex: 1;
height: 100%;
padding-right: 30rpx;
}
.push {
margin-top: 30rpx;
display: flex;
justify-content: space-between;
}
.push .recruit{
width: 48%;
height: 260rpx;
background-color: #fff;
border-radius: 30rpx;
padding: 20rpx 30rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: space-around;
}
.push .recruit .recruit_action{
display: flex;
align-items: center;
justify-content: space-between;
}
.push .recruit .recruit_action image{
width: 70rpx;
height: 70rpx;
}
.push .recruit .recruit_action .add{
background-color: #ffd23c;
width: 140rpx;
height: 70rpx;
text-align: center;
border-radius: 30rpx;
line-height: 70rpx;
}
.tips_text {
font-size: 24rpx;
color: rgb(175, 175, 175);
padding-left: 10rpx;
margin-top: 16rpx;
}
.hot_news {
background: #fff;
margin-top: 40rpx;
border-radius: 30rpx;
box-sizing: border-box;
padding: 20rpx 30rpx;
}
.hot_news .news_title {
display: flex;
align-items: center;
height: 80rpx;
margin-bottom: 20rpx;
}
.hot_news .news_title image{
width: 60rpx;
height: 60rpx;
}
.hot_news .news_title text{
font-size: 34rpx;
margin-left: 20rpx;
font-weight: 500;
}
.hot_news .news_content {
box-sizing: border-box;
padding-left: 19rpx;
}
.hot_news .news_content .news_item {
display: flex;
align-items: center;
margin-bottom: 19rpx;
}
.news_item text {
font-size: 28rpx;
}
.hot_news .news_content .news_item image{}
.hot_news .news_content .news_item .icon{
width: 30rpx;
height: 30rpx;
background: #ffd23c;
border-radius: 100%;
margin-right: 29rpx;
}