71 lines
2.0 KiB
Vue
Raw Normal View History

2023-08-04 11:32:51 +08:00
<template>
2023-08-04 18:11:49 +08:00
<view class="c_task_index">
<u-sticky bgColor="#f5f5f5" offsetTop="44px">
2023-08-05 10:22:22 +08:00
<!-- <u-tabs :list="tabLists" @click="changeCurrent" lineColor='#3274F9' :scrollable="false"
inactiveStyle='color:#666' activeStyle="color:#3274F9"></u-tabs> -->
<uni-segmented-control :current="current" :values="['全部','已完成', '未完成']" styleType="text" @clickItem="changeCurrent" activeColor="#3274F9"></uni-segmented-control>
2023-08-04 18:11:49 +08:00
</u-sticky>
<view class="c_task_index_list">
2023-08-10 14:13:35 +08:00
<view v-for="item in 10" @click="navTo('/subpkg/dispatching/dispatching')" :key="item">
2023-08-05 10:22:22 +08:00
<taskItem></taskItem>
</view>
2023-08-04 18:11:49 +08:00
</view>
2023-08-05 10:22:22 +08:00
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText" :loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
<!-- <u-empty v-else icon="/static/img/empty/data.png" text="没有数据"></u-empty> -->
2023-08-04 11:32:51 +08:00
</view>
</template>
<script>
2023-08-05 10:22:22 +08:00
import { Toast } from "../../libs/uniApi";
2023-08-04 11:32:51 +08:00
import taskItem from "./taskItem.vue"
export default {
2023-08-04 18:11:49 +08:00
name: "task",
components: { taskItem },
2023-08-04 11:32:51 +08:00
data() {
return {
2023-08-04 18:11:49 +08:00
current: 0,
2023-08-05 10:22:22 +08:00
// tabLists: [{
// name: '全部',
// }, {
// name: '已完成'
// }, {
// name: '未完成'
// }],
2023-08-04 18:11:49 +08:00
loadConfig: {
page: 1,
limit: 15,
lastpage: '',
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~',
status: 'loadmore'
},
list: []
2023-08-04 11:32:51 +08:00
};
2023-08-04 18:11:49 +08:00
},
methods: {
2023-08-10 14:13:35 +08:00
navTo(url) {
2023-08-05 10:22:22 +08:00
url ?
uni.navigateTo({
url: url
}) : Toast('暂未开放')
},
2023-08-04 18:11:49 +08:00
changeCurrent(e) {
2023-08-05 10:22:22 +08:00
if(this.current!==e.currentIndex){
this.current = e.currentIndex;
}
2023-08-04 18:11:49 +08:00
}
2023-08-04 11:32:51 +08:00
}
}
</script>
<style lang="scss">
2023-08-04 18:11:49 +08:00
.c_task_index {
padding-bottom: 100rpx;
.c_task_index_list {
padding-top: 28rpx;
}
}
2023-08-04 11:32:51 +08:00
</style>