From 904436a616ca08fc95e1cbbbd13059835ef37e72 Mon Sep 17 00:00:00 2001 From: liukangdong <898885815@qq.com> Date: 星期四, 23 一月 2025 13:51:37 +0800 Subject: [PATCH] ll --- h5/pages/waybill/waybillDetail.vue | 75 ++++ h5/pages/staffLogin/login.vue | 21 h5/utils/config.js | 4 h5/pages/driver/index.vue | 2 h5/pages/waybill/home.vue | 418 +++++++++++++------------ h5/pages/staff/index.vue | 2 screen/src/router/index.js | 4 screen/src/views/SecurityControl.vue | 2 h5/pages/wdata/home.vue | 56 +- h5/pages/driver/taskDetail.vue | 6 h5/pages/waybill/list.vue | 4 screen/src/views/LogisticsCenter.vue | 35 + h5/pages/driver/login.vue | 297 +++++++++--------- h5/pages/wdata/list.vue | 2 14 files changed, 521 insertions(+), 407 deletions(-) diff --git a/h5/pages/driver/index.vue b/h5/pages/driver/index.vue index 69e2736..2d430e1 100644 --- a/h5/pages/driver/index.vue +++ b/h5/pages/driver/index.vue @@ -2,7 +2,7 @@ <view class="main_app"> <view class="title_wrap"> <view class="name">{{ driverInfo.realname || driverInfo.username }}锛屾杩庣櫥褰曪綖</view> - <view class="btn" @click="loginOut">閫�鍑虹櫥褰�</view> + <view class="btn" @click="loginOut">璐﹀彿瑙g粦</view> </view> <!-- --> <view class="banner_wrap"> diff --git a/h5/pages/driver/login.vue b/h5/pages/driver/login.vue index 28c5d00..ed090be 100644 --- a/h5/pages/driver/login.vue +++ b/h5/pages/driver/login.vue @@ -3,43 +3,42 @@ <image class="login_bg" src="@/static/login_bg@2x.png" mode="widthFix" /> <image class="login_logo" src="@/static/logo@2x.png" mode="widthFix" /> <view class="login_title">瀹夋嘲鐗╂祦鏅烘収鍥尯</view> - <view class="login_title">鐗╂祦杞﹀徃鏈虹櫥褰�</view> - <view class="tabs"> - <view class="tab" @click="tabsClick(0)" :class="{active: activeTab == 0 }"><view>璐﹀彿鐧诲綍</view><view class="bor"></view></view> - <view class="tab" @click="tabsClick(1)" :class="{active: activeTab == 1 }"><view>楠岃瘉鐮佺櫥褰�</view><view class="bor"></view></view> + <view class="login_title">鐗╂祦杞﹀徃鏈虹櫥褰�</view> + <view class="tabs"> + <view class="tab" @click="tabsClick(0)" :class="{active: activeTab == 0 }"> + <view>璐﹀彿鐧诲綍</view> + <view class="bor"></view> + </view> + <view class="tab" @click="tabsClick(1)" :class="{active: activeTab == 1 }"> + <view>楠岃瘉鐮佺櫥褰�</view> + <view class="bor"></view> + </view> </view> <view class="login_list"> - <template v-if="activeTab == 0"> - <view class="login_list_item"> - <image src="@/static/login_ic_phone@2x.png" mode="widthFix" /> - <input v-model="form.username" type="tel" @focus="showKeyboard = true" @blur="showKeyboard = false" - maxlength="18" placeholder="璐﹀彿" /> - </view> - <view class="login_list_item"> - <image src="@/static/login_ic_password@2x.png" mode="widthFix" /> - <input v-model="form.password" @focus="showKeyboard = true" @blur="showKeyboard = false" type="password" - placeholder="瀵嗙爜" /> - </view> - </template> - <template v-else> - <view class="login_list_item"> - <image src="@/static/login_ic_phone@2x.png" mode="widthFix" /> - <input v-model="form.phone" type="tel" @focus="showKeyboard = true" @blur="showKeyboard = false" - :maxlength="18" placeholder="鎵嬫満鍙�" /> - </view> - <view class="login_list_item"> - <image src="@/static/ic_captcha.png" mode="widthFix"></image> - <input - v-model="form.code" - placeholder="璇疯緭鍏ラ獙璇佺爜" - :maxlength="6" - type="number" - /> - <text class="captcha" v-if="countDown == 0" @click="initCaptcha" - >鑾峰彇楠岃瘉鐮�</text - > - <text class="placeholder9" v-else>{{ countDown }}</text> - </view> + <template v-if="activeTab == 0"> + <view class="login_list_item"> + <image src="@/static/login_ic_phone@2x.png" mode="widthFix" /> + <input v-model="form.username" type="tel" @focus="showKeyboard = true" @blur="showKeyboard = false" + maxlength="18" placeholder="璐﹀彿" /> + </view> + <view class="login_list_item"> + <image src="@/static/login_ic_password@2x.png" mode="widthFix" /> + <input v-model="form.password" @focus="showKeyboard = true" @blur="showKeyboard = false" type="password" + placeholder="瀵嗙爜" /> + </view> + </template> + <template v-else> + <view class="login_list_item"> + <image src="@/static/login_ic_phone@2x.png" mode="widthFix" /> + <input v-model="form.phone" type="tel" @focus="showKeyboard = true" @blur="showKeyboard = false" + :maxlength="18" placeholder="鎵嬫満鍙�" /> + </view> + <view class="login_list_item"> + <image src="@/static/ic_captcha.png" mode="widthFix"></image> + <input v-model="form.code" placeholder="璇疯緭鍏ラ獙璇佺爜" :maxlength="6" type="number" /> + <text class="captcha" v-if="countDown == 0" @click="initCaptcha">鑾峰彇楠岃瘉鐮�</text> + <text class="placeholder9" v-else>{{ countDown }}</text> + </view> </template> </view> <view class="login_btn"> @@ -58,9 +57,9 @@ import { driverLogin, loginCaptcha, - getUserInfo, - sendSms, - loginDriverByPhone + getUserInfo, + sendSms, + loginDriverByPhone } from '@/api' import { mapState, @@ -70,114 +69,119 @@ data() { return { form: { - username: null, + username: null, phone: null, password: null }, isShowProtocol: false, showKeyboard: false, - countDown: 0, - activeTab: 0, - + countDown: 0, + activeTab: 0, + ywinfo: {} } }, onLoad() { const ywinfo = uni.getStorageSync('ywinfo') || {} - if (ywinfo.ywid && ywinfo.type == 0) { + if (ywinfo.ywid && ywinfo.type == 0) { this.ywinfo = ywinfo uni.setStorageSync('ywinfo', {}) } }, - methods: { - onLogin() { - const { - form,activeTab - } = this - if(activeTab == 0){ - if (!form.username) return uni.showToast({ - title: '璐﹀彿涓嶈兘涓虹┖', - icon: 'none' - }) - if (!form.password) return uni.showToast({ - title: '瀵嗙爜涓嶈兘涓虹┖', - icon: 'none' - }) - }else{ - if (!form.phone) return uni.showToast({ - title: '鎵嬫満鍙蜂笉鑳戒负绌�', - icon: 'none' - }) - if (!form.code) return uni.showToast({ - title: '楠岃瘉鐮佷笉鑳戒负绌�', - icon: 'none' - }) - } - let fn = activeTab == 0 ? driverLogin : loginDriverByPhone - fn({ - ...form, - openid: this.$store.state.openId, - }).then(res => { - if (res.code === 200) { - this.setToken(res.data) - getUserInfo().then(ress => { - setTimeout(() => { - this.showToast('鐧诲綍鎴愬姛') - }) - uni.setStorageSync('ywinfo', this.ywinfo) - this.setDriverInfo(ress.data) - uni.redirectTo({ - url: "/pages/driver/index" - }) - }) - } - }) + methods: { + onLogin() { + const { + form, + activeTab + } = this + if (activeTab == 0) { + if (!form.username) return uni.showToast({ + title: '璐﹀彿涓嶈兘涓虹┖', + icon: 'none' + }) + if (!form.password) return uni.showToast({ + title: '瀵嗙爜涓嶈兘涓虹┖', + icon: 'none' + }) + } else { + if (!form.phone) return uni.showToast({ + title: '鎵嬫満鍙蜂笉鑳戒负绌�', + icon: 'none' + }) + if (!form.code) return uni.showToast({ + title: '楠岃瘉鐮佷笉鑳戒负绌�', + icon: 'none' + }) + } + let fn = activeTab == 0 ? driverLogin : loginDriverByPhone + fn({ + ...form, + openid: this.$store.state.openId, + }).then(res => { + if (res.code === 200) { + this.setToken(res.data) + getUserInfo().then(ress => { + setTimeout(() => { + this.showToast('鐧诲綍鎴愬姛') + }) + uni.setStorageSync('ywinfo', this.ywinfo) + this.setDriverInfo(ress.data) + uni.redirectTo({ + url: "/pages/driver/index" + }) + }) + } + }) }, ...mapMutations(["setToken", "setDriverInfo"]), handleRegister() { uni.navigateTo({ url: "/pages/driver/register" }) - }, - tabsClick(val) { - this.activeTab = val - if(val == 0){ - this.form.username = this.form.username || this.form.phone - this.form.phone = null - this.form.code = null - }else{ - this.form.phone = this.form.username || this.form.phone - this.form.password = null - this.form.username = null - } }, - handleSetPsd() { - if(this.form.username || this.form.phone){ - uni.navigateTo({ - url: "/pages/driver/forgetPsd?phone=" + this.form.username || this.form.phone || '' - }) - }else{ - uni.navigateTo({ - url: "/pages/driver/forgetPsd" - }) + tabsClick(val) { + this.activeTab = val + if (val == 0) { + this.form.username = this.form.username || this.form.phone + this.form.phone = null + this.form.code = null + } else { + this.form.phone = this.form.username || this.form.phone + this.form.password = null + this.form.username = null } - + }, + handleSetPsd() { + if (this.form.username || this.form.phone) { + uni.navigateTo({ + url: "/pages/driver/forgetPsd?phone=" + this.form.username || this.form.phone || '' + }) + } else { + uni.navigateTo({ + url: "/pages/driver/forgetPsd" + }) + } + }, dealChange(e) { console.log(e) }, initCaptcha() { - if (!this.form.phone) return uni.showToast({ - title: '鎵嬫満鍙蜂笉鑳戒负绌�', - icon: 'none' - }) - sendSms({ phone: this.form.phone }).then(res => { - this.countDown = 60 - setInterval(() => { - if (this.countDown == 0) return - this.countDown-- - }, 1000) + if (!this.form.phone) return uni.showToast({ + title: '鎵嬫満鍙蜂笉鑳戒负绌�', + icon: 'none' + }) + sendSms({ + phone: this.form.phone + }).then(res => { + if (res.code === 200) { + this.countDown = 60 + setInterval(() => { + if (this.countDown == 0) return + this.countDown-- + }, 1000) + } }) }, } @@ -215,32 +219,37 @@ font-weight: 600; color: #333333; } - .tabs{ - display: flex; - align-items: center; - justify-content: space-evenly; - width: 530rpx; - margin: 48rpx auto 0rpx; - .tab{ - font-size: 30rpx; - color: #666666; - display: flex; - flex-direction: column; - align-items: center; - height: 52rpx; - line-height: 36rpx; - } - .active{ - font-weight: bold; - font-size: 34rpx; - color: #222222; - .bor{ - width: 80rpx; - height: 8rpx; - background: linear-gradient(to bottom, #4d99a8, #a3c8d4); - } - } + + .tabs { + display: flex; + align-items: center; + justify-content: space-evenly; + width: 530rpx; + margin: 48rpx auto 0rpx; + + .tab { + font-size: 30rpx; + color: #666666; + display: flex; + flex-direction: column; + align-items: center; + height: 52rpx; + line-height: 36rpx; + } + + .active { + font-weight: bold; + font-size: 34rpx; + color: #222222; + + .bor { + width: 80rpx; + height: 8rpx; + background: linear-gradient(to bottom, #4d99a8, #a3c8d4); + } + } } + .login_list { margin-top: 36rpx; width: 100%; @@ -270,7 +279,7 @@ } .captcha { - color: $uni-color-primary; + color: $uni-color-primary; font-size: 30rpx; } diff --git a/h5/pages/driver/taskDetail.vue b/h5/pages/driver/taskDetail.vue index 0e06514..7484ad8 100644 --- a/h5/pages/driver/taskDetail.vue +++ b/h5/pages/driver/taskDetail.vue @@ -207,8 +207,8 @@ // 'openLocation' // ] // 蹇呭~锛岄渶瑕佷娇鐢ㄧ殑JS鎺ュ彛鍒楄〃 // }) - // this.getLocation() - this.getDetail() + this.getLocation() + // this.getDetail() } else { this.getDetail() } @@ -324,7 +324,7 @@ display: flex; .label { - width: 150rpx; + width: 154rpx; font-size: 30rpx; color: #666666; } diff --git a/h5/pages/staff/index.vue b/h5/pages/staff/index.vue index 1be8797..ae4a130 100644 --- a/h5/pages/staff/index.vue +++ b/h5/pages/staff/index.vue @@ -4,7 +4,7 @@ <view class="name" v-if="userInfo.realname">{{ userInfo.realname || userInfo.username || "" }}锛屾杩庣櫥褰曪綖</view> <view class="name" v-else>璇峰厛鐧诲綍</view> <view class="btn" @click="loginOut">{{ - userInfo.username ? "閫�鍑虹櫥褰�" : "鍘荤櫥褰�" + userInfo.username ? "璐﹀彿瑙g粦" : "鍘荤櫥褰�" }}</view> </view> <view class="banner_wrap"> diff --git a/h5/pages/staffLogin/login.vue b/h5/pages/staffLogin/login.vue index 81d457b..6b8785f 100644 --- a/h5/pages/staffLogin/login.vue +++ b/h5/pages/staffLogin/login.vue @@ -81,7 +81,7 @@ loginH5ByPhone, getUserInfo, getSystemDictData, - saveHkUserOpenid, + saveHkUserOpenid, sendSms } from '@/api' import { @@ -95,7 +95,7 @@ return { form: { // username: '18655749830', - username: null, + username: null, phone: null, password: null, code: null @@ -159,7 +159,7 @@ title: '楠岃瘉鐮佷笉鑳戒负绌�', icon: 'none' }) - } + } let fn = activeTab == 0 ? loginPost : loginH5ByPhone fn({ ...form, @@ -175,8 +175,7 @@ }) }) saveHkUserOpenid({}) - } else { - } + } else {} }) }, ...mapMutations(["setToken", "setUserInfo"]), @@ -215,11 +214,13 @@ sendSms({ phone: this.form.phone }).then(res => { - this.countDown = 60 - setInterval(() => { - if (this.countDown == 0) return - this.countDown-- - }, 1000) + if (res.code === 200) { + this.countDown = 60 + setInterval(() => { + if (this.countDown == 0) return + this.countDown-- + }, 1000) + } }) } } diff --git a/h5/pages/waybill/home.vue b/h5/pages/waybill/home.vue index 62dae00..d6f7b85 100644 --- a/h5/pages/waybill/home.vue +++ b/h5/pages/waybill/home.vue @@ -1,201 +1,217 @@ -<template> - <view class="main_app"> - <image class="bg" src="@/static/wuliuche_bg@2x.png" mode="widthFix"></image> - <view class="login_wrap"> - <view class="item"> - <view class="la">鎵嬫満鍙�</view> - <input v-model="form.phone" type="tel" maxlength="18" placeholder-class="placeholder9" placeholder="璇疯緭鍏ユ墜鏈哄彿" /> - </view> - <view class="item"> - <view class="la">楠岃瘉鐮�</view> - <view class="df_sb"> - <input - v-model="form.code" - placeholder="璇疯緭鍏ラ獙璇佺爜" - placeholder-class="placeholder9" - :maxlength="6" - type="number" - /> - <text class="captcha" v-if="countDown == 0" @click="initCaptcha" - >鑾峰彇楠岃瘉鐮�</text - > - <text class="placeholder9" v-else>{{ countDown }}</text> - </view> - </view> - <view class="login_btn" @click="onSubmit"> - <view class="login_btn_n">鏌ヨ</view> - </view> - </view> - </view> -</template> - -<script> - import { sendSms, loginGkUserWithCode, wxAuthorizea, getUserInfo } from '@/api' - export default { - data() { - return { - form: { - code: '', - phone: '' - }, - countDown: 0, - - code: '' - }; - }, - onShow() { - var that = this - let url = 'https://atwl.ahzyssl.com/zhyq_h5/#/pages/waybill/home' - let code = '' - if (window.location.href.indexOf('code=') !== -1 || this.code) { - this.userAuth(3) - } else { - // let url = window.location.href - const appID = 'wx173e6caf5abc718a' - let uri = encodeURIComponent(url) - let authURL = - `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appID}&redirect_uri=${uri}&response_type=code&scope=snsapi_base#wechat_redirect` - window.location.href = authURL - } - }, - methods: { - onSubmit() { - const { code, phone } = this.form - if (!phone) return this.showToast('鎵嬫満鍙蜂笉鑳戒负绌�') - if (!code) return this.showToast('楠岃瘉鐮佷笉鑳戒负绌�') - loginGkUserWithCode({ - phone, code,openid: this.$store.state.openId, userType: 3 - }).then(res => { - if (res && res.code == 200) { - this.$store.commit('setToken', res.data) - getUserInfo().then(ress => { - this.$store.commit('setWaybillInfo', ress.data) - uni.navigateTo({ - url: '/pages/waybill/list' - }) - }) - } - }) - }, - userAuth(source) { - var that = this - let url = window.location.href - let code = '' - if (url.indexOf('code=') !== -1 || this.code) { - const query = url.split('?') - for (const q of query) { - if (q.indexOf('code=') !== -1) { - let statusIndex = q.indexOf('&state') - code = q.substring(q.indexOf('code=') + 5, statusIndex) - } - } - wxAuthorizea({ - code: code || this.code, - source: source - }).then(res => { - if (res.code === 200) { - that.$store.commit('setOpenId', res.data.openid) - if (res.data.token) { - that.$store.commit('setToken', res.data.token) - getUserInfo().then(ress => { - that.$store.commit('setWaybillInfo', ress.data) - uni.navigateTo({ - url: '/pages/waybill/list' - }) - }) - } - } - }) - } - }, - initCaptcha() { - if (!this.form.phone) return uni.showToast({ - title: '鎵嬫満鍙蜂笉鑳戒负绌�', - icon: 'none' - }) - sendSms({ phone: this.form.phone }).then(res => { - this.countDown = 60 - setInterval(() => { - if (this.countDown == 0) return - this.countDown-- - }, 1000) - }) - }, - } - } -</script> - -<style lang="scss"> -.main_app{ - padding-top: 218rpx; - .bg{ - width: 750rpx; - position: absolute; - left: 0; - top: 0; - z-index: -1; - } - .login_wrap { - width: 690rpx; - height: 490rpx; - background: #FFFFFF; - box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(39,155,170,0.16); - border-radius: 16rpx; - padding: 40rpx 30rpx; - box-sizing: border-box; - - .item { - width: 100%; - height: 126rpx; - padding-right: 10rpx; - box-sizing: border-box; - margin-bottom: 30rpx; - border-bottom: 1px solid #E5E5E5; - &:last-child { - margin-bottom: 0 !important; - } - - .la{ - font-weight: 400; - font-size: 28rpx; - color: #222222; - } - .captcha { - color: $uni-color-primary; - } - .df_sb{ - display: flex; - justify-content: space-between; - align-items: center; - } - input { - flex: 1; - height: 86rpx; - color: #666666; - // margin-left: 24rpx; - display: flex; - align-items: center; - border: none; - } - } - } - .login_btn { - width: 630rpx; - height: 88rpx; - box-sizing: border-box; - margin-top: 40rpx; - .login_btn_n { - width: 100%; - height: 98rpx; - background: $uni-color-primary; - box-shadow: 0rpx 12rpx 24rpx 0rpx rgba(39, 155, 170, 0.2); - display: flex; - align-items: center; - justify-content: center; - font-size: 30rpx; - color: #ffffff; - border-radius: 50rpx; - } - } -} -</style> +<template> + <view class="main_app"> + <image class="bg" src="@/static/wuliuche_bg@2x.png" mode="widthFix"></image> + <view class="login_wrap"> + <view class="item"> + <view class="la">鎵嬫満鍙�</view> + <input v-model="form.phone" type="tel" maxlength="18" placeholder-class="placeholder9" placeholder="璇疯緭鍏ユ墜鏈哄彿" /> + </view> + <view class="item"> + <view class="la">楠岃瘉鐮�</view> + <view class="df_sb"> + <input v-model="form.code" placeholder="璇疯緭鍏ラ獙璇佺爜" placeholder-class="placeholder9" :maxlength="6" + type="number" /> + <text class="captcha" v-if="countDown == 0" @click="initCaptcha">鑾峰彇楠岃瘉鐮�</text> + <text class="placeholder9" v-else>{{ countDown }}</text> + </view> + </view> + <view class="login_btn" @click="onSubmit"> + <view class="login_btn_n">鏌ヨ</view> + </view> + </view> + </view> +</template> + +<script> + import { + sendSms, + loginGkUserWithCode, + wxAuthorizea, + getUserInfo + } from '@/api' + export default { + data() { + return { + form: { + code: '', + phone: '' + }, + countDown: 0, + + code: '111' + }; + }, + onShow() { + var that = this + let url = 'https://atwl.ahzyssl.com/zhyq_h5/#/pages/waybill/home' + let code = '' + if (window.location.href.indexOf('code=') !== -1 || this.code) { + this.userAuth(3) + } else { + // let url = window.location.href + const appID = 'wx173e6caf5abc718a' + let uri = encodeURIComponent(url) + let authURL = + `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appID}&redirect_uri=${uri}&response_type=code&scope=snsapi_base#wechat_redirect` + window.location.href = authURL + } + }, + methods: { + onSubmit() { + const { + code, + phone + } = this.form + if (!phone) return this.showToast('鎵嬫満鍙蜂笉鑳戒负绌�') + if (!code) return this.showToast('楠岃瘉鐮佷笉鑳戒负绌�') + loginGkUserWithCode({ + phone, + code, + openid: this.$store.state.openId, + userType: 3 + }).then(res => { + if (res && res.code == 200) { + this.$store.commit('setToken', res.data) + getUserInfo().then(ress => { + this.$store.commit('setWaybillInfo', ress.data) + uni.navigateTo({ + url: '/pages/waybill/list' + }) + }) + } + }) + }, + userAuth(source) { + var that = this + let url = window.location.href + let code = '' + if (url.indexOf('code=') !== -1 || this.code) { + const query = url.split('?') + for (const q of query) { + if (q.indexOf('code=') !== -1) { + let statusIndex = q.indexOf('&state') + code = q.substring(q.indexOf('code=') + 5, statusIndex) + } + } + wxAuthorizea({ + code: code || this.code, + source: source + }).then(res => { + if (res.code === 200) { + that.$store.commit('setOpenId', res.data.openid) + if (res.data.token) { + that.$store.commit('setToken', res.data.token) + getUserInfo().then(ress => { + that.$store.commit('setWaybillInfo', ress.data) + uni.navigateTo({ + url: '/pages/waybill/list' + }) + }) + } + } + }) + } + }, + initCaptcha() { + if (!this.form.phone) return uni.showToast({ + title: '鎵嬫満鍙蜂笉鑳戒负绌�', + icon: 'none' + }) + sendSms({ + phone: this.form.phone + }).then(res => { + if (res.code === 200) { + this.countDown = 60 + setInterval(() => { + if (this.countDown == 0) return + this.countDown-- + }, 1000) + } + }) + }, + } + } +</script> + +<style lang="scss"> + .main_app { + padding-top: 218rpx; + + .bg { + width: 750rpx; + position: absolute; + left: 0; + top: 0; + z-index: -1; + } + + .login_wrap { + width: 690rpx; + height: 490rpx; + background: #FFFFFF; + box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(39, 155, 170, 0.16); + border-radius: 16rpx; + padding: 40rpx 30rpx; + box-sizing: border-box; + + .item { + width: 100%; + height: 126rpx; + padding-right: 10rpx; + box-sizing: border-box; + margin-bottom: 30rpx; + border-bottom: 1px solid #E5E5E5; + + &:last-child { + margin-bottom: 0 !important; + } + + .la { + font-weight: 400; + font-size: 28rpx; + color: #222222; + } + + .captcha { + color: $uni-color-primary; + } + + .df_sb { + display: flex; + justify-content: space-between; + align-items: center; + } + + input { + flex: 1; + height: 86rpx; + color: #666666; + // margin-left: 24rpx; + display: flex; + align-items: center; + border: none; + } + } + } + + .login_btn { + width: 630rpx; + height: 88rpx; + box-sizing: border-box; + margin-top: 40rpx; + + .login_btn_n { + width: 100%; + height: 98rpx; + background: $uni-color-primary; + box-shadow: 0rpx 12rpx 24rpx 0rpx rgba(39, 155, 170, 0.2); + display: flex; + align-items: center; + justify-content: center; + font-size: 30rpx; + color: #ffffff; + border-radius: 50rpx; + } + } + } +</style> \ No newline at end of file diff --git a/h5/pages/waybill/list.vue b/h5/pages/waybill/list.vue index 3886421..89b41ac 100644 --- a/h5/pages/waybill/list.vue +++ b/h5/pages/waybill/list.vue @@ -2,7 +2,7 @@ <view class="main_app"> <view class="title_wrap"> <view class="name">{{ waybillInfo.realname || waybillInfo.username || waybillInfo.mobile }}锛屾杩庣櫥褰曪綖</view> - <view class="btn" @click="loginOut">閫�鍑虹櫥褰�</view> + <view class="btn" @click="loginOut">璐﹀彿瑙g粦</view> </view> <view class="head_wrap" @click="openModal"> <view class="search_box"> @@ -232,7 +232,7 @@ ...form }, pager: { - rows: 10, + rows: 16, page } }).then(res => { diff --git a/h5/pages/waybill/waybillDetail.vue b/h5/pages/waybill/waybillDetail.vue index ad1d581..eb2a814 100644 --- a/h5/pages/waybill/waybillDetail.vue +++ b/h5/pages/waybill/waybillDetail.vue @@ -34,12 +34,28 @@ </view> <view class="line"> <view class="la">杞﹁締浣嶇疆</view> - <view class="val">{{'-'}}</view> + <view class="val">{{ info.address || '-'}}</view> </view> <view class="line"> <view class="la">棰勮鍒拌揪</view> <view class="val primaryColor" v-if="info.plannedArrivedDate">{{info.plannedArrivedDate.slice(0,11)}}</view> - </view> + </view> + <view v-if="showRecord" class="table"> + <view class="ite header"> + <view class="name">鍝佽鍚嶇О</view> + <view class="num">鏁伴噺<text>(涓囨敮)</text></view> + </view> + <view class="ite" v-for="ite in info.orderDetailVOList"> + <view class="name">{{ite.productName}}</view> + <view class="num">{{ite.pnumber}}</view> + </view> + </view> + <view class="line switch" @click="showRecord = !showRecord"> + <view class="">鏌ョ湅鍝佽鏄庣粏</view> + <u-icon v-if="!showRecord" name="arrow-down" size="12" class="ml6" color='#666666'></u-icon> + <u-icon v-if="showRecord" name="arrow-up" size="12" class="ml6" color='#666666'></u-icon> + </view> + </view> </view> <view class="drive_info"> @@ -116,7 +132,8 @@ // color: '#FF0000', // width: 3 // }, - ] + ], + showRecord: false }; }, onLoad(options) { @@ -177,7 +194,17 @@ } if (res.data && res.data.gisList && res.data.gisList.length > 0) { this.gisInfo = res.data.gisList[0] - if (this.gisInfo && this.gisInfo.gisList && this.gisInfo.gisList.length > 0) { + if (this.gisInfo && this.gisInfo.gisList && this.gisInfo.gisList.length > 0) { + const apiKey = 'd9a554b1808ce10a12a932ed9b0db1d0'; + let adsInfo = this.gisInfo.gisList[this.gisInfo.gisList.length - 1] + const location = adsInfo.lon1 + ',' + adsInfo.lat1; + uni.request({ + url: `https://restapi.amap.com/v3/geocode/regeo?key=${apiKey}&location=${location}`, + method: 'GET', + success: (res) => { + this.$set(this.info, 'address', res.data.regeocode.formatted_address) + }, + }) this.polyline = [] let temp = { color: '#ff0000', @@ -191,7 +218,8 @@ } this.polyline.push(temp) } - } + } + }) }, distance() { @@ -417,12 +445,47 @@ width: 140rpx; } - .val {} + .val { + flex: 1; + } &:nth-last-child(1) { margin-bottom: 0; } } + .table{ + margin: 0 auto 20rpx; + .ite{ + width: 100%; + height: 68rpx; + background: #FFFFFF; + border-bottom: 1rpx solid #E5E5E5; + display: flex; + align-items: center; + font-size: 28rpx; + padding-left: 30rpx; + .name{ + flex: 8; + // padding-left: 20rpx; + } + .num{ + flex: 3; + } + } + .header{ + background: #F4F7FC; + font-weight: 500; + text{ + font-size: 22rpx; + } + } + } + .switch{ + display: flex; + align-items: center; + justify-content: center; + color: #666666; + } } } diff --git a/h5/pages/wdata/home.vue b/h5/pages/wdata/home.vue index db0bc8e..ad1fc28 100644 --- a/h5/pages/wdata/home.vue +++ b/h5/pages/wdata/home.vue @@ -24,9 +24,9 @@ <script> import { - sendSms, + sendSms, wxAuthorizea, - loginDriverWithCode, + loginDriverWithCode, getUserInfo } from '@/api' export default { @@ -65,20 +65,20 @@ if (!code) return this.showToast('楠岃瘉鐮佷笉鑳戒负绌�') loginDriverWithCode({ phone, - code, + code, openid: this.$store.state.openId || '111' }).then(res => { - if (res && res.code == 200) { - if (res.data) { - this.$store.commit('setToken', res.data) - getUserInfo().then(ress => { - this.$store.commit('setDriverInfo', ress.data) - setTimeout(() => { - uni.navigateTo({ - url: '/pages/wdata/list' - }) - }, 100) - }) + if (res && res.code == 200) { + if (res.data) { + this.$store.commit('setToken', res.data) + getUserInfo().then(ress => { + this.$store.commit('setDriverInfo', ress.data) + setTimeout(() => { + uni.navigateTo({ + url: '/pages/wdata/list' + }) + }, 100) + }) } } }) @@ -91,11 +91,13 @@ sendSms({ phone: this.form.phone }).then(res => { - this.countDown = 10 - setInterval(() => { - if (this.countDown == 0) return - this.countDown-- - }, 1000) + if (res.code === 200) { + this.countDown = 60 + setInterval(() => { + if (this.countDown == 0) return + this.countDown-- + }, 1000) + } }) }, userAuth(source) { @@ -116,14 +118,14 @@ }).then(res => { if (res.code === 200) { that.$store.commit('setOpenId', res.data.openid) - if (res.data.token) { - that.$store.commit('setToken', res.data.token) - getUserInfo().then(ress => { - that.$store.commit('setDriverInfo', ress.data) - uni.navigateTo({ - url: '/pages/wdata/list' - }) - }) + if (res.data.token) { + that.$store.commit('setToken', res.data.token) + getUserInfo().then(ress => { + that.$store.commit('setDriverInfo', ress.data) + uni.navigateTo({ + url: '/pages/wdata/list' + }) + }) } } }) diff --git a/h5/pages/wdata/list.vue b/h5/pages/wdata/list.vue index f86a953..352daec 100644 --- a/h5/pages/wdata/list.vue +++ b/h5/pages/wdata/list.vue @@ -4,7 +4,7 @@ <view class="name" v-if="driverInfo.realname || driverInfo.username">{{ driverInfo.realname || driverInfo.username }}锛屾杩庣櫥褰曪綖</view> <view class="name" v-else>璇峰厛鐧诲綍</view> <view class="btn" @click="loginOut">{{ - driverInfo.realname || driverInfo.username ? "閫�鍑虹櫥褰�" : "鍘荤櫥褰�" + driverInfo.realname || driverInfo.username ? "璐﹀彿瑙g粦" : "鍘荤櫥褰�" }}</view> </view> <view class="head_wrap"> diff --git a/h5/utils/config.js b/h5/utils/config.js index 05ff784..08884a3 100644 --- a/h5/utils/config.js +++ b/h5/utils/config.js @@ -1,8 +1,8 @@ -// export const baseUrl = 'zhyq_interface/' +export const baseUrl = 'zhyq_interface/' // export const baseUrl = 'http://192.168.0.173/gateway_interface/' // export const baseUrl = 'http://10.50.250.253:8088/gateway_interface/' -export const baseUrl = 'https://atwl.ahzyssl.com/zhyq_interface/' +// export const baseUrl = 'https://atwl.ahzyssl.com/zhyq_interface/' export const app_url = 'https://atwl.ahzyssl.com/zhyq_h5/#/' diff --git a/screen/src/router/index.js b/screen/src/router/index.js index af696c1..b383f55 100644 --- a/screen/src/router/index.js +++ b/screen/src/router/index.js @@ -35,7 +35,7 @@ path: '/SecurityControl', // 瀹夐槻绠℃帶澶у睆 - name: 'SecurityControl', meta: { - title: '瀹夋嘲鏅烘収鐗╂祦鍥尯-瀹夐槻鏅鸿兘鐩戞祴' + title: '瀹夋嘲鏅烘収鐗╂祦鍥尯-鏅鸿兘瀹夐槻鐩戞祴' }, component: () => import('../views/SecurityControl.vue') }, @@ -43,7 +43,7 @@ path: '/LogisticsCenter', //鍏ㄧ渷鐗╂祦鍦ㄩ��-鐗╂祦涓績 name: 'LogisticsCenter', meta: { - title: '瀹夊窘涓儫鎴愬搧闆嗘帶澶у睆' + title: '瀹夊窘涓儫鏁版櫤鎴愬搧绠℃帶' }, component: () => import('../views/LogisticsCenter.vue') }, diff --git a/screen/src/views/LogisticsCenter.vue b/screen/src/views/LogisticsCenter.vue index 1e57222..caf08ca 100644 --- a/screen/src/views/LogisticsCenter.vue +++ b/screen/src/views/LogisticsCenter.vue @@ -4,7 +4,7 @@ <img src="@/assets/images/LogisticsCenter/bg@2x.png" class="main_bg" alt="" /> <div class="main_header"> <img src="@/assets/images/maintitle.gif" class="main_header_bg" alt="" /> - <div class="title">瀹夊窘涓儫鎴愬搧闆嗘帶澶у睆</div> + <div class="title">瀹夊窘涓儫鏁版櫤鎴愬搧绠℃帶</div> <div class="time_wrap"> <span class="date">{{ date }}</span> <span class="week">{{ week }}</span> @@ -438,7 +438,7 @@ <div class="item"> <div class="dian"></div> <div class="la">杞﹁締浣嶇疆锛�</div> - <div class="val">{{ modalInfo.aa || '-' }}</div> + <div class="val">{{ modalInfo.position || '-' }}</div> </div> <div class="item"> <div class="dian"></div> @@ -510,6 +510,7 @@ import VScaleScreen from 'v-scale-screen' import Percent from '@/components/percent.vue' import dayjs from 'dayjs' +import axios from "axios" import * as echarts from 'echarts' import 'swiper/css/swiper.min.css' import Swiper from 'swiper' @@ -1008,6 +1009,20 @@ showModal.value = true kzorderInfo({ contractNumber: item.contractNumber }).then(res => { modalInfo.value = res.data + const apiKey = 'd9a554b1808ce10a12a932ed9b0db1d0' + if (modalInfo.value.gisList && modalInfo.value.gisList.length > 0) { + const gisInfo = modalInfo.value.gisList[0] + if (gisInfo && gisInfo.gisList && gisInfo.gisList.length > 0) { + const adsInfo = gisInfo.gisList[gisInfo.gisList.length - 1] + const location = adsInfo.lon1 + ',' + adsInfo.lat1 + axios.get(`https://restapi.amap.com/v3/geocode/regeo?key=${apiKey}&location=${location}`).then(res => { + console.log('res', res.data) + if(res.data.status == 1){ + modalInfo.value.position = res.data.regeocode.formatted_address + } + }) + } + } modalLoading.value = false nextTick(() => { @@ -1997,6 +2012,7 @@ padding: 0px 10px 30px 20px; position: relative; height: 160px; + .content_wrap { display: flex; justify-content: space-between; @@ -2402,13 +2418,15 @@ z-index: -1; } } - .tooltip_wrap{ - .tooltip{ + + .tooltip_wrap { + .tooltip { z-index: 9999999999; top: 34px; transform: translate(70px, -42%); } } + .tag1 { background-color: #28F0CC; border: 1px solid #28F0CC; @@ -2862,12 +2880,12 @@ flex-wrap: wrap; background-color: #0d2845; border-radius: 4px; - padding: 10px 20px 0; + padding: 10px 20px 0px; margin-bottom: 16px; .item { display: flex; - align-items: center; + /* align-items: center; */ font-size: 13px; width: 55%; margin-bottom: 8px; @@ -2882,10 +2900,15 @@ background-color: #fff; border-radius: 50%; margin-right: 4px; + margin-top: 7px; } .la { color: #01D9FE; + width: 70px; + } + .val{ + flex: 1; } } } diff --git a/screen/src/views/SecurityControl.vue b/screen/src/views/SecurityControl.vue index 775eaa9..1b4ec61 100644 --- a/screen/src/views/SecurityControl.vue +++ b/screen/src/views/SecurityControl.vue @@ -4,7 +4,7 @@ <img src="@/assets/images/SecurityControl/bg@2x.png" class="main_bg" alt="" /> <div class="main_header"> <img src="@/assets/images/maintitle.gif" class="main_header_bg" alt="" /> - <div class="title">瀹夋嘲鏅烘収鐗╂祦鍥尯-瀹夐槻鏅鸿兘鐩戞祴</div> + <div class="title">瀹夋嘲鏅烘収鐗╂祦鍥尯-鏅鸿兘瀹夐槻鐩戞祴</div> <div class="time_wrap"> <span class="date">{{ date }}</span> <span class="week">{{ week }}</span> -- Gitblit v1.9.3