From e17698d3d99039b1c3532d490687f8492ca87704 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期六, 19 七月 2025 14:53:28 +0800
Subject: [PATCH] 调接口
---
small-program/pages/index/index.vue | 40 +++++++++++++++++++++++++---------------
1 files changed, 25 insertions(+), 15 deletions(-)
diff --git a/small-program/pages/index/index.vue b/small-program/pages/index/index.vue
index 23f4457..9a93d5f 100644
--- a/small-program/pages/index/index.vue
+++ b/small-program/pages/index/index.vue
@@ -223,10 +223,10 @@
</view>
<view class="box-hz-list-item" @click="selectAddress(1)">
<view class="box-hz-list-item-label"><text>鐢ㄥ伐鍦扮偣锛�</text></view>
- <view :class="form.location ? 'box-hz-list-item-val active' :'box-hz-list-item-val'">
+ <view :class="form.address ? 'box-hz-list-item-val active' :'box-hz-list-item-val'">
<view class="box-hz-list-item-val-left">
<image class="icon" src="/static/icon/ic_location@2x.png" mode="widthFix"></image>
- <text>{{form.location ? form.location : '璇烽�夋嫨鐢ㄥ伐鍦扮偣'}}</text>
+ <text>{{form.address ? form.address : '璇烽�夋嫨鐢ㄥ伐鍦扮偣'}}</text>
</view>
<u-icon name="arrow-right" color="#111111" size="16"></u-icon>
</view>
@@ -326,15 +326,6 @@
return this.form.estimatedAccount / 100
}
},
- onShow(options) {
- this.typeViewId = 0
- if(this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}'){
- this.isLogin = true
- }
- if (this.userInfo && this.userInfo.useIdentity == 1) {
- this.typeViewId = 1
- }
- },
data() {
return {
show: false,
@@ -394,7 +385,9 @@
orderList: [],
typeVal: '',
page: 1,
- next: true
+ next: true,
+
+ isOnce: true
}
},
async onLoad() {
@@ -402,6 +395,21 @@
this.getCategoryLists()
this.getOrderList()
this.form.linkPhone = this.userInfo.telephone
+ },
+ onShow(options) {
+ this.typeViewId = 0
+ if(this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}'){
+ this.isLogin = true
+ }
+ if (this.userInfo && this.userInfo.useIdentity == 1) {
+ this.typeViewId = 1
+ }
+ if (!this.isOnce && this.userInfo.useIdentity == 1) {
+ this.page = 1
+ this.next = true
+ this.orderList = []
+ this.getOrderList()
+ }
},
watch: {
typeId: {
@@ -496,6 +504,8 @@
queryLgt: this.longitude
}
}).then(res => {
+ if (res.code !== 200) return;
+ this.isOnce = false
res.data.records.forEach(item => {
// 璁㈤鍗�
if (item.type === 2) {
@@ -689,17 +699,17 @@
// 閲囨憳宸�
if (this.form.workType === 0) {
uni.navigateTo({
- url: `/pages/using-workers/using-workers?days=${form.days}&startDate=${form.startDate}&endDate=${form.endDate}&latitude=${form.latitude}&longitude=${form.longitude}&address=${form.location}&workType=${form.workType}`
+ url: `/pages/using-workers/using-workers?days=${form.days}&startDate=${form.startDate}&endDate=${form.endDate}&latitude=${form.latitude}&longitude=${form.longitude}&address=${form.address}&workType=${form.workType}`
})
// 鍒嗘嫞宸�
} else if (this.form.workType === 1) {
uni.navigateTo({
- url: `/pages/sorting/sorting?days=${form.days}&startDate=${form.startDate}&endDate=${form.endDate}&latitude=${form.latitude}&longitude=${form.longitude}&address=${form.location}&workType=${form.workType}`
+ url: `/pages/sorting/sorting?days=${form.days}&startDate=${form.startDate}&endDate=${form.endDate}&latitude=${form.latitude}&longitude=${form.longitude}&address=${form.address}&workType=${form.workType}`
})
// 鍖呰宸�
} else if (this.form.workType === 2) {
uni.navigateTo({
- url: `/pages/packaging-worker/packaging-worker?days=${form.days}&startDate=${form.startDate}&endDate=${form.endDate}&latitude=${form.latitude}&longitude=${form.longitude}&address=${form.location}&workType=${form.workType}`
+ url: `/pages/packaging-worker/packaging-worker?days=${form.days}&startDate=${form.startDate}&endDate=${form.endDate}&latitude=${form.latitude}&longitude=${form.longitude}&address=${form.address}&workType=${form.workType}`
})
}
// 杩愯揣
--
Gitblit v1.9.3