From eb9ae89c3e9f66fe5d0f39092a41e5c09bd86fc6 Mon Sep 17 00:00:00 2001
From: 付延余 <f-yanyu@outlook.com>
Date: 星期五, 24 三月 2023 13:40:02 +0800
Subject: [PATCH] 获取司机定位微信接口签到,货代首页列表详情
---
pages/login/userPassword.vue | 5
pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock.vue | 62 ++++++-----
pages/login/login.vue | 2
manifest.json | 156 ++++++++++++++++--------------
pages.json | 3
pages/customer-page/customer-index/customer-index.vue | 1
pages/driver-page/driver-index/bill-of-lading-details/coal-pick-up-bill/coal-pick-up-bill.vue | 18 ++-
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue | 10 +
pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue | 8 +
pages/customer-page/customer-my/customer-my.vue | 15 +-
10 files changed, 154 insertions(+), 126 deletions(-)
diff --git a/manifest.json b/manifest.json
index c97e162..f2ef2b6 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,75 +1,83 @@
{
- "name" : "unattended-app",
- "appid" : "__UNI__103882A",
- "description" : "",
- "versionName" : "1.0.0",
- "versionCode" : "100",
- "transformPx" : false,
- /* 5+App鐗规湁鐩稿叧 */
- "app-plus" : {
- "usingComponents" : true,
- "nvueStyleCompiler" : "uni-app",
- "compilerVersion" : 3,
- "splashscreen" : {
- "alwaysShowBeforeRender" : true,
- "waiting" : true,
- "autoclose" : true,
- "delay" : 0
- },
- /* 妯″潡閰嶇疆 */
- "modules" : {},
- /* 搴旂敤鍙戝竷淇℃伅 */
- "distribute" : {
- /* android鎵撳寘閰嶇疆 */
- "android" : {
- "permissions" : [
- "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
- "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
- "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
- "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
- "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
- "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
- "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
- "<uses-permission android:name=\"android.permission.CAMERA\"/>",
- "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
- "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
- "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
- "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
- "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
- "<uses-feature android:name=\"android.hardware.camera\"/>",
- "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
- ]
- },
- /* ios鎵撳寘閰嶇疆 */
- "ios" : {},
- /* SDK閰嶇疆 */
- "sdkConfigs" : {}
- }
- },
- /* 蹇簲鐢ㄧ壒鏈夌浉鍏� */
- "quickapp" : {},
- /* 灏忕▼搴忕壒鏈夌浉鍏� */
- "mp-weixin" : {
- "appid" : "wx4a62fc1684c429a9",
- "setting" : {
- "urlCheck" : false,
- "es6" : true,
- "minified" : true,
- "postcss" : false
- },
- "usingComponents" : true
- },
- "mp-alipay" : {
- "usingComponents" : true
- },
- "mp-baidu" : {
- "usingComponents" : true
- },
- "mp-toutiao" : {
- "usingComponents" : true
- },
- "uniStatistics" : {
- "enable" : false
- },
- "vueVersion" : "2"
-}
+ "name": "unattended-app",
+ "appid": "__UNI__103882A",
+ "description": "",
+ "versionName": "1.0.0",
+ "versionCode": "100",
+ "transformPx": false,
+ /* 5+App鐗规湁鐩稿叧 */
+ "app-plus": {
+ "usingComponents": true,
+ "nvueStyleCompiler": "uni-app",
+ "compilerVersion": 3,
+ "splashscreen": {
+ "alwaysShowBeforeRender": true,
+ "waiting": true,
+ "autoclose": true,
+ "delay": 0
+ },
+ /* 妯″潡閰嶇疆 */
+ "modules": {},
+ /* 搴旂敤鍙戝竷淇℃伅 */
+ "distribute": {
+ /* android鎵撳寘閰嶇疆 */
+ "android": {
+ "permissions": [
+ "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+ "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+ "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+ "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+ "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+ "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+ "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+ "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+ "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+ "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+ "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+ "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+ "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+ "<uses-feature android:name=\"android.hardware.camera\"/>",
+ "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+ ]
+ },
+ /* ios鎵撳寘閰嶇疆 */
+ "ios": {},
+ /* SDK閰嶇疆 */
+ "sdkConfigs": {}
+ }
+ },
+ /* 蹇簲鐢ㄧ壒鏈夌浉鍏� */
+ "quickapp": {},
+ /* 灏忕▼搴忕壒鏈夌浉鍏� */
+ "mp-weixin": {
+ "appid": "wx4a62fc1684c429a9",
+ "permission": {
+ "scope.userFuzzyLocation": {
+ "desc": "浣犵殑浣嶇疆淇℃伅灏嗙敤浜庡皬绋嬪簭浣嶇疆鎺ュ彛鐨勬晥鏋滃睍绀�"
+ }
+ },
+ "requiredPrivateInfos": [
+ "getFuzzyLocation"
+ ],
+ "setting": {
+ "urlCheck": false,
+ "es6": true,
+ "minified": true,
+ "postcss": false
+ },
+ "usingComponents": true
+ },
+ "mp-alipay": {
+ "usingComponents": true
+ },
+ "mp-baidu": {
+ "usingComponents": true
+ },
+ "mp-toutiao": {
+ "usingComponents": true
+ },
+ "uniStatistics": {
+ "enable": false
+ },
+ "vueVersion": "2"
+}
\ No newline at end of file
diff --git a/pages.json b/pages.json
index 2d780f8..200f5c4 100644
--- a/pages.json
+++ b/pages.json
@@ -153,7 +153,6 @@
"navigationBarTitleText": "鐭垮満绛惧埌",
"enablePullDownRefresh": false
}
-
}
],
"tabBar": {
@@ -205,4 +204,4 @@
"query": "" //鍚姩鍙傛暟锛屽湪椤甸潰鐨刼nLoad鍑芥暟閲岄潰寰楀埌
}]
}
-}
+}
\ No newline at end of file
diff --git a/pages/customer-page/customer-index/customer-index.vue b/pages/customer-page/customer-index/customer-index.vue
index d35997e..58d8c57 100644
--- a/pages/customer-page/customer-index/customer-index.vue
+++ b/pages/customer-page/customer-index/customer-index.vue
@@ -192,7 +192,6 @@
},
// 鎻愮叅鍗曡鎯�
cardBodyClick(name) {
- console.log('鎻愮叅鍗曡鎯�', name);
let code = null;
this.orderPlanData.forEach(item => {
if (item.id == name) {
diff --git a/pages/customer-page/customer-my/customer-my.vue b/pages/customer-page/customer-my/customer-my.vue
index c7ea67c..fb69950 100644
--- a/pages/customer-page/customer-my/customer-my.vue
+++ b/pages/customer-page/customer-my/customer-my.vue
@@ -131,25 +131,27 @@
},
methods: {
init() {
- uni.showLoading({
- title: '鍔犺浇涓�...'
- });
this.getAllHuoDaiByCustomerId();
this.getFleet();
- uni.hideLoading();
},
// 鑾峰彇璐т唬鍒楄〃
getAllHuoDaiByCustomerId() {
+ uni.showLoading({
+ title: '鍔犺浇涓�...'
+ });
this.$reqGet('getAllHuoDaiByCustomerId').then(res => {
+ uni.hideLoading();
this.huoDaiData = res.data;
- console.log('璐т唬鍒楄〃', res);
});
},
// 鑾峰彇杞﹂槦鍒楄〃
getFleet() {
+ uni.showLoading({
+ title: '鍔犺浇涓�...'
+ });
this.$reqGet('getFleet').then(res => {
+ uni.hideLoading();
this.fleetData = res.data;
- console.log('杞﹂槦鍒楄〃', res);
});
},
// 娣诲姞璐т唬
@@ -160,7 +162,6 @@
},
// 娣诲姞杞﹂槦
addFleet() {
- console.log('娣诲姞杞﹂槦');
this.updateGroupShow = true;
},
addNewFleetPopupClose() {
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 f829724..0080b04 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
@@ -52,6 +52,7 @@
yyId: null,
dayRZ: [],
coalDetailsData: {}, // 鎻愮叅鍗曡鎯�
+ currentPageCoalStatus:0,// 褰撳墠椤甸潰鎻愮叅鍗曠姸鎬�
// 鑾峰彇鎵�鍦ㄧ鎴垮弬鏁�
getWeightHouseObj: {
deptId: '',
@@ -76,7 +77,8 @@
openId: null,
openName: ''
},
- coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅鍦�', '鍑虹叅浠�'] // 鐘舵��
+ coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅鍦�', '鍑虹叅浠�'] ,// 鐘舵��
+
};
},
onShow() {
@@ -128,6 +130,8 @@
// 鑾峰彇瀹㈡湇openId鍙傛暟璧嬪��
this.getServiceOpenid.deptId = this.coalDetailsData.deptId;
this.getServiceOpenid.filedId = this.coalDetailsData.filedId;
+ // 鑾峰彇鎻愮叅鍗曠姸鎬�
+ this.currentPageCoalStatus = this.coalDetailsData.status
}
});
},
@@ -148,7 +152,7 @@
// 绛惧埌
arriveClick() {
uni.navigateTo({
- url: `/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock?orderPlanId=${this.orderPlanId}`
+ url: `/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock?orderPlanId=${this.orderPlanId}&coalStatus=${this.currentPageCoalStatus}`
});
},
// 鍏ュ満鐢宠
@@ -238,7 +242,7 @@
margin: vww(20);
margin-bottom: vww(10);
height: 40%;
- font-size: vww(16);
+ font-size: vww(18);
font-weight: 600;
view {
margin-bottom: vww(10);
diff --git a/pages/driver-page/driver-index/bill-of-lading-details/coal-pick-up-bill/coal-pick-up-bill.vue b/pages/driver-page/driver-index/bill-of-lading-details/coal-pick-up-bill/coal-pick-up-bill.vue
index 286b841..b080272 100644
--- a/pages/driver-page/driver-index/bill-of-lading-details/coal-pick-up-bill/coal-pick-up-bill.vue
+++ b/pages/driver-page/driver-index/bill-of-lading-details/coal-pick-up-bill/coal-pick-up-bill.vue
@@ -3,13 +3,14 @@
<view class="driver" style="background:url(../../../../../static/image/coalBackgroud/coal-background.png) no-repeat;background-size:100% 100%;">
<view class="driver-coalOne">鐢靛瓙鎻愮叅鍗�</view>
<view class="driver-coalTwo">
- <view class="">{{ coalData.deptName || '鏆傛棤鎵�灞炵熆' }}</view>
- <view class="">{{ coalData.coalName || '鏆傛棤鐓ょ' }}</view>
- <view class="">{{ coalData.carNo || '鏆傛棤杞︾墝' }}</view>
+ <view>{{ coalData.code || '鏆傛棤璁㈠崟缂栧彿' }}</view>
+ <view>{{ coalData.deptName || '鏆傛棤鎵�灞炵熆' }}</view>
+ <view>{{ coalData.coalName || '鏆傛棤鐓ょ' }}</view>
+ <view>{{ coalData.carNo || '鏆傛棤杞︾墝' }}</view>
</view>
<view class="driver-coalThree">
- <view class="">{{ coalData.customerName || '鏆傛棤鍗曚綅' }}</view>
- <view class="">{{ coalData.yuYueTime || '鏆傛棤鏃堕棿' }}</view>
+ <view>{{ coalData.customerName || '鏆傛棤鍗曚綅' }}</view>
+ <view>{{ coalData.yuYueTime ? coalData.yuYueTime.slice(0, 10) + ' ' + coalData.yuYueTime.slice(11, 22) : '鏆傛棤鏃堕棿' }}</view>
</view>
<view class="driver-coalFour"><image src="@/static/logo.gif" mode=""></image></view>
</view>
@@ -85,9 +86,12 @@
view:nth-child(3) {
margin-top: vww(15);
}
+ view:nth-child(4) {
+ margin-top: vww(15);
+ }
}
&-coalThree {
- margin-top: vww(76);
+ margin-top: vww(46);
font-size: vww(18);
font-family: Source Han Sans CN, Source Han Sans CN-Bold;
font-weight: 700;
@@ -98,7 +102,7 @@
}
}
&-coalFour {
- margin: vww(68) 0 0 45.5%;
+ margin: vww(58.5) 0 0 45.5%;
image {
width: vww(35);
height: vww(35);
diff --git a/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock.vue b/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock.vue
index 38d397c..4c20882 100644
--- a/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock.vue
+++ b/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock.vue
@@ -5,7 +5,7 @@
<view class="punchTheClock_container">
<view class="punchTheClock_btn" @click="arrive">
<view>
- <p>绛惧埌/鎵撳崱</p>
+ <p>{{ coalStatus == 2 ? '宸茬鍒�' : '绛惧埌/鎵撳崱' }}</p>
<p>{{ nowTime }}</p>
</view>
</view>
@@ -21,13 +21,15 @@
import { todayDate } from '@/utils/util.js';
export default {
onLoad(params) {
- if (params.orderPlanId) {
+ if (params.orderPlanId && params.coalStatus) {
this.punchTheClockObj.id = params.orderPlanId;
+ this.coalStatus = params.coalStatus;
}
},
data() {
return {
nowTime: '',
+ coalStatus: 0,
punchTheClockObj: {
latitude: null,
longitude: null,
@@ -36,38 +38,39 @@
};
},
onShow() {
- this.todayDate();
- // 鑾峰彇鏉冮檺淇℃伅
- wx.getSetting({
- success(res) {
- if (!res.authSetting['scope.userFuzzyLocation']) {
- wx.authorize({
- scope: 'scope.userFuzzyLocation',
- success(res) {
- console.log(res);
- if (res.errMsg == 'authorize:ok') {
- // 鑾峰彇浣嶇疆淇℃伅
- this.getFuzzyLocation();
- }
- }
- });
- } else {
- this.getFuzzyLocation();
- }
- },
- fail() {
- console.log('鑾峰彇澶辫触');
- }
- });
+ this.getSetting(); //鑾峰彇鎺堟潈
+ this.getFuzzyLocation(); //鑾峰彇浣嶇疆
+ this.todayDate(); //褰撳墠鏃堕棿
},
methods: {
+ getSetting() {
+ // 鑾峰彇鏉冮檺淇℃伅
+ wx.getSetting({
+ success(res) {
+ if (!res.authSetting['scope.userFuzzyLocation']) {
+ wx.authorize({
+ scope: 'scope.userFuzzyLocation',
+ success(res) {
+ uni.showToast({
+ title: '鎺堟潈鎴愬姛锛�'
+ });
+ }
+ });
+ }
+ },
+ fail() {
+ console.log('鑾峰彇澶辫触');
+ }
+ });
+ },
getFuzzyLocation() {
+ let that = this;
wx.getFuzzyLocation({
type: 'wgs84',
success(res) {
- console.log(res, '鑾峰彇浣嶇疆');
- this.punchTheClockObj.latitude = res.latitude;
- this.punchTheClockObj.longitude = res.longitude;
+ console.log(res, '鑾峰彇浣嶇疆', that);
+ that.punchTheClockObj.latitude = res.latitude;
+ that.punchTheClockObj.longitude = res.longitude;
}
});
},
@@ -120,6 +123,9 @@
display: flex;
justify-content: center;
align-items: center;
+ p{
+ text-align: center;
+ }
}
.punchTheClock_text {
display: flex;
diff --git a/pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue b/pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue
index 18699c5..eaec294 100644
--- a/pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue
+++ b/pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue
@@ -57,8 +57,14 @@
});
},
cardBodyClick(id) {
+ let code = null;
+ this.orderPlanData.forEach(item => {
+ if (item.id == id) {
+ code = item.code;
+ }
+ });
uni.navigateTo({
- url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${id}`
+ url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${id}&code=${code}`
});
},
// 杞彂
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 944adea..d87737f 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -92,7 +92,6 @@
});
this.$nextTick(() => {
apiLoginWx({ code: uni.getStorageSync('openid') }).then(res => {
- uni.hideLoading();
if (res.code != 1) {
this.$u.toast('鎭枩鎮紝鐧诲綍鎴愬姛锛�');
// 鐧婚檰鎴愬姛锛屽瓨鍌ㄧ浉鍏充俊鎭�
@@ -104,6 +103,7 @@
this.setUserTabbar(res.data.type);
uni.setStorageSync('roleType', res.data.type);
setCustomerId(res.data.customerid);
+ uni.hideLoading();
//璺宠浆椤甸潰
this.$nextTick(() => {
redirectHome();
diff --git a/pages/login/userPassword.vue b/pages/login/userPassword.vue
index 8886b53..06e0f79 100644
--- a/pages/login/userPassword.vue
+++ b/pages/login/userPassword.vue
@@ -43,8 +43,9 @@
},
data() {
return {
- // username: '12222222222', // 瀹㈡埛
- username: '13333333332',// 鍙告満
+ username: '12222222222', // 瀹㈡埛
+ // username:'13333333331',//璐т唬
+ // username: '13333333332',// 鍙告満
password: '123456',
remember: true,
baseUrl: ''
--
Gitblit v1.9.1