master
dongmu 10 months ago
parent df2c2e6958
commit 08aa47576b

@ -1,7 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { driverMemberInfo } from '@/services/home' import { driverMemberInfo } from '@/services/home'
import { useMemberStore } from '@/stores' import { useMemberStore } from '@/stores'
import { onLoad } from '@dcloudio/uni-app' import { onLoad, onShow } from '@dcloudio/uni-app'
import { ENV } from '@/utils/env' import { ENV } from '@/utils/env'
import { ref } from 'vue' import { ref } from 'vue'
// //
@ -27,7 +27,7 @@ const getAvateInfo = () => {
// feilUrl + res.data.avatar // feilUrl + res.data.avatar
const feilUrl = ref() const feilUrl = ref()
// //
onLoad(() => { onShow(() => {
getAvateInfo() getAvateInfo()
}) })
</script> </script>
@ -118,8 +118,10 @@ onLoad(() => {
<view> <view>
<!-- 司机认证 --> <!-- 司机认证 -->
<view class="navate"> <view class="navate">
<view style=""> <view style="display: flex">
<uni-icons type="wallet" size="20"></uni-icons> <view>
<uni-icons type="wallet" size="20"></uni-icons>
</view>
<text style="margin-left: 5px">司机认证</text> <text style="margin-left: 5px">司机认证</text>
</view> </view>
<view> <view>
@ -129,8 +131,10 @@ onLoad(() => {
<!-- 我的车辆 --> <!-- 我的车辆 -->
<view class="navate"> <view class="navate">
<view> <view style="display: flex">
<uni-icons type="wallet" size="20"></uni-icons> <view>
<uni-icons type="wallet" size="20"></uni-icons>
</view>
<text style="margin-left: 5px">我的车辆</text> <text style="margin-left: 5px">我的车辆</text>
</view> </view>
<view> <view>
@ -139,8 +143,10 @@ onLoad(() => {
</view> </view>
<!-- 我的车队 --> <!-- 我的车队 -->
<view class="navate"> <view class="navate">
<view> <view style="display: flex">
<uni-icons type="wallet" size="20"></uni-icons> <view>
<uni-icons type="wallet" size="20"></uni-icons>
</view>
<text style="margin-left: 5px">我的车队</text> <text style="margin-left: 5px">我的车队</text>
</view> </view>
<view> <view>
@ -149,8 +155,10 @@ onLoad(() => {
</view> </view>
<!-- 我的钱包 --> <!-- 我的钱包 -->
<view class="navate" style="border-bottom: none; margin-bottom: 0"> <view class="navate" style="border-bottom: none; margin-bottom: 0">
<view> <view style="display: flex">
<uni-icons type="wallet" size="20"></uni-icons> <view>
<uni-icons type="wallet" size="20"></uni-icons>
</view>
<text style="margin-left: 5px">我的钱包</text> <text style="margin-left: 5px">我的钱包</text>
</view> </view>
<view> <view>

@ -83,16 +83,18 @@ export const http = <T>(options: UniApp.RequestOptions) => {
} }
if (resList.code === 401) { if (resList.code === 401) {
console.log(resList, 'resList过期')
// 401错误 -> 清理用户信息,跳转到登录页 // 401错误 -> 清理用户信息,跳转到登录页
uni.showToast({ uni.showToast({
title: '请求错误', title: `${resList.msg}`,
icon: 'error', icon: 'error',
}) })
// const memberStore = useMemberStore() const memberStore = useMemberStore()
// memberStore.clearProfile() memberStore.clearProfile()
// setTimeout(() => { setTimeout(() => {
// uni.navigateTo({ url: '/pages/login/OneClickLogin/OneClickLogin' }) uni.navigateTo({ url: '/pages/login/login' })
// }, 1000) }, 1000)
reject(resList) reject(resList)
} else { } else {
console.log('500请求错误', res.data) console.log('500请求错误', res.data)

Loading…
Cancel
Save