| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <template>
- <view class="common-page" style="padding: 0">
- <PageScroll
- requestStr="/app/orderinfo/getOrderListByUserId"
- @updateList="updateList"
- ref="scrollRef"
- :otherParams="otherParams"
- method="get"
- >
- <view class="list-con" v-if="dataList.length">
- <OrderItem v-for="cell in dataList" :key="cell.id" :item="cell" class="mt-20"> </OrderItem>
- </view>
- </PageScroll>
- </view>
- </template>
- <script setup>
- import { reactive } from "vue";
- import PageScroll from "@/components/pageScroll/index.vue";
- import OrderItem from "@/pages/my/components/orderItem.vue";
- import { ref } from "vue";
- import { onLoad } from "@dcloudio/uni-app";
- const otherParams = ref({
- userId: "",
- });
- const scrollRef = ref(null);
- const refreshList = () => {
- scrollRef.value?.resetUpScroll();
- };
- let dataList = ref([]);
- const updateList = (data, page) => {
- dataList.value = data;
- if (data.length > 0 && page == 1) {
- uni.$u.ttsModule.speak("查询到" + data.length + "条数据");
- }
- if (data.length == 0 && page == 1) {
- uni.$u.ttsModule.speak("未查询到数据");
- }
- };
- // const isbnList = ref([]);
- onLoad((options) => {
- otherParams.value.userId = options.userId;
- refreshList();
- });
- </script>
- <style lang="scss">
- .search-area {
- padding: 24rpx;
- background-color: #ffffff;
- z-index: 9;
- }
- </style>
|