1
This commit is contained in:
153
src/components/PublicFooterNav/index.vue
Normal file
153
src/components/PublicFooterNav/index.vue
Normal file
@@ -0,0 +1,153 @@
|
||||
<template>
|
||||
<div class="public-footer-nav">
|
||||
<div class="nav-container">
|
||||
<div
|
||||
v-for="item in navItems"
|
||||
:key="item.path"
|
||||
class="nav-item"
|
||||
:class="{ active: isActive(item.path) }"
|
||||
@click="handleNavClick(item.path)"
|
||||
>
|
||||
<i :class="item.icon"></i>
|
||||
<span class="nav-label">{{ item.label }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'PublicFooterNav',
|
||||
data() {
|
||||
return {
|
||||
navItems: [
|
||||
{
|
||||
label: '评论生成',
|
||||
path: '/tools/comment-gen',
|
||||
icon: 'el-icon-edit-outline'
|
||||
},
|
||||
{
|
||||
label: '订单提交',
|
||||
path: '/public/order-submit',
|
||||
icon: 'el-icon-upload2'
|
||||
},
|
||||
{
|
||||
label: '订单搜索',
|
||||
path: '/tools/order-search',
|
||||
icon: 'el-icon-search'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
isActive(path) {
|
||||
return this.$route.path === path
|
||||
},
|
||||
handleNavClick(path) {
|
||||
if (this.$route.path !== path) {
|
||||
this.$router.push(path)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.public-footer-nav {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: #fff;
|
||||
border-top: 1px solid #e4e7ed;
|
||||
box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
|
||||
z-index: 1000;
|
||||
padding: 8px 0;
|
||||
padding-bottom: calc(8px + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
.nav-container {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
padding: 8px 16px;
|
||||
border-radius: 8px;
|
||||
transition: all 0.3s ease;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.nav-item:hover {
|
||||
background-color: #f5f7fa;
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.nav-item.active {
|
||||
color: #409eff;
|
||||
background-color: #ecf5ff;
|
||||
}
|
||||
|
||||
.nav-item i {
|
||||
font-size: 22px;
|
||||
margin-bottom: 4px;
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.nav-item:hover i {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.nav-label {
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/* 响应式设计 */
|
||||
@media (max-width: 480px) {
|
||||
.nav-item {
|
||||
padding: 6px 12px;
|
||||
}
|
||||
|
||||
.nav-item i {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.nav-label {
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.nav-container {
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
.nav-item i {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.nav-label {
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -79,6 +79,12 @@ export const constantRoutes = [
|
||||
}
|
||||
]
|
||||
},
|
||||
// 公共工具首页
|
||||
{
|
||||
path: '/public/home',
|
||||
component: () => import('@/views/public/PublicHome'),
|
||||
hidden: true
|
||||
},
|
||||
// 评论生成工具(内部使用,不易被发现的路径)
|
||||
{
|
||||
path: '/tools/comment-gen',
|
||||
|
||||
@@ -170,13 +170,21 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 页尾导航 -->
|
||||
<PublicFooterNav />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { pinyin } from 'pinyin-pro'
|
||||
import PublicFooterNav from '@/components/PublicFooterNav'
|
||||
|
||||
export default {
|
||||
name: 'CommentGeneratorPublic',
|
||||
components: {
|
||||
PublicFooterNav
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: { productType: '' },
|
||||
@@ -415,6 +423,7 @@ export default {
|
||||
min-height: 100vh;
|
||||
background: #f5f5f5;
|
||||
padding: 16px;
|
||||
padding-bottom: calc(80px + 16px); /* 为页尾导航留出空间 */
|
||||
}
|
||||
|
||||
.mobile-card {
|
||||
|
||||
@@ -144,15 +144,22 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 页尾导航 -->
|
||||
<PublicFooterNav />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listJDOrders, searchOrders } from '@/api/system/jdorder'
|
||||
import { parseTime as formatTime } from '@/utils/ruoyi'
|
||||
import PublicFooterNav from '@/components/PublicFooterNav'
|
||||
|
||||
export default {
|
||||
name: 'OrderSearch',
|
||||
components: {
|
||||
PublicFooterNav
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchForm: {
|
||||
@@ -393,6 +400,7 @@ export default {
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
padding: 20px;
|
||||
padding-bottom: calc(80px + 20px); /* 为页尾导航留出空间 */
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
|
||||
241
src/views/public/PublicHome.vue
Normal file
241
src/views/public/PublicHome.vue
Normal file
@@ -0,0 +1,241 @@
|
||||
<template>
|
||||
<div class="public-home-container">
|
||||
<div class="home-content">
|
||||
<div class="header-section">
|
||||
<h1 class="main-title">工具中心</h1>
|
||||
<p class="subtitle">选择您需要的功能</p>
|
||||
</div>
|
||||
|
||||
<div class="tools-grid">
|
||||
<div
|
||||
v-for="tool in tools"
|
||||
:key="tool.path"
|
||||
class="tool-card"
|
||||
@click="handleToolClick(tool.path)"
|
||||
>
|
||||
<div class="tool-icon-wrapper">
|
||||
<i :class="tool.icon"></i>
|
||||
</div>
|
||||
<h3 class="tool-title">{{ tool.title }}</h3>
|
||||
<p class="tool-desc">{{ tool.description }}</p>
|
||||
<div class="tool-footer">
|
||||
<span class="tool-action">点击使用 <i class="el-icon-arrow-right"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 页尾导航 -->
|
||||
<PublicFooterNav />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PublicFooterNav from '@/components/PublicFooterNav'
|
||||
|
||||
export default {
|
||||
name: 'PublicHome',
|
||||
components: {
|
||||
PublicFooterNav
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tools: [
|
||||
{
|
||||
title: '评论生成',
|
||||
description: '快速生成产品评论内容',
|
||||
path: '/tools/comment-gen',
|
||||
icon: 'el-icon-edit-outline'
|
||||
},
|
||||
{
|
||||
title: '订单提交',
|
||||
description: '提交订单信息,录入系统',
|
||||
path: '/public/order-submit',
|
||||
icon: 'el-icon-upload2'
|
||||
},
|
||||
{
|
||||
title: '订单搜索',
|
||||
description: '快速搜索订单信息',
|
||||
path: '/tools/order-search',
|
||||
icon: 'el-icon-search'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleToolClick(path) {
|
||||
this.$router.push(path)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.public-home-container {
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
padding: 40px 20px 80px;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.home-content {
|
||||
max-width: 1200px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.header-section {
|
||||
text-align: center;
|
||||
margin-bottom: 40px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.main-title {
|
||||
font-size: 36px;
|
||||
font-weight: 700;
|
||||
margin: 0 0 12px 0;
|
||||
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font-size: 18px;
|
||||
margin: 0;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.tools-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
.tool-card {
|
||||
background: #fff;
|
||||
border-radius: 16px;
|
||||
padding: 32px 24px;
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tool-card:hover {
|
||||
transform: translateY(-8px);
|
||||
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.tool-icon-wrapper {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 50%;
|
||||
background: linear-gradient(135deg, #409EFF 0%, #67C23A 100%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 20px;
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.tool-card:hover .tool-icon-wrapper {
|
||||
transform: scale(1.1) rotate(5deg);
|
||||
}
|
||||
|
||||
.tool-icon-wrapper i {
|
||||
font-size: 40px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.tool-title {
|
||||
font-size: 22px;
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
margin: 0 0 12px 0;
|
||||
}
|
||||
|
||||
.tool-desc {
|
||||
font-size: 14px;
|
||||
color: #909399;
|
||||
line-height: 1.6;
|
||||
margin: 0 0 20px 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.tool-footer {
|
||||
width: 100%;
|
||||
padding-top: 16px;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
.tool-action {
|
||||
font-size: 14px;
|
||||
color: #409eff;
|
||||
font-weight: 500;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.tool-action i {
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.tool-card:hover .tool-action i {
|
||||
transform: translateX(4px);
|
||||
}
|
||||
|
||||
/* 响应式设计 */
|
||||
@media (max-width: 768px) {
|
||||
.public-home-container {
|
||||
padding: 24px 16px 80px;
|
||||
}
|
||||
|
||||
.main-title {
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.tools-grid {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.tool-card {
|
||||
padding: 24px 20px;
|
||||
}
|
||||
|
||||
.tool-icon-wrapper {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
}
|
||||
|
||||
.tool-icon-wrapper i {
|
||||
font-size: 36px;
|
||||
}
|
||||
|
||||
.tool-title {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.main-title {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.tool-card {
|
||||
padding: 20px 16px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -116,14 +116,21 @@
|
||||
<el-button type="primary" @click="handleVerify" :loading="verifyLoading">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 页尾导航 -->
|
||||
<PublicFooterNav />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { submitPublicOrder, submitPublicOrderWithForce } from '@/api/public/order'
|
||||
import PublicFooterNav from '@/components/PublicFooterNav'
|
||||
|
||||
export default {
|
||||
name: 'PublicOrderSubmit',
|
||||
components: {
|
||||
PublicFooterNav
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: { command: '' },
|
||||
@@ -352,6 +359,7 @@ ${today} 001
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
padding: 20px;
|
||||
padding-bottom: calc(80px + 20px); /* 为页尾导航留出空间 */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
Reference in New Issue
Block a user