From e680ee8cc2c34ec2d21c238e8110e4f1501eb8bc Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期五, 24 十一月 2023 11:06:37 +0800
Subject: [PATCH] #

---
 pages/business/pricing/priOnline.vue |   80 +++++++++++++++++++++++++++++++++++++---
 1 files changed, 74 insertions(+), 6 deletions(-)

diff --git a/pages/business/pricing/priOnline.vue b/pages/business/pricing/priOnline.vue
index c9294d0..bb61f88 100644
--- a/pages/business/pricing/priOnline.vue
+++ b/pages/business/pricing/priOnline.vue
@@ -53,7 +53,10 @@
 					type: 'user_id'
 				},
 				falg: true,
-				list: []
+				list: [],
+				curr: 2,
+				reload: false,
+				status: 'more',
 			}
 		},
 		onShow() {
@@ -65,17 +68,19 @@
 				that.user.type = data.key
 				that.falg = false
 			})
-			setTimeout(()=> {
-				// this.getCsmtr1()
-			},50)
 			if (this.falg) {
 				this.getDetail()
 			}
+			this.getPriOnlineList1()
+		},
+		onReachBottom() {
+			this.status = 'more';
 			this.getPriOnlineList()
 		},
 		methods: {
-			getPriOnlineList() {
+			getPriOnlineList1() {
 				let _this = this
+				uni.showLoading({})
 				let param = {curr:1,limit:16,dept_id: 0,user_id: 67}
 				if (_this.user.type == 'user_id') {
 					param = {curr:1,limit:16,user_id: _this.user.id}
@@ -101,8 +106,71 @@
 									k['bgcolor'] = 'color: #1e9cf0'
 								}
 							}
-							_this.list = res.data.records
+							let list = res.data.records
+							_this.list = _this.reload ? list : _this.list.concat(list);
+							if (res.data.records.length == 0) {
+								_this.status = 'noMore'
+							}
 						}
+					},
+					fail(result) {
+						uni.showToast({title: '璇锋眰澶辫触'})
+						setTimeout(() => {
+							uni.reLaunch({
+								url: '../../login/login'
+							});
+						}, 1000);
+					},
+					complete() {
+						uni.hideLoading()
+					}
+				})
+			},
+			getPriOnlineList() {
+				let _this = this
+				uni.showLoading({})
+				let param = {curr:that.curr,limit:4,dept_id: 0,user_id: 67}
+				if (this.user.type == 'user_id') {
+					param = {curr:that.curr,limit:4,user_id: that.user.id}
+				} else if(this.user.type == 'dept_id') {
+					param = {curr:that.curr,limit:4,dept_id: that.user.id}
+				} else {
+					param = {curr:that.curr,limit:4}
+				}
+				uni.request({
+					url: `${_this.baseUrl}/priOnline2/list/auth`,
+					header: { 'token': uni.getStorageSync('token') },
+					data: param,
+					success(res) {
+						res = res.data
+						// return
+						if (res.code === 200) {
+							for (let k of res.data.records) {
+								if (k.settle >= 2) {
+									k['bgcolor'] = 'color: #12d489'
+								} else if (k.settle == 1) {
+									k['bgcolor'] = 'color: #ffbd67'
+								} else if (k.settle == 0) {
+									k['bgcolor'] = 'color: #1e9cf0'
+								}
+							}
+							let list = res.data.records
+							_this.list = _this.reload ? list : _this.list.concat(list);
+							if (res.data.records.length == 0) {
+								_this.status = 'noMore'
+							}
+						}
+					},
+					fail(result) {
+						uni.showToast({title: '璇锋眰澶辫触'})
+						setTimeout(() => {
+							uni.reLaunch({
+								url: '../../login/login'
+							});
+						}, 1000);
+					},
+					complete() {
+						uni.hideLoading()
 					}
 				})
 			},

--
Gitblit v1.9.1