123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <template>
- <view>
- <view class="box">
- <view class="top">
- <text class="title">业务项</text>
- </view>
- </view>
- <view class="card-box">
- <uni-list>
- <uni-list-item v-for="(item,index) in typeList" link="reLaunch" @click="onClick(item)">
- <template v-slot:body>{{ item.name }}</template>
- </uni-list-item>
- </uni-list>
- </view>
- <noData v-if="typeList.length==0"></noData>
- <u-loadmore style="margin: 30rpx;" :status="status"/>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- status: 'loadmore',
- customemrId: '1',
- typeList: [],
- p: {
- pageNo: 1,
- pageSize: 3,
- dataCount: 0
- },
- }
- },
- onShow() {
- this.getGoodsList();
- },
- onBackPress() {
- this.$common.to('/pages/onely-disinfect/Index')
- return true;
- },
- methods: {
- onClick(item) {
- this.$common.to('/pages/onely-disinfect/type-business?goodsJson=' + JSON.stringify(item))
- },
- getGoodsList() {
- this.$api.getGoodsList(this.p).then(resp => {
- this.typeList = resp.data;
- })
- }
- },
- //上拉加载更多,分页模拟数据
- onReachBottom() {
- if (parseInt(this.p.dataCount) > parseInt(this.p.pageSize) * parseInt(this.p.pageNo)) {
- this.status = 'loading';
- this.p.pageSize += 5;
- this.getCarDisinFect();
- } else {
- this.status = 'nomore';
- }
- }
- }
- </script>
- <style lang="scss">
- page {
- background-color: #fff;
- }
- .add {
- position: absolute;
- right: 40rpx;
- top: -60rpx;
- z-index: 999;
- border: 1rpx solid #359aff;
- border-radius: 8rpx;
- color: #c8e4ff;
- padding: 10rpx 20rpx;
- font-size: 28rpx;
- }
- @import '@/common/common.scss'
- </style>
|