Jelajahi Sumber

修改详情页面

zs 1 tahun lalu
induk
melakukan
a50b7a9d1d

+ 11 - 0
src/layout/index.vue

@@ -24,6 +24,7 @@
                 <template #dropdown>
                   <el-dropdown-menu>
                     <el-dropdown-item @click="toOpen">管理中心</el-dropdown-item>
+                    <el-dropdown-item @click="toCenter">个人中心</el-dropdown-item>
                     <el-dropdown-item @click="toLogout">注销</el-dropdown-item>
                   </el-dropdown-menu>
                 </template>
@@ -106,6 +107,10 @@ const toHelp = (type) => {
 const toOpen = async () => {
   window.location.href = import.meta.env.VITE_APP_HOME
 }
+// 个人中心
+const toCenter = () => {
+  console.log('个人中心')
+}
 // 退出登录
 const toLogout = () => {
   userStore.logOut()
@@ -163,6 +168,12 @@ const toLogout = () => {
     .top_3 {
       display: flex;
       justify-content: space-between;
+      .example-showcase .el-dropdown-link {
+        cursor: pointer;
+        color: #1c66e7;
+        display: flex;
+        align-items: center;
+      }
     }
   }
   .center {

+ 25 - 5
src/views/achievement/detail.vue

@@ -6,7 +6,7 @@
           <el-col :span="24" class="one">
             <el-row :span="24" class="one_1">
               <el-col :span="20" class="title">{{ info.name || '暂无标题' }}</el-col>
-              <el-col :span="4" class="file">
+              <el-col :span="4" class="file" @click="toFile">
                 <el-icon>
                   <Download />
                 </el-icon>
@@ -44,7 +44,7 @@
             <div class="money">
               参考价格:<span> {{ info.money || '面议' }} </span>
             </div>
-            <a-button type="primary"> 我要买 </a-button>
+            <a-button type="primary" @click="toBuy"> 我要买 </a-button>
           </el-col>
           <el-col :span="24" class="pointer" v-if="!user && !user._id">
             提醒:您还没有登录,登录成功后再对接
@@ -64,14 +64,14 @@
                 </el-col>
               </el-col>
               <el-col :span="8" class="right">
-                <a-button type="primary">
+                <a-button type="primary" @click="toChat">
                   <template #icon>
                     <MessageOutlined />
                   </template>
                   点击在线洽谈
                 </a-button>
-                <a-button class="button"> 进入单位 </a-button>
-                <a-button class="button"> 收藏单位 </a-button>
+                <a-button class="button" @click="toUnit"> 进入单位 </a-button>
+                <a-button class="button" @click="toCollection"> 收藏单位 </a-button>
               </el-col>
             </el-row>
           </el-col>
@@ -159,6 +159,26 @@ const getDict = (data, model) => {
 const getArea = (data) => {
   if (data) return data.join(',')
 }
+// 附件下载
+const toFile = () => {
+  console.log('附件下载')
+}
+// 购买
+const toBuy = () => {
+  console.log('购买')
+}
+// 在线洽谈
+const toChat = () => {
+  console.log('在线洽谈')
+}
+// 进入单位
+const toUnit = () => {
+  console.log('进入单位')
+}
+// 收藏
+const toCollection = () => {
+  console.log('收藏')
+}
 </script>
 <style scoped lang="scss">
 .main {

+ 15 - 3
src/views/demand/detail.vue

@@ -6,7 +6,7 @@
           <el-col :span="24" class="one">
             <el-row :span="24" class="one_1">
               <el-col :span="20" class="title">{{ info.name || '暂无标题' }}</el-col>
-              <el-col :span="4" class="file">
+              <el-col :span="4" class="file" @click="toCollection">
                 <el-icon><Star /></el-icon>
                 收藏
               </el-col>
@@ -35,7 +35,7 @@
             <div class="money">
               价格:<span> {{ info.money || '面议' }} </span>
             </div>
-            <a-button type="primary"> 我要对接 </a-button>
+            <a-button type="primary" @click="toDocking"> 我要对接 </a-button>
           </el-col>
           <el-col :span="24" class="pointer" v-if="!user && !user._id">
             提醒:您还没有登录,登录成功后再对接
@@ -55,7 +55,7 @@
                 </el-col>
               </el-col>
               <el-col :span="4" class="right">
-                <a-button type="primary">
+                <a-button type="primary" @click="toChat">
                   <template #icon>
                     <MessageOutlined />
                   </template>
@@ -144,6 +144,18 @@ const getTime = (data) => {
 const getArea = (data) => {
   if (data) return data.join(',')
 }
+// 在线洽谈
+const toChat = () => {
+  console.log('在线洽谈')
+}
+// 我要对接
+const toDocking = () => {
+  console.log('我要对接')
+}
+// 收藏
+const toCollection = () => {
+  console.log('收藏')
+}
 </script>
 <style scoped lang="scss">
 .main {

+ 6 - 0
src/views/index/index.vue

@@ -184,6 +184,12 @@ const toLogout = () => {
         .right_3 {
           display: flex;
           justify-content: space-between;
+          .example-showcase .el-dropdown-link {
+            cursor: pointer;
+            color: #1c66e7;
+            display: flex;
+            align-items: center;
+          }
         }
       }
     }