Prechádzať zdrojové kódy

修改详情页收藏

zs 9 mesiacov pred
rodič
commit
0e978eb0ee

+ 32 - 1
src/views/detail/achievementDetail.vue

@@ -4,6 +4,14 @@
       <div class="w_1300">
       <div class="w_1300">
         <div class="info_1">
         <div class="info_1">
           <h3 class="name">{{ info.name || '暂无' }}</h3>
           <h3 class="name">{{ info.name || '暂无' }}</h3>
+          <div class="collect iscollect" @click="toCollect" v-if="info.is_collection">
+            <el-icon :size="24" color="#1073ff"><StarFilled /></el-icon>
+            <span>已收藏</span>
+          </div>
+          <div class="collect" v-else @click="toCollect">
+            <el-icon :size="24"><Star /></el-icon>
+            <span>收藏</span>
+          </div>
           <div class="other_1">
           <div class="other_1">
             <div class="value">
             <div class="value">
               <el-image class="image" :src="icon1" fit="fill" />
               <el-image class="image" :src="icon1" fit="fill" />
@@ -109,6 +117,9 @@ import icon9 from '/images/achievement/cg-detail-icon9.png'
 // 接口
 // 接口
 import { AchievementStore } from '@/store/api/platform/achievement'
 import { AchievementStore } from '@/store/api/platform/achievement'
 const store = AchievementStore()
 const store = AchievementStore()
+import { UserStore } from '@/store/user'
+const userStore = UserStore()
+const user = computed(() => userStore.user)
 // 加载中
 // 加载中
 const loading = ref(false)
 const loading = ref(false)
 // 路由
 // 路由
@@ -149,6 +160,11 @@ const toView = async (item) => {
     location.reload()
     location.reload()
   })
   })
 }
 }
