| | |
| | | <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> |
| | | |
| | | <!-- 删除车队模态框 --> |
| | |
| | | |
| | | <script> |
| | | import { redirectLogin } from '@/utils/status'; |
| | | import { BaseUrl } from '@/api/publicInterface.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | passwordModified: '', |
| | | // 用户信息对象 |
| | | userInfo: {}, |
| | | phoneList:[] |
| | | }; |
| | | }, |
| | | onLoad() { |
| | |
| | | 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: '加载中...' |