126 lines
2.2 KiB
Vue
126 lines
2.2 KiB
Vue
<script setup lang="ts">
|
|
import {ref} from 'vue';
|
|
//import { onShow } from "@dcloudio/uni-app";
|
|
// onShow(()=>{
|
|
// getLoginUser()
|
|
// })
|
|
const logout = () => {
|
|
uni.removeStorageSync('identify')
|
|
uni.removeStorageSync('cookie');
|
|
uni.removeStorageSync('userInfo');
|
|
uni.reLaunch({
|
|
url: '/pages/login/login'
|
|
})
|
|
uni.showToast({
|
|
title: '退出成功',
|
|
duration: 2000
|
|
})
|
|
}
|
|
// const user = ref({
|
|
// userAvatar:'',
|
|
// userName:''
|
|
// })
|
|
// const getLoginUser = () => {
|
|
// uni.request({
|
|
// url:'http://localhost:9999/api/user/current',
|
|
// method:'GET',
|
|
// header:{
|
|
// 'cookie': uni.getStorageSync("cookie")
|
|
// },
|
|
// data:{},
|
|
// success: (res:any) => {
|
|
// //user.value = res.data.data
|
|
// console.log(res)
|
|
// }
|
|
|
|
// })
|
|
// }
|
|
</script>
|
|
|
|
<template>
|
|
<view class="viewport">
|
|
|
|
<view class="list" v-if="true">
|
|
<navigator url="../addressList/addressList" hover-class="none" class="item arrow">
|
|
我的收货地址
|
|
</navigator>
|
|
</view>
|
|
|
|
|
|
<view class="list">
|
|
<navigator hover-class="none" url="../run/run" class="item arrow" open-type="openSetting">跑腿认证</navigator>
|
|
</view>
|
|
|
|
<view class="list">
|
|
<view class="logout" @click="logout">
|
|
退出登录
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<style lang="scss">
|
|
page {
|
|
background-color: #f4f4f4;
|
|
}
|
|
|
|
.viewport {
|
|
padding: 20rpx;
|
|
}
|
|
|
|
.list {
|
|
padding: 0 20rpx;
|
|
background-color: #fff;
|
|
margin-bottom: 20rpx;
|
|
border-radius: 10rpx;
|
|
|
|
.item {
|
|
line-height: 90rpx;
|
|
padding-left: 10rpx;
|
|
font-size: 30rpx;
|
|
color: #333;
|
|
border-top: 1rpx solid #ddd;
|
|
position: relative;
|
|
text-align: left;
|
|
border-radius: 0;
|
|
background-color: #fff;
|
|
|
|
&::after {
|
|
width: auto;
|
|
height: auto;
|
|
left: auto;
|
|
border: none;
|
|
}
|
|
|
|
&:first-child {
|
|
border: none;
|
|
}
|
|
|
|
&::after {
|
|
right: 5rpx;
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
.action {
|
|
text-align: center;
|
|
line-height: 90rpx;
|
|
margin-top: 40rpx;
|
|
font-size: 32rpx;
|
|
color: #333;
|
|
|
|
.button {
|
|
background-color: #fff;
|
|
margin-bottom: 20rpx;
|
|
border-radius: 10rpx;
|
|
}
|
|
}
|
|
.logout {
|
|
height: 100rpx;
|
|
line-height: 100rpx;
|
|
font-size: 35rpx;
|
|
text-align: center;
|
|
}
|
|
</style>
|