app_tree_planting/pages/duty/index.vue

220 lines
4.4 KiB
Vue
Raw Normal View History

2023-01-11 19:31:59 +08:00
<template>
2023-02-05 20:52:34 +08:00
<view class="page">
<view class="status-bar"></view>
<view class="content">
<!-- 搜索框 -->
<view class="search">
<view class="search-content">
<image src="../../static/images/ic_search.png" class="icon" mode="aspectFill"></image>
<input @input="onSearchInput" placeholder="请输入关键字搜索" />
</view>
<view class="btn" @click="doSearch">搜索</view>
</view>
<!-- 轮播图 -->
<swiper v-if="slider.length > 0" class="swiper" :indicator-dots="true" :autoplay="true" :circular="true">
<swiper-item v-for="(item, index) in slider" :key="index">
<navigator class="item" hover-class="none" :url="'/pages/duty/list'">
<image :lazy-load="true" :src="item.imageUrl" mode="aspectFill"></image>
</navigator>
</swiper-item>
</swiper>
<view class="func-box">
<view class="item" @click="openActivity()">
<image src="../../static/images/ic_labour_pious_icon.png" mode="aspectFill"></image>
<text>劳动尽责</text>
</view>
<view class="item" @click="openCertificate">
2023-02-05 20:52:34 +08:00
<image src="../../static/images/ic_certify_search_icon.png" mode="aspectFill"></image>
<text>证书查询</text>
</view>
<view class="item" @click="openExplain">
2023-02-05 20:52:34 +08:00
<image src="../../static/images/ic_duty_answer_icon.png" mode="aspectFill"></image>
<text>尽责说明</text>
2023-02-05 20:52:34 +08:00
</view>
</view>
<image class="divider" src="../../static/images/ic_duty_divider.png" mode="aspectFill"></image>
</view>
2023-01-11 19:31:59 +08:00
</view>
</template>
<script>
2023-02-01 19:25:51 +08:00
import pageLoading from '@/components/loading/pageLoading.vue';
export default {
components: {
pageLoading
},
data() {
return {
2023-02-05 20:52:34 +08:00
showPageLoading: true,
slider: [{
imageUrl: "https://img1.baidu.com/it/u=1470385559,3839180880&fm=253&fmt=auto&app=138&f=JPEG?w=667&h=500"
}], //轮播图
2023-02-01 19:25:51 +08:00
};
},
methods: {
2023-02-05 20:52:34 +08:00
doSearch() {
2023-02-01 19:25:51 +08:00
2023-02-05 20:52:34 +08:00
},
onSearchInput(event) {
},
openActivity() {
uni.navigateTo({
url: "/pages/duty/activitylist"
})
},
openExplain() {
uni.navigateTo({
url: "/pages/duty/dutyexplain"
})
},
openCertificate() {
uni.navigateTo({
url: "/pages/user/mine_certif_search"
})
2023-02-05 20:52:34 +08:00
}
2023-02-01 19:25:51 +08:00
}
};
2023-01-11 19:31:59 +08:00
</script>
<style scoped lang="scss">
2023-02-05 20:52:34 +08:00
page {
height: 100%;
}
2023-02-01 19:25:51 +08:00
2023-02-05 20:52:34 +08:00
.page {
display: flex;
flex: 1;
flex-direction: column;
overflow: hidden;
height: 100%;
background: #fff;
2023-02-01 19:25:51 +08:00
}
2023-02-05 20:52:34 +08:00
.content {
flex: 1;
width: 100%;
height: 100rpx;
display: flex;
flex-direction: column;
justify-content: flex-start;
}
/*幻灯片广告 */
.swiper {
height: 350rpx;
margin: 14rpx 24rpx 0;
image {
height: 350rpx;
width: 100%;
border-radius: 15rpx;
//box-shadow: 0 0 12px #dddee1;
2023-01-11 19:31:59 +08:00
}
2023-02-01 19:25:51 +08:00
2023-02-05 20:52:34 +08:00
.current {
width: 98%;
height: 350rpx;
margin: 1.0% 1.0%;
transition: all 0.2s ease-in 0s;
}
2023-02-01 19:25:51 +08:00
2023-02-05 20:52:34 +08:00
.item {
position: relative;
2023-02-01 19:25:51 +08:00
2023-02-05 20:52:34 +08:00
.title {
position: absolute;
left: 0;
bottom: 0;
2023-01-11 19:31:59 +08:00
display: flex;
2023-02-01 19:25:51 +08:00
justify-content: center;
2023-02-05 20:52:34 +08:00
width: 100%;
2023-02-01 19:25:51 +08:00
2023-02-05 20:52:34 +08:00
text {
margin: 7% 6%;
2023-02-01 19:25:51 +08:00
display: flex;
align-items: center;
2023-01-11 19:31:59 +08:00
color: #fff;
2023-02-05 20:52:34 +08:00
display: -webkit-box;
text-overflow: ellipsis;
word-break: break-all;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
font-size: 34rpx;
padding: 14rpx 20rpx;
max-width: 610rpx;
line-height: 1.3;
border-radius: 5rpx;
2023-02-01 19:25:51 +08:00
}
}
2023-02-05 20:52:34 +08:00
}
}
2023-02-01 19:25:51 +08:00
2023-02-05 20:52:34 +08:00
.func-box {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-around;
padding: 20rpx 10rpx;
2023-02-01 19:25:51 +08:00
2023-02-05 20:52:34 +08:00
.item {
display: flex;
flex-direction: column;
align-items: center;
2023-02-01 19:25:51 +08:00
2023-02-05 20:52:34 +08:00
image {
width: 80rpx;
height: 80rpx;
}
text {
color: black;
font-size: 30rpx;
margin-top: 10rpx;
2023-01-11 19:31:59 +08:00
}
}
}
2023-02-01 19:25:51 +08:00
2023-02-05 20:52:34 +08:00
.divider {
width: 96%;
height: 100rpx;
align-self: center;
}
2023-02-01 19:25:51 +08:00
2023-02-05 20:52:34 +08:00
/*搜索*/
.search {
padding: 10rpx 24rpx 10rpx 24rpx;
display: flex;
justify-content: space-between;
align-items: center;
.search-content {
background: #f2f2f2;
border-radius: 15px;
padding: 10rpx 24rpx 10rpx 24rpx;
margin-right: 15rpx;
flex: 1;
display: flex;
align-items: center;
}
2023-02-01 19:25:51 +08:00
2023-02-05 20:52:34 +08:00
/deep/.input {
color: #8cc7b5;
}
2023-01-11 19:31:59 +08:00
2023-02-05 20:52:34 +08:00
.icon {
width: 30rpx;
height: 30rpx;
margin-right: 15rpx;
2023-01-11 19:31:59 +08:00
}
2023-02-01 19:25:51 +08:00
2023-02-05 20:52:34 +08:00
.btn {
color: #b3b3b3;
}
2023-02-01 19:25:51 +08:00
}
</style>