From 4e3e18cdb0d75c098b68353ef8c86cdd7c0f79b2 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期四, 21 八月 2025 15:27:34 +0800
Subject: [PATCH] 111

---
 small-program/pages/demand-hall/demand-hall.vue |   59 ++++++++++++++++++++++++++++++++++++-----------------------
 1 files changed, 36 insertions(+), 23 deletions(-)

diff --git a/small-program/pages/demand-hall/demand-hall.vue b/small-program/pages/demand-hall/demand-hall.vue
index b953303..793717b 100644
--- a/small-program/pages/demand-hall/demand-hall.vue
+++ b/small-program/pages/demand-hall/demand-hall.vue
@@ -11,7 +11,7 @@
 		<view class="index-wu" v-if="!isLogin">
 			<image src="/static/icon/default_login@2x.png" mode="widthFix"></image>
 			<text>鎮ㄨ繕娌℃湁鐧诲綍锛岃鐧诲綍鍚庢煡鐪嬭鍗�</text>
-			<button>鐧诲綍</button>
+			<button @click="toLogin">鐧诲綍</button>
 		</view>
 		
 		<!-- 宸茬櫥闄� -->
@@ -50,7 +50,7 @@
 						<view class="index-list-item-head-r" v-if="item.status === 2">宸叉帴鍗�</view>
 						<view class="index-list-item-head-r" v-if="item.status === 3">杩涜涓�</view>
 						<view class="index-list-item-head-r" v-if="item.status === 2 && item.isUpdate === 1">宸蹭慨鏀癸紝寰呮帴鍗曟柟纭</view>
-						<view class="index-list-item-head-r hui" v-if="item.status === 4">宸插畬鎴�</view>
+						<view class="index-list-item-head-r hui" v-if="item.status === 4 && item.commentStatus !== 0">宸插畬鎴�</view>
 						<view class="index-list-item-head-r hui" v-if="item.status === 99">宸插彇娑�</view>
 						<view class="index-list-item-head-r" v-if="item.status === 4 && item.commentStatus === 0">寰呰瘎浠�</view>
 					</view>
@@ -98,7 +98,7 @@
 							<view class="eidt-close" v-if="[0,1,2].includes(item.status)" @click.stop="orderId = item.id, show = true">鍙栨秷璁㈠崟</view>
 							<view class="eidt-phone" v-if="[2].includes(item.status)">鑱旂郴甯堝倕</view>
 							<view class="eidt-phone" v-if="item.status === 4 && item.commentStatus === 0">璇勪环璁㈠崟</view>
-							<view class="eidt-btn" v-if="[0,1,2].includes(item.status)" @click.stop="jumpEdit(item)">淇敼璁㈠崟</view>
+							<view class="eidt-btn" v-if="[0,1,2].includes(item.status) && item.type !== 2" @click.stop="jumpEdit(item)">淇敼璁㈠崟</view>
 							<view class="eidt-btn" v-if="(item.type === 2 && item.status === 0) ||  (item.type === 2 && item.status === 3)" @click.stop="jumpEdit(item)">缁х画鏀粯</view>
 							<view class="eidt-btn" v-if="item.status === 2" @click.stop="startJobs(item.id)">寮�濮嬩綔涓�</view>
 							<view class="eidt-btn" v-if="item.status === 3" @click.stop="jumpDesc(item)">瀹屾垚骞舵敮浠�</view>
@@ -206,19 +206,21 @@
 		onShow(options) {
 			this.typeViewId = 0
 			if(this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}'){
+				console.log('宸茬櫥闄�')
 				this.isLogin = true
+				if (!this.isOnce) {
+					this.commentStatus = ''
+					this.orderList = []
+					this.next = true
+					this.page = 1
+					this.getOrderList()
+				}
+			} else {
+				this.isLogin = false
+				console.log('鏈櫥闄�')
 			}
 			if (this.userInfo && this.userInfo.useIdentity == 1) {
 				this.typeViewId = 1
-			} else {
-				this.typeViewId = 0
-			}
-			if (!this.isOnce) {
-				this.commentStatus = ''
-				this.orderList = []
-				this.next = true
-				this.page = 1
-				this.getOrderList()
 			}
 		},
 		data() {
@@ -270,15 +272,23 @@
 			this.getOrderList()
 		},
 		methods: {
+			toLogin() {
+				uni.navigateTo({
+					url: '/pages/login/login'
+				})
+			},
 			startJobs(orderId) {
 				this.$u.api.begin({ orderId })
 					.then(res => {
-						this.status = ''
-						this.commentStatus = ''
-						this.orderList = []
-						this.next = true
-						this.page = 1
-						this.getOrderList()
+						if (res.code === 200) {
+							this.status = ''
+							this.commentStatus = ''
+							this.orderList = []
+							this.next = true
+							this.page = 1
+							this.getOrderList()
+						}
+						
 					})
 			},
 			jumpDesc(item) {
@@ -310,11 +320,14 @@
 				this.$u.api.cancelOrder({
 					orderId: this.orderId
 				}).then(res => {
-					this.show = false
-					this.orderList = []
-					this.next = true
-					this.page = 1
-					this.getOrderList()
+					if (res.code === 200) {
+						this.show = false
+						this.orderList = []
+						this.next = true
+						this.page = 1
+						this.getOrderList()
+					}
+					
 				})
 			},
 			phoneCall(phoneNumber) {

--
Gitblit v1.9.3