From e6dccb3b16847f4bda31f305113070596677caff Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期五, 23 八月 2024 17:13:25 +0800
Subject: [PATCH] -

---
 src/pages/order/order.vue |  111 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 106 insertions(+), 5 deletions(-)

diff --git a/src/pages/order/order.vue b/src/pages/order/order.vue
index d87e150..00ed0b9 100644
--- a/src/pages/order/order.vue
+++ b/src/pages/order/order.vue
@@ -3,30 +3,131 @@
 		<up-sticky bgColor="#fff">
 			<up-subsection :list="list" :current="current4" activeColor="#f9ae3d"
 				@change="sectionChange"></up-subsection>
-			
 		</up-sticky>
+		<view class="full-page">
+			<view class="listrecord c-p-20" v-for="(item,index) in listO.orderList">
+				<view class="coreshop-ff chuany-bradius20">
+					<view class="c-p-26">
+						<view class="chuany-flex chuany-justify-between">
+							<text class="chuany-font34 chuany-text-bold">
+								{{item.orderName}}
+							</text>
+							<view class="chuany-flex chuany-justify-between">
+								<!-- <text class="c-p-r-20">
+								
+							</text> -->
+								<up-tag class='c-m-r-10' text="宸茬粨绠�" shape="circle" type="success" plain plainFill
+									size='mini'></up-tag>
+								<up-tag text="宸茬‘璁�" shape="circle" type="success" plain plainFill size='mini'></up-tag>
+							</view>
+						</view>
+						<view class="chuany-flex chuany-justify-between c-p-t-20">
+							<view class="chuany-width50">
+								<text>
+									鏂瑰紡锛氳鏃�
+								</text>
+							</view>
+							<text class="chuany-width50">
+								宸ヤ环锛�17鍏�/灏忔椂
+							</text>
+						</view>
+					</view>
+				</view>
+			</view>
+			<up-loadmore :status="status" />
+		</view>
 		<up-empty mode="order" icon="http://cdn.uviewui.com/uview/empty/order.png">
 		</up-empty>
+
 	</view>
 </template>
 
 <script setup>
 	import {
+		onLoad,
+		onShow,
+		onReachBottom
+	} from "@dcloudio/uni-app";
+	import {
 		reactive,
-		ref
+		ref,
+		getCurrentInstance
 	} from 'vue';
+	const {
+		$upload,
+		$api,
+		$util,
+		$db
+	} = getCurrentInstance().appContext.config.globalProperties
 	const state = reactive({
-		currentIdex: 0
+		pageIndex: 1,
+		pageSize: 20,
 	})
+	let status = ref('loadmore')
+	let totalPages = ref(0)
+	let listO = reactive({
+		orderList:[]
+	})
+	onReachBottom(() => {
+			if (this.loadStatus != 'nomore') {
+				PostMyListPageCompany();
+			}
+		}),
+		onLoad(() => {
+			$api.PostMyListPageCompany(state).then(res => {
+				console.log(res, '---');
+			})
+		})
 	const current4 = ref(0);
 	const list = ref(['鍏ㄩ儴', '杩涜涓�', '宸插畬鎴�', '宸插彇娑�']);
-	
 
-	const sectionChange=(index)=> {
+
+	const sectionChange = (index) => {
 		current4.value = index;
+	}
+	const PostMyListPageCompany = () => {
+		let data = {
+			pageIndex: state.pageIndex,
+			pageSize: state.pageSize,
+		}
+		this.loadStatus = 'loading';
+		$api.PostMyListPageCompany(data).then(res => {
+			if (res.code == 1) {
+				if(state.pageIndex==1){
+					listO.orderList = res.data.items
+				}else{
+					listO.orderList.concat(...res.data.items)
+				}
+				// totalPages.value = res.data.totalCount
+				// 鏍规嵁count鏁伴噺鍒ゆ柇鏄惁杩樻湁鏁版嵁
+				if (res.data.totalCount > listO.orderList.length) {
+					status.value = 'loadmore';
+					state.pageIndex++
+				} else {
+					// 鏁版嵁宸插姞杞藉畬姣�
+					status.value = 'nomore';
+				}
+			} else {
+				// _that.$refs.uToast.show({ message: res.msg, type: 'error' });
+			}
+		})
 	}
 </script>
 
 <style>
+	.content {
+		/* width: 100%; */
+		box-sizing: border-box;
+	}
 
+	.bgblue {
+		background-color: #4e96f5;
+		border-radius: 20rpx 20rpx 0 0;
+		color: #fff;
+	}
+
+	.listrecord {
+		width: 100%;
+		box-sizing: border-box;
+	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.1