zhengyiming
2025-02-10 0470145fcd755d3f87bffc7a985bd3cc82c5f3f6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<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>