From f22e264b6c282f597a139f549025cb9120fe0da1 Mon Sep 17 00:00:00 2001 From: wk Date: 星期三, 23 十月 2024 09:49:06 +0800 Subject: [PATCH] feat:临时入场 --- pages/freight-forwarder-page/freightForwarder-my/freightForwarder-my.vue | 233 ++++++++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 187 insertions(+), 46 deletions(-) diff --git a/pages/freight-forwarder-page/freightForwarder-my/freightForwarder-my.vue b/pages/freight-forwarder-page/freightForwarder-my/freightForwarder-my.vue index 535fb39..8d88e3a 100644 --- a/pages/freight-forwarder-page/freightForwarder-my/freightForwarder-my.vue +++ b/pages/freight-forwarder-page/freightForwarder-my/freightForwarder-my.vue @@ -3,6 +3,45 @@ <view class="driver-banner"> <view class="navgation">鎴戠殑</view> </view> + <view class="information-block-box"> + <view class="personal-information"> + <view class="personal-information-block"> + <view class="block-main"> + <view class="information-line"> + <view class="line-label"> + <image src="https://wrzs.czjlchem.com:9090/appimg/image/banner/phonenum.png" + mode="widthFix"></image> + <view class="label-text">鎵嬫満鍙�</view> + </view> + <view class="information-value"> + {{ userInfo.phone || '' }} + </view> + </view> + <view class="information-line"> + <view class="line-label"> + <image src="https://wrzs.czjlchem.com:9090/appimg/image/banner/carnum.png" + mode="widthFix"></image> + <view class="label-text">濮撳悕</view> + </view> + <view class="information-value"> + {{ userInfo.name || '' }} + </view> + </view> + <view class="information-line"> + <view class="line-label"> + <image src="https://wrzs.czjlchem.com:9090/appimg/image/banner/carnum.png" + mode="widthFix"></image> + <view class="label-text">瑙掕壊</view> + </view> + <view class="information-value"> + {{ '璐т唬' }} + </view> + </view> + + </view> + </view> + </view> + </view> <view class="personal-information"> <view class="personal-information-block"> <view class="block-main"> @@ -75,15 +114,18 @@ <!-- <view class="statistics"><u-button text="鍙戣繍缁熻" type="primary" @click="statistics"></u-button></view> --> <view class="utils-button"> - <!-- <view class="utils"><u-button text="淇敼瀵嗙爜" + <view class="utils"><u-button text="淇敼瀵嗙爜" type="primary" @click="modifyPwd"></u-button></view> - <view class="utils"><u-button text="閲嶇疆瀵嗙爜" + <!-- <view class="utils"><u-button text="閲嶇疆瀵嗙爜" type="primary" @click="initPwd"></u-button></view> --> <view class="utils"><u-button text="閫�鍑虹櫥褰�" type="primary" @click="logout"></u-button></view> + <view class="utils"><u-button text="鑱旂郴鎴戜滑" + type="primary" + @click="contactUs"></u-button></view> </view> <!-- 鍒犻櫎杞﹂槦妯℃�佹 --> @@ -135,6 +177,7 @@ <script> import { redirectLogin } from '@/utils/status'; + import { BaseUrl } from '@/api/publicInterface.js' export default { data() { return { @@ -161,7 +204,8 @@ modifyPwdShow: false, passwordModified: '', // 鐢ㄦ埛淇℃伅瀵硅薄 - userEntity: {}, + userInfo: {}, + phoneList:[] }; }, onLoad() { @@ -170,13 +214,74 @@ methods: { init() { this.getFleet(); + this.getUserEntity(); + uni.request({ + url: `${BaseUrl}/admin/dict/page`, + method: 'GET', + data: { + dictType:'Setings' + }, + header: { + Authorization: 'Bearer' + ' ' + uni.getStorageSync('token'), + clientToc: 'Y', + 'CLIENT_TOC': 'Y', + }, + success: res => { + let dictId=res.data.data?.records[0].id + uni.request({ + url: `${BaseUrl}/admin/dict/item/page`, + method: 'GET', + data: { + dictId:dictId + }, + header: { + Authorization: 'Bearer' + ' ' + uni.getStorageSync('token'), + clientToc: 'Y', + 'CLIENT_TOC': 'Y', + }, + success: res => { + res.data.data.records.forEach(item=>{ + if(item.description.includes('鑱旂郴')){ + this.phoneList=item.value.split(','); + } + }) + }, + fail: err => { + } + }) + }, + fail: err => { + } + }) }, // 鑾峰彇杞﹂槦 getFleet() { this.$reqGet('getFleet').then(res => { - console.log('璐т唬1杞﹂槦', res); + console.log('鎵胯繍鍟�1杞﹂槦', res); this.fleetData = res.data; }); + }, + contactUs(){ + uni.showActionSheet({ + itemList: this.phoneList, + success: (res) => { + uni.makePhoneCall({ + phoneNumber:this.phoneList[res.tapIndex].split(":")[1] + }) + }, + fail: (err) => { + console.log('寮圭獥鍙栨秷'); + } + }); + }, + getUserEntity() { + uni.showLoading({ + title: '鍔犺浇涓�...' + }); + this.$reqGet('getUserEntity').then(res => { + uni.hideLoading() + this.userInfo = res.data; + }) }, // 娣诲姞杞﹂槦 addFleet() { @@ -239,49 +344,12 @@ url: `/pages/customer-page/fleet-management/fleet-management?id=${id}` }); }, - updateInfo() { - this.$reqPost('updateUser', this.userEntity, 'json').then(res => { - uni.hideLoading() - if (res.code == 0) { - uni.showToast({ - title: '閲嶇疆鎴愬姛', - duration: 2000, - icon: 'success' - }) - } else { - this.$u.toast(res.msg ? res.msg : '淇敼澶辫触'); - } - }).catch(err => { - this.$u.toast('淇敼澶辫触'); - }); - }, - initPwd() { - this.initPwdShow = true - }, - initPwdConfirm() { - this.initPwdShow = false - uni.showLoading({ - title: '鍔犺浇涓�' - }) - this.userEntity.password = '123456' - this.updateInfo() - }, - initPwdCancel() { - this.initPwdShow = false - }, modifyPwd() { - this.modifyPwdShow = true - }, - modifyPwdConfirm() { - if (this.passwordModified.length === 0) { - return this.$u.toast('瀵嗙爜涓嶈兘涓虹┖') - } - this.modifyPwdShow = false - this.userEntity.password = this.passwordModified - this.updateInfo() - }, - modifyPwdCancel() { - this.modifyPwdShow = false + this.$store.commit('changeisLogin', false) + this.$store.dispatch('websocketOnClose') + uni.reLaunch({ + url: `/pages/login/resetPassword/resetPassword?phone=${this.userInfo.phone}&idCard=${this.userInfo.idCard}` + }) }, logout() { this.logoutShow = true; @@ -328,6 +396,79 @@ } } } + .information-block-box { + width: 100%; + + .personal-information { + width: 100%; + display: flex; + justify-content: center; + position: relative; + top: vww(-30); + + &-block { + width: 690rpx; + height: 300rpx; + background: #ffffff; + box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12); + border-radius: 20rpx; + display: flex; + flex-direction: column; + justify-content: space-between; + + .block-main { + width: 636rpx; + margin: vww(10) vww(14); + } + + .information-line { + @include flex; + width: 636rpx; + align-items: center!important; + height: vww(45); + border-bottom: 1rpx solid #f0f1f6; + + .line-label { + width: 50%; + height: 90rpx; + @include flex; + align-items: center; + + image { + width: 50rpx; + height: 50rpx; + } + + .label-text { + flex: 0.8; + font-size: 30rpx; + font-weight: 400; + color: #000000; + line-height: 32rpx; + text-align: left; + } + } + + .information-value { + min-width: vww(125); + @include flex; + font-size: 30rpx; + font-weight: 400; + color: #000000; + line-height: 85rpx; + } + } + + .last { + border-bottom: 0; + + .information-value { + justify-content: space-between; + } + } + } + } + } ::v-deep.freightForwarder-my { width: 100%; -- Gitblit v1.9.1