Files
dvcp_v2_wechat_app/src/project/fengdu/AppNewFarmerBank/integralTask.vue

170 lines
4.2 KiB
Vue
Raw Normal View History

2023-03-28 17:08:46 +08:00
<template>
<div class="integralTask">
<div class="img-bg">
<img src="https://cdn.cunwuyun.cn/fengdu/img-jifenlist.png" alt="">
</div>
<div class="title">任务大厅</div>
2023-03-29 15:13:38 +08:00
<div class="card-list" v-if="list.length">
2023-03-29 10:16:36 +08:00
<div class="card" v-for="(item,index) in list" :key="index" @click="$linkTo('./taskDetail?id='+item.id)">
<h4>{{ item.title }}</h4>
<p>{{ item.detail }}</p>
<div class="imgs" v-if="item.files">
<image mode="aspectFill" v-for="(e, i) in item.files" :key="i" :src="e.url"/>
2023-03-28 17:08:46 +08:00
</div>
<div class="time">
2023-03-29 15:13:38 +08:00
<div class="goin" v-if="item.intoBegintime && item.intoEndtime">
2023-03-28 17:08:46 +08:00
<img src="https://cdn.cunwuyun.cn/fengdu/ic-jinchangshijian.png" alt="">
2023-03-29 10:16:36 +08:00
<div class="label">进场时间</div>
<div class="value">{{ item.intoBegintime.substring(0, 16)}} {{ item.intoEndtime.substring(0, 16) }}</div>
2023-03-28 17:08:46 +08:00
</div>
2023-03-29 15:13:38 +08:00
<div class="exit" v-if="item.exitBegintime && item.exitEndtime">
2023-03-28 17:08:46 +08:00
<img src="https://cdn.cunwuyun.cn/fengdu/ic-lichangshijian.png" alt="">
2023-03-29 10:16:36 +08:00
<div class="label">离场时间</div>
<div class="value">{{ item.exitBegintime.substring(0, 16) }} {{ item.exitEndtime.substring(0, 16) }}</div>
2023-03-28 17:08:46 +08:00
</div>
<div class="type">
<img src="https://cdn.cunwuyun.cn/fengdu/ic-renwuleixing.png" alt="">
2023-03-29 10:16:36 +08:00
<div class="label">任务类型</div>
2023-03-29 15:13:38 +08:00
<div class="value">{{ $dict.getLabel('fdIntegralTaskType', item.type) }}</div>
2023-03-28 17:08:46 +08:00
</div>
</div>
</div>
</div>
2023-03-29 15:13:38 +08:00
<AiEmpty :description="`暂无任务`" class="emptyWrap" v-else/>
2023-03-28 17:08:46 +08:00
</div>
</template>
<script>
export default {
name: 'integralTask',
appName: '功德银行',
data() {
return {
2023-03-29 16:07:38 +08:00
list: [],
current: 1,
2023-03-28 17:08:46 +08:00
}
},
methods: {
2023-03-29 10:16:36 +08:00
getList() {
2023-03-29 16:07:38 +08:00
this.$instance.post('/app/appintegraltask/list',null,{
params: {
current: this.current,
status: 1
}
}).then(res=> {
2023-03-29 10:16:36 +08:00
if(res?.data) {
this.list = res.data.records
}
})
}
2023-03-28 17:08:46 +08:00
},
onShow() {
uni.setNavigationBarTitle({
title: '功德银行'
});
2023-03-29 15:13:38 +08:00
this.$dict.load(['fdIntegralTaskType']).then(() => {
this.getList()
})
2023-03-28 17:08:46 +08:00
},
2023-03-29 16:07:38 +08:00
onReachBottom() {
this.current++;
this.getList()
},
2023-03-28 17:08:46 +08:00
}
</script>
<style lang="scss" scoped>
.integralTask {
.img-bg {
width: 100%;
height: 216px;
img {
width: 100%;
height: 100%;
}
}
.title {
font-size: 34px;
font-weight: 500;
color: #222222;
padding: 0 32px;
margin-top: 32px;
}
.card-list {
padding: 24px 32px;
box-sizing: border-box;
.card {
background: #FFF;
color: #333333;
border-radius: 16px;
2023-03-29 10:16:36 +08:00
margin-bottom: 24px;
2023-03-28 17:08:46 +08:00
h4 {
padding: 24px 24px 0;
box-sizing: border-box;
font-size: 34px;
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
p {
padding: 16px 24px;
box-sizing: border-box;
font-size: 28px;
font-weight: 400;
}
.imgs {
2023-03-29 10:16:36 +08:00
display: flex;
align-items: center;
flex-wrap: wrap;
padding: 16px 24px;
box-sizing: border-box;
image {
height: 208px;
width: 33.33%;
padding-right: 12px;
margin-bottom: 12px;
box-sizing: border-box;
2023-03-28 18:13:57 +08:00
2023-03-29 10:16:36 +08:00
&:nth-of-type(3n) {
padding-right: 0;
}
}
2023-03-28 17:08:46 +08:00
}
.time {
padding: 0 24px 24px;
box-sizing: border-box;
border-top: 2px solid #EEEEEE;
& > div {
margin-top: 16px;
}
.goin,
.exit,
.type {
2023-03-29 10:16:36 +08:00
display: flex;
2023-03-28 17:08:46 +08:00
img {
width: 30px;
height: 30px;
2023-03-29 10:16:36 +08:00
align-self: center;
2023-03-28 17:08:46 +08:00
}
.label {
2023-03-29 10:16:36 +08:00
font-size: 24px;
2023-03-28 17:08:46 +08:00
font-weight: 400;
color: #666666;
2023-03-29 10:16:36 +08:00
align-self: center;
width: 130px;
2023-03-28 17:08:46 +08:00
}
.value {
color: #333333;
font-size: 24px;
font-weight: 400;
2023-03-29 10:16:36 +08:00
width: calc(100% - 160px);
2023-03-28 17:08:46 +08:00
}
}
}
}
}
}
</style>