|
|
@ -1,7 +1,7 @@ |
|
|
|
<template> |
|
|
|
<view class="viewport"> |
|
|
|
<!-- 列表1 --> |
|
|
|
<view class="list" v-if="true"> |
|
|
|
<view class="list" v-if="memberStore.profile"> |
|
|
|
<navigator url="/pagesMember/address/address" hover-class="none" class="item arrow"> |
|
|
|
我的收货地址 |
|
|
|
</navigator> |
|
|
@ -17,14 +17,32 @@ |
|
|
|
<navigator hover-class="none" class="item arrow" url=" ">关于小兔鲜儿</navigator> |
|
|
|
</view> |
|
|
|
<!-- 操作按钮 --> |
|
|
|
<view class="action"> |
|
|
|
<view class="action" v-if="memberStore.profile"> |
|
|
|
<view class="button">退出登录</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
// |
|
|
|
import { useMemberStore } from '@/stores' |
|
|
|
|
|
|
|
const memberStore = useMemberStore() |
|
|
|
// 退出登录 |
|
|
|
const onLogout = () => { |
|
|
|
// 模态弹窗 |
|
|
|
uni.showModal({ |
|
|
|
content: '是否退出登录?', |
|
|
|
confirmColor: '#27BA9B', |
|
|
|
success: (res) => { |
|
|
|
if (res.confirm) { |
|
|
|
// 清理用户信息 |
|
|
|
memberStore.clearProfile() |
|
|
|
// 返回上一页 |
|
|
|
uni.navigateBack() |
|
|
|
} |
|
|
|
}, |
|
|
|
}) |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss"> |
|
|
|