| | |
| | | </view> |
| | | |
| | | <view class="menu-panel"> |
| | | <view v-for="item in menuList" :key="item.title" class="menu-panel__item" @click="jump(item)"> |
| | | <view v-for="item in menuList" :key="item.title" class="menu-panel__item" @click="jump(item)" v-show="item.key !== 'reward' || userInfo.auditStatus === 3"> |
| | | <text class="menu-panel__title">{{ item.title }}</text> |
| | | <view class="menu-panel__right"> |
| | | <template v-if="item.key === 'wallet'"> |
| | |
| | | </template> |
| | | <template v-if="item.key === 'driver'"> |
| | | <text v-if="userInfo.auditStatus === 99" class="menu-panel__sub menu-panel__sub--danger">完成认证后即可接单</text> |
| | | <text v-else-if="userInfo.auditStatus === 0" class="menu-panel__sub menu-panel__sub--danger">审核中</text> |
| | | <text v-if="userInfo.auditStatus === 2" class="menu-panel__sub menu-panel__sub--danger">已驳回</text> |
| | | <text v-else-if="!userInfo.hasApprovedOfficial && userInfo.auditStatus === 0" class="menu-panel__sub menu-panel__sub--danger">审核中</text> |
| | | <text v-else-if="userInfo.hasApprovedOfficial && userInfo.auditStatus === 0" class="menu-panel__sub menu-panel__sub--danger">变更中</text> |
| | | <text v-if="!userInfo.hasApprovedOfficial && userInfo.auditStatus === 2" class="menu-panel__sub menu-panel__sub--danger">已驳回</text> |
| | | <text v-if="userInfo.hasApprovedOfficial && userInfo.auditStatus === 2" class="menu-panel__sub menu-panel__sub--danger">变更已驳回</text> |
| | | <text v-else-if="userInfo.auditStatus === 3" class="menu-panel__sub menu-panel__sub--primary">已认证</text> |
| | | </template> |
| | | <template v-else-if="item.key === 'setting'"> |
| | | <text class="menu-panel__sub menu-panel__sub--muted">当前版本V1.0.0</text> |
| | | <text class="menu-panel__sub menu-panel__sub--muted">当前版本{{ appVersion }}</text> |
| | | </template> |
| | | <view class="menu-panel__arrow"> |
| | | <image src="/static/image/mine_ar2@2x.png" mode="widthFix"></image> |
| | |
| | | <view class="mine-page__footer"> |
| | | <button class="mine-page__logout" hover-class="mine-page__logout--hover" @click.stop="handleLogout">退出登录</button> |
| | | </view> |
| | | |
| | | <u-popup :show="showPlatformPopup" mode="bottom" round="24" :closeable="true" @close="showPlatformPopup = false"> |
| | | <view class="platform-popup"> |
| | | <view class="platform-popup__title">联系平台</view> |
| | | <view |
| | | v-for="(phone, index) in serverPhoneList" |
| | | :key="index" |
| | | class="platform-popup__item" |
| | | @click="handlePlatformCall(phone)" |
| | | > |
| | | <image class="platform-popup__icon" src="/static/image/ic_call@2x.png" mode="aspectFit"></image> |
| | | <text class="platform-popup__text">{{ phone }}</text> |
| | | </view> |
| | | <view v-if="!platformPhoneList.length" class="platform-popup__empty">暂无平台联系电话</view> |
| | | </view> |
| | | </u-popup> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | statusBarHeight: 0, |
| | | navHeight: 0, |
| | | useVerifiedState: true, |
| | | serverPhone: '', |
| | | serverPhone1: '', |
| | | showPlatformPopup: false, |
| | | platformPhoneList: [], |
| | | appVersion: 'V1.0.0', |
| | | menuList: [ |
| | | { key: 'wallet', title: '我的钱包' }, |
| | | { key: 'driver', title: '司机认证' }, |
| | | { key: 'reward', title: '奖励大厅' }, |
| | | { key: 'revenue', title: '营收分析' }, |
| | | { key: 'agreementPrivacy', title: '司机隐私政策', type: 'driverPrivacyPolicy' }, |
| | | { key: 'agreementErrandLuggage', title: '跑腿车主行李寄存须知', type: 'errandLuggageStorageNotice' }, |
| | | { key: 'agreementErrandLuggage', title: '跑腿达人行李寄存须知', type: 'errandLuggageStorageNotice' }, |
| | | { key: 'agreementErrandService', title: '跑腿达人服务协议', type: 'errandServiceAgreement' }, |
| | | { key: 'agreementErrandRisk', title: '跑腿达人风险承诺', type: 'errandRiskCommitment' }, |
| | | { key: 'agreementOwnerLuggage', title: '平台车主行李寄存须知', type: 'ownerLuggageStorageNotice' }, |
| | | { key: 'agreementOwnerService', title: '平台车主服务协议', type: 'ownerServiceAgreement' }, |
| | | { key: 'agreementOwnerRisk', title: '平台车主风险承诺', type: 'ownerRiskCommitment' }, |
| | | { key: 'help', title: '帮助与客服' }, |
| | | { key: 'platform', title: '联系平台' }, |
| | | { key: 'help', title: '联系客服' }, |
| | | { key: 'setting', title: '设置' } |
| | | ], |
| | | profileStates: { |
| | |
| | | return { |
| | | marginTop: this.navHeight + 'px' |
| | | } |
| | | }, |
| | | serverPhoneList() { |
| | | if (!this.serverPhone) return [] |
| | | return this.serverPhone.split(',') |
| | | } |
| | | }, |
| | | onLoad() { |
| | | const systemInfo = uni.getSystemInfoSync() |
| | | this.statusBarHeight = systemInfo.statusBarHeight || 0 |
| | | this.navHeight = this.statusBarHeight + uni.upx2px(88) |
| | | if (plus.runtime && plus.runtime.version) { |
| | | this.appVersion = 'V' + plus.runtime.version |
| | | } |
| | | this.getContactInfo() |
| | | }, |
| | | onShow() { |
| | | this.getStats() |
| | | this.getUserInfo() |
| | | this.getServerPhone() |
| | | }, |
| | | methods: { |
| | | async getContactInfo() { |
| | | const res = await this.$u.api.getPlatformAboutUs({}) |
| | | console.log(res,"====================") |
| | | if (res.code === 200) { |
| | | this.serverPhone1 = res.data.serverPhone || '' |
| | | } |
| | | }, |
| | | formatPhoneList(phoneText) { |
| | | if (!phoneText) { |
| | | return [] |
| | | } |
| | | return Array.from(new Set( |
| | | String(phoneText) |
| | | .split(/[\n,,、;;\s]+/) |
| | | .map(item => item.trim()) |
| | | .filter(item => item && /\d/.test(item)) |
| | | )) |
| | | }, |
| | | getServerPhone() { |
| | | this.$u.api.getPlatformAboutUs().then(res => { |
| | | if (res.code === 200 && res.data) { |
| | | this.serverPhone = res.data.serverPhone || '' |
| | | this.platformPhoneList = this.formatPhoneList(this.serverPhone) |
| | | } |
| | | }) |
| | | }, |
| | | getUserInfo() { |
| | | this.$u.api.verifyDetail().then(user => { |
| | | if (user.code === 200) { |
| | |
| | | uni.navigateTo({ |
| | | url: '/pages/settings/settings' |
| | | }) |
| | | } else if (item.key === 'reward') { |
| | | if (this.userInfo.auditStatus === 3) { |
| | | uni.navigateTo({ |
| | | url: '/pages/reward-hall/reward-hall' |
| | | }) |
| | | } else { |
| | | uni.showToast({ |
| | | title: '认证通过后才可进入奖励大厅', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } else if (item.key === 'revenue') { |
| | | uni.navigateTo({ |
| | | url: '/pages/revenue-analysis/revenue-analysis' |
| | | }) |
| | | } else if (item.key === 'driver') { |
| | | if (this.userInfo.auditStatus === 99) { |
| | | uni.navigateTo({ |
| | |
| | | uni.navigateTo({ |
| | | url: `/pages/agreement/agreement?type=${item.type}&title=${encodeURIComponent(item.title)}` |
| | | }) |
| | | } else if (item.key === 'platform') { |
| | | if (this.platformPhoneList.length) { |
| | | this.showPlatformPopup = true |
| | | } else { |
| | | uni.showToast({ title: '平台联系电话获取失败', icon: 'none' }) |
| | | } |
| | | } else if (item.key === 'help') { |
| | | if (this.serverPhone) { |
| | | uni.makePhoneCall({ |
| | | phoneNumber: this.serverPhone |
| | | }) |
| | | } else { |
| | | uni.showToast({ title: '客服电话获取失败', icon: 'none' }) |
| | | } |
| | | } |
| | | }, |
| | | handlePlatformCall(phone) { |
| | | if (!phone) { |
| | | return |
| | | } |
| | | uni.makePhoneCall({ |
| | | phoneNumber: phone |
| | | }) |
| | | }, |
| | | handleLogout() { |
| | | uni.showToast({ title: '退出中...', icon: 'loading' }) |
| | |
| | | } |
| | | |
| | | &__footer { |
| | | position: fixed; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 60rpx; |
| | | // padding: 16rpx 0 calc(env(safe-area-inset-bottom) + 20rpx); |
| | | padding-bottom: 30rpx; |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | |
| | | |
| | | .menu-panel { |
| | | margin-top: 20rpx; |
| | | margin-bottom: 200rpx; |
| | | margin-bottom: 30rpx; |
| | | border-radius: 22rpx; |
| | | background: #ffffff; |
| | | overflow: hidden; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .platform-popup { |
| | | padding: 44rpx 32rpx calc(env(safe-area-inset-bottom) + 36rpx); |
| | | |
| | | &__title { |
| | | font-size: 34rpx; |
| | | font-weight: 700; |
| | | color: #2b3139; |
| | | text-align: center; |
| | | margin-bottom: 32rpx; |
| | | } |
| | | |
| | | &__item { |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 24rpx 0; |
| | | border-bottom: 1rpx solid #eef1f5; |
| | | } |
| | | |
| | | &__icon { |
| | | width: 36rpx; |
| | | height: 36rpx; |
| | | margin-right: 20rpx; |
| | | flex-shrink: 0; |
| | | } |
| | | |
| | | &__text { |
| | | font-size: 30rpx; |
| | | color: #2b3139; |
| | | line-height: 42rpx; |
| | | } |
| | | |
| | | &__empty { |
| | | padding: 24rpx 0; |
| | | font-size: 28rpx; |
| | | color: #8f96a3; |
| | | text-align: center; |
| | | } |
| | | } |
| | | </style> |