From 237a32aadb51f4c7f51d4734f6e62663f8acde36 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期六, 08 四月 2023 17:02:18 +0800
Subject: [PATCH] 修复多个bug
---
api/publicInterface.js | 78 ++++++++----------
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue | 4
pages/driver-page/appointment/appointment.vue | 8 +
api/request.js | 19 ++--
pages/customer-page/customer-index/customer-index.vue | 27 ++----
pages/tabbar-page/index-tabbar/index-tabbar.vue | 41 ++++++---
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue | 4
pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue | 3
pages/driver-page/driver-index/driver-index.vue | 28 ++----
9 files changed, 100 insertions(+), 112 deletions(-)
diff --git a/api/publicInterface.js b/api/publicInterface.js
index 856e250..e850135 100644
--- a/api/publicInterface.js
+++ b/api/publicInterface.js
@@ -2,13 +2,11 @@
// import login from "../pages/login/login";
-import {
- BaseUrl as wrBaseUrl
-} from '@/api/request.js'
-const BaseUrl = "http://192.168.0.110:9999";
+import { BaseUrl as wrBaseUrl } from '@/api/request.js'
+const BaseUrl = 'http://192.168.31.14:9999'
// const BaseUrl = "http://hesuancj.cn:9999"
-// const BaseUrl = "https://hesuancj.cn:9095"
-// const BaseUrl = "http://192.168.3.119:9999"
+// const BaseUrl = 'https://mx.jzeg.cn:9095'
+// const BaseUrl = 'http://192.168.31.18:9999'
// 鐧诲綍
// function apiLogin({
@@ -63,9 +61,7 @@
carImg,
drivingImg
}) {
- uni.showLoading({
- title: "鍔犺浇涓�..."
- })
+ uni.showLoading({ title: '鍔犺浇涓�...' })
return new Promise((resolve, reject) => {
uni.request({
url: wrBaseUrl + '/wrzs/wx/bindWx',
@@ -83,18 +79,18 @@
drivingImg
},
header: {
- "Authorization": 'Basic c29jaWFsOnNvY2lhbA==', //app:app
+ 'Authorization': 'Basic c29jaWFsOnNvY2lhbA==', //app:app
'content-type': 'application/json',
- "CLIENT_TOC": "Y",
- "isToken": "false"
+ 'CLIENT_TOC': 'Y',
+ 'isToken': 'false'
},
- success: (res) => {
- uni.hideLoading();
+ success: res => {
+ uni.hideLoading()
resolve(res)
},
- fail: (err) => {
- console.log('閿欒', err);
- uni.hideLoading();
+ fail: err => {
+ console.log('閿欒', err)
+ uni.hideLoading()
uni.showModal({
title: '鏈嶅姟鍣ㄩ敊璇�',
icon: null
@@ -114,8 +110,8 @@
}) {
return new Promise((resolve, reject) => {
uni.request({
- url: BaseUrl + "/admin/oauth2/token",
- method: "POST",
+ url: BaseUrl + '/admin/oauth2/token',
+ method: 'POST',
data: {
username,
password,
@@ -123,18 +119,18 @@
scope
},
header: {
- "Authorization": 'Basic c29jaWFsOnNvY2lhbA==', //app:app
+ 'Authorization': 'Basic c29jaWFsOnNvY2lhbA==', //app:app
'content-type': 'application/x-www-form-urlencoded',
- "CLIENT_TOC": "Y",
- "isToken": "false"
+ 'CLIENT_TOC': 'Y',
+ 'isToken': 'false'
},
- success: (res) => {
- uni.hideLoading();
- resolve(res.data);
+ success: res => {
+ uni.hideLoading()
+ resolve(res.data)
},
- fail: (err) => {
- console.log('閿欒', err);
- uni.hideLoading();
+ fail: err => {
+ console.log('閿欒', err)
+ uni.hideLoading()
uni.showToast({
icon: 'none',
title: '鏈嶅姟鍣ㄩ敊璇�'
@@ -146,34 +142,30 @@
// 寰俊灏忕▼搴忎竴閿櫥褰�
-function apiLoginWx({
- code
-}) {
- uni.showLoading({
- title: '鍔犺浇涓�...'
- })
+function apiLoginWx({ code }) {
+ uni.showLoading({ title: '鍔犺浇涓�...' })
return new Promise((resolve, reject) => {
uni.request({
url: BaseUrl + '/admin/oauth2/token',
- method: "POST",
+ method: 'POST',
data: {
grant_type: 'mobile',
mobile: `MINI@${code}`,
code
},
header: {
- "Authorization": 'Basic c29jaWFsOnNvY2lhbA==', //app:app
+ 'Authorization': 'Basic c29jaWFsOnNvY2lhbA==', //app:app
'content-type': 'application/x-www-form-urlencoded',
- "CLIENT_TOC": "Y",
- "isToken": "false"
+ 'CLIENT_TOC': 'Y',
+ 'isToken': 'false'
},
- success: (res) => {
- uni.hideLoading();
+ success: res => {
+ uni.hideLoading()
resolve(res.data)
},
- fail: (err) => {
- console.log('閿欒', err);
- uni.hideLoading();
+ fail: err => {
+ console.log('閿欒', err)
+ uni.hideLoading()
uni.showToast({
icon: 'none',
title: '鏈嶅姟鍣ㄩ敊璇�'
diff --git a/api/request.js b/api/request.js
index 47a6779..be2601b 100644
--- a/api/request.js
+++ b/api/request.js
@@ -78,18 +78,19 @@
500: responseError
}
-// const BaseUrl = "http://192.168.0.120:9997"
-// const webSocketUrl = "ws://192.168.3.119:9997/wrzs/ws/info"
+// const BaseUrl = "http://192.168.31.18:9997"
+// const webSocketUrl = "ws://192.168.31.18:9997/wrzs/ws/info"
-// const BaseUrl = "http://192.168.3.119:9997";
-const BaseUrl = "http://192.168.0.110:9997";
-const webSocketUrl = "ws://192.168.0.110:9997/wrzs/ws/info"
+const BaseUrl = "http://192.168.31.14:9997";
+const webSocketUrl = "ws://192.168.31.14:9997/wrzs/ws/info"
+// // 绾夸笂寮�鍙�
// const BaseUrl = "http://hesuancj.cn:9997";
-// 绾夸笂
-// const BaseUrl = "https://hesuancj.cn:9095";
-// const webSocketUrl = "wss://hesuancj.cn:9095/wrzs/ws/info"
-
// const webSocketUrl = "ws://hesuancj.cn:9997/wrzs/ws/info"
+// // 绾夸笂鐢熶骇
+// const BaseUrl = "https://mx.jzeg.cn:9095";
+// const webSocketUrl = "wss://mx.jzeg.cn:9095/wrzs/ws/info"
+
+
// 璇锋眰鎷︽埅
const fetch = (url, opt) => {
// 鏌ユ壘瀵瑰簲鍦板潃
diff --git a/pages/customer-page/customer-index/customer-index.vue b/pages/customer-page/customer-index/customer-index.vue
index 763db1e..6437192 100644
--- a/pages/customer-page/customer-index/customer-index.vue
+++ b/pages/customer-page/customer-index/customer-index.vue
@@ -9,8 +9,8 @@
寮�
</view>
<view class="card-left__utils">
- <u-button @tap.stop="receiveClick(item)" text="棰嗗彇" type="primary" v-if="item.carNumSurplus != 0" shape="circle"></u-button>
- <u-button text="杞彂" type="primary" @tap.stop="forwardClick(item)" shape="circle" v-if="item.carNumSurplus1 != 0"></u-button>
+ <u-button @tap.stop="receiveClick(item)" text="棰嗗彇" type="primary" v-if="item.carNum != 0" shape="circle"></u-button>
+ <u-button text="杞彂" type="primary" @tap.stop="forwardClick(item)" shape="circle" v-if="item.cars2 != 0"></u-button>
</view>
</template>
<template v-slot:right-top>
@@ -141,9 +141,7 @@
},
// 鑾峰彇鍙戣繍璁″垝鍒楄〃
GetOrderPlan() {
- uni.showLoading({
- title: '鍔犺浇涓�...'
- });
+ uni.showLoading({ title: '鍔犺浇涓�...' });
this.$reqGet('GetOrderPlan').then(res => {
if (res.data) {
this.orderPlanData = res.data;
@@ -178,9 +176,7 @@
popupDetermineClick() {
if (this.receiveNum) {
this.getOrderNum.num = this.receiveNum;
- uni.showLoading({
- title: '鍔犺浇涓�...'
- });
+ uni.showLoading({ title: '鍔犺浇涓�...' });
this.$reqPost('customerGet', this.getOrderNum, 'params').then(res => {
uni.hideLoading();
if (res.code == 0) {
@@ -230,21 +226,15 @@
cars2 = item.cars2;
}
});
- uni.navigateTo({
- url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${name}&code=${code}&cars2=${cars2}`
- });
+ uni.navigateTo({ url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${name}&code=${code}&cars2=${cars2}` });
},
// 鐐瑰嚮鍘嗗彶鎻愮叅鍗曚竴琛岃幏鍙栬鎯�
faYundetail(v) {
- uni.navigateTo({
- url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&cars2=${v.cars2}`
- });
+ uni.navigateTo({ url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&cars2=${v.cars2}` });
},
// 杞彂
forwardClick(obj) {
- uni.navigateTo({
- url: `/pages/public-page/forward/forward?orderPlanId=${obj.id}&carNumSurplus1=${obj.carNumSurplus1}&carNum=${obj.carNum}&cars2=${obj.cars2}`
- });
+ uni.navigateTo({ url: `/pages/public-page/forward/forward?orderPlanId=${obj.id}&carNumSurplus1=${obj.carNumSurplus1}&carNum=${obj.carNum}&cars2=${obj.cars2}` });
}
}
};
@@ -253,6 +243,7 @@
<style lang="scss" scoped>
.scroll-Y {
height: 600rpx;
+ margin-bottom: vww(50);
.more_text {
color: #999;
font-size: 24rpx;
@@ -264,7 +255,7 @@
margin: 0 auto;
// 涓讳綋
.customer-index-body {
- margin-bottom: vww(56);
+ margin-bottom: vww(10);
.card-left__top {
margin-top: vww(26);
text-align: center;
diff --git a/pages/driver-page/appointment/appointment.vue b/pages/driver-page/appointment/appointment.vue
index cf74770..dae7583 100644
--- a/pages/driver-page/appointment/appointment.vue
+++ b/pages/driver-page/appointment/appointment.vue
@@ -96,9 +96,11 @@
this.$reqPost('yuYue', { takeCoalId: this.yuYuePostParams.takeCoalId, yuYueId: this.yuYuePostParams.yuYueId }, 'params').then(res => {
if (res.code == 0) {
this.$u.toast('棰勭害鎴愬姛锛�');
- uni.navigateBack({
- delta: 1
- });
+ let timer = setTimeout(() => {
+ uni.navigateBack({
+ delta: 1
+ });
+ }, 1000);
} else {
this.$u.toast(res.msg ? res.msg : '棰勭害澶辫触');
}
diff --git a/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue b/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
index f4a9bc0..f1d9e15 100644
--- a/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
+++ b/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
@@ -248,9 +248,7 @@
uni.navigateTo({
url: `/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice?takeCoalId=${this.orderPlanId}&sceneId=${
res.data.id
- }&gateCameraId=${res.data.lastEquipmentId}&gateCameraCode=${res.data.lastEquipmentCode}&weighHouseCode=${res.data.code}&getWeightHouseObj=${JSON.stringify(
- this.getWeightHouseObj
- )}`
+ }&gateCameraId=${res.data.lastEquipmentId}&gateCameraCode=${res.data.lastEquipmentCode}&weighHouseCode=${res.data.code}`
});
} else {
this.$u.toast('鏈湪纾呮埧锛岃鍓嶅線纾呮埧鍚庡啀璇曪紒锛�');
diff --git a/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue b/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
index 228ec16..391fe04 100644
--- a/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
+++ b/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
@@ -76,8 +76,6 @@
},
data() {
return {
- // 鏄惁鍙偣鍑绘斁绌�
- isEvacuation: false,
weighData: {
//纭绉伴噸鎺ュ彛鍙傛暟
deptId: '',
@@ -188,7 +186,7 @@
if (this.weighList.skin ? (this.weighList.skin < this.realTimeWeigh ? true : false) : true) {
this.saveWeigh();
} else {
- this.$u.toast('姣涢噸涓峲鑳藉皬浜庣毊閲�');
+ this.$u.toast('姣涢噸涓嶈兘灏忎簬鐨噸');
this.isConfirmWeighLoading = false;
}
} else {
diff --git a/pages/driver-page/driver-index/driver-index.vue b/pages/driver-page/driver-index/driver-index.vue
index e241d3e..50204f2 100644
--- a/pages/driver-page/driver-index/driver-index.vue
+++ b/pages/driver-page/driver-index/driver-index.vue
@@ -67,7 +67,7 @@
<!-- 寰呴绾︽彁鐓ゅ崟 -->
<view class="daiYuYue" v-for="(item, index) in driverBillOfLoadingData.list3" :key="index">
<view class="daiYuYueTop">
- <text class="tmcode">鎻愮叅鍗曠紪鍙凤細{{ item.code }}</text>
+ <view class="tmcode">鎻愮叅鍗曠紪鍙凤細{{ item.code }}</view>
</view>
<view class="daiYuYueTable">
<!-- <view>{{ item.deptName }}</view>
@@ -141,7 +141,6 @@
watch: {
indexdriverBillOfLoadingData: {
handler(v) {
- console.log(v, '鍒锋柊涔嬪悗鐨勫徃鏈洪椤�');
this.driverBillOfLoadingData = v;
},
deep: true,
@@ -174,7 +173,6 @@
title: '鍔犺浇涓�...'
});
this.$reqGet('qiangDanList').then(res => {
- console.log(res, '鍙告満棣栭〉');
uni.hideLoading();
this.driverBillOfLoadingData = res.data;
});
@@ -292,15 +290,13 @@
background-color: #f5f5f5;
height: vww(60);
padding-left: vww(12);
- line-height: vww(40);
+ line-height: vww(31);
border: vww(1) solid #eeeeee;
font-weight: 400;
- // .tmcode {
- // overflow: hidden;
- // text-overflow: ellipsis;
- // white-space: nowrap;
- // width: 100%;
- // }
+ .tmcode {
+ word-break: break-all;
+ width: 100%;
+ }
}
&Table {
.uni-table {
@@ -334,15 +330,13 @@
background-color: #f5f5f5;
height: vww(60);
padding-left: vww(12);
- line-height: vww(40);
+ line-height: vww(31);
border: vww(1) solid #eeeeee;
font-weight: 400;
- // .tmcode {
- // overflow: hidden;
- // text-overflow: ellipsis;
- // white-space: nowrap;
- // width: 100%;
- // }
+ .tmcode {
+ word-break: break-all;
+ width: 100%;
+ }
}
&Center {
border: vww(1) solid #eeeeee;
diff --git a/pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue b/pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue
index 226a699..8537405 100644
--- a/pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue
+++ b/pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue
@@ -179,6 +179,7 @@
<style lang="scss" scoped>
.scroll-Y {
height: 600rpx;
+ margin-bottom: vww(50);
.more_text {
color: #999;
font-size: 24rpx;
@@ -190,7 +191,7 @@
margin: 0 auto;
// 涓讳綋
.freightForwarder-index-body {
- margin-bottom: vww(56);
+ margin-bottom: vww(10);
// 鍗$墖鏍峰紡
.card-left__top {
diff --git a/pages/tabbar-page/index-tabbar/index-tabbar.vue b/pages/tabbar-page/index-tabbar/index-tabbar.vue
index 9a4b61a..7d5114a 100644
--- a/pages/tabbar-page/index-tabbar/index-tabbar.vue
+++ b/pages/tabbar-page/index-tabbar/index-tabbar.vue
@@ -25,8 +25,16 @@
},
//棣栭〉涓嬫媺鍒锋柊
onPullDownRefresh() {
- uni.showLoading({
- title: '鍔犺浇涓�...'
+ uni.showLoading({ title: '鍔犺浇涓�...' });
+ // 鑾峰彇鍘嗗彶鎻愮叅鍗�
+ this.$reqGet('getJhOrderPlanDataPage', { current: 1, size: 10 }).then(res => {
+ if (res.data.records) {
+ this.indexHistoryCoalData = res.data.records;
+ uni.hideLoading();
+ uni.stopPullDownRefresh();
+ } else {
+ this.$u.toast('鍔犺浇澶辫触');
+ }
});
// 瀹㈡埛鑾峰彇鏃ヨ鍒�
if (this.roleType == 1) {
@@ -35,28 +43,31 @@
this.orderPlanDataStore = res.data;
uni.hideLoading();
uni.stopPullDownRefresh();
+ } else {
+ this.$u.toast('鍔犺浇澶辫触');
}
});
} else if (this.roleType == 2) {
this.$reqGet('huoDaiList').then(res => {
- this.indexHuoDaiOrderPlanData = res.data;
- uni.hideLoading();
- uni.stopPullDownRefresh();
- });
- // 鑾峰彇鍘嗗彶鎻愮叅鍗�
- this.$reqGet('getJhOrderPlanDataPage', { current: 1, size: 10 }).then(res => {
- if (res.data.records) {
- this.indexHistoryCoalData = res.data.records;
+ if (res.data) {
+ this.indexHuoDaiOrderPlanData = res.data;
uni.hideLoading();
uni.stopPullDownRefresh();
+ } else {
+ this.$u.toast('鍔犺浇澶辫触');
}
});
} else if (this.roleType == 3) {
- this.$reqGet('qiangDanList').then(res => {
- this.indexdriverBillOfLoadingData = res.data;
- uni.hideLoading();
- uni.stopPullDownRefresh();
- });
+ if (res.data) {
+ this.$reqGet('qiangDanList').then(res => {
+ this.indexdriverBillOfLoadingData = res.data;
+ uni.hideLoading();
+ uni.stopPullDownRefresh();
+ });
+ } else {
+ this.$u.toast('鍔犺浇澶辫触');
+ }
+ s;
}
},
onLoad() {
--
Gitblit v1.9.1