master
dongmu 12 months ago
parent df2c2e6958
commit 08aa47576b

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

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

Loading…
Cancel
Save