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 | 155 ++++++++++++++++++---------------------------------
1 files changed, 54 insertions(+), 101 deletions(-)
diff --git a/small-program/pages/demand-hall/demand-hall.vue b/small-program/pages/demand-hall/demand-hall.vue
index cb5b86a..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>
@@ -95,23 +95,20 @@
<view class="eidt">
<view></view>
<view class="eidt-right">
- <view class="eidt-close" v-if="[0,1,2].includes(item.status)" @click="orderId = item.id, show = true">鍙栨秷璁㈠崟</view>
+ <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="jumpEdit(item)">淇敼璁㈠崟</view>
- <view class="eidt-btn" v-if="(item.type === 2 && item.status === 0) || (item.type === 2 && item.status === 3)" @click="jumpEdit(item)">缁х画鏀粯</view>
- <!-- <view class="eidt-close">鍒犻櫎璁㈠崟</view>
- <view class="eidt-phone">鑱旂郴甯堝倕</view>
- <view class="eidt-phone">璇勪环璁㈠崟</view>
- <view class="eidt-btn">淇敼璁㈠崟</view>
- <view class="eidt-btn">瀹屾垚骞舵敮浠�</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>
</view>
</view>
</view>
</view>
<!-- 鎺ュ崟鏂� -->
<view class="index-list" v-if="typeViewId === 1">
- <view class="index-list-item" v-for="(item, index) in orderList" :key="index">
+ <view class="index-list-item" v-for="(item, index) in orderList" :key="index" @click="jumpDesc(item)">
<view class="index-list-item-head">
<view class="index-list-item-head-l">
<view class="xoam"></view>
@@ -174,90 +171,11 @@
<view class="eidt-tips" v-else></view>
<view class="eidt-right">
- <view class="eidt-close" v-if="item.status === 2" @click="orderId = item.id, show = true">鍙栨秷璁㈠崟</view>
- <view class="eidt-phone" v-if="[2,3].includes(item.status)" @click="phoneCall(item.linkPhone)">鑱旂郴涓氫富</view>
-
- <!-- <view class="eidt-close">鍒犻櫎璁㈠崟</view>
- <view class="eidt-phone">鑱旂郴甯堝倕</view>
- <view class="eidt-phone">璇勪环璁㈠崟</view>
- <view class="eidt-btn">淇敼璁㈠崟</view>
- <view class="eidt-btn">瀹屾垚骞舵敮浠�</view> -->
+ <view class="eidt-close" v-if="item.status === 2" @click.stop="orderId = item.id, show = true">鍙栨秷璁㈠崟</view>
+ <view class="eidt-phone" v-if="[2,3].includes(item.status)" @click.stop="phoneCall(item.linkPhone)">鑱旂郴涓氫富</view>
</view>
</view>
</view>
- <!-- <view class="index-list-item">
- <view class="index-list-item-head">
- <view class="index-list-item-head-l">
- <view class="xoam"></view>
- <text>杩愯揣鍗�-灏忚揣杞�-鍘㈠紡</text>
- <view class="tips1">鑷富鎶㈠崟</view>
- </view>
- <view class="index-list-item-head-r">宸叉帴鍗�</view>
- </view>
- <view class="index-list-item-info">
- 钁¤悇锝�20000鏂わ綔闇�2杈�
- </view>
- <view class="index-list-item-date">
- <image src="/static/icon/order_ic_time@2x.png" mode="widthFix"></image>
- <text>07-26 鑷� 07-27锛�2澶╋級</text>
- </view>
- <view class="address">
- <view class="address-xian"></view>
- <view class="address-row">
- <image src="/static/icon/ic_qidian@2x.png" mode="widthFix"></image>
- <text>闀挎睙瑗胯矾澶ц渶灞辨.鏋楀叕鍥タ闂ㄤ繚瀹夊</text>
- </view>
- <view class="address-row">
- <image src="/static/icon/ic_jingguo@2x.png" mode="widthFix"></image>
- <text>闀挎睙瑗胯矾澶ц渶灞辨.鏋楀叕鍥笢闂ㄤ繚瀹夊</text>
- </view>
- <view class="address-row">
- <image src="/static/icon/ic_zhongdian@2x.png" mode="widthFix"></image>
- <text>瀹夊窘鑾茶姳绉戞妧浜т笟鍥眴绫崇鎶�鏈夐檺鍏徃</text>
- </view>
- </view>
- <view class="index-list-item-price">
- <text>棰勪及锛�</text>
- <text>楼1000.00</text>
- </view>
- <view class="eidt">
- <view></view>
- <view class="eidt-right">
- <view class="eidt-close">鍙栨秷璁㈠崟</view>
- </view>
- </view>
- </view> -->
- <!-- <view class="index-list-item">
- <view class="index-list-item-head">
- <view class="index-list-item-head-l">
- <view class="xoam"></view>
- <text>鐢ㄥ伐鍗�-閲囨憳宸�</text>
- <view class="tips1">鑷富鎶㈠崟</view>
- </view>
- <view class="index-list-item-head-r">寰呮帴鍗�</view>
- </view>
- <view class="index-list-item-info">
- 钁¤悇锝�2000鏂�
- </view>
- <view class="index-list-item-dz">
- <image src="/static/icon/order_ic_location@2x.png" mode="widthFix"></image>
- <text>闀挎睙瑗胯矾澶ц渶灞辨.鏋楀叕鍥タ闂ㄤ繚瀹夊</text>
- </view>
- <view class="index-list-item-dz">
- <image src="/static/icon/order_ic_time@2x.png" mode="widthFix"></image>
- <text>07-26 鑷� 07-27锛�2澶╋級</text>
- </view>
- <view class="index-list-item-price">
- <text>棰勪及锛�</text>
- <text>楼1000.00</text>
- </view>
- <view class="eidt">
- <view></view>
- <view class="eidt-right">
- <view class="eidt-close">鍙栨秷璁㈠崟</view>
- </view>
- </view>
- </view> -->
</view>
</template>
@@ -288,12 +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
}
},
data() {
@@ -324,7 +251,8 @@
next: true,
page: 1,
- orderList: []
+ orderList: [],
+ isOnce: true
};
},
async onLoad() {
@@ -344,6 +272,25 @@
this.getOrderList()
},
methods: {
+ toLogin() {
+ uni.navigateTo({
+ url: '/pages/login/login'
+ })
+ },
+ startJobs(orderId) {
+ this.$u.api.begin({ orderId })
+ .then(res => {
+ if (res.code === 200) {
+ this.status = ''
+ this.commentStatus = ''
+ this.orderList = []
+ this.next = true
+ this.page = 1
+ this.getOrderList()
+ }
+
+ })
+ },
jumpDesc(item) {
uni.navigateTo({
url: `/pages/order-details/order-details?id=${item.id}`
@@ -370,14 +317,17 @@
}
},
cancelOrder() {
- this.$u.api.receiveCancelOrder({
+ 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) {
@@ -398,6 +348,8 @@
queryLgt: this.longitude
}
}).then(res => {
+ if (res.code !== 200) return;
+ this.isOnce = false
res.data.records.forEach(item => {
// 璁㈤鍗�
if (item.type === 2) {
@@ -533,6 +485,7 @@
display: flex;
align-items: center;
justify-content: flex-end;
+ flex-wrap: wrap;
.eidt-close {
width: 160rpx;
height: 64rpx;
--
Gitblit v1.9.3