<template>
|
<PageLayoutWithBg class="index-page-wrapper" :title="'首页'" :need-auth="false">
|
<template #left>
|
<div class="menu-btn-wrapper city-btn" @click="goCitySelect">
|
<div class="city-btn-text">{{ locationCity }}</div>
|
<RectDown :size="12" />
|
</div>
|
</template>
|
</PageLayoutWithBg>
|
</template>
|
|
<script setup lang="ts">
|
import { useUser } from '@/hooks';
|
import { useUserStore } from '@/stores/modules/user';
|
import { RectDown } from '@nutui/icons-vue-taro';
|
import Taro from '@tarojs/taro';
|
import { LocationUtils } from '@12333/utils';
|
|
const { locationCity } = useUser();
|
|
const userStore = useUserStore();
|
|
function goCitySelect() {
|
Taro.navigateTo({
|
url: RouterPath.citySelect,
|
});
|
}
|
// onMounted(async () => {
|
// if (!isSetMatchMakingIdentity.value) {
|
// Taro.navigateTo({
|
// url: RouterPath.toggleMatchMakingIdentity,
|
// });
|
// }
|
// });
|
</script>
|
|
<style lang="scss">
|
@import '@/styles/common.scss';
|
|
.index-page-wrapper {
|
.city-btn {
|
display: flex;
|
align-items: center;
|
|
.city-btn-text {
|
max-width: 200px;
|
@include ellipsis;
|
margin-right: 12px;
|
}
|
}
|
}
|
</style>
|