提交 75b4e03e 作者: 毛细亚

优化前端代码,调整菜单和路由

上级 6fac9e0e
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
<!-- Prevent caching at the proxy server --> <!-- Prevent caching at the proxy server -->
<meta http-equiv="expires" content="0"> <meta http-equiv="expires" content="0">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" /> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
<title><%= htmlWebpackPlugin.options.title %></title> <!-- <title><%= htmlWebpackPlugin.options.title %></title> -->
<title>企微侧边栏</title>
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0,shrink-to-fit=no,user-scalable=no"> --> <!-- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0,shrink-to-fit=no,user-scalable=no"> -->
<script src="https://g.alicdn.com/dingding/dinglogin/0.0.5/ddLogin.js"></script> <script src="https://g.alicdn.com/dingding/dinglogin/0.0.5/ddLogin.js"></script>
</head> </head>
......
...@@ -4,16 +4,9 @@ ...@@ -4,16 +4,9 @@
<div class="mobile-menu-bar" v-if="token && external_userid && showMemberId"> <div class="mobile-menu-bar" v-if="token && external_userid && showMemberId">
<!-- 临时调试信息 --> <!-- 临时调试信息 -->
<div class="menu-container"> <div class="menu-container">
<el-menu <el-menu :default-active="selectedPath" mode="horizontal" class="mobile-el-menu"
:default-active="selectedPath" :class="{ 'collapsed': !isMenuExpanded && shouldShowToggle }" background-color="#fff" router
mode="horizontal" @select="handleSelect" ref="menuRef">
class="mobile-el-menu"
:class="{ 'collapsed': !isMenuExpanded && shouldShowToggle }"
background-color="#fff"
router
@select="handleSelect"
ref="menuRef"
>
<el-menu-item v-for="item in menuList" :key="item.path" :index="item.path" class="mobile-menu-item"> <el-menu-item v-for="item in menuList" :key="item.path" :index="item.path" class="mobile-menu-item">
<!-- 任务列表菜单项显示红点 --> <!-- 任务列表菜单项显示红点 -->
<div v-if="item.path === '/taskList' && hasTaskRedDot" class="menu-item-with-badge"> <div v-if="item.path === '/taskList' && hasTaskRedDot" class="menu-item-with-badge">
...@@ -29,13 +22,7 @@ ...@@ -29,13 +22,7 @@
</el-menu> </el-menu>
<!-- 展开收起按钮 --> <!-- 展开收起按钮 -->
<el-button <el-button type="text" size="mini" v-if="shouldShowToggle" class="menu-toggle-btn" @click="toggleMenu">
type="text"
size="mini"
v-if="shouldShowToggle"
class="menu-toggle-btn"
@click="toggleMenu"
>
<i :class="isMenuExpanded ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"></i> <i :class="isMenuExpanded ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"></i>
<span>{{ isMenuExpanded ? '收起' : '展开' }}</span> <span>{{ isMenuExpanded ? '收起' : '展开' }}</span>
</el-button> </el-button>
...@@ -113,7 +100,7 @@ export default { ...@@ -113,7 +100,7 @@ export default {
hasRedDot: false // 红点状态 hasRedDot: false // 红点状态
}, },
{ {
label: '跟进记录', label: '微言助手',
path: '/summaryList' path: '/summaryList'
}, },
// { // {
......
...@@ -12,7 +12,7 @@ import taskRecord from '../views/taskRecord.vue' ...@@ -12,7 +12,7 @@ import taskRecord from '../views/taskRecord.vue'
import mailList from '@/views/mailList.vue' import mailList from '@/views/mailList.vue'
import quickSendGame from '@/views/quickSendGame.vue' import quickSendGame from '@/views/quickSendGame.vue'
import taskList from '@/views/taskList.vue' import taskList from '@/views/taskList.vue'
import summaryList from '@/views/summaryList.vue' import aiChat from '@/views/components/aiChat/aiChat.vue'
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
import store from '@/store' import store from '@/store'
Vue.use(VueRouter) Vue.use(VueRouter)
...@@ -85,9 +85,9 @@ const routes = [ ...@@ -85,9 +85,9 @@ const routes = [
component: taskList component: taskList
}, },
{ {
path: '/summaryList', path: '/aiChat',
name: 'summaryList', name: 'aiChat',
component: summaryList component: aiChat
}, },
{ {
path: '/login', path: '/login',
......
<template>
<div>
<h1>AI 微言</h1>
</div>
</template>
<script>
export default {
name: 'aiArgenChat'
}
</script>
\ No newline at end of file
<template>
<div class="quickSendGame columnFlex">
<div class="content search-form">
<el-tabs v-model="activeName">
<el-tab-pane label="AI微言" name="aiChat">
<aiArgenChat v-if="activeName === 'aiChat'" />
</el-tab-pane>
<el-tab-pane label="AI 跟进记录" name="aiFollow">
<summaryList v-if="activeName === 'aiFollow'" />
</el-tab-pane>
</el-tabs>
</div>
</div>
</template>
<script>
import aiArgenChat from './aiArgenChat.vue'
import summaryList from './summaryList.vue'
import { mapActions } from 'vuex'
export default {
name: 'quickSendGame',
components: {
aiArgenChat,
summaryList,
},
data() {
return {
activeName: 'aiChat'
}
},
created() {
},
mounted() {
// this.initializeWecom()
},
methods: {
...mapActions('user', ['initWecom']),
async initializeWecom() {
try {
console.log('🚀 开始初始化企业微信 SDK')
const result = await this.initWecom()
console.log('✅ 企业微信 SDK 初始化成功', result)
} catch (error) {
console.error('❌ 企业微信 SDK 初始化失败:', error)
}
},
}
}
</script>
<style lang="scss" scoped>
.quickSendGame {
::v-deep .el-tabs__nav-next,
::v-deep .el-tabs__nav-prev {
line-height: 50px;
}
width: 100%;
height: 100%;
background: #fff;
::v-deep .el-tabs__item {
padding: 0 15px;
}
.detailsTitle {
width: 100%;
padding: 0 10px;
height: 60px;
font-size: 18px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
border-bottom: 1px solid #ebeef5;
border-left: 1px solid #ebeef5;
p {
color: #333333;
}
}
.content {
width: 100%;
height: calc(100% - 10px);
::v-deep .el-tabs__header {
margin: 0 0 20px;
}
}
::v-deep .el-tabs--border-card .is-active {
border: none !important;
}
::v-deep .is-active {
border: none;
}
.inputContent {
width: 100%;
::v-deep .el-input {
width: 80%;
}
}
::v-deep .el-tabs,
.el-tabs__content,
.el-tab-pane {
width: 100%;
height: 100%;
}
::v-deep .el-tabs__content {
width: 100%;
height: calc(100% - 50px);
}
::v-deep .el-tab-pane {
width: 100%;
height: 100%;
}
.scrollList {
width: 100%;
height: calc(100% - 40px);
overflow: auto;
}
.draggable {
position: relative;
transition: all 0.3s;
.icon {
position: absolute;
left: 10px;
top: 15px;
z-index: 10;
}
}
::v-deep .el-icon-circle-close {
color: #fff;
}
.bate {
width: 42px;
height: 20px;
background: linear-gradient(135deg, #6ee7e9 0%, #9ff2cd 47%, #e3fdb2 100%);
border-radius: 10px;
padding: 0px 10px 3px 10px;
}
}
</style>
\ No newline at end of file
...@@ -20,7 +20,7 @@ export default { ...@@ -20,7 +20,7 @@ export default {
EmailGift, EmailGift,
WxGift WxGift
}, },
created(){ created() {
this.initializeWecom() this.initializeWecom()
}, },
methods: { methods: {
...@@ -50,7 +50,7 @@ export default { ...@@ -50,7 +50,7 @@ export default {
padding-top: 10px; padding-top: 10px;
background: #fff; background: #fff;
::v-deep .el-tabs__content{ ::v-deep .el-tabs__content {
height: calc(100% - 55px); height: calc(100% - 55px);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论