zs 1 month ago
parent
commit
800693601a
3 changed files with 6 additions and 3 deletions
  1. 1 1
      src/router/index.js
  2. 3 1
      src/views/detail/baseDetail.vue
  3. 2 1
      src/views/detail/projectDetail.vue

+ 1 - 1
src/router/index.js

@@ -33,7 +33,7 @@ const router = createRouter({
       path: '/thr',
       name: 'thr',
       meta: { title: '产学研用协同创新数字化平台-创新中心' },
-      component: () => import('@/views/thr/index.vue')
+      component: () => import('@/views/thr/demand.vue')
     },
     {
       path: '/thrOne',

+ 3 - 1
src/views/detail/baseDetail.vue

@@ -185,7 +185,9 @@ const toView = (item) => {
 }
 // 查看企业详情
 const toCompany = (item) => {
-  router.push({ path: `/company/detail`, query: { id: item.company } })
+  if (user.value.id) {
+    router.push({ path: `/company/detail`, query: { id: item.company } })
+  } else ElMessage({ message: '未登录!', type: 'error' })
 }
 const getUrl = (item) => {
   if (item) return `${import.meta.env.VITE_APP_HOST}${item}`

+ 2 - 1
src/views/detail/projectDetail.vue

@@ -141,6 +141,7 @@ const contactApplyStore = ContactApplyStore()
 import { UserStore } from '@/store/user'
 const userStore = UserStore()
 const user = computed(() => userStore.user)
+const $checkRes = inject('$checkRes')
 
 // 收藏
 import moment from 'moment'
@@ -241,7 +242,7 @@ const toChat = () => {
         let apply_user = user.value.id
         const obj = { source_id, source, apply_user }
         const res = await contactApplyStore.create(obj)
-        $checkRes(res,`预约对接成功等待消息通知`,res.errmsg)
+        $checkRes(res, `预约对接成功等待消息通知`, res.errmsg)
       })
       .catch(() => {})
   } else ElMessage({ message: '未登录!', type: 'error' })