wwf
昨天 737179a0ce34147269cccf288fecd0e7bb4c309b
src/views/main/home/index.vue
@@ -54,7 +54,15 @@
</template>
<script>
import { useLoginStore } from '@/stores/login.js'
import { useSessionStore } from '@/stores/session.js'
import { storeToRefs } from 'pinia';
export default {
  setup() {
    const { userInfo } = storeToRefs(useSessionStore())
    const { loginDialogVisible } = storeToRefs(useLoginStore())
    return { userInfo, loginDialogVisible }
  },
  data() {
    return {
      operationList: [
@@ -114,6 +122,11 @@
      this.$router.push('/main/noticeList')
    },
    goOperationPage(item) {
      if (item.value != 'appraisalPlan' && !this.userInfo.id) {
        this.loginDialogVisible = true
        this.$message.primary('请先登录')
        return
      }
      this.$router.push(`/main/${item.value}`)
    }
  }