2024-04-23 23:01:35 +08:00
|
|
|
|
<template>
|
|
|
|
|
<view class="h-full w-full" :style="{ height: `${windowHeight}px` }">
|
|
|
|
|
<!--顶部个人信息栏-->
|
2024-05-06 00:06:10 +08:00
|
|
|
|
<view class="px-4 pt-4 pb-2 bg-[#3c96f3] text-white">
|
2024-04-23 23:01:35 +08:00
|
|
|
|
<view class="flex padding justify-between">
|
|
|
|
|
<view class="flex items-center">
|
|
|
|
|
<view v-if="!avatar" class="border-2 border-solid border-[#eaeaea] rounded-full w-16 h-16 bg-white">
|
|
|
|
|
<view class="iconfont icon-people text-gray text-[40px]"></view>
|
|
|
|
|
</view>
|
|
|
|
|
<image v-if="avatar" @click="handleToAvatar" :src="avatar"
|
2024-05-06 00:06:10 +08:00
|
|
|
|
class="border-2 border-solid border-[#eaeaea] rounded-full w-12 h-13" mode="widthFix">
|
2024-04-23 23:01:35 +08:00
|
|
|
|
</image>
|
|
|
|
|
<view v-if="!name" @click="handleToLogin" class="text-lg ml-2.5">
|
|
|
|
|
点击登录
|
|
|
|
|
</view>
|
|
|
|
|
<view v-if="name" @click="handleToInfo" class="ml-4">
|
|
|
|
|
<view class="text-lg">
|
2024-05-06 00:06:10 +08:00
|
|
|
|
用户昵称:{{ nickName }}
|
|
|
|
|
</view>
|
|
|
|
|
<view class="text-lg">
|
|
|
|
|
ID:{{ name }}
|
2024-04-23 23:01:35 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2024-05-06 00:06:10 +08:00
|
|
|
|
|
2024-04-23 23:01:35 +08:00
|
|
|
|
</view>
|
2024-05-06 00:06:10 +08:00
|
|
|
|
<view v-if="name" class="info1" >
|
|
|
|
|
<view class="info11">
|
|
|
|
|
<up-icon v-if="sex == '0'"
|
|
|
|
|
name="man"
|
|
|
|
|
size="30"
|
|
|
|
|
color="blue"
|
|
|
|
|
></up-icon>
|
|
|
|
|
<up-icon v-else-if="sex == '1'"
|
|
|
|
|
name="woman"
|
|
|
|
|
size="30"
|
|
|
|
|
color="pink"
|
|
|
|
|
></up-icon>
|
|
|
|
|
<span >22</span>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="info12">
|
|
|
|
|
<span>LV.</span>
|
|
|
|
|
<span >2</span>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view class="info13">
|
|
|
|
|
<up-icon
|
|
|
|
|
name="star"
|
|
|
|
|
size="30"
|
|
|
|
|
color="#333333"
|
|
|
|
|
></up-icon>
|
|
|
|
|
<span >77</span>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2024-04-23 23:01:35 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
2024-05-06 00:06:10 +08:00
|
|
|
|
<view class="zinfo">
|
|
|
|
|
|
|
|
|
|
<view>0关注</view>
|
|
|
|
|
<view>0赞</view>
|
|
|
|
|
<view>8浏览</view>
|
|
|
|
|
<view>8收藏</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="content-section relative top-[-10px]">
|
|
|
|
|
<view class="m-4 py-5 bg-white rounded-md grid grid-cols-3 text-center [&_.icon]:text-[28px]">
|
2024-04-23 23:01:35 +08:00
|
|
|
|
<view @click="handleJiaoLiuQun">
|
2024-05-06 00:06:10 +08:00
|
|
|
|
<view class="iconfont icon-caogao text-pink-600 icon"></view>
|
|
|
|
|
<view class="my-2 text-xs">草稿箱</view>
|
2024-04-23 23:01:35 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view @click="handleBuilding">
|
2024-05-06 00:06:10 +08:00
|
|
|
|
<view class="iconfont icon-lishixinxi text-blue-600 icon"></view>
|
|
|
|
|
<view class="my-2 text-xs">历史投稿</view>
|
2024-04-23 23:01:35 +08:00
|
|
|
|
</view>
|
2024-05-06 00:06:10 +08:00
|
|
|
|
<view @click="handleBuilding" style="justify-content: center;">
|
|
|
|
|
<view class="iconfont icon-lanqi text-blue-600 icon"></view>
|
|
|
|
|
<view class="my-2 text-xs">参与活动</view>
|
2024-04-23 23:01:35 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
2024-05-06 00:06:10 +08:00
|
|
|
|
|
|
|
|
|
|
2024-04-23 23:01:35 +08:00
|
|
|
|
<view class="menu-list">
|
2024-05-06 16:11:42 +08:00
|
|
|
|
<view class="list-cell list-cell-arrow" @click="handleToUserInfo">
|
2024-04-23 23:01:35 +08:00
|
|
|
|
<view class="menu-item-box">
|
|
|
|
|
<view class="iconfont icon-user menu-icon"></view>
|
2024-05-06 16:11:42 +08:00
|
|
|
|
<view>账号设置</view>
|
2024-05-06 00:06:10 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="list-cell list-cell-arrow" @click="handleToInfo">
|
|
|
|
|
<view class="menu-item-box">
|
|
|
|
|
<view class="iconfont icon-user menu-icon"></view>
|
|
|
|
|
<view>个人信息</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="list-cell list-cell-arrow" @click="handleAbout">
|
|
|
|
|
<view class="menu-item-box">
|
|
|
|
|
<view class="iconfont icon-aixin menu-icon"></view>
|
|
|
|
|
<view>学生专属卡</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="list-cell list-cell-arrow" @click="handleAbout">
|
|
|
|
|
<view class="menu-item-box">
|
|
|
|
|
<view class="iconfont icon-aixin menu-icon"></view>
|
|
|
|
|
<view>邀请好友</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="list-cell list-cell-arrow" @click="handleAbout">
|
|
|
|
|
<view class="menu-item-box">
|
|
|
|
|
<view class="iconfont icon-aixin menu-icon"></view>
|
|
|
|
|
<view>优惠券</view>
|
2024-04-23 23:01:35 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2024-05-06 00:06:10 +08:00
|
|
|
|
<view class="list-cell list-cell-arrow" @click="handleAbout">
|
2024-04-23 23:01:35 +08:00
|
|
|
|
<view class="menu-item-box">
|
2024-05-06 00:06:10 +08:00
|
|
|
|
<view class="iconfont icon-aixin menu-icon"></view>
|
|
|
|
|
<view>地址管理</view>
|
2024-04-23 23:01:35 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2024-05-06 00:06:10 +08:00
|
|
|
|
<view class="list-cell list-cell-arrow" @click="handleAbout">
|
|
|
|
|
<view class="menu-item-box">
|
|
|
|
|
<view class="iconfont icon-aixin menu-icon"></view>
|
|
|
|
|
<view>我的订单</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="list-cell list-cell-arrow" @click="handleAbout">
|
|
|
|
|
<view class="menu-item-box">
|
|
|
|
|
<view class="iconfont icon-aixin menu-icon"></view>
|
|
|
|
|
<view>客服中心</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
2024-04-23 23:01:35 +08:00
|
|
|
|
<view class="list-cell list-cell-arrow" @click="handleAbout">
|
|
|
|
|
<view class="menu-item-box">
|
|
|
|
|
<view class="iconfont icon-aixin menu-icon"></view>
|
|
|
|
|
<view>关于我们</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="list-cell list-cell-arrow" @click="handleToSetting">
|
|
|
|
|
<view class="menu-item-box">
|
|
|
|
|
<view class="iconfont icon-setting menu-icon"></view>
|
|
|
|
|
<view>应用设置</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
2024-05-06 00:06:10 +08:00
|
|
|
|
<script setup>
|
|
|
|
|
import { useStore } from 'vuex'
|
|
|
|
|
import { useRouter } from 'vue-router'
|
|
|
|
|
import { ref, getCurrentInstance } from 'vue';
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
2024-04-23 23:01:35 +08:00
|
|
|
|
|
2024-05-06 00:06:10 +08:00
|
|
|
|
|
|
|
|
|
const name = ref(proxy.$store.state.user.name)
|
|
|
|
|
const nickName = ref(proxy.$store.state.user.nickName)
|
|
|
|
|
const sex = ref(proxy.$store.state.user.sex)
|
|
|
|
|
const version = ref(getApp().globalData.config.appInfo.version)
|
|
|
|
|
const avatar = ref(proxy.$store.state.user.avatar)
|
2024-05-08 10:28:48 +08:00
|
|
|
|
|
|
|
|
|
const info = ()=> {
|
|
|
|
|
console.log(avatar);
|
|
|
|
|
}
|
|
|
|
|
info();
|
2024-05-06 00:06:10 +08:00
|
|
|
|
|
2024-05-06 16:11:42 +08:00
|
|
|
|
const handleToUserInfo = ()=> {
|
|
|
|
|
proxy.$tab.navigateTo('/pages/mine/info/userInfo')
|
|
|
|
|
}
|
|
|
|
|
|
2024-05-06 00:06:10 +08:00
|
|
|
|
function windowHeight() {
|
2024-04-23 23:01:35 +08:00
|
|
|
|
return uni.getSystemInfoSync().windowHeight - 50
|
|
|
|
|
}
|
2024-05-06 00:06:10 +08:00
|
|
|
|
|
|
|
|
|
function handleToInfo() {
|
|
|
|
|
proxy.$tab.navigateTo('/pages/mine/info/index')
|
|
|
|
|
}
|
|
|
|
|
function handleToEditInfo() {
|
|
|
|
|
proxy.$tab.navigateTo('/pages/mine/info/edit')
|
|
|
|
|
}
|
|
|
|
|
function handleToSetting() {
|
|
|
|
|
proxy.$tab.navigateTo('/pages/mine/setting/index')
|
|
|
|
|
}
|
|
|
|
|
function handleToLogin() {
|
|
|
|
|
proxy.$tab.reLaunch('/pages/login')
|
|
|
|
|
}
|
|
|
|
|
function handleToAvatar() {
|
|
|
|
|
proxy.$tab.navigateTo('/pages/mine/avatar/index')
|
|
|
|
|
}
|
|
|
|
|
function handleLogout() {
|
|
|
|
|
proxy.$modal.confirm('确定注销并退出系统吗?').then(() => {
|
|
|
|
|
proxy.$store.dispatch('LogOut').then(() => {
|
|
|
|
|
proxy.$tab.reLaunch('/pages/index')
|
2024-04-23 23:01:35 +08:00
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
2024-05-06 00:06:10 +08:00
|
|
|
|
function handleHelp() {
|
|
|
|
|
proxy.$tab.navigateTo('/pages/mine/help/index')
|
|
|
|
|
}
|
|
|
|
|
function handleAbout() {
|
|
|
|
|
proxy.$tab.navigateTo('/pages/mine/about/index')
|
|
|
|
|
}
|
|
|
|
|
function handleJiaoLiuQun() {
|
|
|
|
|
proxy.$modal.showToast('QQ群:①133713780、②146013835')
|
|
|
|
|
}
|
|
|
|
|
function handleBuilding() {
|
|
|
|
|
proxy.$modal.showToast('模块建设中~')
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-23 23:01:35 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
page {
|
|
|
|
|
background-color: #f5f6f7;
|
|
|
|
|
}
|
2024-05-06 00:06:10 +08:00
|
|
|
|
.info1{
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content:space-evenly;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.info11{
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
background-color: rgba(174, 235, 96, 1);
|
|
|
|
|
border-radius: 15px;
|
|
|
|
|
padding: 2px 8px 2px 8px;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
.info12{
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
background-color: rgba(242, 132, 102, 1);
|
|
|
|
|
border-radius: 15px;
|
|
|
|
|
padding: 2px 8px 2px 8px;
|
|
|
|
|
}
|
|
|
|
|
.info13{
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
background-color: rgba(116, 118, 230, 1);
|
|
|
|
|
border-radius: 15px;
|
|
|
|
|
padding: 2px 8px 2px 8px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.zinfo{
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content:space-evenly;
|
|
|
|
|
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
|
|
|
|
|
}
|
2024-04-23 23:01:35 +08:00
|
|
|
|
</style>
|