Files
kangyuan-mobile/pages/increment/index.vue
T
2026-05-26 15:52:30 +08:00

54 lines
1.6 KiB
Vue

<template>
<s-layout title="绿色积分增量系统" leftUrl="/pages/index/index" :goLeft="false">
<view class="p-x-32">
<card_mescroll ref="mescrollRef" @upCallback="getList" :height="height">
<view class="p-y-32 p-x-16 bg24 radius20 m-t-40" v-if="list.length">
<view class="m-b-16" v-for="(v, i) in list" :key="i">
<card_list :data="v" @upDate="upDate"></card_list>
</view>
</view>
</card_mescroll>
</view>
<card_tabBar></card_tabBar>
</s-layout>
</template>
<script setup lang="ts">
import { ref, getCurrentInstance } from 'vue';
import card_mescroll from '@/components/card_pages/card_mescroll.vue';
import card_list from './components/increment/card_list.vue';
import card_tabBar from './components/increment/card_tabBar.vue';
import * as api from '@/sheep/api/increment';
const { proxy } = getCurrentInstance() as any;
let height = ref('100%');
let list = ref([]);
let mescrollRef = ref(null);
const getList = async (mescroll) => {
let res: any = await api.getOrderPage({
pageNo: mescroll?.num || 1,
pageSize: mescroll?.size || 10,
});
let dataList = [];
if (res.code === 0) {
dataList = res.data.list;
if (mescroll?.num == 1) {
list.value = [];
}
list.value = list.value.concat(dataList);
mescrollRef.value.getState(true, dataList.length);
} else {
mescrollRef.value.getState(false);
}
};
const upDate = () => {
if (mescrollRef.value) {
mescrollRef.value.mescrollTrigger();
}
};
</script>
<style scoped lang="scss">
page{
background: #F2F4F7;
}
</style>