+const toCollect = async () => {
+  if (user.value.id) {
+    info.value.is_collection = !info.value.is_collection
+  } else ElMessage({ message: '未登录!', type: 'error' })
+}
 </script>
 </script>
 <style scoped lang="scss">
 <style scoped lang="scss">
 .main {
 .main {
@@ -156,11 +172,26 @@ const toView = async (item) => {
     background: url(/images/bg-cg_detail-infor.png) no-repeat top right;
     background: url(/images/bg-cg_detail-infor.png) no-repeat top right;
     .info_1 {
     .info_1 {
       padding: 100px 80px 0 80px;
       padding: 100px 80px 0 80px;
+
       .name {
       .name {
         font-size: $global-font-size-36;
         font-size: $global-font-size-36;
-        width: 50%;
+        width: 70%;
         font-weight: bold;
         font-weight: bold;
       }
       }
+      .collect {
+        display: flex;
+        align-items: center;
+        width: 50%;
+        font-size: $global-font-size-20;
+        color: #929292;
+        cursor: default;
+        span {
+          margin: 0 0 0 5px;
+        }
+      }
+      .iscollect {
+        color: #1073ff;
+      }
       .other_1 {
       .other_1 {
         width: 430px;
         width: 430px;
         margin-top: 40px !important;
         margin-top: 40px !important;

+ 44 - 4
src/views/detail/companyDetail.vue

@@ -12,7 +12,17 @@
             </el-image>
             </el-image>
           </div>
           </div>
           <div class="oneRight">
           <div class="oneRight">
-            <div class="name">{{ info.name || '暂无' }}</div>
+            <div class="info_title">
+              <div class="name">{{ info.name || '暂无' }}</div>
+              <div class="collect iscollect" @click="toCollect" v-if="info.is_collection">
+                <el-icon :size="24" color="#1073ff"><StarFilled /></el-icon>
+                <span>已收藏</span>
+              </div>
+              <div class="collect" v-else @click="toCollect">
+                <el-icon :size="24"><Star /></el-icon>
+                <span>收藏</span>
+              </div>
+            </div>
             <p><span>企业类型: </span>{{ getDict(info.pattern, 'pattern') || '暂无' }}</p>
             <p><span>企业类型: </span>{{ getDict(info.pattern, 'pattern') || '暂无' }}</p>
             <p><span>企业人数: </span>{{ info.person || '暂无' }}人</p>
             <p><span>企业人数: </span>{{ info.person || '暂无' }}人</p>
             <p><span>企业所属行业: </span>{{ getDict(info.type, 'industry') || '暂无' }}</p>
             <p><span>企业所属行业: </span>{{ getDict(info.type, 'industry') || '暂无' }}</p>
@@ -47,6 +57,9 @@ import { get } from 'lodash-es'
 // 接口
 // 接口
 import { CompanyStore } from '@/store/api/user/company'
 import { CompanyStore } from '@/store/api/user/company'
 const store = CompanyStore()
 const store = CompanyStore()
+import { UserStore } from '@/store/user'
+const userStore = UserStore()
+const user = computed(() => userStore.user)
 // 加载中
 // 加载中
 const loading = ref(false)
 const loading = ref(false)
 // 路由
 // 路由
@@ -108,6 +121,11 @@ const getDict = (data, model) => {
 const getUrl = (item) => {
 const getUrl = (item) => {
   if (item && item.length > 0) return `${import.meta.env.VITE_APP_HOST}${item[0].uri}`
   if (item && item.length > 0) return `${import.meta.env.VITE_APP_HOST}${item[0].uri}`
 }
 }
+const toCollect = async () => {
+  if (user.value.id) {
+    info.value.is_collection = !info.value.is_collection
+  } else ElMessage({ message: '未登录!', type: 'error' })
+}
 </script>
 </script>
 <style scoped lang="scss">
 <style scoped lang="scss">
 .main {
 .main {
@@ -130,10 +148,32 @@ const getUrl = (item) => {
         }
         }
       }
       }
       .oneRight {
       .oneRight {
-        .name {
-          font-size: $global-font-size-26;
+        width: 1100px;
+        .info_title {
+          display: flex;
+          justify-content: space-between;
+          align-items: center;
           margin-bottom: 20px;
           margin-bottom: 20px;
-          color: $global-color-fff;
+
+          .name {
+            font-size: $global-font-size-26;
+            color: $global-color-fff;
+          }
+          .collect {
+            display: flex;
+            align-items: center;
+            justify-content: flex-end;
+            width: 50%;
+            font-size: $global-font-size-20;
+            color: #929292;
+            cursor: default;
+            span {
+              margin: 0 0 0 5px;
+            }
+          }
+          .iscollect {
+            color: #1073ff;
+          }
         }
         }
         p {
         p {
           font-size: $global-font-size-16;
           font-size: $global-font-size-16;

+ 48 - 9
src/views/detail/demandDetail.vue

@@ -8,7 +8,17 @@
             <el-icon color="#0085f5"><Location /></el-icon>
             <el-icon color="#0085f5"><Location /></el-icon>
             <span>{{ getArea(info.area) }}</span>
             <span>{{ getArea(info.area) }}</span>
           </div>
           </div>
-          <div class="name">{{ info.name || '暂无' }}</div>
+          <div class="info_title">
+            <div class="name">{{ info.name || '暂无' }}</div>
+            <div class="collect iscollect" @click="toCollect" v-if="info.is_collection">
+              <el-icon :size="24" color="#1073ff"><StarFilled /></el-icon>
+              <span>已收藏</span>
+            </div>
+            <div class="collect" v-else @click="toCollect">
+              <el-icon :size="24"><Star /></el-icon>
+              <span>收藏</span>
+            </div>
+          </div>
           <div class="other">
           <div class="other">
             <span class="other_1">{{ getDict(info.urgent, 'urgent') || '暂无' }}</span>
             <span class="other_1">{{ getDict(info.urgent, 'urgent') || '暂无' }}</span>
             <div class="other_2">
             <div class="other_2">
@@ -76,6 +86,9 @@ import { DictDataStore } from '@/store/api/system/dictData'
 import { DemandStore } from '@/store/api/platform/demand'
 import { DemandStore } from '@/store/api/platform/demand'
 const store = DemandStore()
 const store = DemandStore()
 const dictDataStore = DictDataStore()
 const dictDataStore = DictDataStore()
+import { UserStore } from '@/store/user'
+const userStore = UserStore()
+const user = computed(() => userStore.user)
 const $checkRes = inject('$checkRes')
 const $checkRes = inject('$checkRes')
 // 加载中
 // 加载中
 const loading = ref(false)
 const loading = ref(false)
@@ -171,6 +184,11 @@ const toView = (item) => {
     location.reload()
     location.reload()
   })
   })
 }
 }
+const toCollect = async () => {
+  if (user.value.id) {
+    info.value.is_collection = !info.value.is_collection
+  } else ElMessage({ message: '未登录!', type: 'error' })
+}
 </script>
 </script>
 <style scoped lang="scss">
 <style scoped lang="scss">
 .main {
 .main {
@@ -183,7 +201,7 @@ const toView = (item) => {
     }
     }
     .info_2 {
     .info_2 {
       position: relative;
       position: relative;
-      padding: 0 20px 0 50px;
+      padding: 0 40px;
       background-color: #fff;
       background-color: #fff;
       box-shadow: 0 0 13px 0 rgba(5, 88, 219, 0.18);
       box-shadow: 0 0 13px 0 rgba(5, 88, 219, 0.18);
       .area {
       .area {
@@ -191,18 +209,39 @@ const toView = (item) => {
         align-items: center;
         align-items: center;
         justify-content: flex-end;
         justify-content: flex-end;
         padding-top: 15px;
         padding-top: 15px;
-        margin-right: 20px;
         font-size: $global-font-size-16;
         font-size: $global-font-size-16;
         span {
         span {
           margin: 0 0 0 5px;
           margin: 0 0 0 5px;
         }
         }
       }
       }
-      .name {
-        margin-top: 15px;
-        font-size: $global-font-size-24;
-        line-height: 36px;
-        color: #2b2b2b;
+      .info_title {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        .name {
+          margin-top: 15px;
+          font-size: $global-font-size-24;
+          width: 90%;
+          line-height: 36px;
+          color: #2b2b2b;
+        }
+        .collect {
+          display: flex;
+          align-items: center;
+          justify-content: flex-end;
+          width: 50%;
+          font-size: $global-font-size-20;
+          color: #929292;
+          cursor: default;
+          span {
+            margin: 0 0 0 5px;
+          }
+        }
+        .iscollect {
+          color: #1073ff;
+        }
       }
       }
+
       .other {
       .other {
         margin-top: 25px;
         margin-top: 25px;
         .other_1 {
         .other_1 {
@@ -264,7 +303,7 @@ const toView = (item) => {
     }
     }
     .info_3 {
     .info_3 {
       margin-top: 20px;
       margin-top: 20px;
-      padding: 50px;
+      padding: 40px;
       background-color: #fff;
       background-color: #fff;
       border: solid 1px #dedede;
       border: solid 1px #dedede;
       font-size: $global-font-size-16;
       font-size: $global-font-size-16;

+ 46 - 4
src/views/detail/expertDetail.vue

@@ -7,7 +7,17 @@
           <div class="infoName">
           <div class="infoName">
             <el-image class="image" :src="userLogo" fit="fill" />
             <el-image class="image" :src="userLogo" fit="fill" />
             <div class="other_1">
             <div class="other_1">
-              <div class="name">{{ info.name || '暂无' }}</div>
+              <div class="info_title">
+                <div class="name">{{ info.name || '暂无' }}</div>
+                <div class="collect iscollect" @click="toCollect" v-if="info.is_collection">
+                  <el-icon :size="24" color="#1073ff"><StarFilled /></el-icon>
+                  <span>已收藏</span>
+                </div>
+                <div class="collect" v-else @click="toCollect">
+                  <el-icon :size="24"><Star /></el-icon>
+                  <span>收藏</span>
+                </div>
+              </div>
               <div class="brief">
               <div class="brief">
                 <span>{{ info.title || '暂无' }}</span>
                 <span>{{ info.title || '暂无' }}</span>
                 <span v-if="info.area">{{ info.area || '暂无' }}</span>
                 <span v-if="info.area">{{ info.area || '暂无' }}</span>
@@ -87,6 +97,9 @@
 import userLogo from '/images/userLogo.png'
 import userLogo from '/images/userLogo.png'
 import { ExpertStore } from '@/store/api/user/expert'
 import { ExpertStore } from '@/store/api/user/expert'
 const store = ExpertStore()
 const store = ExpertStore()
+import { UserStore } from '@/store/user'
+const userStore = UserStore()
+const user = computed(() => userStore.user)
 // 加载中
 // 加载中
 const loading = ref(false)
 const loading = ref(false)
 // 路由
 // 路由
@@ -136,6 +149,11 @@ const searchOther = async () => {
 const toActive = (item) => {
 const toActive = (item) => {
   active.value = item
   active.value = item
 }
 }
+const toCollect = async () => {
+  if (user.value.id) {
+    info.value.is_collection = !info.value.is_collection
+  } else ElMessage({ message: '未登录!', type: 'error' })
+}
 </script>
 </script>
 <style scoped lang="scss">
 <style scoped lang="scss">
 .main {
 .main {
@@ -157,9 +175,31 @@ const toActive = (item) => {
         justify-content: center;
         justify-content: center;
         .other_1 {
         .other_1 {
           margin: 0 0 0 10px;
           margin: 0 0 0 10px;
-          .name {
-            font-size: $global-font-size-22;
-            font-weight: bold;
+
+          .info_title {
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+
+            .name {
+              font-size: $global-font-size-22;
+              font-weight: bold;
+            }
+            .collect {
+              display: flex;
+              align-items: center;
+              justify-content: flex-end;
+              width: 50%;
+              font-size: $global-font-size-20;
+              color: #929292;
+              cursor: default;
+              span {
+                margin: 0 0 0 5px;
+              }
+            }
+            .iscollect {
+              color: #1073ff;
+            }
           }
           }
           .brief {
           .brief {
             font-size: $global-font-size-18;
             font-size: $global-font-size-18;
@@ -224,11 +264,13 @@ const toActive = (item) => {
               margin: 0 10px 0 0;
               margin: 0 10px 0 0;
               color: #666666;
               color: #666666;
               border: 1px solid #bbbbbb;
               border: 1px solid #bbbbbb;
+              cursor: default;
             }
             }
             .menuTrue {
             .menuTrue {
               color: $global-color-fff;
               color: $global-color-fff;
               background: #1073ff;
               background: #1073ff;
               border: none;
               border: none;
+              cursor: default;
             }
             }
           }
           }
           .content_2 {
           .content_2 {

+ 0 - 3
src/views/detail/industryDetail.vue

@@ -22,9 +22,6 @@
 // 接口
 // 接口
 import { SectorStore } from '@/store/api/platform/sector'
 import { SectorStore } from '@/store/api/platform/sector'
 const store = SectorStore()
 const store = SectorStore()
-import { UserStore } from '@/store/user'
-const userStore = UserStore()
-const user = userStore.user
 // 加载中
 // 加载中
 const loading = ref(false)
 const loading = ref(false)
 // 路由
 // 路由

+ 29 - 2
src/views/detail/matchDetail.vue

@@ -4,8 +4,16 @@
       <div class="w_1300">
       <div class="w_1300">
         <div class="info_1">
         <div class="info_1">
           <h3 class="name">{{ info.name || '暂无' }}</h3>
           <h3 class="name">{{ info.name || '暂无' }}</h3>
+          <div class="collect iscollect" @click="toCollect" v-if="info.is_collection">
+            <el-icon :size="24" color="#1073ff"><StarFilled /></el-icon>
+            <span>已收藏</span>
+          </div>
+          <div class="collect" v-else @click="toCollect">
+            <el-icon :size="24"><Star /></el-icon>
+            <span>收藏</span>
+          </div>
           <p class="brief">{{ info.industry || '暂无' }}</p>
           <p class="brief">{{ info.industry || '暂无' }}</p>
-          <p class="money" v-if="info.money">{{ info.money || '暂无' }}</p>
+          <p class="money" v-if="info.money">奖金:{{ info.money || '暂无' }}</p>
           <div class="other" v-if="info.match_type">
           <div class="other" v-if="info.match_type">
             <span>活动类型:</span>
             <span>活动类型:</span>
             <span class="type">{{ getDict(info.match_type, 'type') || '暂无' }}</span>
             <span class="type">{{ getDict(info.match_type, 'type') || '暂无' }}</span>
@@ -251,6 +259,11 @@ const submitForm = async (formEl) => {
     ElMessage.error('用户未登录无法报名活动!')
     ElMessage.error('用户未登录无法报名活动!')
   }
   }
 }
 }
+const toCollect = async () => {
+  if (user.value.id) {
+    info.value.is_collection = !info.value.is_collection
+  } else ElMessage({ message: '未登录!', type: 'error' })
+}
 // provide
 // provide
 provide('form', form)
 provide('form', form)
 provide('rules', rules)
 provide('rules', rules)
@@ -267,9 +280,23 @@ provide('submitForm', submitForm)
       padding: 90px 80px 0 80px;
       padding: 90px 80px 0 80px;
       .name {
       .name {
         font-size: $global-font-size-36;
         font-size: $global-font-size-36;
-        width: 50%;
+        width: 70%;
         font-weight: bold;
         font-weight: bold;
       }
       }
+      .collect {
+        display: flex;
+        align-items: center;
+        width: 50%;
+        font-size: $global-font-size-20;
+        color: #929292;
+        cursor: default;
+        span {
+          margin: 0 0 0 5px;
+        }
+      }
+      .iscollect {
+        color: #1073ff;
+      }
       .brief {
       .brief {
         font-size: $global-font-size-20;
         font-size: $global-font-size-20;
         margin-top: 25px;
         margin-top: 25px;

+ 11 - 2
src/views/detail/news.vue

@@ -43,7 +43,17 @@
                 </el-col>
                 </el-col>
               </el-col>
               </el-col>
               <el-col :span="24" class="pager">
               <el-col :span="24" class="pager">
-                <el-pagination background layout="total, prev, pager, next" :page-sizes="[10, 20, 50, 100, 200]" :total="total" :page-size="limit" v-model:current-page="currentPage" @current-change="changePage" @size-change="sizeChange"> </el-pagination>
+                <el-pagination
+                  background
+                  layout="total, prev, pager, next"
+                  :page-sizes="[10, 20, 50, 100, 200]"
+                  :total="total"
+                  :page-size="limit"
+                  v-model:current-page="currentPage"
+                  @current-change="changePage"
+                  @size-change="sizeChange"
+                >
+                </el-pagination>
               </el-col>
               </el-col>
             </el-col>
             </el-col>
             <el-col :span="6" class="right">
             <el-col :span="6" class="right">
@@ -89,7 +99,6 @@ const projectStore = ProjectStore()
 const achievementStore = AchievementStore()
 const achievementStore = AchievementStore()
 // 路由
 // 路由
 const router = useRouter()
 const router = useRouter()
-const route = useRoute()
 // 图片引入
 // 图片引入
 import new_4 from '/images/new_4.png'
 import new_4 from '/images/new_4.png'
 // 加载中
 // 加载中

+ 18 - 0
src/views/detail/newsDetail.vue

@@ -6,6 +6,14 @@
         <el-col :span="24" class="one_2">
         <el-col :span="24" class="one_2">
           <div class="left">
           <div class="left">
             <h2>{{ info.title || '暂无' }}</h2>
             <h2>{{ info.title || '暂无' }}</h2>
+            <div class="collect" @click="toCollect" v-if="info.is_collection">
+              <el-icon :size="24" color="#1073ff"><StarFilled /></el-icon>
+              <span>已收藏</span>
+            </div>
+            <div class="collect" v-else @click="toCollect">
+              <el-icon :size="24"><Star /></el-icon>
+              <span>收藏</span>
+            </div>
             <div class="other">
             <div class="other">
               <div class="other_1">
               <div class="other_1">
                 <el-image class="image" :src="time1" fit="fill" />
                 <el-image class="image" :src="time1" fit="fill" />
@@ -97,6 +105,9 @@ const store = NewsStore()
 const expertStore = ExpertStore()
 const expertStore = ExpertStore()
 const matchStore = MatchStore()
 const matchStore = MatchStore()
 const projectStore = ProjectStore()
 const projectStore = ProjectStore()
+import { UserStore } from '@/store/user'
+const userStore = UserStore()
+const user = computed(() => userStore.user)
 // 路由
 // 路由
 const router = useRouter()
 const router = useRouter()
 const route = useRoute()
 const route = useRoute()
@@ -172,6 +183,11 @@ const toView = (item, type) => {
   else if (type == '1') router.push({ path: '/expert/detail', query: { id: item.id || item._id } })
   else if (type == '1') router.push({ path: '/expert/detail', query: { id: item.id || item._id } })
   else if (type == '2') router.push({ path: '/project/detail', query: { id: item.id || item._id } })
   else if (type == '2') router.push({ path: '/project/detail', query: { id: item.id || item._id } })
 }
 }
+const toCollect = async () => {
+  if (user.value.id) {
+    info.value.is_collection = !info.value.is_collection
+  } else ElMessage({ message: '未登录!', type: 'error' })
+}
 </script>
 </script>
 <style scoped lang="scss">
 <style scoped lang="scss">
 .main {
 .main {
@@ -292,11 +308,13 @@ const toView = (item, type) => {
               .button {
               .button {
                 color: $global-color-107;
                 color: $global-color-107;
                 padding: 5px 15px;
                 padding: 5px 15px;
+                cursor: default;
               }
               }
               .button:hover {
               .button:hover {
                 color: $global-color-fff;
                 color: $global-color-fff;
                 background-color: $global-color-107;
                 background-color: $global-color-107;
                 border-radius: 20px;
                 border-radius: 20px;
+                cursor: default;
               }
               }
             }
             }
           }
           }

+ 43 - 6
src/views/detail/platformDetail.vue

@@ -13,7 +13,17 @@
               </el-carousel>
               </el-carousel>
             </div>
             </div>
             <div class="info_right">
             <div class="info_right">
-              <div class="right_name">{{ info.name || '暂无' }}</div>
+              <div class="info_title">
+                <div class="name">{{ info.name || '暂无' }}</div>
+                <div class="collect iscollect" @click="toCollect" v-if="info.is_collection">
+                  <el-icon :size="24" color="#1073ff"><StarFilled /></el-icon>
+                  <span>已收藏</span>
+                </div>
+                <div class="collect" v-else @click="toCollect">
+                  <el-icon :size="24"><Star /></el-icon>
+                  <span>收藏</span>
+                </div>
+              </div>
               <el-col :span="24" class="other_1">
               <el-col :span="24" class="other_1">
                 <span>建设主体:</span>
                 <span>建设主体:</span>
                 {{ info.build || '暂无建设主体' }}
                 {{ info.build || '暂无建设主体' }}
@@ -141,6 +151,11 @@ const getUrl = (item, type) => {
     else return `${import.meta.env.VITE_APP_HOST}${item}`
     else return `${import.meta.env.VITE_APP_HOST}${item}`
   }
   }
 }
 }
+const toCollect = async () => {
+  if (user.value.id) {
+    info.value.is_collection = !info.value.is_collection
+  } else ElMessage({ message: '未登录!', type: 'error' })
+}
 </script>
 </script>
 <style scoped lang="scss">
 <style scoped lang="scss">
 .main {
 .main {
@@ -166,12 +181,34 @@ const getUrl = (item, type) => {
         }
         }
         .info_right {
         .info_right {
           margin-left: 40px;
           margin-left: 40px;
-          width: 580px;
-          .right_name {
-            color: #22284e;
-            font-size: $global-font-size-26;
-            line-height: 26px;
+          width: 725px;
+
+          .info_title {
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
             margin-bottom: 30px;
             margin-bottom: 30px;
+
+            .name {
+              color: #22284e;
+              font-size: $global-font-size-26;
+              line-height: 26px;
+            }
+            .collect {
+              display: flex;
+              align-items: center;
+              justify-content: flex-end;
+              width: 50%;
+              font-size: $global-font-size-20;
+              color: #929292;
+              cursor: default;
+              span {
+                margin: 0 0 0 5px;
+              }
+            }
+            .iscollect {
+              color: #1073ff;
+            }
           }
           }
           .other_1 {
           .other_1 {
             font-size: $global-font-size-18;
             font-size: $global-font-size-18;

+ 13 - 0
src/views/detail/projectDetail.vue

@@ -62,6 +62,14 @@
               <div class="pdf_type textOne">{{ info.industry || '暂无' }}</div>
               <div class="pdf_type textOne">{{ info.industry || '暂无' }}</div>
               <div class="title">
               <div class="title">
                 <p class="ellipsis-3">{{ info.name || '暂无' }}</p>
                 <p class="ellipsis-3">{{ info.name || '暂无' }}</p>
+                <div class="collect" @click="toCollect" v-if="info.is_collection">
+                  <el-icon :size="24" color="#1073ff"><StarFilled /></el-icon>
+                  <span>已收藏</span>
+                </div>
+                <div class="collect" v-else @click="toCollect">
+                  <el-icon :size="24"><Star /></el-icon>
+                  <span>收藏</span>
+                </div>
               </div>
               </div>
               <div class="address">
               <div class="address">
                 <el-icon color="#595959"><Location /></el-icon>
                 <el-icon color="#595959"><Location /></el-icon>
@@ -237,6 +245,11 @@ const toClose = () => {
   dialog.value = false
   dialog.value = false
   form.value = {}
   form.value = {}
 }
 }
+const toCollect = async () => {
+  if (user.value.id) {
+    info.value.is_collection = !info.value.is_collection
+  } else ElMessage({ message: '未登录!', type: 'error' })
+}
 // provide
 // provide
 provide('form', form)
 provide('form', form)
 provide('rules', rules)
 provide('rules', rules)

+ 42 - 6
src/views/detail/serviceDetail.vue

@@ -13,7 +13,17 @@
               </el-carousel>
               </el-carousel>
             </div>
             </div>
             <div class="info_right">
             <div class="info_right">
-              <div class="right_name">{{ info.name || '暂无' }}</div>
+              <div class="info_title">
+                <div class="name">{{ info.name || '暂无' }}</div>
+                <div class="collect iscollect" @click="toCollect" v-if="info.is_collection">
+                  <el-icon :size="24" color="#1073ff"><StarFilled /></el-icon>
+                  <span>已收藏</span>
+                </div>
+                <div class="collect" v-else @click="toCollect">
+                  <el-icon :size="24"><Star /></el-icon>
+                  <span>收藏</span>
+                </div>
+              </div>
               <el-col :span="24" class="other_1">
               <el-col :span="24" class="other_1">
                 <span>服务领域:</span>
                 <span>服务领域:</span>
                 {{ info.field || '暂无服务领域' }}
                 {{ info.field || '暂无服务领域' }}
@@ -108,6 +118,11 @@ const toView = (item) => {
 const getUrl = (item) => {
 const getUrl = (item) => {
   if (item) return `${import.meta.env.VITE_APP_HOST}${item}`
   if (item) return `${import.meta.env.VITE_APP_HOST}${item}`
 }
 }
+const toCollect = async () => {
+  if (user.value.id) {
+    info.value.is_collection = !info.value.is_collection
+  } else ElMessage({ message: '未登录!', type: 'error' })
+}
 </script>
 </script>
 <style scoped lang="scss">
 <style scoped lang="scss">
 .main {
 .main {
@@ -134,12 +149,33 @@ const getUrl = (item) => {
         }
         }
         .info_right {
         .info_right {
           margin-left: 40px;
           margin-left: 40px;
-          width: 600px;
-          .right_name {
-            color: #22284e;
-            font-size: $global-font-size-26;
-            line-height: 26px;
+          width: 740px;
+          .info_title {
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
             margin-bottom: 30px;
             margin-bottom: 30px;
+
+            .name {
+              color: #22284e;
+              font-size: $global-font-size-26;
+              line-height: 26px;
+            }
+            .collect {
+              display: flex;
+              align-items: center;
+              justify-content: flex-end;
+              width: 50%;
+              font-size: $global-font-size-20;
+              color: #929292;
+              cursor: default;
+              span {
+                margin: 0 0 0 5px;
+              }
+            }
+            .iscollect {
+              color: #1073ff;
+            }
           }
           }
           .other_1 {
           .other_1 {
             font-size: $global-font-size-18;
             font-size: $global-font-size-18;

+ 0 - 4
src/views/detail/studyDetail.vue

@@ -34,13 +34,9 @@ import lists from '/images/bg-tec-list.jpg'
 // 接口
 // 接口
 import { DirectoryStore } from '@/store/api/platform/directory'
 import { DirectoryStore } from '@/store/api/platform/directory'
 const store = DirectoryStore()
 const store = DirectoryStore()
-import { UserStore } from '@/store/user'
-const userStore = UserStore()
-const user = computed(() => userStore.user)
 // 加载中
 // 加载中
 const loading = ref(false)
 const loading = ref(false)
 // 路由
 // 路由
-const router = useRouter()
 const route = useRoute()
 const route = useRoute()
 
 
 const column = ref([
 const column = ref([

+ 41 - 16
src/views/detail/supplyDetail.vue

@@ -8,7 +8,17 @@
             <!-- <el-icon color="#0085f5"><Location /></el-icon>
             <!-- <el-icon color="#0085f5"><Location /></el-icon>
             <span>{{ info.area || '暂无' }}</span> -->
             <span>{{ info.area || '暂无' }}</span> -->
           </div>
           </div>
-          <div class="name">{{ info.name || '暂无' }}</div>
+          <div class="info_title">
+            <div class="name">{{ info.name || '暂无' }}</div>
+            <div class="collect iscollect" @click="toCollect" v-if="info.is_collection">
+              <el-icon :size="24" color="#1073ff"><StarFilled /></el-icon>
+              <span>已收藏</span>
+            </div>
+            <div class="collect" v-else @click="toCollect">
+              <el-icon :size="24"><Star /></el-icon>
+              <span>收藏</span>
+            </div>
+          </div>
           <div class="other">
           <div class="other">
             <span class="other_1">{{ getDict(info.urgent, 'urgent') || '暂无' }}</span>
             <span class="other_1">{{ getDict(info.urgent, 'urgent') || '暂无' }}</span>
             <div class="other_2">
             <div class="other_2">
@@ -162,6 +172,11 @@ const toView = (item) => {
     location.reload()
     location.reload()
   })
   })
 }
 }
+const toCollect = async () => {
+  if (user.value.id) {
+    info.value.is_collection = !info.value.is_collection
+  } else ElMessage({ message: '未登录!', type: 'error' })
+}
 </script>
 </script>
 <style scoped lang="scss">
 <style scoped lang="scss">
 .main {
 .main {
@@ -174,25 +189,35 @@ const toView = (item) => {
     }
     }
     .info_2 {
     .info_2 {
       position: relative;
       position: relative;
-      padding: 0 20px 0 50px;
+      padding: 0 40px;
       background-color: #fff;
       background-color: #fff;
       box-shadow: 0 0 13px 0 rgba(5, 88, 219, 0.18);
       box-shadow: 0 0 13px 0 rgba(5, 88, 219, 0.18);
-      .area {
+      .info_title {
         display: flex;
         display: flex;
+        justify-content: space-between;
         align-items: center;
         align-items: center;
-        justify-content: flex-end;
-        padding-top: 15px;
-        margin-right: 20px;
-        font-size: $global-font-size-16;
-        span {
-          margin: 0 0 0 5px;
+        .name {
+          margin-top: 15px;
+          font-size: $global-font-size-24;
+          width: 90%;
+          line-height: 36px;
+          color: #2b2b2b;
+        }
+        .collect {
+          display: flex;
+          align-items: center;
+          justify-content: flex-end;
+          width: 50%;
+          font-size: $global-font-size-20;
+          color: #929292;
+          cursor: default;
+          span {
+            margin: 0 0 0 5px;
+          }
+        }
+        .iscollect {
+          color: #1073ff;
         }
         }
-      }
-      .name {
-        margin-top: 15px;
-        font-size: $global-font-size-24;
-        line-height: 36px;
-        color: #2b2b2b;
       }
       }
       .other {
       .other {
         margin-top: 25px;
         margin-top: 25px;
@@ -255,7 +280,7 @@ const toView = (item) => {
     }
     }
     .info_3 {
     .info_3 {
       margin-top: 20px;
       margin-top: 20px;
-      padding: 50px;
+      padding: 40px;
       background-color: #fff;
       background-color: #fff;
       border: solid 1px #dedede;
       border: solid 1px #dedede;
       font-size: $global-font-size-16;
       font-size: $global-font-size-16;

+ 5 - 3
src/views/nine/index.vue

@@ -142,9 +142,9 @@
           </div>
           </div>
         </div>
         </div>
         <div class="two_ipunt">
         <div class="two_ipunt">
-          <el-input class="input" size="large" v-model="searchForm.name" placeholder="成果名称" />
-          <el-input class="input" size="large" v-model="searchForm.tags" placeholder="标签名称" />
-          <el-input class="input" size="large" v-model="searchForm.source" placeholder="项目来源" />
+          <el-input class="input" clearable size="large" v-model="searchForm.name" placeholder="成果名称" />
+          <el-input class="input" clearable size="large" v-model="searchForm.tags" placeholder="标签名称" />
+          <el-input class="input" clearable size="large" v-model="searchForm.source" placeholder="项目来源" />
           <el-button class="button" size="large" type="primary" @click="toSearchInfo">检索</el-button>
           <el-button class="button" size="large" type="primary" @click="toSearchInfo">检索</el-button>
         </div>
         </div>
       </div>
       </div>
@@ -284,9 +284,11 @@ const searchOther = async () => {
   matureList.value.unshift({ id: '-1', is_active: true, value: '-1', label: '不限' })
   matureList.value.unshift({ id: '-1', is_active: true, value: '-1', label: '不限' })
   sellList.value.unshift({ id: '-1', is_active: true, value: '-1', label: '不限' })
   sellList.value.unshift({ id: '-1', is_active: true, value: '-1', label: '不限' })
   typeList.value.unshift({ id: '-1', is_active: true, value: '-1', label: '不限' })
   typeList.value.unshift({ id: '-1', is_active: true, value: '-1', label: '不限' })
+  // 地区
   result = await regionStore.list({ level: 'city', parent_code: 22 })
   result = await regionStore.list({ level: 'city', parent_code: 22 })
   if (result.errcode == '0') cityList.value = result.data
   if (result.errcode == '0') cityList.value = result.data
   cityList.value.unshift({ id: '-1', is_active: true, code: '-1', name: '不限' })
   cityList.value.unshift({ id: '-1', is_active: true, code: '-1', name: '不限' })
+  // 行业板块
   result = await sectorStore.query({ is_use: '0' })
   result = await sectorStore.query({ is_use: '0' })
   if (result.errcode == '0') plateList.value = result.data
   if (result.errcode == '0') plateList.value = result.data
   plateList.value.unshift({ id: '-1', is_active: true, title: '不限' })
   plateList.value.unshift({ id: '-1', is_active: true, title: '不限' })

+ 5 - 24
src/views/one/index.vue

@@ -169,18 +169,9 @@ const matchList = ref([])
 const matchInfo = ref({})
 const matchInfo = ref({})
 // 分类
 // 分类
 const typeList = ref([
 const typeList = ref([
-  {
-    title: '热门高校',
-    list: []
-  },
-  {
-    title: '政府部门',
-    list: []
-  },
-  {
-    title: '科研机构',
-    list: []
-  }
+  { title: '热门高校', list: [] },
+  { title: '政府部门', list: [] },
+  { title: '科研机构', list: [] }
 ])
 ])
 // 请求
 // 请求
 onMounted(async () => {
 onMounted(async () => {
@@ -190,12 +181,7 @@ onMounted(async () => {
   loading.value = false
   loading.value = false
 })
 })
 const searchOther = async () => {
 const searchOther = async () => {
-  const info = {
-    skip: 0,
-    limit: 10,
-    is_use: '0',
-    status: '1'
-  }
+  const info = { skip: 0, limit: 10, is_use: '0', status: '1' }
   let res
   let res
   // 政策新闻
   // 政策新闻
   res = await newsStore.query({ ...info })
   res = await newsStore.query({ ...info })
@@ -216,12 +202,7 @@ const searchOther = async () => {
   }
   }
 }
 }
 const searchMatch = async () => {
 const searchMatch = async () => {
-  const info = {
-    skip: 0,
-    limit: 5,
-    is_use: '0',
-    status: '1'
-  }
+  const info = { skip: 0, limit: 5, is_use: '0', status: '1' }
   const res = await matchStore.query(info)
   const res = await matchStore.query(info)
   if (res.errcode == '0') {
   if (res.errcode == '0') {
     matchList.value = res.data.slice(1, 5)
     matchList.value = res.data.slice(1, 5)

+ 2 - 10
src/views/search/index.vue

@@ -76,11 +76,7 @@ onMounted(async () => {
   loading.value = false
   loading.value = false
 })
 })
 const search = async () => {
 const search = async () => {
-  const info = {
-    skip: 0,
-    limit: 6,
-    is_use: '0'
-  }
+  const info = { skip: 0, limit: 6, is_use: '0' }
   const res = await store.query(info)
   const res = await store.query(info)
   if (res.errcode == '0') list.value = res.data
   if (res.errcode == '0') list.value = res.data
 }
 }
@@ -100,11 +96,7 @@ const remoteMethod = (query) => {
     searchLoading.value = true
     searchLoading.value = true
     setTimeout(async () => {
     setTimeout(async () => {
       searchLoading.value = false
       searchLoading.value = false
-      const info = {
-        is_use: '0',
-        status: '1',
-        title: query
-      }
+      const info = { is_use: '0', status: '1', title: query }
       const res = await store.query(info)
       const res = await store.query(info)
       if (res.errcode == '0') tagsList.value = res.data
       if (res.errcode == '0') tagsList.value = res.data
     }, 200)
     }, 200)

+ 1 - 7
src/views/search/parts/achievement.vue

@@ -244,13 +244,7 @@ onMounted(async () => {
 const search = async (query = { skip, limit }) => {
 const search = async (query = { skip, limit }) => {
   skip = query.skip
   skip = query.skip
   limit = query.limit
   limit = query.limit
-  const info = {
-    skip: query.skip,
-    limit: query.limit,
-    status: '1',
-    is_use: '0',
-    ...searchForm.value
-  }
+  const info = { skip: query.skip, limit: query.limit, status: '1', is_use: '0', ...searchForm.value }
   if (searchValue.value) info.tags = searchValue.value
   if (searchValue.value) info.tags = searchValue.value
   const res = await store.query(info)
   const res = await store.query(info)
   if (res.errcode == '0') {
   if (res.errcode == '0') {

+ 1 - 6
src/views/search/parts/company.vue

@@ -181,12 +181,7 @@ const searchOther = async () => {
 const search = async (query = { skip, limit }) => {
 const search = async (query = { skip, limit }) => {
   skip = query.skip
   skip = query.skip
   limit = query.limit
   limit = query.limit
-  const info = {
-    skip: query.skip,
-    limit: query.limit,
-    status: '1',
-    ...searchForm.value
-  }
+  const info = { skip: query.skip, limit: query.limit, status: '1', ...searchForm.value }
   if (searchValue.value) info.tags = searchValue.value
   if (searchValue.value) info.tags = searchValue.value
   const res = await store.query(info)
   const res = await store.query(info)
   if (res.errcode == '0') {
   if (res.errcode == '0') {

+ 1 - 7
src/views/search/parts/demand.vue

@@ -150,13 +150,7 @@ const searchOther = async () => {
 const search = async (query = { skip, limit }) => {
 const search = async (query = { skip, limit }) => {
   skip = query.skip
   skip = query.skip
   limit = query.limit
   limit = query.limit
-  const info = {
-    skip: query.skip,
-    limit: query.limit,
-    is_use: '0',
-    status: '1',
-    ...searchForm.value
-  }
+  const info = { skip: query.skip, limit: query.limit, is_use: '0', status: '1', ...searchForm.value }
   if (searchValue.value) info.tags = searchValue.value
   if (searchValue.value) info.tags = searchValue.value
   let res = await demandStore.query(info)
   let res = await demandStore.query(info)
   if (res.errcode == '0') {
   if (res.errcode == '0') {

+ 1 - 6
src/views/search/parts/expert.vue

@@ -183,12 +183,7 @@ const searchOther = async () => {
 const search = async (query = { skip, limit }) => {
 const search = async (query = { skip, limit }) => {
   skip = query.skip
   skip = query.skip
   limit = query.limit
   limit = query.limit
-  const info = {
-    skip: query.skip,
-    limit: query.limit,
-    status: '1',
-    ...searchForm.value
-  }
+  const info = { skip: query.skip, limit: query.limit, status: '1', ...searchForm.value }
   if (searchValue.value) info.tags = searchValue.value
   if (searchValue.value) info.tags = searchValue.value
   const res = await store.query(info)
   const res = await store.query(info)
   if (res.errcode == '0') {
   if (res.errcode == '0') {

+ 1 - 7
src/views/search/parts/project.vue

@@ -164,13 +164,7 @@ const searchOther = async () => {
 const search = async (query = { skip, limit }) => {
 const search = async (query = { skip, limit }) => {
   skip = query.skip
   skip = query.skip
   limit = query.limit
   limit = query.limit
-  const info = {
-    skip: query.skip,
-    limit: query.limit,
-    status: '1',
-    is_use: '0',
-    ...searchForm.value
-  }
+  const info = { skip: query.skip, limit: query.limit, status: '1', is_use: '0', ...searchForm.value }
   if (searchValue.value) info.tags = searchValue.value
   if (searchValue.value) info.tags = searchValue.value
   const res = await store.query(info)
   const res = await store.query(info)
   if (res.errcode == '0') {
   if (res.errcode == '0') {

+ 1 - 7
src/views/search/parts/supply.vue

@@ -175,13 +175,7 @@ const searchOther = async () => {
 const search = async (query = { skip, limit }) => {
 const search = async (query = { skip, limit }) => {
   skip = query.skip
   skip = query.skip
   limit = query.limit
   limit = query.limit
-  const info = {
-    skip: query.skip,
-    limit: query.limit,
-    is_use: '0',
-    status: '1',
-    ...searchForm.value
-  }
+  const info = { skip: query.skip, limit: query.limit, is_use: '0', status: '1', ...searchForm.value }
   if (searchValue.value) info.tags = searchValue.value
   if (searchValue.value) info.tags = searchValue.value
   let res = await supplyStore.query(info)
   let res = await supplyStore.query(info)
   if (res.errcode == '0') {
   if (res.errcode == '0') {

+ 2 - 0
src/views/six/index.vue

@@ -104,6 +104,8 @@ const searchOther = async () => {
   plateList.value.unshift({ id: '-1', title: '不限', is_active: true })
   plateList.value.unshift({ id: '-1', title: '不限', is_active: true })
 }
 }
 const search = async (query = { skip, limit }) => {
 const search = async (query = { skip, limit }) => {
+  skip = query.skip
+  limit = query.limit
   const info = { skip: query.skip, limit: query.limit, is_use: '0', status: '1', ...searchForm.value }
   const info = { skip: query.skip, limit: query.limit, is_use: '0', status: '1', ...searchForm.value }
   const res = await store.list(info)
   const res = await store.list(info)
   if (res.errcode == '0') {
   if (res.errcode == '0') {

+ 1 - 6
src/views/ten/index.vue

@@ -95,12 +95,7 @@ onMounted(async () => {
   loading.value = false
   loading.value = false
 })
 })
 const search = async () => {
 const search = async () => {
-  const info = {
-    skip: 0,
-    limit: 2,
-    is_use: '0',
-    status: '1'
-  }
+  const info = { skip: 0, limit: 2, is_use: '0', status: '1' }
   const res = await matchStore.query(info)
   const res = await matchStore.query(info)
   if (res.errcode == '0') {
   if (res.errcode == '0') {
     matchList.value = res.data
     matchList.value = res.data