H5首页更新
@ -102,76 +102,11 @@ export const constantRoutes = [
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'cloud',
|
||||
title: '云',
|
||||
component: () => import('@/views/H5/cloud/index.vue'),
|
||||
path: 'about',
|
||||
title: 'H5关于我们',
|
||||
component: () => import('@/views/H5/about/index.vue'),
|
||||
meta: {
|
||||
title: '云', fullPath: '/h5HomePage/cloud'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'calculate',
|
||||
title: '算',
|
||||
component: () => import('@/views/H5/calculate/index.vue'),
|
||||
meta: {
|
||||
title: '算', fullPath: '/h5HomePage/calculate'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'net',
|
||||
title: '网',
|
||||
component: () => import('@/views/H5/net/index.vue'),
|
||||
meta: {
|
||||
title: '网', fullPath: '/h5HomePage/net'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'use',
|
||||
title: '用',
|
||||
component: () => import('@/views/H5/use/index.vue'),
|
||||
meta: {
|
||||
title: '用', fullPath: '/h5HomePage/use'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'details',
|
||||
title: '算产品详情',
|
||||
component: () => import('@/views/H5/details/index.vue'),
|
||||
meta: {
|
||||
title: '产品详情', fullPath: '/h5HomePage/details'
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
path: 'netDetail',
|
||||
title: '网产品详情',
|
||||
component: () => import('@/views/H5/netDetails/index.vue'),
|
||||
meta: {
|
||||
title: '产品详情', fullPath: '/h5HomePage/netDetail'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'useDetail',
|
||||
title: 'AI产品详情',
|
||||
component: () => import('@/views/H5/useDetails/index.vue'),
|
||||
meta: {
|
||||
title: 'AI产品详情', fullPath: '/h5HomePage/useDetail'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'service',
|
||||
title: '智能客服详情',
|
||||
component: () => import('@/views/H5/useDetails/service.vue'),
|
||||
meta: {
|
||||
title: '智能客服详情', fullPath: '/h5HomePage/service'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'consultDialogFull',
|
||||
title: '全屏咨询弹窗预览',
|
||||
component: () => import('@/views/H5/consultDialogFullPreview/index.vue'),
|
||||
meta: {
|
||||
title: '全屏咨询弹窗预览', fullPath: '/h5HomePage/consultDialogFull'
|
||||
title: 'H5关于我们', fullPath: '/h5HomePage/about'
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -179,12 +114,8 @@ export const constantRoutes = [
|
||||
{
|
||||
name: 'H5about',
|
||||
path: '/H5about',
|
||||
title: 'H5关于我们',
|
||||
hidden: true,
|
||||
component: () => import('@/views/H5/about/index.vue'),
|
||||
meta: {
|
||||
title: 'H5关于我们', fullPath: '/h5about/index'
|
||||
}
|
||||
redirect: '/h5HomePage/about',
|
||||
hidden: true
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
@ -220,45 +220,15 @@ if (isMobile) {
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "cloud",
|
||||
title: '云',
|
||||
component: () => import('@/views/H5/cloud/index.vue'),
|
||||
path: "about",
|
||||
title: 'H5关于我们',
|
||||
component: () => import('@/views/H5/about/index.vue'),
|
||||
meta: {
|
||||
title: "云",
|
||||
fullPath: "/h5HomePage/cloud",
|
||||
title: "H5关于我们",
|
||||
fullPath: "/h5HomePage/about",
|
||||
isMobile: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "calculate",
|
||||
title: '算',
|
||||
component: () => import('@/views/H5/calculate/index.vue'),
|
||||
meta: {
|
||||
title: "算",
|
||||
fullPath: "/h5HomePage/calculate",
|
||||
isMobile: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "net",
|
||||
title: '网',
|
||||
component: () => import('@/views/H5/net/index.vue'),
|
||||
meta: {
|
||||
title: "网",
|
||||
fullPath: "/h5HomePage/net",
|
||||
isMobile: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "use",
|
||||
title: '用',
|
||||
component: () => import('@/views/H5/use/index.vue'),
|
||||
meta: {
|
||||
title: "用",
|
||||
fullPath: "/h5HomePage/use",
|
||||
isMobile: true
|
||||
},
|
||||
},
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 134 KiB |
|
Before Width: | Height: | Size: 136 KiB |
|
Before Width: | Height: | Size: 134 KiB |
|
Before Width: | Height: | Size: 132 KiB |
|
Before Width: | Height: | Size: 130 KiB |
|
Before Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 107 KiB |
|
Before Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 406 KiB |
|
Before Width: | Height: | Size: 416 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 205 KiB |
|
Before Width: | Height: | Size: 144 KiB |
|
Before Width: | Height: | Size: 207 KiB |
|
Before Width: | Height: | Size: 197 KiB |
|
Before Width: | Height: | Size: 193 KiB |
|
Before Width: | Height: | Size: 188 KiB |
|
Before Width: | Height: | Size: 145 KiB |
|
Before Width: | Height: | Size: 148 KiB |
|
Before Width: | Height: | Size: 146 KiB |
|
Before Width: | Height: | Size: 144 KiB |
|
Before Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 190 KiB |
|
Before Width: | Height: | Size: 109 KiB |
|
Before Width: | Height: | Size: 208 KiB |
|
Before Width: | Height: | Size: 165 KiB |
|
Before Width: | Height: | Size: 182 KiB |
|
Before Width: | Height: | Size: 164 KiB |
|
Before Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 12 KiB |
@ -1,239 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- 标题 -->
|
||||
<div class="top-tit">
|
||||
开元云
|
||||
</div>
|
||||
|
||||
<!-- 搜索 -->
|
||||
<div class="search">
|
||||
<div class="search-box">
|
||||
<div class="input">
|
||||
<input
|
||||
type="text"
|
||||
placeholder="请输入产品名称"
|
||||
v-model="searchValue"
|
||||
@keyup.enter="handleSearch"
|
||||
/>
|
||||
</div>
|
||||
<div class="search-btn" @click="handleSearch">
|
||||
搜索
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 搜索提示 -->
|
||||
<div v-if="isSearching && searchValue" class="search-tip">
|
||||
搜索关键词: "{{ searchValue }}"
|
||||
<span class="clear-search" @click="clearSearch">× 清空搜索</span>
|
||||
</div>
|
||||
|
||||
<!-- 供应商 - 只在非搜索模式显示 -->
|
||||
<div v-if="!isSearching && cloudData.secMenu && cloudData.secMenu.length > 0" class="supplier-container">
|
||||
<div v-for="(value, index) in cloudData.secMenu" :key="index" class="supplier" @click="selectSupplier(index)">
|
||||
<div class="supplier-title" :class="{ 'active': activeSupplierIndex === index }">
|
||||
{{ value.secTitle }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 产品 -->
|
||||
<div class="box">
|
||||
<!-- 搜索模式:显示搜索结果 -->
|
||||
<template v-if="isSearching && searchResults.length > 0">
|
||||
<div v-for="product in searchResults" :key="product.id" class="box-item">
|
||||
<div class="item-tit">
|
||||
{{ product.name }}
|
||||
</div>
|
||||
<div class="item-detail">
|
||||
{{ product.description }}
|
||||
</div>
|
||||
<div class="item-desc">
|
||||
智算
|
||||
</div>
|
||||
<div class="item-btn">
|
||||
<div class="btn" @click="goToDetail(product.id)">
|
||||
查看详情
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- 搜索模式:无结果 -->
|
||||
<div v-else-if="isSearching && searchResults.length === 0" class="no-data">
|
||||
未找到与"{{ searchValue }}"相关的产品
|
||||
</div>
|
||||
|
||||
<!-- 正常模式:只显示当前选中的供应商的产品 -->
|
||||
<template v-else-if="!isSearching && cloudData.secMenu && cloudData.secMenu.length > 0 && activeSupplierIndex >= 0">
|
||||
<template v-for="thrMenu in cloudData.secMenu[activeSupplierIndex].thrMenu">
|
||||
<div v-for="product in thrMenu.value" :key="product.id" class="box-item">
|
||||
<div class="item-tit">
|
||||
{{ product.name }}
|
||||
</div>
|
||||
<div class="item-detail">
|
||||
{{ product.description }}
|
||||
</div>
|
||||
<div class="item-desc">
|
||||
智算
|
||||
</div>
|
||||
<div class="item-btn">
|
||||
<div class="btn" @click="goToDetail(product.id)">
|
||||
查看详情
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<!-- 正常模式:无数据 -->
|
||||
<div v-else-if="!isSearching && (!cloudData.secMenu || cloudData.secMenu.length === 0)" class="no-data">
|
||||
暂无产品数据
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reqNavList } from '@/api/H5/index'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
cloudData: {},
|
||||
activeSupplierIndex: 0,
|
||||
searchValue: '',
|
||||
isSearching: false,
|
||||
searchResults: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getCloudData()
|
||||
},
|
||||
methods: {
|
||||
async getCloudData(keyword) {
|
||||
try {
|
||||
const params = {
|
||||
url_link: window.location.href,
|
||||
...(keyword && { keyword: keyword.trim() })
|
||||
}
|
||||
|
||||
const res = await reqNavList(params)
|
||||
if (res.status == true) {
|
||||
if (keyword) {
|
||||
// 搜索模式
|
||||
this.isSearching = true
|
||||
this.searchResults = Array.isArray(res.data) ? res.data : []
|
||||
} else {
|
||||
// 正常模式
|
||||
this.isSearching = false
|
||||
this.searchResults = []
|
||||
this.cloudData = res.data.product_service[1] || {}
|
||||
|
||||
if (this.cloudData.secMenu && this.cloudData.secMenu.length > 0) {
|
||||
this.activeSupplierIndex = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取数据失败:', error)
|
||||
this.isSearching = false
|
||||
this.searchResults = []
|
||||
}
|
||||
},
|
||||
|
||||
// 处理搜索
|
||||
handleSearch() {
|
||||
const keyword = this.searchValue.trim()
|
||||
if (keyword) {
|
||||
this.getCloudData(keyword)
|
||||
} else {
|
||||
// 如果搜索框为空,返回正常模式
|
||||
this.clearSearch()
|
||||
}
|
||||
},
|
||||
|
||||
// 清空搜索
|
||||
clearSearch() {
|
||||
this.isSearching = false
|
||||
this.searchValue = ''
|
||||
this.searchResults = []
|
||||
this.getCloudData() // 重新加载正常数据
|
||||
},
|
||||
|
||||
// 选择供应商
|
||||
selectSupplier(index) {
|
||||
if (!this.isSearching) {
|
||||
this.activeSupplierIndex = index
|
||||
}
|
||||
},
|
||||
|
||||
// 跳转到详情页
|
||||
goToDetail(productId) {
|
||||
if (productId === '2113') {
|
||||
this.$router.push({
|
||||
path: '/h5HomePage/details',
|
||||
query: {
|
||||
id: productId
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$router.push({
|
||||
path: '/h5HomePage/netDetail',
|
||||
query: {
|
||||
id: productId
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
html, body {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@import url('../less/all/index.less');
|
||||
|
||||
/* 搜索提示样式 */
|
||||
.search-tip {
|
||||
padding: 10px 20px;
|
||||
background-color: #f5f7fa;
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #e4e7ed;
|
||||
}
|
||||
|
||||
.clear-search {
|
||||
color: #409EFF;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
padding: 2px 8px;
|
||||
border-radius: 3px;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.clear-search:hover {
|
||||
background-color: #ecf5ff;
|
||||
color: #409EFF;
|
||||
}
|
||||
|
||||
/* 无数据样式 */
|
||||
.no-data {
|
||||
text-align: center;
|
||||
padding: 40px 20px;
|
||||
color: #909399;
|
||||
font-size: 14px;
|
||||
background-color: #f5f7fa;
|
||||
border-radius: 4px;
|
||||
margin: 20px;
|
||||
}
|
||||
</style>
|
||||
@ -1,375 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- 标题 -->
|
||||
<div class="top-tit">
|
||||
开元云
|
||||
</div>
|
||||
|
||||
<!-- 搜索框(完善功能) -->
|
||||
<div class="search">
|
||||
<div class="search-box">
|
||||
<div class="input">
|
||||
<input
|
||||
type="text"
|
||||
placeholder="请输入产品名称"
|
||||
v-model="keyWord"
|
||||
@keyup.enter="search"
|
||||
/>
|
||||
</div>
|
||||
<div class="search-btn" @click="search">
|
||||
搜索
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 供应商 -->
|
||||
<div class="supplier-container" v-if="!isSearchMode">
|
||||
<div v-for="(value, index) in cloudData.secMenu" :key="index" class="supplier" @click="selectSupplier(index)">
|
||||
<div class="supplier-title" :class="{ 'active': activeSupplierIndex === index }">
|
||||
{{ value.secTitle }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 云产品 -->
|
||||
<div class="box">
|
||||
<!-- 无数据提示 -->
|
||||
<div v-if="showNoData" class="no-data">
|
||||
暂无相关产品数据
|
||||
</div>
|
||||
|
||||
<!-- 搜索模式:显示所有产品 -->
|
||||
<template v-else-if="isSearchMode && searchResults.length > 0">
|
||||
<div v-for="product in searchResults" :key="product.id" class="box-item">
|
||||
<!-- 标题 -->
|
||||
<div class="item-tit">
|
||||
{{ product.name }}
|
||||
</div>
|
||||
|
||||
<!-- 产品描述(如果有) -->
|
||||
<div class="item-detail" v-if="product.description">
|
||||
{{ product.description }}
|
||||
</div>
|
||||
|
||||
<!-- 供应商标签 -->
|
||||
<div class="item-desc" v-if="product.label">
|
||||
{{ product.label }}
|
||||
</div>
|
||||
|
||||
<!-- 立即咨询 -->
|
||||
<div class="item-btn">
|
||||
<div class="btn" @click="openConsultDialog(product, null)">
|
||||
立即咨询
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- 正常模式:只显示当前选中的供应商的产品 -->
|
||||
<template v-else-if="!isSearchMode && activeSupplierIndex >= 0">
|
||||
<template v-for="thrMenu in cloudData.secMenu[activeSupplierIndex].thrMenu">
|
||||
<div v-for="product in thrMenu.value" :key="product.id" class="box-item">
|
||||
<!-- 标题 -->
|
||||
<div class="item-tit">
|
||||
{{ product.name }}
|
||||
</div>
|
||||
|
||||
<!-- 产品描述(如果有) -->
|
||||
<div class="item-detail" v-if="product.description">
|
||||
{{ product.description }}
|
||||
</div>
|
||||
|
||||
<!-- 供应商标签 -->
|
||||
<div class="item-desc" v-if="showProductDesc(product)">
|
||||
{{ getProductDesc(product) }}
|
||||
</div>
|
||||
|
||||
<!-- 立即咨询 -->
|
||||
<div class="item-btn">
|
||||
<div class="btn" @click="openConsultDialog(product, thrMenu)">
|
||||
立即咨询
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<!-- 产品咨询弹窗 -->
|
||||
<ProductConsultDialog :visible.sync="showConsultDialog" :platform-name="platformName" :qr-code="qrCode"
|
||||
:default-form-data="consultFormData" :submit-api="submitConsultApi" @success="handleConsultSuccess"
|
||||
@close="handleDialogClose" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reqNavList } from '@/api/H5/index'
|
||||
import ProductConsultDialog from '../components/H5_dialog/index.vue'
|
||||
import { reqProductConsult } from '@/api/H5/index'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ProductConsultDialog
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
cloudData: {},
|
||||
activeSupplierIndex: 0, // 默认选中第一个供应商
|
||||
keyWord: '',
|
||||
// 搜索相关
|
||||
isSearchMode: false,
|
||||
searchResults: [],
|
||||
// 咨询弹窗相关
|
||||
showConsultDialog: false,
|
||||
platformName: '开元云',
|
||||
qrCode: '',
|
||||
consultFormData: {
|
||||
content: '',
|
||||
custom_type: '1',
|
||||
name: '',
|
||||
phone: '',
|
||||
company: '',
|
||||
email: '',
|
||||
checked: false
|
||||
},
|
||||
currentProduct: null,
|
||||
currentCategory: null,
|
||||
searchTimer: null // 防抖定时器
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getCloudData()
|
||||
},
|
||||
computed: {
|
||||
// 当前选中的供应商标题
|
||||
currentSupplierTitle() {
|
||||
if (this.cloudData.secMenu && this.cloudData.secMenu[this.activeSupplierIndex]) {
|
||||
return this.cloudData.secMenu[this.activeSupplierIndex].secTitle
|
||||
}
|
||||
return ''
|
||||
},
|
||||
// 显示无数据提示
|
||||
showNoData() {
|
||||
if (this.isSearchMode) {
|
||||
return this.searchResults.length === 0
|
||||
} else {
|
||||
return !this.cloudData.secMenu || this.cloudData.secMenu.length === 0
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 防抖处理:避免频繁请求
|
||||
debounce(func, delay = 500) {
|
||||
return (...args) => {
|
||||
if (this.searchTimer) clearTimeout(this.searchTimer)
|
||||
this.searchTimer = setTimeout(() => {
|
||||
func.apply(this, args)
|
||||
}, delay)
|
||||
}
|
||||
},
|
||||
|
||||
// 判断是否显示供应商标签
|
||||
showProductDesc(product) {
|
||||
// 如果是百度云且有label字段
|
||||
if (this.currentSupplierTitle === '百度云' && product.label) {
|
||||
return true
|
||||
}
|
||||
|
||||
// 如果是阿里云,总是显示(因为阿里云数据中没有label字段)
|
||||
if (this.currentSupplierTitle === '阿里云') {
|
||||
return true
|
||||
}
|
||||
|
||||
// 其他情况
|
||||
return false
|
||||
},
|
||||
|
||||
// 获取供应商标签内容
|
||||
getProductDesc(product) {
|
||||
// 获取当前供应商标题
|
||||
const supplierTitle = this.currentSupplierTitle
|
||||
|
||||
// 处理百度云
|
||||
if (supplierTitle === '百度云') {
|
||||
// 如果product有ssecTitle字段(虽然你的数据中没有),使用它
|
||||
if (product.ssecTitle && product.ssecTitle.trim() !== '') {
|
||||
return product.ssecTitle
|
||||
}
|
||||
// 否则使用label字段
|
||||
return product.label || '百度云'
|
||||
}
|
||||
|
||||
// 处理阿里云 - 阿里云数据中没有ssecTitle和label字段,所以直接显示供应商名称
|
||||
if (supplierTitle === '阿里云') {
|
||||
// 如果阿里云的数据结构中有ssecTitle字段,使用它
|
||||
if (product.ssecTitle && product.ssecTitle.trim() !== '') {
|
||||
return product.ssecTitle
|
||||
}
|
||||
// 如果阿里云的数据结构中有label字段,使用它
|
||||
if (product.label && product.label.trim() !== '') {
|
||||
return product.label
|
||||
}
|
||||
// 否则显示"阿里云"
|
||||
return '阿里云'
|
||||
}
|
||||
|
||||
// 默认返回供应商标题
|
||||
return supplierTitle
|
||||
},
|
||||
|
||||
// 获取云数据(支持接收keyword参数)
|
||||
async getCloudData(keyword = '') {
|
||||
if (keyword) {
|
||||
this.keyWord = keyword
|
||||
}
|
||||
|
||||
try {
|
||||
const res = await reqNavList({
|
||||
url_link: window.location.href,
|
||||
keyword: this.keyWord.trim() // 去除首尾空格,避免空字符请求
|
||||
})
|
||||
|
||||
if (res.status == true) {
|
||||
// 判断是搜索模式还是正常模式
|
||||
if (this.keyWord.trim() && Array.isArray(res.data)) {
|
||||
// 搜索模式:返回的是数组
|
||||
this.isSearchMode = true
|
||||
this.searchResults = res.data
|
||||
console.log('搜索模式数据:', this.searchResults)
|
||||
} else {
|
||||
// 正常模式:返回的是嵌套结构
|
||||
this.isSearchMode = false
|
||||
this.searchResults = []
|
||||
this.cloudData = res.data.product_service[0] || {}
|
||||
console.log('正常模式数据:', this.cloudData)
|
||||
|
||||
// 确保有数据时重置选中第一个供应商
|
||||
if (this.cloudData.secMenu && this.cloudData.secMenu.length > 0) {
|
||||
this.activeSupplierIndex = 0
|
||||
} else {
|
||||
this.activeSupplierIndex = -1
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取数据失败:', error)
|
||||
}
|
||||
},
|
||||
|
||||
// 搜索方法(绑定防抖)
|
||||
search: function() {
|
||||
// 调用防抖后的获取数据方法
|
||||
this.debounce(this.getCloudData)(this.keyWord)
|
||||
},
|
||||
|
||||
// 选择供应商(不允许取消选中)
|
||||
selectSupplier(index) {
|
||||
this.activeSupplierIndex = index
|
||||
},
|
||||
|
||||
// 打开咨询弹窗
|
||||
openConsultDialog(product, category) {
|
||||
this.currentProduct = product
|
||||
this.currentCategory = category
|
||||
|
||||
// 设置咨询表单的预填内容
|
||||
let content = `我想咨询关于【${product.name}】的产品信息`
|
||||
if (product.description) {
|
||||
content += ` - ${product.description}`
|
||||
}
|
||||
|
||||
this.consultFormData = {
|
||||
...this.consultFormData,
|
||||
content: content
|
||||
}
|
||||
|
||||
this.showConsultDialog = true
|
||||
},
|
||||
|
||||
// 提交咨询API
|
||||
async submitConsultApi(data) {
|
||||
// 如果有额外的产品信息,可以添加到提交数据中
|
||||
const submitData = {
|
||||
...data,
|
||||
product_name: this.currentProduct?.name || '',
|
||||
product_description: this.currentProduct?.description || '',
|
||||
product_label: this.currentProduct?.label || '',
|
||||
product_category: this.currentCategory?.thrTitle || '',
|
||||
supplier_name: this.isSearchMode ? '搜索产品' : (this.cloudData.secMenu[this.activeSupplierIndex]?.secTitle || ''),
|
||||
page_type: this.isSearchMode ? 'search_result' : 'product_list'
|
||||
}
|
||||
|
||||
return await reqProductConsult(submitData)
|
||||
},
|
||||
|
||||
// 咨询成功回调
|
||||
handleConsultSuccess(response) {
|
||||
console.log('咨询提交成功:', response)
|
||||
this.$message.success('咨询提交成功,我们将尽快联系您!')
|
||||
},
|
||||
|
||||
// 弹窗关闭回调
|
||||
handleDialogClose() {
|
||||
this.currentProduct = null
|
||||
this.currentCategory = null
|
||||
// 重置表单数据
|
||||
this.consultFormData = {
|
||||
content: '',
|
||||
custom_type: '1',
|
||||
name: '',
|
||||
phone: '',
|
||||
company: '',
|
||||
email: '',
|
||||
checked: false
|
||||
}
|
||||
},
|
||||
|
||||
// 清空搜索
|
||||
clearSearch() {
|
||||
this.keyWord = ''
|
||||
this.isSearchMode = false
|
||||
this.searchResults = []
|
||||
this.getCloudData()
|
||||
}
|
||||
},
|
||||
// 销毁时清除定时器
|
||||
beforeDestroy() {
|
||||
if (this.searchTimer) clearTimeout(this.searchTimer)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped>
|
||||
@import url('../less/cloud/cloud.less');
|
||||
|
||||
// 新增无数据样式
|
||||
.no-data {
|
||||
text-align: center;
|
||||
padding: 40px 0;
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
// 搜索模式提示
|
||||
.search-mode-tip {
|
||||
text-align: center;
|
||||
padding: 10px 0;
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
|
||||
.clear-btn {
|
||||
color: #409EFF;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,585 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisible"
|
||||
:fullscreen="true"
|
||||
custom-class="mobile-consult-fullscreen-dialog"
|
||||
:append-to-body="true"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="!submitSuccess"
|
||||
:show-close="false"
|
||||
@close="handleClose"
|
||||
>
|
||||
<div v-if="submitSuccess" class="submit-success-page">
|
||||
<div class="success-icon">
|
||||
<i class="el-icon-check"></i>
|
||||
</div>
|
||||
<h2 class="success-title">已完成</h2>
|
||||
<p class="success-desc">您的咨询信息已提交,我们会尽快与您联系。</p>
|
||||
</div>
|
||||
|
||||
<div v-else class="mobile-consult-wrap">
|
||||
<h2 class="mobile-consult-title">{{ title }}</h2>
|
||||
<p class="mobile-consult-subtitle">期待与您开启AI创新未来</p>
|
||||
|
||||
<el-form
|
||||
ref="consultForm"
|
||||
:model="formData"
|
||||
:rules="rules"
|
||||
label-position="top"
|
||||
class="mobile-consult-form"
|
||||
>
|
||||
<el-form-item label="1. 请填写您的姓名" prop="name">
|
||||
<el-input
|
||||
v-model.trim="formData.name"
|
||||
maxlength="20"
|
||||
placeholder="请输入您的姓名"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="2. 请填写您的联系方式" prop="phone">
|
||||
<el-input
|
||||
v-model.trim="formData.phone"
|
||||
maxlength="11"
|
||||
placeholder="请输入您的联系电话"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="3. 请填写您的邮箱" prop="email">
|
||||
<el-input
|
||||
v-model.trim="formData.email"
|
||||
maxlength="60"
|
||||
placeholder="请输入您的邮箱"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="4. 请填写您的公司名称" prop="company">
|
||||
<el-input
|
||||
v-model.trim="formData.company"
|
||||
maxlength="80"
|
||||
placeholder="请输入您的公司名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="5. 请选择您的企业类型(单选)" prop="enterprise_type">
|
||||
<el-radio-group v-model="formData.enterprise_type" class="option-grid">
|
||||
<el-radio
|
||||
v-for="item in localizedEnterpriseOptions"
|
||||
:key="item.id"
|
||||
:label="String(item.id)"
|
||||
class="option-item"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="6. 请选择您所在的省份(单选)" prop="region">
|
||||
<el-select
|
||||
:key="provinceSelectKey"
|
||||
v-model="formData.region"
|
||||
filterable
|
||||
placeholder="输入省份名称搜索..."
|
||||
class="full-select"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in localizedProvinceOptions"
|
||||
:key="`region-${item.id}-${item.name}`"
|
||||
:label="item.name"
|
||||
:value="String(item.id)"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="7. 您想咨询的方向(可多选)">
|
||||
<el-checkbox-group v-model="formData.consult_direction_list" class="direction-list">
|
||||
<el-checkbox
|
||||
v-for="item in localizedConsultDirectionOptions"
|
||||
:key="item.id"
|
||||
:label="item.id"
|
||||
class="direction-item"
|
||||
>
|
||||
<span class="direction-main">{{ item.title }}</span>
|
||||
<span class="direction-sub">{{ item.desc }}</span>
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="8. 如果您有其他问题需要咨询,请留言">
|
||||
<el-input
|
||||
v-model.trim="formData.content"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 3, maxRows: 5 }"
|
||||
maxlength="500"
|
||||
show-word-limit
|
||||
placeholder="请输入您想咨询的内容..."
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div class="qrcode-area">
|
||||
<p>长按二维码添加微信,获取专属服务</p>
|
||||
<img src="@/assets/image/newkefu.png" alt="官方客服二维码">
|
||||
</div>
|
||||
|
||||
<el-checkbox v-model="formData.checked" class="privacy-checkbox">
|
||||
<span>
|
||||
您填写的信息仅用于本次业务对接沟通,公司将严格落实信息安全保护机制,不泄露、不滥用您的任何个人资料。
|
||||
</span>
|
||||
</el-checkbox>
|
||||
|
||||
<el-button
|
||||
type="primary"
|
||||
class="submit-btn"
|
||||
:loading="loading"
|
||||
@click="handleSubmit"
|
||||
>
|
||||
提交咨询
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reqConsultForm, reqProductConsult } from '@/api/H5'
|
||||
import {
|
||||
extractConsultOptionList,
|
||||
isEnglishLocale,
|
||||
localizeDictOptions,
|
||||
localizeDirectionOptions,
|
||||
normalizeDictOptions as buildDictOptions,
|
||||
normalizeDirectionOptions as buildDirectionOptions
|
||||
} from '@/utils/consultDict'
|
||||
|
||||
export default {
|
||||
name: 'MobileFullScreenConsultDialog',
|
||||
props: {
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '开元云科技合作咨询'
|
||||
},
|
||||
qrCode: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
currentUrl: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
submitApi: {
|
||||
type: Function,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
const validatePhone = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error('请输入联系电话'))
|
||||
} else if (!/^1[3-9]\d{9}$/.test(value)) {
|
||||
callback(new Error('请输入正确的手机号'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
loading: false,
|
||||
formData: this.getInitialFormData(),
|
||||
enterpriseOptions: [],
|
||||
provinceOptions: [],
|
||||
provinceSelectKey: 0,
|
||||
consultDirectionOptions: [],
|
||||
submitSuccess: false,
|
||||
rules: {
|
||||
name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
|
||||
phone: [{ required: true, validator: validatePhone, trigger: 'blur' }],
|
||||
email: [
|
||||
{ required: true, message: '请输入邮箱', trigger: 'blur' },
|
||||
{ type: 'email', message: '请输入正确的邮箱地址', trigger: 'blur' }
|
||||
],
|
||||
company: [{ required: true, message: '请输入公司名称', trigger: 'blur' }],
|
||||
enterprise_type: [{ required: true, message: '请选择企业类型', trigger: 'change' }],
|
||||
region: [{ required: true, message: '请选择所在省份', trigger: 'change' }]
|
||||
},
|
||||
originalOverflow: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
dialogVisible: {
|
||||
get() {
|
||||
return this.visible
|
||||
},
|
||||
set(value) {
|
||||
this.$emit('update:visible', value)
|
||||
}
|
||||
},
|
||||
localizedEnterpriseOptions() {
|
||||
return localizeDictOptions(this.enterpriseOptions, isEnglishLocale(this.$i18n))
|
||||
},
|
||||
localizedProvinceOptions() {
|
||||
return localizeDictOptions(this.provinceOptions, isEnglishLocale(this.$i18n))
|
||||
},
|
||||
localizedConsultDirectionOptions() {
|
||||
return localizeDirectionOptions(this.consultDirectionOptions, isEnglishLocale(this.$i18n))
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$i18n.locale'() {
|
||||
this.provinceSelectKey += 1
|
||||
},
|
||||
visible: {
|
||||
immediate: true,
|
||||
handler(newVal) {
|
||||
if (newVal) {
|
||||
this.resetForm()
|
||||
this.fetchConsultOptions()
|
||||
this.disableBodyScroll()
|
||||
} else {
|
||||
this.enableBodyScroll()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getInitialFormData() {
|
||||
return {
|
||||
custom_type: '1',
|
||||
name: '',
|
||||
phone: '',
|
||||
email: '',
|
||||
company: '',
|
||||
enterprise_type: '',
|
||||
region: '',
|
||||
consult_direction_list: [],
|
||||
content: '',
|
||||
checked: false
|
||||
}
|
||||
},
|
||||
resetForm() {
|
||||
this.formData = this.getInitialFormData()
|
||||
this.submitSuccess = false
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.consultForm) this.$refs.consultForm.clearValidate()
|
||||
})
|
||||
},
|
||||
disableBodyScroll() {
|
||||
this.originalOverflow = document.body.style.overflow
|
||||
document.body.style.overflow = 'hidden'
|
||||
},
|
||||
enableBodyScroll() {
|
||||
document.body.style.overflow = this.originalOverflow || ''
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
this.$emit('close')
|
||||
},
|
||||
async fetchConsultOptions() {
|
||||
try {
|
||||
const res = await reqConsultForm()
|
||||
const list = extractConsultOptionList(res)
|
||||
if (!list.length) return
|
||||
|
||||
const enterpriseOptions = buildDictOptions(list, 'enterprise_type')
|
||||
const provinceOptions = buildDictOptions(list, 'region')
|
||||
const consultDirectionOptions = buildDirectionOptions(list)
|
||||
|
||||
if (enterpriseOptions.length) this.enterpriseOptions = enterpriseOptions
|
||||
if (provinceOptions.length) {
|
||||
this.provinceOptions = provinceOptions
|
||||
this.provinceSelectKey += 1
|
||||
if (this.formData.region && !provinceOptions.some(item => item.id === String(this.formData.region))) {
|
||||
this.formData.region = ''
|
||||
}
|
||||
}
|
||||
if (consultDirectionOptions.length) this.consultDirectionOptions = consultDirectionOptions
|
||||
} catch (error) {
|
||||
// 保留本地兜底选项,避免接口异常时无法填写表单。
|
||||
}
|
||||
},
|
||||
buildSubmitPayload() {
|
||||
return {
|
||||
custom_type: this.formData.custom_type,
|
||||
name: this.formData.name,
|
||||
phone: this.formData.phone,
|
||||
email: this.formData.email,
|
||||
company: this.formData.company,
|
||||
enterprise_type: this.formData.enterprise_type,
|
||||
region: this.formData.region,
|
||||
consult_direction: this.formData.consult_direction_list.join(','),
|
||||
content: this.formData.content,
|
||||
source: '公众号',
|
||||
url_link: this.currentUrl || window.location.href
|
||||
}
|
||||
},
|
||||
async handleSubmit() {
|
||||
if (!this.formData.checked) {
|
||||
this.$message.warning('请先勾选信息安全与隐私保护说明')
|
||||
return
|
||||
}
|
||||
this.$refs.consultForm.validate(async valid => {
|
||||
if (!valid) return
|
||||
this.loading = true
|
||||
try {
|
||||
const payload = this.buildSubmitPayload()
|
||||
const response = this.submitApi ? await this.submitApi(payload) : await reqProductConsult(payload)
|
||||
if (response && (response.status === true || response.status === 'true')) {
|
||||
this.$emit('success', response)
|
||||
this.submitSuccess = true
|
||||
} else {
|
||||
this.$message.error((response && response.msg) || '提交失败,请稍后再试')
|
||||
}
|
||||
} catch (error) {
|
||||
this.$message.error('提交失败,请稍后再试')
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.enableBodyScroll()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
::v-deep .mobile-consult-fullscreen-dialog {
|
||||
margin: 0 !important;
|
||||
width: 100% !important;
|
||||
max-width: 100% !important;
|
||||
height: 100vh;
|
||||
border-radius: 0;
|
||||
|
||||
.el-dialog__header {
|
||||
padding: 14px 14px 8px;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.el-dialog__title {
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
color: #111827;
|
||||
}
|
||||
|
||||
.el-dialog__body {
|
||||
height: calc(100vh - 60px);
|
||||
padding: 12px 14px 18px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.mobile-consult-wrap {
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
.submit-success-page {
|
||||
min-height: calc(100vh - 110px);
|
||||
padding: 80px 24px 24px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.success-icon {
|
||||
width: 88px;
|
||||
height: 88px;
|
||||
border-radius: 50%;
|
||||
background: #22c55e;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 14px 28px rgba(34, 197, 94, 0.22);
|
||||
|
||||
i {
|
||||
font-size: 46px;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
.success-title {
|
||||
margin: 24px 0 10px;
|
||||
color: #111827;
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.mobile-consult-title {
|
||||
margin: 0;
|
||||
font-size: 24px;
|
||||
line-height: 1.25;
|
||||
color: #111827;
|
||||
}
|
||||
|
||||
.mobile-consult-subtitle {
|
||||
margin: 6px 0 16px;
|
||||
font-size: 12px;
|
||||
color: #9ca3af;
|
||||
}
|
||||
|
||||
.mobile-consult-form {
|
||||
::v-deep .el-form-item {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
::v-deep .el-form-item__content,
|
||||
::v-deep .el-input,
|
||||
::v-deep .el-select,
|
||||
::v-deep .el-textarea {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
::v-deep .el-form-item__label {
|
||||
padding-bottom: 6px;
|
||||
font-size: 13px;
|
||||
line-height: 1.3;
|
||||
color: #1f2937;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
::v-deep .el-form-item__error {
|
||||
position: static;
|
||||
padding-top: 6px;
|
||||
line-height: 1.25;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
::v-deep .el-input__inner {
|
||||
height: 40px;
|
||||
border-radius: 10px;
|
||||
border: 1px solid #e5e7eb;
|
||||
}
|
||||
|
||||
::v-deep .el-form-item.is-error .el-input__inner,
|
||||
::v-deep .el-form-item.is-error .el-textarea__inner {
|
||||
border-color: #f56c6c;
|
||||
}
|
||||
|
||||
::v-deep .el-textarea__inner {
|
||||
border-radius: 10px;
|
||||
border: 1px solid #e5e7eb;
|
||||
}
|
||||
}
|
||||
|
||||
.option-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 8px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.option-item {
|
||||
margin-right: 0 !important;
|
||||
padding: 9px 8px;
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 10px;
|
||||
white-space: nowrap;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
|
||||
::v-deep .el-radio__label {
|
||||
padding-left: 6px;
|
||||
font-size: 12px;
|
||||
color: #374151;
|
||||
}
|
||||
}
|
||||
|
||||
.full-select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.direction-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.direction-item {
|
||||
margin-right: 0 !important;
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 10px;
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
|
||||
::v-deep .el-checkbox__label {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
padding-left: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.direction-main {
|
||||
font-size: 14px;
|
||||
color: #111827;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.direction-sub {
|
||||
font-size: 12px;
|
||||
color: #9ca3af;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.qrcode-area {
|
||||
margin: 16px 0;
|
||||
text-align: center;
|
||||
padding: 18px 0;
|
||||
background: #f7f8fa;
|
||||
border-radius: 12px;
|
||||
|
||||
p {
|
||||
margin: 0 0 10px;
|
||||
font-size: 12px;
|
||||
color: #6b7280;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 98px;
|
||||
height: 98px;
|
||||
border-radius: 8px;
|
||||
border: 1px dashed #3b82f6;
|
||||
}
|
||||
}
|
||||
|
||||
.privacy-checkbox {
|
||||
margin: 0 0 14px;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
|
||||
::v-deep .el-checkbox__input {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
::v-deep .el-checkbox__label {
|
||||
padding-left: 8px;
|
||||
color: #6b7280;
|
||||
font-size: 12px;
|
||||
line-height: 1.6;
|
||||
white-space: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
width: 100%;
|
||||
height: 44px;
|
||||
border: none;
|
||||
border-radius: 999px;
|
||||
background: #111827;
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
</style>
|
||||
@ -1,43 +0,0 @@
|
||||
<template>
|
||||
<div class="consult-full-preview">
|
||||
<div class="preview-actions">
|
||||
<el-button type="primary" @click="dialogVisible = true">打开全屏咨询弹窗</el-button>
|
||||
</div>
|
||||
|
||||
<mobile-full-screen-consult-dialog
|
||||
:visible.sync="dialogVisible"
|
||||
:current-url="currentUrl"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MobileFullScreenConsultDialog from '../components/H5_dialog/MobileFullScreenConsultDialog.vue'
|
||||
|
||||
export default {
|
||||
name: 'ConsultDialogFullPreview',
|
||||
components: { MobileFullScreenConsultDialog },
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
currentUrl() {
|
||||
return window.location.href
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.consult-full-preview {
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
.preview-actions {
|
||||
padding: 12px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
@ -1,338 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="banner">
|
||||
<!-- 介绍 -->
|
||||
<div class="introduce">
|
||||
<div class="title">
|
||||
<span>{{ productList.title }}</span>
|
||||
</div>
|
||||
<!-- 详情 -->
|
||||
<div class="details">
|
||||
<span>{{ productList.description }}</span>
|
||||
</div>
|
||||
<div class="btn" @click="openConsultDialog(productList, 'banner')">
|
||||
立即咨询
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 规格 -->
|
||||
<div class="specification">
|
||||
<div class="title">
|
||||
产品<span class="color">规格</span>
|
||||
</div>
|
||||
<!-- 产品列表 -->
|
||||
<div class="product-list">
|
||||
<!-- 列表项 -->
|
||||
<div class="list-box" v-for="(item, index) in productList.products" :key="index">
|
||||
<div class="box-title">
|
||||
{{ item.title }}
|
||||
</div>
|
||||
<!-- 详情 -->
|
||||
<div class="box-details">
|
||||
<div class="details-item" v-for="(items, index) in item.list" :key="index">
|
||||
<span>
|
||||
<span class="item-title">
|
||||
<span>{{ items.name }}</span>
|
||||
</span>
|
||||
<span class="item-details">
|
||||
<span>{{ items.content }}</span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 价格 -->
|
||||
<div class="price">
|
||||
¥<span class="price-dig">{{ item.price }}</span><span class="price-color">{{ item.price_unit }}(可短租)</span>
|
||||
</div>
|
||||
<!-- 咨询 -->
|
||||
<div class="box-btn" @click="openConsultDialog(item, 'spec')">
|
||||
立即咨询
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 产品咨询弹窗 -->
|
||||
<ProductConsultDialog
|
||||
:visible.sync="showConsultDialog"
|
||||
:platform-name="platformName"
|
||||
:qr-code="qrCode"
|
||||
:default-form-data="consultFormData"
|
||||
:submit-api="submitConsultApi"
|
||||
@success="handleConsultSuccess"
|
||||
@close="handleDialogClose"
|
||||
/>
|
||||
|
||||
<Footer></Footer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reqProductDetail, reqProductConsult } from '@/api/H5/index'
|
||||
import Footer from '../components/footer/footer.vue';
|
||||
import ProductConsultDialog from '../components/H5_dialog/index.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Footer,
|
||||
ProductConsultDialog
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
id: null,
|
||||
productList: [],
|
||||
|
||||
// 咨询弹窗相关
|
||||
showConsultDialog: false,
|
||||
platformName: '产品详情页',
|
||||
qrCode: '',
|
||||
consultFormData: {
|
||||
content: '',
|
||||
custom_type: '1',
|
||||
name: '',
|
||||
phone: '',
|
||||
company: '',
|
||||
email: '',
|
||||
checked: false
|
||||
},
|
||||
currentProduct: null,
|
||||
consultSource: '' // 记录咨询来源:banner 或 spec
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
// 获取id
|
||||
this.id = this.$route.query.id
|
||||
console.log('ID:', this.id)
|
||||
this.getProductList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 获取产品列表
|
||||
async getProductList() {
|
||||
const res = await reqProductDetail({ id: this.id })
|
||||
console.log('产品详情是', res)
|
||||
if (res.status === true) {
|
||||
this.productList = res.data
|
||||
}
|
||||
},
|
||||
|
||||
// 打开咨询弹窗
|
||||
openConsultDialog(product, source) {
|
||||
this.currentProduct = product
|
||||
this.consultSource = source
|
||||
|
||||
// 根据来源设置不同的咨询内容
|
||||
let content = ''
|
||||
if (source === 'banner') {
|
||||
// 从banner咨询
|
||||
content = `我想咨询关于【${product.title || '产品'}】的详细信息`
|
||||
} else if (source === 'spec') {
|
||||
// 从规格列表咨询
|
||||
content = `我想咨询【${product.title || '产品规格'}】的价格和租赁详情`
|
||||
}
|
||||
|
||||
// 设置咨询表单的预填内容
|
||||
this.consultFormData = {
|
||||
...this.consultFormData,
|
||||
content: content
|
||||
}
|
||||
|
||||
this.showConsultDialog = true
|
||||
},
|
||||
|
||||
// 提交咨询API
|
||||
async submitConsultApi(data) {
|
||||
// 构建提交数据
|
||||
const submitData = {
|
||||
...data,
|
||||
product_id: this.id,
|
||||
product_title: this.productList.title || '',
|
||||
product_name: this.currentProduct?.title || '',
|
||||
product_price: this.currentProduct?.price || '',
|
||||
product_unit: this.currentProduct?.price_unit || '',
|
||||
consult_source: this.consultSource || '',
|
||||
page_type: 'product_detail',
|
||||
page_url: window.location.href
|
||||
}
|
||||
|
||||
return await reqProductConsult(submitData)
|
||||
},
|
||||
|
||||
// 咨询成功回调
|
||||
handleConsultSuccess(response) {
|
||||
console.log('咨询提交成功:', response)
|
||||
this.$message.success('咨询提交成功,我们将尽快联系您!')
|
||||
},
|
||||
|
||||
// 弹窗关闭回调
|
||||
handleDialogClose() {
|
||||
this.currentProduct = null
|
||||
this.consultSource = ''
|
||||
// 重置表单数据
|
||||
this.consultFormData = {
|
||||
content: '',
|
||||
custom_type: '1',
|
||||
name: '',
|
||||
phone: '',
|
||||
company: '',
|
||||
email: '',
|
||||
checked: false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.color {
|
||||
background: linear-gradient(to right, #0066FF, #66CCFF);
|
||||
/* 蓝到浅蓝渐变 */
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
color: transparent;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.banner {
|
||||
height: 4.2rem;
|
||||
background: url(../images/calculateBanner.jpg) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
position: relative;
|
||||
|
||||
.introduce {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 14%;
|
||||
transform: translate(-90%);
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 0.32rem;
|
||||
/* 修改为0.32rem */
|
||||
color: #000;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.details {
|
||||
font-size: 0.18rem;
|
||||
/* 修改为0.18rem */
|
||||
color: #8890ab;
|
||||
line-height: 2 !important;
|
||||
margin-top: .1rem;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin-top: .1rem;
|
||||
width: 2rem;
|
||||
height: .4rem;
|
||||
border-radius: .1rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: .2rem;
|
||||
background: linear-gradient(90deg, #275AFF 0%, #2EBDFA 100%);
|
||||
color: #fff;
|
||||
cursor: pointer; /* 添加手型光标 */
|
||||
}
|
||||
}
|
||||
|
||||
// 规格
|
||||
.specification {
|
||||
height: 100%;
|
||||
background: linear-gradient(to bottom, #fff, #f2f6fb, #fff);
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
font-size: 0.32rem;
|
||||
/* 修改为0.32rem */
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
// 产品列表
|
||||
.product-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
padding: 0 1%;
|
||||
|
||||
// 列表项
|
||||
.list-box {
|
||||
position: relative;
|
||||
margin: .2rem 2%;
|
||||
width: 46%;
|
||||
box-shadow: 0 .02rem .08rem rgba(39, 90, 255, 0.08);
|
||||
border-radius: .3rem;
|
||||
padding: .2rem .2rem;
|
||||
background-color: #fff;
|
||||
padding-bottom: 2rem;
|
||||
// 标题
|
||||
.box-title {
|
||||
font-size: 0.24rem;
|
||||
/* 修改为0.24rem */
|
||||
font-weight: 600;
|
||||
margin-bottom: .2rem;
|
||||
}
|
||||
|
||||
// 详情
|
||||
.box-details {
|
||||
.details-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
line-height: 1;
|
||||
|
||||
.item-title {
|
||||
font-size: .16rem;
|
||||
color: #000;
|
||||
margin-right: 0.07rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.item-details {
|
||||
font-size: .16rem;
|
||||
color: #8890ab;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 价格
|
||||
.price {
|
||||
width: calc(100% - 0.4rem);
|
||||
position: absolute;
|
||||
bottom: .2rem;
|
||||
font-size: .16rem;
|
||||
color: #F62424;
|
||||
margin-top: .2rem;
|
||||
padding-top: .2rem;
|
||||
// 虚线
|
||||
border-top: .02rem dashed #e0e0e0;
|
||||
margin-bottom: .8rem;
|
||||
.price-dig {
|
||||
font-size: 0.28rem;
|
||||
/* 修改为0.28rem */
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.price-color {
|
||||
color: #8890ab;
|
||||
}
|
||||
}
|
||||
|
||||
.box-btn {
|
||||
width: calc(100% - 0.4rem); /* 减去左右 padding */
|
||||
margin-top: .2rem; /* 增加上边距 */
|
||||
padding: .1rem .2rem;
|
||||
text-align: center;
|
||||
border-radius: .1rem;
|
||||
font-size: .2rem;
|
||||
background: linear-gradient(90deg, #275AFF 0%, #2EBDFA 100%);
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
left: 0.2rem;
|
||||
right: 0.2rem;
|
||||
bottom: 0.2rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
Before Width: | Height: | Size: 595 KiB |
|
Before Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 270 KiB |
|
Before Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 284 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 214 KiB |
|
Before Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 3.0 MiB |
@ -1,296 +1,96 @@
|
||||
<template>
|
||||
<div class="h5-container">
|
||||
<!-- 主要内容区域 -->
|
||||
<div ref="mainContent" class="main" @scroll="handleScroll">
|
||||
<transition :name="transitionName" mode="out-in">
|
||||
<router-view></router-view>
|
||||
<router-view />
|
||||
</transition>
|
||||
</div>
|
||||
<div style="height: 1.4rem;"></div>
|
||||
|
||||
<!-- 返回顶部按钮 -->
|
||||
<!--
|
||||
<transition name="fade-scale">
|
||||
<div
|
||||
v-show="showBackToTop"
|
||||
class="back-to-top"
|
||||
@click="scrollToTop"
|
||||
>
|
||||
<div v-show="showBackToTop" class="back-to-top" @click="scrollToTop">
|
||||
<div class="back-to-top-icon">
|
||||
<svg viewBox="0 0 24 24" fill="none">
|
||||
<path d="M12 5L12 19M12 5L6 11M12 5L18 11"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"/>
|
||||
<path d="M12 5L12 19M12 5L6 11M12 5L18 11" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
</div>
|
||||
<div class="back-to-top-text">回顶部</div>
|
||||
</div>
|
||||
</transition>
|
||||
</transition> -->
|
||||
|
||||
<!-- 底部导航栏 -->
|
||||
<div class="tabBar">
|
||||
<!-- 首页 -->
|
||||
<!-- <div class="tabBar">
|
||||
<div
|
||||
v-for="tab in tabList"
|
||||
:key="tab.id"
|
||||
class="tabBar-item"
|
||||
:class="{ active: activeTab === 'index' }"
|
||||
@click="switchTab('index')"
|
||||
:class="{ active: activeTab === tab.id }"
|
||||
@click="switchTab(tab)"
|
||||
>
|
||||
<div class="item-img">
|
||||
<transition name="icon-bounce" mode="out-in">
|
||||
<img
|
||||
:key="activeTab === 'index'"
|
||||
:src="activeTab === 'index' ? require('./images/tabBar/homeColor.png') : require('./images/tabBar/home.png')"
|
||||
alt="首页"
|
||||
/>
|
||||
</transition>
|
||||
<img :src="activeTab === tab.id ? tab.activeIcon : tab.icon" :alt="tab.name" />
|
||||
</div>
|
||||
<div class="item-text">
|
||||
<transition name="text-slide" mode="out-in">
|
||||
<span :key="activeTab === 'index'">首页</span>
|
||||
</transition>
|
||||
</div>
|
||||
<div class="active-indicator" v-if="activeTab === 'index'"></div>
|
||||
<div class="item-text">{{ tab.name }}</div>
|
||||
<div v-if="activeTab === tab.id" class="active-indicator"></div>
|
||||
</div>
|
||||
|
||||
<!-- 云 -->
|
||||
<div
|
||||
class="tabBar-item"
|
||||
:class="{ active: activeTab === 'cloud' }"
|
||||
@click="switchTab('cloud')"
|
||||
>
|
||||
<div class="item-img">
|
||||
<transition name="icon-bounce" mode="out-in">
|
||||
<img
|
||||
:key="activeTab === 'cloud'"
|
||||
:src="activeTab === 'cloud' ? require('./images/tabBar/cloudColor.png') : require('./images/tabBar/cloud.png')"
|
||||
alt="云"
|
||||
/>
|
||||
</transition>
|
||||
</div>
|
||||
<div class="item-text">
|
||||
<transition name="text-slide" mode="out-in">
|
||||
<span :key="activeTab === 'cloud'">云</span>
|
||||
</transition>
|
||||
</div>
|
||||
<div class="active-indicator" v-if="activeTab === 'cloud'"></div>
|
||||
</div>
|
||||
|
||||
<!-- 算 -->
|
||||
<div
|
||||
class="tabBar-item"
|
||||
:class="{ active: activeTab === 'calculate' }"
|
||||
@click="switchTab('calculate')"
|
||||
>
|
||||
<div class="item-img">
|
||||
<transition name="icon-bounce" mode="out-in">
|
||||
<img
|
||||
:key="activeTab === 'calculate'"
|
||||
:src="activeTab === 'calculate' ? require('./images/tabBar/calculateColor.png') : require('./images/tabBar/calculate.png')"
|
||||
alt="算"
|
||||
/>
|
||||
</transition>
|
||||
</div>
|
||||
<div class="item-text">
|
||||
<transition name="text-slide" mode="out-in">
|
||||
<span :key="activeTab === 'calculate'">算</span>
|
||||
</transition>
|
||||
</div>
|
||||
<div class="active-indicator" v-if="activeTab === 'calculate'"></div>
|
||||
</div>
|
||||
|
||||
<!-- 网 -->
|
||||
<div
|
||||
class="tabBar-item"
|
||||
:class="{ active: activeTab === 'net' }"
|
||||
@click="switchTab('net')"
|
||||
>
|
||||
<div class="item-img">
|
||||
<transition name="icon-bounce" mode="out-in">
|
||||
<img
|
||||
:key="activeTab === 'net'"
|
||||
:src="activeTab === 'net' ? require('./images/tabBar/netColor.png') : require('./images/tabBar/net.png')"
|
||||
alt="网"
|
||||
/>
|
||||
</transition>
|
||||
</div>
|
||||
<div class="item-text">
|
||||
<transition name="text-slide" mode="out-in">
|
||||
<span :key="activeTab === 'net'">网</span>
|
||||
</transition>
|
||||
</div>
|
||||
<div class="active-indicator" v-if="activeTab === 'net'"></div>
|
||||
</div>
|
||||
|
||||
<!-- 用 -->
|
||||
<div
|
||||
class="tabBar-item"
|
||||
:class="{ active: activeTab === 'use' }"
|
||||
@click="switchTab('use')"
|
||||
>
|
||||
<div class="item-img">
|
||||
<transition name="icon-bounce" mode="out-in">
|
||||
<img
|
||||
:key="activeTab === 'use'"
|
||||
:src="activeTab === 'use' ? require('./images/tabBar/userColor.png') : require('./images/tabBar/user.png')"
|
||||
alt="用"
|
||||
/>
|
||||
</transition>
|
||||
</div>
|
||||
<div class="item-text">
|
||||
<transition name="text-slide" mode="out-in">
|
||||
<span :key="activeTab === 'use'">用</span>
|
||||
</transition>
|
||||
</div>
|
||||
<div class="active-indicator" v-if="activeTab === 'use'"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import './media.js'
|
||||
|
||||
export default {
|
||||
name: 'H5HomePage',
|
||||
data() {
|
||||
return {
|
||||
activeTab: 'index', // 当前激活的标签
|
||||
activeTab: 'index',
|
||||
tabList: [
|
||||
{ id: 'index', name: '首页', path: '/h5HomePage/index' },
|
||||
{ id: 'cloud', name: '云', path: '/h5HomePage/cloud' },
|
||||
{ id: 'calculate', name: '算', path: '/h5HomePage/calculate' },
|
||||
{ id: 'net', name: '网', path: '/h5HomePage/net' },
|
||||
{ id: 'use', name: '用', path: '/h5HomePage/use' }
|
||||
{
|
||||
id: 'index',
|
||||
name: '首页',
|
||||
path: '/h5HomePage/index',
|
||||
icon: require('./images/tabBar/home.png'),
|
||||
activeIcon: require('./images/tabBar/homeColor.png')
|
||||
},
|
||||
{
|
||||
id: 'about',
|
||||
name: '关于我们',
|
||||
path: '/h5HomePage/about',
|
||||
icon: require('./images/tabBar/user.png'),
|
||||
activeIcon: require('./images/tabBar/userColor.png')
|
||||
}
|
||||
],
|
||||
showBackToTop: false, // 是否显示返回顶部按钮
|
||||
scrollThreshold: 200, // 滚动多少距离后显示按钮(可根据需要调整)
|
||||
transitionName: 'fade', // 页面切换动画名称
|
||||
isSwitching: false, // 是否正在切换
|
||||
};
|
||||
showBackToTop: false,
|
||||
scrollThreshold: 200,
|
||||
transitionName: 'fade'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 监听路由变化,更新激活的标签
|
||||
'$route'(to) {
|
||||
this.updateActiveTab(to.path);
|
||||
this.updateActiveTab(to.path)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// 初始化时根据当前路由设置激活状态
|
||||
this.updateActiveTab(this.$route.path);
|
||||
this.updateActiveTab(this.$route.path)
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 切换标签页
|
||||
* @param {string} tabId - 标签ID
|
||||
*/
|
||||
switchTab(tabId) {
|
||||
// 如果正在切换或点击的是当前已激活的标签,不进行操作
|
||||
if (this.isSwitching || this.activeTab === tabId) return;
|
||||
|
||||
// 设置正在切换状态
|
||||
this.isSwitching = true;
|
||||
|
||||
// 更新激活状态
|
||||
this.activeTab = tabId;
|
||||
|
||||
// 根据tabId跳转到对应的路由
|
||||
const tab = this.tabList.find(item => item.id === tabId);
|
||||
if (tab) {
|
||||
// 添加点击反馈动画
|
||||
this.animateTabClick(tabId);
|
||||
|
||||
// 延迟路由跳转,让动画先执行
|
||||
setTimeout(() => {
|
||||
this.$router.push(tab.path);
|
||||
// 重置切换状态
|
||||
setTimeout(() => {
|
||||
this.isSwitching = false;
|
||||
}, 300);
|
||||
}, 150);
|
||||
} else {
|
||||
this.isSwitching = false;
|
||||
}
|
||||
switchTab(tab) {
|
||||
if (this.activeTab === tab.id || this.$route.path === tab.path) return
|
||||
this.activeTab = tab.id
|
||||
this.$router.push(tab.path)
|
||||
},
|
||||
|
||||
/**
|
||||
* 执行Tab点击动画
|
||||
* @param {string} tabId - 标签ID
|
||||
*/
|
||||
animateTabClick(tabId) {
|
||||
// 获取点击的tab元素
|
||||
const tabIndex = this.tabList.findIndex(item => item.id === tabId);
|
||||
const tabs = document.querySelectorAll('.tabBar-item');
|
||||
|
||||
if (tabs[tabIndex]) {
|
||||
// 添加点击动画类
|
||||
tabs[tabIndex].classList.add('click-animation');
|
||||
|
||||
// 动画结束后移除类
|
||||
setTimeout(() => {
|
||||
tabs[tabIndex].classList.remove('click-animation');
|
||||
}, 300);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 根据路由路径更新激活的标签
|
||||
* @param {string} path - 当前路由路径
|
||||
*/
|
||||
updateActiveTab(path) {
|
||||
// 从路径中提取tabId
|
||||
const pathParts = path.split('/');
|
||||
const tabId = pathParts[pathParts.length - 1];
|
||||
|
||||
// 如果提取的tabId在tabList中存在,则更新activeTab
|
||||
if (this.tabList.some(item => item.id === tabId)) {
|
||||
this.activeTab = tabId;
|
||||
}
|
||||
this.activeTab = path.endsWith('/about') ? 'about' : 'index'
|
||||
},
|
||||
|
||||
/**
|
||||
* 处理滚动事件
|
||||
*/
|
||||
handleScroll() {
|
||||
if (this.$refs.mainContent) {
|
||||
const scrollTop = this.$refs.mainContent.scrollTop;
|
||||
// 当滚动距离超过阈值时显示返回顶部按钮
|
||||
this.showBackToTop = scrollTop > this.scrollThreshold;
|
||||
}
|
||||
const mainContent = this.$refs.mainContent
|
||||
if (mainContent) this.showBackToTop = mainContent.scrollTop > this.scrollThreshold
|
||||
},
|
||||
|
||||
/**
|
||||
* 滚动到顶部
|
||||
*/
|
||||
scrollToTop() {
|
||||
if (this.$refs.mainContent) {
|
||||
// 添加点击反馈效果
|
||||
const btn = document.querySelector('.back-to-top');
|
||||
if (btn) {
|
||||
btn.classList.add('clicked');
|
||||
setTimeout(() => {
|
||||
btn.classList.remove('clicked');
|
||||
}, 300);
|
||||
}
|
||||
|
||||
this.$refs.mainContent.scrollTo({
|
||||
top: 0,
|
||||
behavior: 'smooth' // 平滑滚动
|
||||
});
|
||||
}
|
||||
const mainContent = this.$refs.mainContent
|
||||
if (mainContent) mainContent.scrollTo({ top: 0, behavior: 'smooth' })
|
||||
}
|
||||
}
|
||||
};
|
||||
function adapter() {
|
||||
//获取布局视口宽度,因为开启了理想视口,布局视口=设备横向独立像素值
|
||||
const dpWidth = document.documentElement.clientWidth
|
||||
//计算根字体大小
|
||||
const rootFonstSize = (dpWidth * 100) / 750
|
||||
//设置根字体大小
|
||||
document.documentElement.style.fontSize = rootFonstSize + 'px'
|
||||
}
|
||||
adapter()
|
||||
window.onresize = adapter()
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
@ -1,243 +0,0 @@
|
||||
.top-tit {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
background: linear-gradient(90deg, #275AFF 0%, #2EBDFA 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
font-size: 0.39rem;
|
||||
/* 增大30%: .3rem * 1.3 = .39rem */
|
||||
font-weight: bold;
|
||||
margin: 0.3rem 0;
|
||||
}
|
||||
.supplier-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
/* 允许换行 */
|
||||
padding: 0.2rem 0.22rem;
|
||||
gap: 0.15rem;
|
||||
/* 使用gap控制间距 */
|
||||
}
|
||||
.supplier {
|
||||
flex-shrink: 0;
|
||||
/* 防止收缩 */
|
||||
}
|
||||
.supplier .supplier-title {
|
||||
font-size: 0.28rem;
|
||||
color: #000;
|
||||
padding: 0.12rem 0.2rem;
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 0.12rem;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
white-space: nowrap;
|
||||
/* 防止文字换行 */
|
||||
}
|
||||
.supplier .supplier-title:hover {
|
||||
background-color: #e0e0e0;
|
||||
transform: translateY(-0.02rem);
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.supplier .supplier-title.active {
|
||||
background: linear-gradient(90deg, #275aff, #2ebdfa);
|
||||
color: #fff;
|
||||
box-shadow: 0 0.04rem 0.12rem rgba(39, 90, 255, 0.3);
|
||||
transform: translateY(-0.02rem);
|
||||
}
|
||||
.box {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
padding: 0 0.3rem;
|
||||
}
|
||||
.box .box-item {
|
||||
display: flex;
|
||||
width: 48%;
|
||||
flex-direction: column;
|
||||
align-items: self-start;
|
||||
border: 0.02rem solid #f0f0f0;
|
||||
border-radius: 0.2rem;
|
||||
padding: 0.15rem 0.2rem;
|
||||
margin: 0.34rem 0;
|
||||
transition: all 0.3s ease;
|
||||
position: relative;
|
||||
padding-bottom: 0.6rem;
|
||||
}
|
||||
.box .box-item:hover {
|
||||
transform: translateY(-0.05rem);
|
||||
box-shadow: 0 0.08rem 0.2rem rgba(0, 0, 0, 0.1);
|
||||
border-color: #1f70ff;
|
||||
}
|
||||
.box .box-item .item-tit {
|
||||
font-size: 0.26rem;
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
margin-bottom: 0.1rem;
|
||||
}
|
||||
.box .box-item .item-detail {
|
||||
color: #666;
|
||||
font-size: 0.22rem;
|
||||
margin: 0.15rem 0;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.box .box-item .item-desc {
|
||||
color: #666;
|
||||
background-color: #f8f9fa;
|
||||
font-size: 0.2rem;
|
||||
padding: 0.08rem 0.12rem;
|
||||
border-radius: 0.1rem;
|
||||
margin-bottom: 0.15rem;
|
||||
border: 0.01rem solid #e9ecef;
|
||||
}
|
||||
.box .box-item .item-btn {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
padding-top: 0.2rem;
|
||||
}
|
||||
.box .box-item .item-btn .btn {
|
||||
background: linear-gradient(90deg, #275AFF 0%, #2EBDFA 100%);
|
||||
border-radius: 0.04rem;
|
||||
padding: 0.08rem 0;
|
||||
width: calc(100% - 0.4rem);
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 0.182rem;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
border: none;
|
||||
position: absolute;
|
||||
bottom: 0.2rem;
|
||||
}
|
||||
.box .box-item .item-btn .btn:hover {
|
||||
background: linear-gradient(90deg, #0d5aff, #2a7aff);
|
||||
transform: translateY(-0.02rem);
|
||||
box-shadow: 0 0.04rem 0.1rem rgba(31, 112, 255, 0.3);
|
||||
}
|
||||
.search {
|
||||
width: 100%;
|
||||
margin: 0.3rem 0;
|
||||
padding: 0 0.3rem;
|
||||
}
|
||||
.search .search-box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: #f8f9fa;
|
||||
border-radius: 0.3rem;
|
||||
overflow: hidden;
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
border: 0.02rem solid #e9ecef;
|
||||
box-shadow: 0 0.02rem 0.06rem rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
.search .search-box:focus-within {
|
||||
transform: translateY(-0.01rem);
|
||||
}
|
||||
.search .search-btn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 18%;
|
||||
color: #fff;
|
||||
padding: 0.18rem 0;
|
||||
background: linear-gradient(90deg, #1f70ff, #3a8cff);
|
||||
border-bottom-right-radius: 0.3rem;
|
||||
border-top-right-radius: 0.3rem;
|
||||
font-size: 0.28rem;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.search .search-btn::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: -100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%);
|
||||
transition: left 0.5s ease;
|
||||
}
|
||||
.search .search-btn:hover {
|
||||
background: linear-gradient(90deg, #0d5aff, #2a7aff);
|
||||
width: 20%;
|
||||
}
|
||||
.search .search-btn:hover::after {
|
||||
left: 100%;
|
||||
}
|
||||
.search .search-btn:active {
|
||||
background: linear-gradient(90deg, #0a50e6, #2575e6);
|
||||
transform: scale(0.98);
|
||||
}
|
||||
.search .input {
|
||||
flex: 1;
|
||||
padding: 0.16rem 0;
|
||||
padding-left: 0.25rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.search .input input {
|
||||
border: none;
|
||||
outline: none;
|
||||
background: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
font-size: 0.26rem;
|
||||
color: #333;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.search .input input::placeholder {
|
||||
color: #adb5bd;
|
||||
font-size: 0.24rem;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
.search .input input:focus::placeholder {
|
||||
color: #868e96;
|
||||
}
|
||||
/* 为供应商容器和产品列表添加搜索状态样式 */
|
||||
.supplier-container {
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
.box {
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
/* 当有搜索关键词时,调整一些元素的样式 */
|
||||
:global body.search-active .supplier-container {
|
||||
opacity: 0.8;
|
||||
}
|
||||
:global body.search-active .box {
|
||||
animation: searchResultAppear 0.4s ease;
|
||||
}
|
||||
@keyframes searchResultAppear {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translateY(0.1rem);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
/* 响应式调整 */
|
||||
@media (max-width: 480px) {
|
||||
.search {
|
||||
padding: 0 0.2rem;
|
||||
margin: 0.25rem 0;
|
||||
}
|
||||
.search .search-box {
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
.search .search-btn {
|
||||
font-size: 0.26rem;
|
||||
padding: 0.16rem 0;
|
||||
}
|
||||
.search .input {
|
||||
padding: 0.14rem 0;
|
||||
padding-left: 0.2rem;
|
||||
}
|
||||
.search .input input {
|
||||
font-size: 0.24rem;
|
||||
}
|
||||
}
|
||||
@ -1,300 +0,0 @@
|
||||
.top-tit {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
background: linear-gradient(90deg, #275AFF 0%, #2EBDFA 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
font-size: .39rem;
|
||||
/* 增大30%: .3rem * 1.3 = .39rem */
|
||||
font-weight: bold;
|
||||
margin: .3rem 0;
|
||||
}
|
||||
|
||||
.supplier-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
/* 允许换行 */
|
||||
padding: .2rem .22rem;
|
||||
gap: .15rem;
|
||||
/* 使用gap控制间距 */
|
||||
}
|
||||
|
||||
.supplier {
|
||||
flex-shrink: 0;
|
||||
/* 防止收缩 */
|
||||
|
||||
.supplier-title {
|
||||
font-size: .28rem;
|
||||
color: #000;
|
||||
padding: .12rem .2rem;
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 0.12rem;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
white-space: nowrap;
|
||||
/* 防止文字换行 */
|
||||
|
||||
&:hover {
|
||||
background-color: #e0e0e0;
|
||||
transform: translateY(-0.02rem);
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: linear-gradient(90deg, #275aff, #2ebdfa);
|
||||
color: #fff;
|
||||
box-shadow: 0 .04rem .12rem rgba(39, 90, 255, 0.3);
|
||||
transform: translateY(-0.02rem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.box {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
padding: 0 .3rem;
|
||||
|
||||
.box-item {
|
||||
display: flex;
|
||||
width: 48%;
|
||||
flex-direction: column;
|
||||
align-items: self-start;
|
||||
border: .02rem solid #f0f0f0;
|
||||
border-radius: .2rem;
|
||||
padding: .15rem .2rem;
|
||||
margin: .34rem 0;
|
||||
transition: all 0.3s ease;
|
||||
position: relative;
|
||||
padding-bottom: .6rem;
|
||||
&:hover {
|
||||
transform: translateY(-0.05rem);
|
||||
box-shadow: 0 .08rem .2rem rgba(0, 0, 0, 0.1);
|
||||
border-color: #1f70ff;
|
||||
}
|
||||
|
||||
.item-tit {
|
||||
font-size: .26rem;
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
margin-bottom: .1rem;
|
||||
}
|
||||
|
||||
.item-detail {
|
||||
color: #666;
|
||||
font-size: .22rem;
|
||||
margin: .15rem 0;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.item-desc {
|
||||
color: #666;
|
||||
background-color: #f8f9fa;
|
||||
font-size: .2rem;
|
||||
padding: .08rem .12rem;
|
||||
border-radius: .1rem;
|
||||
margin-bottom: .15rem;
|
||||
border: .01rem solid #e9ecef;
|
||||
}
|
||||
|
||||
.item-btn {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
// justify-content: flex-end;
|
||||
padding-top: .2rem;
|
||||
.btn {
|
||||
background: linear-gradient(90deg, #275AFF 0%, #2EBDFA 100%);
|
||||
border-radius: 0.04rem;
|
||||
// padding: 0.08rem ;
|
||||
padding: .08rem 0;
|
||||
width: calc(100% - 0.4rem);
|
||||
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 0.182rem;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
border: none;
|
||||
position: absolute;
|
||||
bottom: 0.2rem;
|
||||
|
||||
&:hover {
|
||||
background: linear-gradient(90deg, #0d5aff, #2a7aff);
|
||||
transform: translateY(-0.02rem);
|
||||
box-shadow: 0 .04rem .1rem rgba(31, 112, 255, 0.3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.search {
|
||||
width: 100%;
|
||||
margin: .3rem 0;
|
||||
padding: 0 .3rem;
|
||||
|
||||
.search-box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: #f8f9fa;
|
||||
border-radius: .3rem;
|
||||
overflow: hidden;
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
border: .02rem solid #e9ecef;
|
||||
box-shadow: 0 .02rem .06rem rgba(0, 0, 0, 0.04);
|
||||
|
||||
// &:hover {
|
||||
// border-color: #ced4da;
|
||||
// background-color: #fff;
|
||||
// box-shadow: 0 .04rem .12rem rgba(0, 0, 0, 0.08);
|
||||
// }
|
||||
|
||||
&:focus-within {
|
||||
// border-color: #1f70ff;
|
||||
// background-color: #fff;
|
||||
// box-shadow: 0 .04rem .16rem rgba(31, 112, 255, 0.15);
|
||||
transform: translateY(-0.01rem);
|
||||
}
|
||||
}
|
||||
|
||||
.search-btn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 18%;
|
||||
color: #fff;
|
||||
padding: .18rem 0;
|
||||
background: linear-gradient(90deg, #1f70ff, #3a8cff);
|
||||
border-bottom-right-radius: .3rem;
|
||||
border-top-right-radius: .3rem;
|
||||
font-size: .28rem;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: -100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg,
|
||||
rgba(255, 255, 255, 0) 0%,
|
||||
rgba(255, 255, 255, 0.2) 50%,
|
||||
rgba(255, 255, 255, 0) 100%);
|
||||
transition: left 0.5s ease;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: linear-gradient(90deg, #0d5aff, #2a7aff);
|
||||
width: 20%;
|
||||
|
||||
&::after {
|
||||
left: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
&:active {
|
||||
background: linear-gradient(90deg, #0a50e6, #2575e6);
|
||||
transform: scale(0.98);
|
||||
}
|
||||
}
|
||||
|
||||
.input {
|
||||
flex: 1;
|
||||
padding: .16rem 0;
|
||||
padding-left: .25rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
input {
|
||||
border: none;
|
||||
outline: none;
|
||||
background: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
font-size: .26rem;
|
||||
color: #333;
|
||||
line-height: 1.4;
|
||||
|
||||
&::placeholder {
|
||||
color: #adb5bd;
|
||||
font-size: .24rem;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
&::placeholder {
|
||||
color: #868e96;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 为供应商容器和产品列表添加搜索状态样式 */
|
||||
.supplier-container {
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.box {
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
/* 当有搜索关键词时,调整一些元素的样式 */
|
||||
:global {
|
||||
body.search-active {
|
||||
.supplier-container {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.box {
|
||||
animation: searchResultAppear 0.4s ease;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes searchResultAppear {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translateY(.1rem);
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* 响应式调整 */
|
||||
@media (max-width: 480px) {
|
||||
.search {
|
||||
padding: 0 .2rem;
|
||||
margin: .25rem 0;
|
||||
|
||||
.search-box {
|
||||
border-radius: .25rem;
|
||||
}
|
||||
|
||||
.search-btn {
|
||||
font-size: .26rem;
|
||||
padding: .16rem 0;
|
||||
}
|
||||
|
||||
.input {
|
||||
padding: .14rem 0;
|
||||
padding-left: .2rem;
|
||||
|
||||
input {
|
||||
font-size: .24rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,251 +0,0 @@
|
||||
.top-tit {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
background: linear-gradient(90deg, #275AFF 0%, #2EBDFA 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
font-size: 0.39rem;
|
||||
/* 增大30%: .3rem * 1.3 = .39rem */
|
||||
font-weight: bold;
|
||||
margin: 0.3rem 0;
|
||||
}
|
||||
.supplier-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
/* 允许换行 */
|
||||
padding: 0.2rem 0.22rem;
|
||||
gap: 0.15rem;
|
||||
/* 使用gap控制间距 */
|
||||
}
|
||||
.supplier {
|
||||
flex-shrink: 0;
|
||||
/* 防止收缩 */
|
||||
}
|
||||
.supplier .supplier-title {
|
||||
font-size: 0.28rem;
|
||||
/* 修改为下方代码的字体大小 */
|
||||
color: #000;
|
||||
padding: 0.12rem 0.2rem;
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 0.12rem;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
white-space: nowrap;
|
||||
/* 防止文字换行 */
|
||||
}
|
||||
.supplier .supplier-title:hover {
|
||||
background-color: #e0e0e0;
|
||||
transform: translateY(-0.02rem);
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.supplier .supplier-title.active {
|
||||
background: linear-gradient(90deg, #275aff, #2ebdfa);
|
||||
color: #fff;
|
||||
box-shadow: 0 0.04rem 0.12rem rgba(39, 90, 255, 0.3);
|
||||
transform: translateY(-0.02rem);
|
||||
}
|
||||
.box {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
padding: 0 0.3rem;
|
||||
}
|
||||
.box .box-item {
|
||||
position: relative;
|
||||
display: flex;
|
||||
width: 48%;
|
||||
flex-direction: column;
|
||||
align-items: self-start;
|
||||
border: 0.02rem solid #f0f0f0;
|
||||
border-radius: 0.2rem;
|
||||
padding: 0.15rem 0.2rem;
|
||||
margin: 0.34rem 0;
|
||||
transition: all 0.3s ease;
|
||||
padding-bottom: 0.6rem;
|
||||
}
|
||||
.box .box-item:hover {
|
||||
transform: translateY(-0.05rem);
|
||||
box-shadow: 0 0.08rem 0.2rem rgba(0, 0, 0, 0.1);
|
||||
border-color: #1f70ff;
|
||||
}
|
||||
.box .box-item .item-tit {
|
||||
font-size: 0.26rem;
|
||||
/* 修改为下方代码的字体大小 */
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
margin-bottom: 0.1rem;
|
||||
}
|
||||
.box .box-item .item-detail {
|
||||
color: #666;
|
||||
font-size: 0.22rem;
|
||||
/* 修改为下方代码的字体大小 */
|
||||
margin: 0.15rem 0;
|
||||
line-height: 1.4;
|
||||
min-height: 0.4rem;
|
||||
}
|
||||
.box .box-item .item-desc {
|
||||
color: #666;
|
||||
background-color: #f8f9fa;
|
||||
font-size: 0.2rem;
|
||||
/* 修改为下方代码的字体大小 */
|
||||
padding: 0.08rem 0.12rem;
|
||||
border-radius: 0.1rem;
|
||||
margin-bottom: 0.15rem;
|
||||
border: 0.01rem solid #e9ecef;
|
||||
min-height: 0.32rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.box .box-item .item-btn {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
padding-top: 0.2rem;
|
||||
}
|
||||
.box .box-item .item-btn .btn {
|
||||
background: linear-gradient(90deg, #275AFF 0%, #2EBDFA 100%);
|
||||
border-radius: 0.04rem;
|
||||
padding: 0.08rem 0;
|
||||
width: calc(100% - 0.4rem);
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 0.182rem;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
border: none;
|
||||
position: absolute;
|
||||
bottom: 0.2rem;
|
||||
}
|
||||
.box .box-item .item-btn .btn:hover {
|
||||
background: linear-gradient(90deg, #0d5aff, #2a7aff);
|
||||
transform: translateY(-0.02rem);
|
||||
box-shadow: 0 0.04rem 0.1rem rgba(31, 112, 255, 0.3);
|
||||
}
|
||||
.search {
|
||||
width: 100%;
|
||||
margin: 0.3rem 0;
|
||||
padding: 0 0.3rem;
|
||||
}
|
||||
.search .search-box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: #f8f9fa;
|
||||
border-radius: 0.3rem;
|
||||
overflow: hidden;
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
border: 0.02rem solid #e9ecef;
|
||||
box-shadow: 0 0.02rem 0.06rem rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
.search .search-box:focus-within {
|
||||
transform: translateY(-0.01rem);
|
||||
}
|
||||
.search .search-btn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 18%;
|
||||
color: #fff;
|
||||
padding: 0.18rem 0;
|
||||
background: linear-gradient(90deg, #1f70ff, #3a8cff);
|
||||
border-bottom-right-radius: 0.3rem;
|
||||
border-top-right-radius: 0.3rem;
|
||||
font-size: 0.28rem;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.search .search-btn::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: -100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%);
|
||||
transition: left 0.5s ease;
|
||||
}
|
||||
.search .search-btn:hover {
|
||||
background: linear-gradient(90deg, #0d5aff, #2a7aff);
|
||||
width: 20%;
|
||||
}
|
||||
.search .search-btn:hover::after {
|
||||
left: 100%;
|
||||
}
|
||||
.search .search-btn:active {
|
||||
background: linear-gradient(90deg, #0a50e6, #2575e6);
|
||||
transform: scale(0.98);
|
||||
}
|
||||
.search .input {
|
||||
flex: 1;
|
||||
padding: 0.16rem 0;
|
||||
padding-left: 0.25rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.search .input input {
|
||||
border: none;
|
||||
outline: none;
|
||||
background: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
font-size: 0.26rem;
|
||||
color: #333;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.search .input input::placeholder {
|
||||
color: #adb5bd;
|
||||
font-size: 0.24rem;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
.search .input input:focus::placeholder {
|
||||
color: #868e96;
|
||||
}
|
||||
/* 为供应商容器和产品列表添加搜索状态样式 */
|
||||
.supplier-container {
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
.box {
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
/* 当有搜索关键词时,调整一些元素的样式 */
|
||||
:global body.search-active .supplier-container {
|
||||
opacity: 0.8;
|
||||
}
|
||||
:global body.search-active .box {
|
||||
animation: searchResultAppear 0.4s ease;
|
||||
}
|
||||
@keyframes searchResultAppear {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translateY(0.1rem);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
/* 响应式调整 */
|
||||
@media (max-width: 480px) {
|
||||
.search {
|
||||
padding: 0 0.2rem;
|
||||
margin: 0.25rem 0;
|
||||
}
|
||||
.search .search-box {
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
.search .search-btn {
|
||||
font-size: 0.26rem;
|
||||
padding: 0.16rem 0;
|
||||
}
|
||||
.search .input {
|
||||
padding: 0.14rem 0;
|
||||
padding-left: 0.2rem;
|
||||
}
|
||||
.search .input input {
|
||||
font-size: 0.24rem;
|
||||
}
|
||||
}
|
||||
@ -1,312 +0,0 @@
|
||||
.top-tit {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
background: linear-gradient(90deg, #275AFF 0%, #2EBDFA 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
font-size: .39rem;
|
||||
/* 增大30%: .3rem * 1.3 = .39rem */
|
||||
font-weight: bold;
|
||||
margin: .3rem 0;
|
||||
}
|
||||
|
||||
.supplier-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
/* 允许换行 */
|
||||
padding: .2rem .22rem;
|
||||
gap: .15rem;
|
||||
/* 使用gap控制间距 */
|
||||
}
|
||||
|
||||
.supplier {
|
||||
flex-shrink: 0;
|
||||
/* 防止收缩 */
|
||||
|
||||
.supplier-title {
|
||||
font-size: .28rem;
|
||||
/* 修改为下方代码的字体大小 */
|
||||
color: #000;
|
||||
padding: .12rem .2rem;
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 0.12rem;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
white-space: nowrap;
|
||||
/* 防止文字换行 */
|
||||
|
||||
&:hover {
|
||||
background-color: #e0e0e0;
|
||||
transform: translateY(-0.02rem);
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: linear-gradient(90deg, #275aff, #2ebdfa);
|
||||
color: #fff;
|
||||
box-shadow: 0 .04rem .12rem rgba(39, 90, 255, 0.3);
|
||||
transform: translateY(-0.02rem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.box {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
padding: 0 .3rem;
|
||||
|
||||
.box-item {
|
||||
position: relative;
|
||||
display: flex;
|
||||
width: 48%;
|
||||
flex-direction: column;
|
||||
align-items: self-start;
|
||||
border: .02rem solid #f0f0f0;
|
||||
border-radius: .2rem;
|
||||
padding: .15rem .2rem;
|
||||
margin: .34rem 0;
|
||||
transition: all 0.3s ease;
|
||||
padding-bottom: .6rem;
|
||||
|
||||
&:hover {
|
||||
transform: translateY(-0.05rem);
|
||||
box-shadow: 0 .08rem .2rem rgba(0, 0, 0, 0.1);
|
||||
border-color: #1f70ff;
|
||||
}
|
||||
|
||||
.item-tit {
|
||||
font-size: .26rem;
|
||||
/* 修改为下方代码的字体大小 */
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
margin-bottom: .1rem;
|
||||
}
|
||||
|
||||
.item-detail {
|
||||
color: #666;
|
||||
font-size: .22rem;
|
||||
/* 修改为下方代码的字体大小 */
|
||||
margin: .15rem 0;
|
||||
line-height: 1.4;
|
||||
min-height: .4rem;
|
||||
// 确保有最小高度
|
||||
}
|
||||
|
||||
.item-desc {
|
||||
color: #666;
|
||||
background-color: #f8f9fa;
|
||||
font-size: .2rem;
|
||||
/* 修改为下方代码的字体大小 */
|
||||
padding: .08rem .12rem;
|
||||
border-radius: .1rem;
|
||||
margin-bottom: .15rem;
|
||||
border: .01rem solid #e9ecef;
|
||||
min-height: .32rem;
|
||||
// 确保有最小高度
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.item-btn {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
// justify-content: flex-end;
|
||||
padding-top: .2rem;
|
||||
|
||||
.btn {
|
||||
background: linear-gradient(90deg, #275AFF 0%, #2EBDFA 100%);
|
||||
border-radius: 0.04rem;
|
||||
// padding: 0.08rem ;
|
||||
padding: .08rem 0;
|
||||
width: calc(100% - 0.4rem);
|
||||
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 0.182rem;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
border: none;
|
||||
position: absolute;
|
||||
bottom: 0.2rem;
|
||||
|
||||
&:hover {
|
||||
background: linear-gradient(90deg, #0d5aff, #2a7aff);
|
||||
transform: translateY(-0.02rem);
|
||||
box-shadow: 0 .04rem .1rem rgba(31, 112, 255, 0.3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.search {
|
||||
width: 100%;
|
||||
margin: .3rem 0;
|
||||
padding: 0 .3rem;
|
||||
|
||||
.search-box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: #f8f9fa;
|
||||
border-radius: .3rem;
|
||||
overflow: hidden;
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
border: .02rem solid #e9ecef;
|
||||
box-shadow: 0 .02rem .06rem rgba(0, 0, 0, 0.04);
|
||||
|
||||
// &:hover {
|
||||
// border-color: #ced4da;
|
||||
// background-color: #fff;
|
||||
// box-shadow: 0 .04rem .12rem rgba(0, 0, 0, 0.08);
|
||||
// }
|
||||
|
||||
&:focus-within {
|
||||
// border-color: #1f70ff;
|
||||
// background-color: #fff;
|
||||
// box-shadow: 0 .04rem .16rem rgba(31, 112, 255, 0.15);
|
||||
transform: translateY(-0.01rem);
|
||||
}
|
||||
}
|
||||
|
||||
.search-btn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 18%;
|
||||
color: #fff;
|
||||
padding: .18rem 0;
|
||||
background: linear-gradient(90deg, #1f70ff, #3a8cff);
|
||||
border-bottom-right-radius: .3rem;
|
||||
border-top-right-radius: .3rem;
|
||||
font-size: .28rem;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: -100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg,
|
||||
rgba(255, 255, 255, 0) 0%,
|
||||
rgba(255, 255, 255, 0.2) 50%,
|
||||
rgba(255, 255, 255, 0) 100%);
|
||||
transition: left 0.5s ease;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: linear-gradient(90deg, #0d5aff, #2a7aff);
|
||||
width: 20%;
|
||||
|
||||
&::after {
|
||||
left: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
&:active {
|
||||
background: linear-gradient(90deg, #0a50e6, #2575e6);
|
||||
transform: scale(0.98);
|
||||
}
|
||||
}
|
||||
|
||||
.input {
|
||||
flex: 1;
|
||||
padding: .16rem 0;
|
||||
padding-left: .25rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
input {
|
||||
border: none;
|
||||
outline: none;
|
||||
background: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
font-size: .26rem;
|
||||
color: #333;
|
||||
line-height: 1.4;
|
||||
|
||||
&::placeholder {
|
||||
color: #adb5bd;
|
||||
font-size: .24rem;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
&::placeholder {
|
||||
color: #868e96;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 为供应商容器和产品列表添加搜索状态样式 */
|
||||
.supplier-container {
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.box {
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
/* 当有搜索关键词时,调整一些元素的样式 */
|
||||
:global {
|
||||
body.search-active {
|
||||
.supplier-container {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.box {
|
||||
animation: searchResultAppear 0.4s ease;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes searchResultAppear {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translateY(.1rem);
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* 响应式调整 */
|
||||
@media (max-width: 480px) {
|
||||
.search {
|
||||
padding: 0 .2rem;
|
||||
margin: .25rem 0;
|
||||
|
||||
.search-box {
|
||||
border-radius: .25rem;
|
||||
}
|
||||
|
||||
.search-btn {
|
||||
font-size: .26rem;
|
||||
padding: .16rem 0;
|
||||
}
|
||||
|
||||
.input {
|
||||
padding: .14rem 0;
|
||||
padding-left: .2rem;
|
||||
|
||||
input {
|
||||
font-size: .24rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,503 +0,0 @@
|
||||
* {
|
||||
touch-action: manipulation;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
::v-deep .el-dialog__wrapper .el-dialog .el-dialog__body .el-input .el-input__inner,
|
||||
::v-deep .el-dialog__wrapper .el-dialog .el-dialog__body .el-textarea .el-input__inner,
|
||||
::v-deep .el-dialog__wrapper .el-dialog .el-dialog__body .el-input .el-textarea__inner,
|
||||
::v-deep .el-dialog__wrapper .el-dialog .el-dialog__body .el-textarea .el-textarea__inner {
|
||||
touch-action: manipulation;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
.dialog-tit {
|
||||
font-size: 0.4rem;
|
||||
color: #333;
|
||||
padding: 0.2rem 0 0.4rem;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
.dialog-tit .pc-tip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 0.3rem;
|
||||
color: #ff6b35;
|
||||
font-weight: 500;
|
||||
}
|
||||
.dialog-tit .pc-tip i {
|
||||
margin-right: 0.2rem;
|
||||
font-size: 0.42rem;
|
||||
}
|
||||
.dialog-tit .pc-tip span {
|
||||
font-size: 0.36rem;
|
||||
}
|
||||
.url_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 0.2rem;
|
||||
}
|
||||
.url-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
flex: 1;
|
||||
}
|
||||
.url-container .url {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
color: #275aff;
|
||||
text-decoration: none;
|
||||
padding: 0.12rem 0.24rem;
|
||||
border-radius: 0.24rem;
|
||||
transition: all 0.3s ease;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
border: 1px solid transparent;
|
||||
background: #f5f7ff;
|
||||
margin-left: 0.2rem;
|
||||
}
|
||||
.url-container .url:hover {
|
||||
background-color: #e8edff;
|
||||
border-color: #275aff;
|
||||
transform: translateY(-0.04rem);
|
||||
box-shadow: 0 0.08rem 0.32rem rgba(39, 90, 255, 0.15);
|
||||
}
|
||||
.url-container .url.copied {
|
||||
background-color: #e1f3d8;
|
||||
border-color: #67c23a;
|
||||
color: #67c23a;
|
||||
}
|
||||
.url-container .url.copied:hover {
|
||||
background-color: #d1edc4;
|
||||
border-color: #5daf34;
|
||||
}
|
||||
.url-container .tooltip {
|
||||
position: absolute;
|
||||
bottom: 100%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%) translateY(-0.16rem);
|
||||
background-color: rgba(0, 0, 0, 0.85);
|
||||
color: white;
|
||||
font-size: 0.24rem;
|
||||
padding: 0.08rem 0.16rem;
|
||||
border-radius: 0.16rem;
|
||||
white-space: nowrap;
|
||||
z-index: 1000;
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s, transform 0.2s;
|
||||
pointer-events: none;
|
||||
}
|
||||
.url-container .tooltip::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
border-width: 0.08rem;
|
||||
border-style: solid;
|
||||
border-color: rgba(0, 0, 0, 0.85) transparent transparent transparent;
|
||||
}
|
||||
.url-container .tooltip.tooltip-visible {
|
||||
opacity: 1;
|
||||
transform: translateX(-50%) translateY(0);
|
||||
}
|
||||
.url_btn {
|
||||
margin-left: 0.4rem;
|
||||
}
|
||||
.url_btn .copy-hint {
|
||||
display: inline-block;
|
||||
font-size: 0.26rem;
|
||||
color: #000;
|
||||
padding: 0.1rem 0.2rem;
|
||||
border-radius: 0.12rem;
|
||||
border: 1px solid #000;
|
||||
transition: all 0.2s;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
min-width: 1.2rem;
|
||||
text-align: center;
|
||||
}
|
||||
.url_btn .copy-hint:hover {
|
||||
color: #275aff;
|
||||
border-color: #275aff;
|
||||
}
|
||||
.url.copied .url_btn .copy-hint {
|
||||
color: #67c23a;
|
||||
border-color: #67c23a;
|
||||
}
|
||||
.check-tit {
|
||||
font-size: 0.16rem;
|
||||
color: #666;
|
||||
line-height: 1;
|
||||
margin: 0.08rem 0;
|
||||
font-weight: normal;
|
||||
}
|
||||
.check-tit span {
|
||||
color: #275aff;
|
||||
font-weight: 500;
|
||||
margin: 0 0.04rem;
|
||||
}
|
||||
::v-deep .product-consult-dialog.el-dialog {
|
||||
border-radius: 0.32rem;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 0.4rem 1.6rem rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
::v-deep .product-consult-dialog.el-dialog .el-dialog__header {
|
||||
padding: 0.4rem 0.6rem 0.3rem;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
|
||||
margin-bottom: 0;
|
||||
}
|
||||
::v-deep .product-consult-dialog.el-dialog .el-dialog__header .el-dialog__title {
|
||||
font-size: 0.4rem;
|
||||
font-weight: 600;
|
||||
color: #1a1a1a;
|
||||
}
|
||||
::v-deep .product-consult-dialog.el-dialog .el-dialog__header .el-dialog__headerbtn {
|
||||
top: 0.4rem;
|
||||
right: 0.4rem;
|
||||
}
|
||||
::v-deep .product-consult-dialog.el-dialog .el-dialog__header .el-dialog__headerbtn .el-dialog__close {
|
||||
font-size: 0.36rem;
|
||||
color: #999;
|
||||
}
|
||||
::v-deep .product-consult-dialog.el-dialog .el-dialog__header .el-dialog__headerbtn .el-dialog__close:hover {
|
||||
color: #275aff;
|
||||
}
|
||||
::v-deep .product-consult-dialog.el-dialog .el-dialog__body {
|
||||
padding: 0.2rem 0.6rem;
|
||||
max-height: 70vh;
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
::v-deep .product-consult-dialog.el-dialog .el-dialog__body.is-mobile-scroll {
|
||||
touch-action: pan-y;
|
||||
}
|
||||
::v-deep .product-consult-dialog.el-dialog .el-dialog__footer {
|
||||
padding: 0.4rem 0.6rem;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
background: #fafbfc;
|
||||
}
|
||||
::v-deep .el-form .el-form-item {
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
::v-deep .el-form .el-form-item .el-form-item__label {
|
||||
padding-bottom: 0.12rem;
|
||||
font-size: 0.32rem;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 1.5;
|
||||
}
|
||||
::v-deep .el-form .el-form-item .el-input .el-input__inner,
|
||||
::v-deep .el-form .el-form-item .el-textarea .el-input__inner,
|
||||
::v-deep .el-form .el-form-item .el-input .el-textarea__inner,
|
||||
::v-deep .el-form .el-form-item .el-textarea .el-textarea__inner {
|
||||
font-size: 0.32rem;
|
||||
border: 1px solid #dcdfe6;
|
||||
border-radius: 0.24rem;
|
||||
transition: all 0.3s;
|
||||
padding: 0.24rem 0.32rem;
|
||||
color: #333;
|
||||
touch-action: manipulation;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
::v-deep .el-form .el-form-item .el-input .el-input__inner:hover,
|
||||
::v-deep .el-form .el-form-item .el-textarea .el-input__inner:hover,
|
||||
::v-deep .el-form .el-form-item .el-input .el-textarea__inner:hover,
|
||||
::v-deep .el-form .el-form-item .el-textarea .el-textarea__inner:hover {
|
||||
border-color: #c0c4cc;
|
||||
}
|
||||
::v-deep .el-form .el-form-item .el-input .el-input__inner:focus,
|
||||
::v-deep .el-form .el-form-item .el-textarea .el-input__inner:focus,
|
||||
::v-deep .el-form .el-form-item .el-input .el-textarea__inner:focus,
|
||||
::v-deep .el-form .el-form-item .el-textarea .el-textarea__inner:focus {
|
||||
border-color: #275aff;
|
||||
box-shadow: 0 0 0 0.04rem rgba(39, 90, 255, 0.1);
|
||||
}
|
||||
::v-deep .el-form .el-form-item .el-input .el-input__inner::placeholder,
|
||||
::v-deep .el-form .el-form-item .el-textarea .el-input__inner::placeholder,
|
||||
::v-deep .el-form .el-form-item .el-input .el-textarea__inner::placeholder,
|
||||
::v-deep .el-form .el-form-item .el-textarea .el-textarea__inner::placeholder {
|
||||
color: #999;
|
||||
font-size: 0.28rem;
|
||||
}
|
||||
::v-deep .el-form .el-form-item .el-textarea__inner {
|
||||
min-height: 2.4rem;
|
||||
line-height: 1.5;
|
||||
resize: vertical;
|
||||
}
|
||||
::v-deep .el-form .el-form-item .el-radio {
|
||||
margin-right: 0.6rem;
|
||||
}
|
||||
::v-deep .el-form .el-form-item .el-radio .el-radio__label {
|
||||
font-size: 0.32rem;
|
||||
color: #666;
|
||||
}
|
||||
::v-deep .el-form .el-form-item .el-radio .el-radio__inner {
|
||||
width: 0.36rem;
|
||||
height: 0.36rem;
|
||||
}
|
||||
::v-deep .el-form .el-form-item .el-radio .el-radio__inner::after {
|
||||
width: 0.18rem;
|
||||
height: 0.18rem;
|
||||
}
|
||||
.agreement-checkbox {
|
||||
margin: 0.4rem 0 0.6rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #666;
|
||||
width: 100%;
|
||||
overflow: visible;
|
||||
}
|
||||
.agreement-checkbox ::v-deep .el-checkbox {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
width: 100%;
|
||||
}
|
||||
.agreement-checkbox ::v-deep .el-checkbox .el-checkbox__label {
|
||||
color: #666;
|
||||
padding-left: 0.16rem;
|
||||
white-space: normal;
|
||||
word-wrap: break-word;
|
||||
word-break: break-word;
|
||||
overflow-wrap: break-word;
|
||||
width: calc(100% - 0.48rem);
|
||||
font-size: 0.16rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.agreement-checkbox ::v-deep .el-checkbox .el-checkbox__label .agreement-text {
|
||||
width: 100%;
|
||||
font-size: 0.16rem;
|
||||
}
|
||||
.agreement-checkbox ::v-deep .el-checkbox .el-checkbox__label .agreement-text p {
|
||||
margin: 0.08rem 0;
|
||||
}
|
||||
.agreement-checkbox ::v-deep .el-checkbox .el-checkbox__inner {
|
||||
flex-shrink: 0;
|
||||
width: 0.32rem;
|
||||
height: 0.32rem;
|
||||
border-radius: 0.08rem;
|
||||
margin-top: 0.04rem;
|
||||
}
|
||||
.agreement-checkbox ::v-deep .el-checkbox .el-checkbox__inner::after {
|
||||
border-width: 0.04rem;
|
||||
left: 0.1rem;
|
||||
top: 0.04rem;
|
||||
}
|
||||
.qrcode-section {
|
||||
margin: 0.4rem 0 0.6rem;
|
||||
padding: 0.4rem;
|
||||
background: #f8f9ff;
|
||||
border-radius: 0.32rem;
|
||||
border: 1px solid #e8edff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
}
|
||||
.qrcode-section img {
|
||||
width: 3.2rem;
|
||||
height: 3.2rem;
|
||||
object-fit: contain;
|
||||
margin-bottom: 0.4rem;
|
||||
border-radius: 0.16rem;
|
||||
box-shadow: 0 0.08rem 0.32rem rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.qrcode-section span {
|
||||
font-size: 0.28rem;
|
||||
color: #666;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.dialog-footer ::v-deep .el-button {
|
||||
min-width: 2.4rem;
|
||||
height: 0.88rem;
|
||||
font-size: 0.32rem;
|
||||
border-radius: 0.44rem;
|
||||
padding: 0 0.8rem;
|
||||
font-weight: 500;
|
||||
border: none;
|
||||
background: linear-gradient(135deg, #275aff 0%, #5a7dff 100%);
|
||||
box-shadow: 0 0.08rem 0.32rem rgba(39, 90, 255, 0.3);
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.dialog-footer ::v-deep .el-button:hover {
|
||||
transform: translateY(-0.04rem);
|
||||
box-shadow: 0 0.16rem 0.48rem rgba(39, 90, 255, 0.4);
|
||||
}
|
||||
.dialog-footer ::v-deep .el-button:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
.dialog-footer ::v-deep .el-button .el-icon-loading {
|
||||
font-size: 0.32rem;
|
||||
}
|
||||
:deep(.el-message) {
|
||||
font-size: 0.32rem !important;
|
||||
min-width: auto !important;
|
||||
padding: 0.24rem 0.4rem !important;
|
||||
border-radius: 0.32rem !important;
|
||||
box-shadow: 0 0.16rem 0.48rem rgba(0, 0, 0, 0.15) !important;
|
||||
border: none !important;
|
||||
}
|
||||
:deep(.el-message__content) {
|
||||
font-size: 0.32rem !important;
|
||||
line-height: 1.5 !important;
|
||||
}
|
||||
@media screen and (max-width: 750px) {
|
||||
.dialog-tit {
|
||||
font-size: 0.32rem;
|
||||
padding: 0.15rem 0 0.3rem;
|
||||
}
|
||||
.dialog-tit .pc-tip i {
|
||||
font-size: 0.34rem;
|
||||
}
|
||||
.dialog-tit .pc-tip span {
|
||||
font-size: 0.3rem;
|
||||
}
|
||||
.url_box {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 0.2rem;
|
||||
}
|
||||
.url-container {
|
||||
width: 100%;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.url-container .url {
|
||||
width: 100%;
|
||||
padding: 0.1rem 0.2rem;
|
||||
font-size: 0.28rem;
|
||||
margin: 0.1rem 0 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.url_btn {
|
||||
margin-left: 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.url_btn .copy-hint {
|
||||
width: 100%;
|
||||
max-width: 3rem;
|
||||
font-size: 0.24rem;
|
||||
padding: 0.12rem 0.24rem;
|
||||
text-align: center;
|
||||
}
|
||||
.check-tit {
|
||||
font-size: 0.16rem;
|
||||
line-height: 1.6;
|
||||
font-weight: 600;
|
||||
}
|
||||
::v-deep .product-consult-dialog.el-dialog {
|
||||
width: 90% !important;
|
||||
margin-top: 10vh !important;
|
||||
border-radius: 0.24rem;
|
||||
}
|
||||
::v-deep .product-consult-dialog.el-dialog .el-dialog__header {
|
||||
padding: 0.25rem 0.3rem 0.2rem;
|
||||
}
|
||||
::v-deep .product-consult-dialog.el-dialog .el-dialog__header .el-dialog__title {
|
||||
font-size: 0.34rem;
|
||||
}
|
||||
::v-deep .product-consult-dialog.el-dialog .el-dialog__body {
|
||||
padding: 0.2rem 0.3rem;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
max-height: 60vh;
|
||||
}
|
||||
::v-deep .product-consult-dialog.el-dialog .el-dialog__footer {
|
||||
padding: 0.25rem 0.3rem;
|
||||
}
|
||||
::v-deep .el-form .el-form-item {
|
||||
margin-bottom: 0.3rem;
|
||||
}
|
||||
::v-deep .el-form .el-form-item .el-form-item__label {
|
||||
font-size: 0.28rem;
|
||||
}
|
||||
::v-deep .el-form .el-form-item .el-input .el-input__inner,
|
||||
::v-deep .el-form .el-form-item .el-textarea .el-input__inner,
|
||||
::v-deep .el-form .el-form-item .el-input .el-textarea__inner,
|
||||
::v-deep .el-form .el-form-item .el-textarea .el-textarea__inner {
|
||||
font-size: 0.28rem;
|
||||
padding: 0.2rem 0.24rem;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
::v-deep .el-form .el-form-item .el-radio .el-radio__label {
|
||||
font-size: 0.28rem;
|
||||
}
|
||||
.agreement-checkbox {
|
||||
margin: 0.3rem 0 0.4rem;
|
||||
}
|
||||
.agreement-checkbox ::v-deep .el-checkbox .el-checkbox__label {
|
||||
font-size: 0.22rem !important;
|
||||
padding-left: 0.12rem;
|
||||
line-height: 1.6;
|
||||
}
|
||||
.agreement-checkbox ::v-deep .el-checkbox .el-checkbox__inner {
|
||||
width: 0.28rem;
|
||||
height: 0.28rem;
|
||||
margin-top: 0.02rem;
|
||||
}
|
||||
.agreement-checkbox ::v-deep .el-checkbox .el-checkbox__inner::after {
|
||||
left: 0.08rem;
|
||||
top: 0.02rem;
|
||||
border-width: 0.03rem;
|
||||
}
|
||||
.qrcode-section {
|
||||
padding: 0.3rem;
|
||||
margin: 0.3rem 0 0.4rem;
|
||||
}
|
||||
.qrcode-section img {
|
||||
width: 2.4rem;
|
||||
height: 2.4rem;
|
||||
margin-bottom: 0.3rem;
|
||||
}
|
||||
.qrcode-section span {
|
||||
font-size: 0.24rem;
|
||||
}
|
||||
.dialog-footer ::v-deep .el-button {
|
||||
min-width: 100%;
|
||||
height: 0.8rem;
|
||||
font-size: 0.28rem;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 751px) and (max-width: 1200px) {
|
||||
::v-deep .product-consult-dialog.el-dialog {
|
||||
width: 70% !important;
|
||||
}
|
||||
.agreement-checkbox ::v-deep .el-checkbox .el-checkbox__label {
|
||||
font-size: 0.26rem !important;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 750px) {
|
||||
.url,
|
||||
.url_btn .copy-hint,
|
||||
.el-checkbox__inner,
|
||||
.el-radio__inner,
|
||||
.el-button {
|
||||
cursor: pointer;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
.el-input__inner,
|
||||
.el-textarea__inner {
|
||||
font-size: 16px !important;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
.product-consult-dialog {
|
||||
pointer-events: auto !important;
|
||||
}
|
||||
.el-dialog__wrapper {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.el-dialog__wrapper.el-dialog__wrapper--fixed {
|
||||
touch-action: none;
|
||||
}
|
||||
}
|
||||
@ -1,365 +0,0 @@
|
||||
.h5-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
.main {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
/* 为iOS添加平滑滚动 */
|
||||
}
|
||||
/* 页面切换动画 */
|
||||
.fade-enter-active,
|
||||
.fade-leave-active {
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.fade-enter-from {
|
||||
opacity: 0;
|
||||
transform: translateY(0.2rem);
|
||||
}
|
||||
.fade-leave-to {
|
||||
opacity: 0;
|
||||
transform: translateY(-0.2rem);
|
||||
}
|
||||
/* 返回顶部按钮样式 */
|
||||
.back-to-top {
|
||||
position: fixed;
|
||||
right: 0.4rem;
|
||||
bottom: 1.5rem;
|
||||
/* 在底部导航栏上方 */
|
||||
z-index: 999;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 1.1rem;
|
||||
height: 1.1rem;
|
||||
background: linear-gradient(90deg, #275AFF 0%, #2EBDFA 100%);
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0.08rem 0.24rem rgba(102, 126, 234, 0.4);
|
||||
cursor: pointer;
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
user-select: none;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
/* 悬停效果 */
|
||||
/* 激活效果 */
|
||||
/* 点击动画 */
|
||||
}
|
||||
.back-to-top:hover {
|
||||
transform: translateY(-0.1rem);
|
||||
box-shadow: 0 0.12rem 0.36rem rgba(102, 126, 234, 0.6);
|
||||
background: linear-gradient(90deg, #275AFF 0%, #2EBDFA 100%);
|
||||
}
|
||||
.back-to-top:active {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
.back-to-top.clicked {
|
||||
animation: pulse 0.3s ease;
|
||||
}
|
||||
.back-to-top .back-to-top-icon {
|
||||
width: 0.45rem;
|
||||
height: 0.45rem;
|
||||
color: white;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 0.04rem;
|
||||
}
|
||||
.back-to-top .back-to-top-icon svg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
stroke: currentColor;
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
.back-to-top .back-to-top-text {
|
||||
color: white;
|
||||
font-size: 0.24rem;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
letter-spacing: 0.02rem;
|
||||
text-shadow: 0 0.02rem 0.04rem rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
/* 脉冲动画 */
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
}
|
||||
50% {
|
||||
transform: scale(0.9);
|
||||
}
|
||||
100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
/* 返回顶部按钮动画 */
|
||||
.fade-scale-enter-active,
|
||||
.fade-scale-leave-active {
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
.fade-scale-enter-from,
|
||||
.fade-scale-leave-to {
|
||||
opacity: 0;
|
||||
transform: scale(0.8) translateY(0.2rem);
|
||||
}
|
||||
/* TabBar 样式 */
|
||||
.tabBar {
|
||||
padding: 0.2rem 0;
|
||||
background-color: rgba(255, 255, 255, 0.95);
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1000;
|
||||
box-shadow: 0 -0.02rem 0.2rem rgba(0, 0, 0, 0.08);
|
||||
backdrop-filter: blur(10px);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.tabBar .tabBar-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
padding: 0.1rem 0.15rem;
|
||||
border-radius: 0.3rem;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
user-select: none;
|
||||
/* 悬停效果 */
|
||||
/* 激活状态 */
|
||||
/* 点击动画 */
|
||||
/* 激活指示器 */
|
||||
}
|
||||
.tabBar .tabBar-item:hover {
|
||||
background-color: rgba(24, 144, 255, 0.08);
|
||||
transform: translateY(-0.05rem);
|
||||
}
|
||||
.tabBar .tabBar-item.active .item-text {
|
||||
color: #1890ff;
|
||||
font-weight: 600;
|
||||
}
|
||||
.tabBar .tabBar-item.click-animation {
|
||||
animation: tabClick 0.3s ease;
|
||||
}
|
||||
.tabBar .tabBar-item .active-indicator {
|
||||
position: absolute;
|
||||
bottom: 0.05rem;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 0.3rem;
|
||||
height: 0.04rem;
|
||||
border-radius: 0.02rem;
|
||||
animation: indicatorAppear 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
||||
}
|
||||
.tabBar .item-img {
|
||||
margin-bottom: 0.08rem;
|
||||
position: relative;
|
||||
width: 0.5rem;
|
||||
height: 0.5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.tabBar .item-img img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
.tabBar .item-text {
|
||||
font-size: 0.24rem;
|
||||
color: #666;
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
position: relative;
|
||||
height: 0.3rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
/* 图标动画 */
|
||||
.icon-bounce-enter-active {
|
||||
animation: iconBounceIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
||||
}
|
||||
.icon-bounce-leave-active {
|
||||
animation: iconBounceOut 0.3s ease;
|
||||
}
|
||||
@keyframes iconBounceIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: scale(0.3) rotate(-30deg);
|
||||
}
|
||||
50% {
|
||||
transform: scale(1.2) rotate(10deg);
|
||||
}
|
||||
70% {
|
||||
transform: scale(0.9) rotate(-5deg);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform: scale(1) rotate(0deg);
|
||||
}
|
||||
}
|
||||
@keyframes iconBounceOut {
|
||||
0% {
|
||||
opacity: 1;
|
||||
transform: scale(1) rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
transform: scale(0.5) rotate(30deg);
|
||||
}
|
||||
}
|
||||
/* 文字动画 */
|
||||
.text-slide-enter-active {
|
||||
animation: textSlideIn 0.3s ease-out;
|
||||
}
|
||||
.text-slide-leave-active {
|
||||
animation: textSlideOut 0.2s ease-in;
|
||||
}
|
||||
@keyframes textSlideIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translateY(0.1rem);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
@keyframes textSlideOut {
|
||||
0% {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
transform: translateY(-0.1rem);
|
||||
}
|
||||
}
|
||||
/* Tab点击动画 */
|
||||
@keyframes tabClick {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
}
|
||||
50% {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
/* 指示器出现动画 */
|
||||
@keyframes indicatorAppear {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translateX(-50%) scaleX(0);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform: translateX(-50%) scaleX(1);
|
||||
}
|
||||
}
|
||||
/* 响应式调整 */
|
||||
@media (max-width: 480px) {
|
||||
.back-to-top {
|
||||
right: 0.3rem;
|
||||
bottom: 1.6rem;
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
}
|
||||
.back-to-top .back-to-top-icon {
|
||||
width: 0.4rem;
|
||||
height: 0.4rem;
|
||||
margin-bottom: 0.03rem;
|
||||
}
|
||||
.back-to-top .back-to-top-text {
|
||||
font-size: 0.22rem;
|
||||
}
|
||||
.tabBar {
|
||||
padding: 0.15rem 0;
|
||||
}
|
||||
.tabBar .tabBar-item {
|
||||
padding: 0.08rem 0.12rem;
|
||||
}
|
||||
.tabBar .item-img {
|
||||
width: 0.45rem;
|
||||
height: 0.45rem;
|
||||
}
|
||||
.tabBar .item-text {
|
||||
font-size: 0.22rem;
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.back-to-top {
|
||||
right: 0.5rem;
|
||||
bottom: 2rem;
|
||||
width: 1.2rem;
|
||||
height: 1.2rem;
|
||||
}
|
||||
.back-to-top .back-to-top-icon {
|
||||
width: 0.5rem;
|
||||
height: 0.5rem;
|
||||
margin-bottom: 0.05rem;
|
||||
}
|
||||
.back-to-top .back-to-top-text {
|
||||
font-size: 0.26rem;
|
||||
}
|
||||
}
|
||||
/* 深色模式支持 */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.back-to-top {
|
||||
background: linear-gradient(90deg, #275AFF 0%, #2EBDFA 100%);
|
||||
box-shadow: 0 0.08rem 0.24rem rgba(138, 43, 226, 0.4);
|
||||
}
|
||||
.back-to-top:hover {
|
||||
background: linear-gradient(90deg, #275AFF 0%, #2EBDFA 100%);
|
||||
box-shadow: 0 0.12rem 0.36rem rgba(138, 43, 226, 0.6);
|
||||
}
|
||||
.tabBar {
|
||||
background-color: rgba(30, 30, 30, 0.95);
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
.tabBar .tabBar-item .item-text {
|
||||
color: #b0b0b0;
|
||||
}
|
||||
.tabBar .tabBar-item:hover {
|
||||
background-color: rgba(100, 181, 246, 0.08);
|
||||
}
|
||||
.tabBar .tabBar-item.active .item-text {
|
||||
color: #64b5f6;
|
||||
}
|
||||
.tabBar .tabBar-item.active .active-indicator {
|
||||
background: linear-gradient(90deg, #64b5f6, #81c784);
|
||||
}
|
||||
}
|
||||
/* 安全区域适配(iPhone X及以上机型) */
|
||||
@supports (padding: max(0px)) {
|
||||
.back-to-top {
|
||||
bottom: calc(1.5rem + env(safe-area-inset-bottom, 0));
|
||||
}
|
||||
.tabBar {
|
||||
padding-bottom: calc(0.2rem + env(safe-area-inset-bottom, 0));
|
||||
}
|
||||
@media (max-width: 480px) {
|
||||
.back-to-top {
|
||||
bottom: calc(1.6rem + env(safe-area-inset-bottom, 0));
|
||||
}
|
||||
.tabBar {
|
||||
padding-bottom: calc(0.15rem + env(safe-area-inset-bottom, 0));
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.back-to-top {
|
||||
bottom: calc(2rem + env(safe-area-inset-bottom, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -10,9 +10,15 @@
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
-ms-overflow-style: none;
|
||||
scrollbar-width: none;
|
||||
/* 为iOS添加平滑滚动 */
|
||||
}
|
||||
|
||||
.main::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* 页面切换动画 */
|
||||
.fade-enter-active,
|
||||
.fade-leave-active {
|
||||
|
||||
@ -1,672 +0,0 @@
|
||||
.main-page {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
background-color: #f8fafd;
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.logo-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.top-box {
|
||||
width: 100%;
|
||||
height: 50vh;
|
||||
background: url("../../images/banner.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.title {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #222f60;
|
||||
}
|
||||
.title .name {
|
||||
background: linear-gradient(90deg, #275AFF 0%, #2EBDFA 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
font-size: 0.68rem;
|
||||
}
|
||||
.title .title-top {
|
||||
font-size: 0.6rem;
|
||||
}
|
||||
.title .title-btm {
|
||||
font-size: 0.338rem;
|
||||
margin-top: 0.98rem;
|
||||
}
|
||||
.text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 0.14rem 0;
|
||||
width: 100%;
|
||||
}
|
||||
.text .text-top {
|
||||
font-size: 0.338rem;
|
||||
color: #000;
|
||||
font-weight: 700;
|
||||
}
|
||||
.text .text-btm {
|
||||
font-size: 0.234rem;
|
||||
color: #707070;
|
||||
}
|
||||
.base-box,
|
||||
.journey-box,
|
||||
.latitude-box {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0.3rem 0.4rem;
|
||||
}
|
||||
.base-box .content,
|
||||
.journey-box .content,
|
||||
.latitude-box .content {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
gap: 0.2rem;
|
||||
}
|
||||
.base-box .content .item-box,
|
||||
.journey-box .content .item-box,
|
||||
.latitude-box .content .item-box {
|
||||
width: 48%;
|
||||
border-radius: 0.1rem;
|
||||
padding: 0.2rem;
|
||||
box-shadow: 0 0.02rem 0.08rem rgba(39, 90, 255, 0.08);
|
||||
margin-bottom: 0.2rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
|
||||
border: 0.01rem solid rgba(39, 90, 255, 0.1);
|
||||
transition: all 0.3s ease;
|
||||
position: relative;
|
||||
padding-bottom: 1.8rem;
|
||||
}
|
||||
.base-box .content .item-box:hover,
|
||||
.journey-box .content .item-box:hover,
|
||||
.latitude-box .content .item-box:hover {
|
||||
box-shadow: 0 0.04rem 0.16rem rgba(39, 90, 255, 0.12);
|
||||
transform: translateY(-0.02rem);
|
||||
border-color: rgba(39, 90, 255, 0.2);
|
||||
background: linear-gradient(135deg, #e8f2ff 0%, #ffffff 100%);
|
||||
}
|
||||
.base-box .content .item-box .item-title,
|
||||
.journey-box .content .item-box .item-title,
|
||||
.latitude-box .content .item-box .item-title {
|
||||
font-size: 0.26rem;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 0.1rem;
|
||||
}
|
||||
.base-box .content .item-box .item-description,
|
||||
.journey-box .content .item-box .item-description,
|
||||
.latitude-box .content .item-box .item-description {
|
||||
font-size: 0.2rem;
|
||||
color: #666;
|
||||
margin-bottom: 0.15rem;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.base-box .content .item-box .advantage-list,
|
||||
.journey-box .content .item-box .advantage-list,
|
||||
.latitude-box .content .item-box .advantage-list {
|
||||
display: block;
|
||||
}
|
||||
.base-box .content .item-box .advantage-list .advantage-item,
|
||||
.journey-box .content .item-box .advantage-list .advantage-item,
|
||||
.latitude-box .content .item-box .advantage-list .advantage-item {
|
||||
display: block;
|
||||
font-size: 0.156rem;
|
||||
color: #666;
|
||||
}
|
||||
.base-box .content .item-box .advantage-list .advantage-item .advantage-icon,
|
||||
.journey-box .content .item-box .advantage-list .advantage-item .advantage-icon,
|
||||
.latitude-box .content .item-box .advantage-list .advantage-item .advantage-icon {
|
||||
width: 0.18rem;
|
||||
height: 0.18rem;
|
||||
margin-right: 0.05rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.base-box .content .item-box .advantage-list .advantage-item .advantage-name,
|
||||
.journey-box .content .item-box .advantage-list .advantage-item .advantage-name,
|
||||
.latitude-box .content .item-box .advantage-list .advantage-item .advantage-name {
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
font-size: 0.2rem;
|
||||
margin-right: 0.05rem;
|
||||
}
|
||||
.base-box .content .item-box .advantage-list .advantage-item .advantage-content,
|
||||
.journey-box .content .item-box .advantage-list .advantage-item .advantage-content,
|
||||
.latitude-box .content .item-box .advantage-list .advantage-item .advantage-content {
|
||||
font-size: 0.18rem;
|
||||
}
|
||||
.base-box .content .item-box .item-price,
|
||||
.journey-box .content .item-box .item-price,
|
||||
.latitude-box .content .item-box .item-price {
|
||||
width: calc(100% - 0.4rem);
|
||||
padding-top: 0.2rem;
|
||||
border-top: 0.02rem dashed #d4d6e1;
|
||||
font-size: 0.13rem;
|
||||
font-weight: bold;
|
||||
color: #d4d6e1;
|
||||
margin: 0.2rem 0;
|
||||
position: absolute;
|
||||
bottom: 0.6rem;
|
||||
}
|
||||
.base-box .content .item-box .item-price .price,
|
||||
.journey-box .content .item-box .item-price .price,
|
||||
.latitude-box .content .item-box .item-price .price {
|
||||
font-size: 0.38rem;
|
||||
color: #f52220;
|
||||
}
|
||||
.base-box .content .item-box .item-price .price-icon,
|
||||
.journey-box .content .item-box .item-price .price-icon,
|
||||
.latitude-box .content .item-box .item-price .price-icon {
|
||||
color: #f52220;
|
||||
font-size: 0.18rem;
|
||||
}
|
||||
.base-box .content .item-box .tag-list,
|
||||
.journey-box .content .item-box .tag-list,
|
||||
.latitude-box .content .item-box .tag-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.1rem;
|
||||
margin: 0.15rem 0;
|
||||
}
|
||||
.base-box .content .item-box .tag-list .tag-item,
|
||||
.journey-box .content .item-box .tag-list .tag-item,
|
||||
.latitude-box .content .item-box .tag-list .tag-item {
|
||||
padding: 0.04rem 0.12rem;
|
||||
font-size: 0.18rem;
|
||||
color: #aeb6bf;
|
||||
background-color: #fff;
|
||||
border: 0.02rem solid #c8d6e7;
|
||||
border-radius: 0.12rem;
|
||||
display: inline-block;
|
||||
}
|
||||
.base-box .content .item-box .item-button,
|
||||
.journey-box .content .item-box .item-button,
|
||||
.latitude-box .content .item-box .item-button {
|
||||
background: linear-gradient(90deg, #275AFF 0%, #2EBDFA 100%);
|
||||
border-radius: 0.04rem;
|
||||
padding: 0.08rem 0;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
margin-top: auto;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
bottom: -1.6rem;
|
||||
}
|
||||
.base-box .content .item-box .item-button .item-button-text,
|
||||
.journey-box .content .item-box .item-button .item-button-text,
|
||||
.latitude-box .content .item-box .item-button .item-button-text {
|
||||
color: #fff;
|
||||
font-size: 0.182rem;
|
||||
/* 增大30%: 0.14rem * 1.3 = 0.182rem */
|
||||
}
|
||||
.partner {
|
||||
background-color: #f8f9fd;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0.3rem 0.4rem;
|
||||
}
|
||||
.partner .partner-scroll {
|
||||
width: 100%;
|
||||
max-width: 14rem;
|
||||
margin: 0 auto;
|
||||
padding: 0.15rem;
|
||||
background: #fff;
|
||||
border-radius: 0.16rem;
|
||||
margin-bottom: 0.3rem;
|
||||
}
|
||||
.partner .partner-scroll .logo-scroll-wrapper {
|
||||
width: 100%;
|
||||
height: 0.85rem;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
.partner .partner-scroll .logo-scroll-container {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
animation: scroll linear infinite;
|
||||
white-space: nowrap;
|
||||
width: max-content;
|
||||
}
|
||||
.partner .partner-scroll .logo-item {
|
||||
flex: 0 0 auto;
|
||||
width: 1.68rem;
|
||||
height: 100%;
|
||||
margin-right: 0.2rem;
|
||||
background: #fff;
|
||||
border-radius: 0.04rem;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.partner .partner-scroll .logo-item img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
/* 关键:无缝循环滚动动画 */
|
||||
@keyframes scroll {
|
||||
0% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
100% {
|
||||
/* 因为图片重复了三份,所以移动33.33%实现无缝循环 */
|
||||
transform: translateX(-33.33%);
|
||||
}
|
||||
}
|
||||
.footer {
|
||||
width: 100%;
|
||||
background: #f5f7fa;
|
||||
color: #fff;
|
||||
padding: 0.4rem 0.2rem;
|
||||
}
|
||||
.footer-content {
|
||||
max-width: 12rem;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.footer {
|
||||
width: 100%;
|
||||
background: #f6f8fd;
|
||||
color: #333;
|
||||
padding: 0.6rem 0.2rem 0.4rem;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border-top: 0.01rem solid #e8edf5;
|
||||
}
|
||||
.footer:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.footer-content {
|
||||
max-width: 12.8rem;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
}
|
||||
/* 顶部信息区域 */
|
||||
.footer-top {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.logo-footer {
|
||||
width: 2.4rem;
|
||||
height: 0.8rem;
|
||||
margin-bottom: 0.4rem;
|
||||
border-radius: 0.12rem;
|
||||
}
|
||||
.logo-footer img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.footer-center {
|
||||
font-size: 0.24rem;
|
||||
padding: 0.3rem 0.2rem;
|
||||
background: #fff;
|
||||
border-radius: 0.16rem;
|
||||
box-shadow: 0 0.02rem 0.08rem rgba(0, 0, 0, 0.05);
|
||||
margin-top: 0.4rem;
|
||||
border: 0.01rem solid #eef2f9;
|
||||
width: 100%;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.footer-center {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 0.3rem 0.6rem;
|
||||
}
|
||||
}
|
||||
.footer-center .contact-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
padding: 0.16rem 0.2rem;
|
||||
border-radius: 0.12rem;
|
||||
}
|
||||
.footer-center .contact-item .iconfont {
|
||||
width: 0.2rem;
|
||||
height: 0.2rem;
|
||||
margin-right: 0.12rem;
|
||||
margin-top: 0.02rem;
|
||||
color: #275AFF;
|
||||
flex-shrink: 0;
|
||||
font-size: 0.26rem;
|
||||
}
|
||||
.footer-center .contact-item .label {
|
||||
color: #666;
|
||||
flex-shrink: 0;
|
||||
font-weight: 500;
|
||||
margin-right: 0.08rem;
|
||||
font-size: 0.24rem;
|
||||
}
|
||||
.footer-center .contact-item .value {
|
||||
color: #444;
|
||||
flex: 1;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.footer-center .contact-item .phone-numbers {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.08rem;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.footer-center .contact-item .phone-numbers {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 0.16rem;
|
||||
}
|
||||
}
|
||||
.footer-center .contact-item .phone-link {
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
transition: all 0.3s;
|
||||
font-weight: 500;
|
||||
font-size: 0.208rem;
|
||||
/* 增大30%: 0.16rem * 1.3 = 0.208rem */
|
||||
}
|
||||
.footer-center .contact-item .phone-link:hover {
|
||||
color: #275AFF;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.footer-center .contact-item .phone-separator {
|
||||
color: #999;
|
||||
font-weight: 300;
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.footer-center .contact-item .phone-separator {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.footer-center .contact-item .email-link {
|
||||
color: #275AFF;
|
||||
text-decoration: none;
|
||||
word-break: break-all;
|
||||
font-weight: 500;
|
||||
font-size: 0.208rem;
|
||||
/* 增大30%: 0.16rem * 1.3 = 0.208rem */
|
||||
}
|
||||
.footer-center .contact-item .email-link:hover {
|
||||
color: #2ebdfa;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.code-img {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
margin-top: 0.4rem;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.code-img {
|
||||
width: auto;
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
.code-img .qr-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
border-radius: 0.16rem;
|
||||
padding: 0.24rem;
|
||||
box-shadow: 0 0.02rem 0.12rem rgba(39, 90, 255, 0.08);
|
||||
border: 0.01rem solid #eef2f9;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.code-img .qr-box:hover {
|
||||
background: #fff;
|
||||
border-color: #2ebdfa;
|
||||
transform: translateY(-4px);
|
||||
box-shadow: 0 8px 24px rgba(39, 90, 255, 0.15);
|
||||
}
|
||||
.code-img .qr-box .qr-code {
|
||||
width: 1.8rem;
|
||||
height: 1.8rem;
|
||||
background: #fff;
|
||||
border-radius: 0.12rem;
|
||||
padding: 0.12rem;
|
||||
border: 1px solid #eef2f9;
|
||||
margin-bottom: 0.16rem;
|
||||
overflow: hidden;
|
||||
}
|
||||
.code-img .qr-box .qr-code img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
border-radius: 0.04rem;
|
||||
}
|
||||
.code-img .qr-box .qr-content {
|
||||
color: #333;
|
||||
font-size: 0.182rem;
|
||||
/* 增大30%: 0.14rem * 1.3 = 0.182rem */
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
/* 底部信息区域 */
|
||||
.footer-bottom {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
padding: 0.3rem 0.2rem;
|
||||
background: #fff;
|
||||
border-radius: 0.16rem;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
||||
margin-top: 0.4rem;
|
||||
border: 1px solid #eef2f9;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.footer-bottom {
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
text-align: left;
|
||||
padding: 0.3rem 0.4rem;
|
||||
}
|
||||
}
|
||||
.icp-info {
|
||||
margin-bottom: 0.24rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.icp-info {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
.icp-info .icp-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.08rem;
|
||||
margin-bottom: 0.12rem;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.icp-info .icp-item {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
.icp-info .icp-item .icp-text {
|
||||
color: #888;
|
||||
font-size: 0.24rem;
|
||||
}
|
||||
.icp-info .icp-item .icp-number {
|
||||
color: #444;
|
||||
font-weight: 500;
|
||||
font-size: 0.24rem;
|
||||
}
|
||||
.icp-info .copyright {
|
||||
color: #888;
|
||||
font-size: 0.24rem;
|
||||
font-weight: 300;
|
||||
}
|
||||
.record-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 0.16rem;
|
||||
margin-bottom: 0.24rem;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.record-info {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
.police-record {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.1rem;
|
||||
padding: 0.08rem 0.16rem;
|
||||
background: #f9fafc;
|
||||
border-radius: 0.24rem;
|
||||
transition: all 0.3s;
|
||||
border: 1px solid #eef2f9;
|
||||
}
|
||||
.police-record:hover {
|
||||
background: #f0f5ff;
|
||||
border-color: #275AFF;
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
.police-record .police-icon {
|
||||
width: 0.18rem;
|
||||
height: 0.18rem;
|
||||
}
|
||||
.police-record .police-link {
|
||||
color: #666;
|
||||
text-decoration: none;
|
||||
font-size: 0.24rem;
|
||||
}
|
||||
.police-record .police-link:hover {
|
||||
color: #275AFF;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.license-record .license-link {
|
||||
color: #666;
|
||||
text-decoration: none;
|
||||
font-size: 0.24rem;
|
||||
padding: 0.08rem 0.16rem;
|
||||
background: #f9fafc;
|
||||
border-radius: 0.24rem;
|
||||
transition: all 0.3s;
|
||||
border: 1px solid #eef2f9;
|
||||
}
|
||||
.license-record .license-link:hover {
|
||||
background: #f0f5ff;
|
||||
color: #275AFF;
|
||||
text-decoration: underline;
|
||||
transform: translateY(-2px);
|
||||
border-color: #275AFF;
|
||||
}
|
||||
/* 移动端二维码 */
|
||||
.mobile-qr {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
margin-top: 0.4rem;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.mobile-qr {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.mobile-qr .qr-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
border-radius: 0.16rem;
|
||||
padding: 0.24rem;
|
||||
box-shadow: 0 2px 12px rgba(39, 90, 255, 0.08);
|
||||
border: 1px solid #eef2f9;
|
||||
width: 100%;
|
||||
max-width: 2.4rem;
|
||||
margin-right: 0.4rem;
|
||||
}
|
||||
.mobile-qr .qr-item .qr-code {
|
||||
width: 1.6rem;
|
||||
height: 1.6rem;
|
||||
background: #fff;
|
||||
border-radius: 0.12rem;
|
||||
padding: 0.12rem;
|
||||
border: 1px solid #eef2f9;
|
||||
margin-bottom: 0.16rem;
|
||||
}
|
||||
.mobile-qr .qr-item .qr-code img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
border-radius: 0.04rem;
|
||||
}
|
||||
.mobile-qr .qr-item .qr-desc {
|
||||
color: #333;
|
||||
font-size: 0.208rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
/* PC端二维码 */
|
||||
.pc-qr {
|
||||
position: absolute;
|
||||
right: 0.4rem;
|
||||
bottom: 0.4rem;
|
||||
display: none;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.pc-qr {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
.pc-qr .qr-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
border-radius: 0.16rem;
|
||||
padding: 0.24rem;
|
||||
box-shadow: 0 2px 12px rgba(39, 90, 255, 0.08);
|
||||
border: 1px solid #eef2f9;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.pc-qr .qr-box:hover {
|
||||
background: #fff;
|
||||
border-color: #2ebdfa;
|
||||
transform: translateY(-4px) scale(1.05);
|
||||
box-shadow: 0 8px 24px rgba(39, 90, 255, 0.15);
|
||||
}
|
||||
.pc-qr .qr-box .qr-code {
|
||||
width: 1.6rem;
|
||||
height: 1.6rem;
|
||||
background: #fff;
|
||||
border-radius: 0.12rem;
|
||||
padding: 0.12rem;
|
||||
border: 1px solid #eef2f9;
|
||||
margin-bottom: 0.16rem;
|
||||
}
|
||||
.pc-qr .qr-box .qr-code img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
border-radius: 0.04rem;
|
||||
}
|
||||
.pc-qr .qr-box .qr-content {
|
||||
color: #333;
|
||||
font-size: 0.182rem;
|
||||
/* 增大30%: 0.14rem * 1.3 = 0.182rem */
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
@ -1,9 +1,6 @@
|
||||
function adapter() {
|
||||
//获取布局视口宽度,因为开启了理想视口,布局视口=设备横向独立像素值
|
||||
const dpWidth = document.documentElement.clientWidth
|
||||
//计算根字体大小
|
||||
const rootFonstSize = (dpWidth * 100) / 750
|
||||
//设置根字体大小
|
||||
document.documentElement.style.fontSize = rootFonstSize + 'px'
|
||||
}
|
||||
adapter()
|
||||
|
||||
@ -1,230 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- 标题 -->
|
||||
<div class="top-tit">
|
||||
开元云
|
||||
</div>
|
||||
|
||||
<!-- 搜索 -->
|
||||
<div class="search">
|
||||
<div class="search-box">
|
||||
<div class="input">
|
||||
<input
|
||||
type="text"
|
||||
placeholder="请输入产品名称"
|
||||
v-model="searchValue"
|
||||
@keyup.enter="handleSearch"
|
||||
/>
|
||||
</div>
|
||||
<div class="search-btn" @click="handleSearch">
|
||||
搜索
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 搜索提示 -->
|
||||
<div v-if="isSearching && searchValue" class="search-tip">
|
||||
搜索关键词: "{{ searchValue }}"
|
||||
<span class="clear-search" @click="clearSearch">× 清空搜索</span>
|
||||
</div>
|
||||
|
||||
<!-- 供应商 - 只在非搜索模式显示 -->
|
||||
<div v-if="!isSearching && cloudData.secMenu && cloudData.secMenu.length > 0" class="supplier-container">
|
||||
<div v-for="(value, index) in cloudData.secMenu" :key="index" class="supplier" @click="selectSupplier(index)">
|
||||
<div class="supplier-title" :class="{ 'active': activeSupplierIndex === index }">
|
||||
{{ value.secTitle }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 云产品 -->
|
||||
<div class="box">
|
||||
<!-- 搜索模式:显示搜索结果 -->
|
||||
<template v-if="isSearching && searchResults.length > 0">
|
||||
<div v-for="product in searchResults" :key="product.id" class="box-item">
|
||||
<div class="item-tit">
|
||||
{{ product.name }}
|
||||
</div>
|
||||
<div class="item-detail">
|
||||
{{ product.description }}
|
||||
</div>
|
||||
<div class="item-desc">
|
||||
算力网络
|
||||
</div>
|
||||
<div class="item-btn">
|
||||
<div class="btn" @click="goToDetail(product.id)">
|
||||
查看详情
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- 搜索模式:无结果 -->
|
||||
<div v-else-if="isSearching && searchResults.length === 0" class="no-data">
|
||||
未找到与"{{ searchValue }}"相关的产品
|
||||
</div>
|
||||
|
||||
<!-- 正常模式:只显示当前选中的供应商的产品 -->
|
||||
<template v-else-if="!isSearching && cloudData.secMenu && cloudData.secMenu.length > 0 && activeSupplierIndex >= 0">
|
||||
<template v-for="thrMenu in cloudData.secMenu[activeSupplierIndex].thrMenu">
|
||||
<div v-for="product in thrMenu.value" :key="product.id" class="box-item">
|
||||
<div class="item-tit">
|
||||
{{ product.name }}
|
||||
</div>
|
||||
<div class="item-detail">
|
||||
{{ product.description }}
|
||||
</div>
|
||||
<div class="item-desc">
|
||||
算力网络
|
||||
</div>
|
||||
<div class="item-btn">
|
||||
<div class="btn" @click="goToDetail(product.id)">
|
||||
查看详情
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<!-- 正常模式:无数据 -->
|
||||
<div v-else-if="!isSearching && (!cloudData.secMenu || cloudData.secMenu.length === 0)" class="no-data">
|
||||
暂无产品数据
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reqNavList } from '@/api/H5/index'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
cloudData: {},
|
||||
activeSupplierIndex: 0,
|
||||
searchValue: '',
|
||||
isSearching: false,
|
||||
searchResults: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getCloudData()
|
||||
},
|
||||
methods: {
|
||||
async getCloudData(keyword) {
|
||||
try {
|
||||
const params = {
|
||||
url_link: window.location.href,
|
||||
...(keyword && { keyword: keyword.trim() })
|
||||
}
|
||||
|
||||
const res = await reqNavList(params)
|
||||
if (res.status == true) {
|
||||
if (keyword) {
|
||||
// 搜索模式
|
||||
this.isSearching = true
|
||||
this.searchResults = Array.isArray(res.data) ? res.data : []
|
||||
} else {
|
||||
// 正常模式
|
||||
this.isSearching = false
|
||||
this.searchResults = []
|
||||
this.cloudData = res.data.product_service[2] || {}
|
||||
|
||||
if (this.cloudData.secMenu && this.cloudData.secMenu.length > 0) {
|
||||
this.activeSupplierIndex = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取数据失败:', error)
|
||||
this.isSearching = false
|
||||
this.searchResults = []
|
||||
}
|
||||
},
|
||||
|
||||
// 处理搜索
|
||||
handleSearch() {
|
||||
const keyword = this.searchValue.trim()
|
||||
if (keyword) {
|
||||
this.getCloudData(keyword)
|
||||
} else {
|
||||
// 如果搜索框为空,返回正常模式
|
||||
this.clearSearch()
|
||||
}
|
||||
},
|
||||
|
||||
// 清空搜索
|
||||
clearSearch() {
|
||||
this.isSearching = false
|
||||
this.searchValue = ''
|
||||
this.searchResults = []
|
||||
this.getCloudData() // 重新加载正常数据
|
||||
},
|
||||
|
||||
// 选择供应商
|
||||
selectSupplier(index) {
|
||||
if (!this.isSearching) {
|
||||
this.activeSupplierIndex = index
|
||||
}
|
||||
},
|
||||
|
||||
// 跳转到详情页
|
||||
goToDetail(productId) {
|
||||
this.$router.push({
|
||||
path: '/h5HomePage/netDetail',
|
||||
query: {
|
||||
id: productId
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
html, body {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@import url('../less/all/index.less');
|
||||
|
||||
/* 搜索提示样式 */
|
||||
.search-tip {
|
||||
padding: 10px 20px;
|
||||
background-color: #f5f7fa;
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #e4e7ed;
|
||||
}
|
||||
|
||||
.clear-search {
|
||||
color: #409EFF;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
padding: 2px 8px;
|
||||
border-radius: 3px;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.clear-search:hover {
|
||||
background-color: #ecf5ff;
|
||||
color: #409EFF;
|
||||
}
|
||||
|
||||
/* 无数据样式 */
|
||||
.no-data {
|
||||
text-align: center;
|
||||
padding: 40px 20px;
|
||||
color: #909399;
|
||||
font-size: 14px;
|
||||
background-color: #f5f7fa;
|
||||
border-radius: 4px;
|
||||
margin: 20px;
|
||||
}
|
||||
</style>
|
||||
@ -1,561 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="banner">
|
||||
<!-- 介绍 -->
|
||||
<div class="introduce">
|
||||
<div class="title">
|
||||
<span>{{ productList.title }}</span>
|
||||
</div>
|
||||
<!-- 详情 -->
|
||||
<div class="details">
|
||||
<span>{{ productList.description }}</span>
|
||||
</div>
|
||||
<div class="btn" @click="openConsultDialog">
|
||||
立即咨询
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 数据 -->
|
||||
<div class="data">
|
||||
<!-- 优势 -->
|
||||
<div class="advantage">
|
||||
<div class="title">
|
||||
产品<span class="color">优势</span>
|
||||
</div>
|
||||
<!-- 优势列表 -->
|
||||
<div class="advantage-list">
|
||||
<!-- 优势项 -->
|
||||
<div class="advantage-item" v-for="(item, index) in productList.adList" :key="index">
|
||||
<div class="icon">
|
||||
<img :src="item.img ? item.img : ''" alt="">
|
||||
</div>
|
||||
<!-- 描述 -->
|
||||
<div class="advantage-desc">
|
||||
<span class="desc-title">{{ item.title }}</span>
|
||||
<span class="desc-details">{{ item.description }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 功能 -->
|
||||
<div class="function">
|
||||
<div class="title">
|
||||
产品<span class="color">功能</span>
|
||||
</div>
|
||||
<!-- 功能列表 -->
|
||||
<div class="function-list" v-for="(group, groupIndex) in productList.useList" :key="group.id || groupIndex">
|
||||
<!-- 功能项 -->
|
||||
<div class="function-box" v-for="(item, itemIndex) in group.content" :key="item.id">
|
||||
<!-- 图标 -->
|
||||
<div class="function-icon">
|
||||
<img :src="getFunctionIcon(itemIndex)" alt="">
|
||||
</div>
|
||||
<!-- 描述 -->
|
||||
<div class="function-desc">
|
||||
<span class="desc-title">{{ item.title }}</span>
|
||||
<span class="desc-details">{{ item.description }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 场景 -->
|
||||
<div class="scene" v-if="productList.applicationList && productList.applicationList.length > 0">
|
||||
<div class="title">
|
||||
产品<span class="color">场景</span>
|
||||
</div>
|
||||
<!-- 场景列表 -->
|
||||
<div class="scene-list">
|
||||
<!-- 场景切换 -->
|
||||
<div class="scene-switch">
|
||||
<div
|
||||
class="scene-item"
|
||||
v-for="(scene, index) in productList.applicationList"
|
||||
:key="scene.id"
|
||||
:class="{ active: activeSceneIndex === index }"
|
||||
@click="switchScene(index)"
|
||||
>
|
||||
{{ scene.memuName }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- 场景描述 -->
|
||||
<div class="scene-desc">
|
||||
<!-- 上数据 -->
|
||||
<div class="top" v-if="currentScene">
|
||||
<!-- 标题 -->
|
||||
<div class="top-tit">
|
||||
{{ currentScene.title_r }}
|
||||
</div>
|
||||
<!-- 描述 -->
|
||||
<div class="top-desc">
|
||||
{{ currentScene.description_r }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- 下数据 -->
|
||||
<div class="bottom" v-if="currentScene && currentScene.provide">
|
||||
<div class="bottom-item" v-for="(provideItem, index) in currentScene.provide" :key="index">
|
||||
<!-- 标题 -->
|
||||
<div class="bottom-tit">
|
||||
{{ provideItem.title }}
|
||||
</div>
|
||||
<!-- 描述 -->
|
||||
<div class="bottom-desc">
|
||||
{{ provideItem.content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 产品咨询弹窗 -->
|
||||
<ProductConsultDialog
|
||||
v-if="showConsultDialog"
|
||||
:visible.sync="showConsultDialog"
|
||||
:platform-name="platformName"
|
||||
:qr-code="qrCode"
|
||||
:default-form-data="consultFormData"
|
||||
:submit-api="submitConsultApi"
|
||||
@success="handleConsultSuccess"
|
||||
@close="handleDialogClose"
|
||||
/>
|
||||
|
||||
<!-- 底部 -->
|
||||
<Footer></Footer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reqProductDetail, reqProductConsult } from '@/api/H5/index'
|
||||
import Footer from '../components/footer/footer.vue';
|
||||
import ProductConsultDialog from '../components/H5_dialog/index.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Footer,
|
||||
ProductConsultDialog
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
id: null,
|
||||
productList: {},
|
||||
activeSceneIndex: 0, // 修改为索引控制
|
||||
|
||||
// 咨询弹窗相关
|
||||
showConsultDialog: false,
|
||||
platformName: '产品详情页',
|
||||
qrCode: '',
|
||||
consultFormData: {
|
||||
content: '',
|
||||
custom_type: '1',
|
||||
name: '',
|
||||
phone: '',
|
||||
company: '',
|
||||
email: '',
|
||||
checked: false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
// 计算所有功能项的图标数组
|
||||
functionIcons() {
|
||||
const icons = [
|
||||
require('../images/netDetails/1.png'),
|
||||
require('../images/netDetails/2.png'),
|
||||
require('../images/netDetails/3.png'),
|
||||
require('../images/netDetails/4.png'),
|
||||
require('../images/netDetails/5.png'),
|
||||
require('../images/netDetails/6.png'),
|
||||
require('../images/netDetails/7.png'),
|
||||
];
|
||||
return icons;
|
||||
},
|
||||
|
||||
// 当前场景
|
||||
currentScene() {
|
||||
if (this.productList.applicationList && this.productList.applicationList.length > 0) {
|
||||
return this.productList.applicationList[this.activeSceneIndex];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
// 获取id
|
||||
this.id = this.$route.query.id
|
||||
console.log('ID:', this.id)
|
||||
this.getProductList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 获取产品列表
|
||||
async getProductList() {
|
||||
const res = await reqProductDetail({ id: this.id })
|
||||
console.log('产品详情是', res)
|
||||
if (res.status === true) {
|
||||
this.productList = res.data
|
||||
// 如果有场景数据,默认显示第一个
|
||||
if (this.productList.applicationList && this.productList.applicationList.length > 0) {
|
||||
this.activeSceneIndex = 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 根据索引获取功能图标
|
||||
getFunctionIcon(index) {
|
||||
// 使用模运算循环使用图标
|
||||
return this.functionIcons[index % this.functionIcons.length];
|
||||
},
|
||||
|
||||
// 切换场景
|
||||
switchScene(index) {
|
||||
this.activeSceneIndex = index;
|
||||
},
|
||||
|
||||
// 打开咨询弹窗
|
||||
openConsultDialog() {
|
||||
// 准备咨询内容
|
||||
let content = `我想咨询关于【${this.productList.title || '产品'}】的详细信息`
|
||||
|
||||
|
||||
// 设置咨询表单的预填内容
|
||||
this.consultFormData = {
|
||||
...this.consultFormData,
|
||||
content: content
|
||||
}
|
||||
|
||||
this.showConsultDialog = true
|
||||
},
|
||||
|
||||
// 提交咨询API
|
||||
async submitConsultApi(data) {
|
||||
// 构建提交数据
|
||||
const submitData = {
|
||||
...data,
|
||||
product_id: this.id,
|
||||
product_title: this.productList.title || '',
|
||||
product_description: this.productList.description || '',
|
||||
product_advantages: this.productList.adList ? this.productList.adList.length : 0,
|
||||
product_features: this.productList.useList ? this.productList.useList.length : 0,
|
||||
current_scene: this.currentScene?.memuName || '',
|
||||
current_scene_title: this.currentScene?.title_r || '',
|
||||
consult_source: 'product_detail_banner',
|
||||
page_type: 'product_detail_h5',
|
||||
page_url: window.location.href
|
||||
}
|
||||
|
||||
return await reqProductConsult(submitData)
|
||||
},
|
||||
|
||||
// 咨询成功回调
|
||||
handleConsultSuccess(response) {
|
||||
console.log('咨询提交成功:', response)
|
||||
this.$message.success('咨询提交成功,我们将尽快联系您!')
|
||||
},
|
||||
|
||||
// 弹窗关闭回调
|
||||
handleDialogClose() {
|
||||
// 重置表单数据(保留部分信息)
|
||||
this.consultFormData = {
|
||||
content: '',
|
||||
custom_type: '1',
|
||||
name: '',
|
||||
phone: '',
|
||||
company: '',
|
||||
email: '',
|
||||
checked: false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.banner {
|
||||
height: 4.2rem;
|
||||
background: url(../images/netBanner.jpg) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
position: relative;
|
||||
|
||||
.introduce {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 14%;
|
||||
transform: translate(-90%);
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: left;
|
||||
font-size: 0.32rem;
|
||||
/* 修改为0.32rem */
|
||||
color: #000;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.details {
|
||||
font-size: 0.18rem;
|
||||
/* 修改为0.18rem */
|
||||
color: #8890ab;
|
||||
line-height: 2 !important;
|
||||
margin-top: .1rem;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin-top: .1rem;
|
||||
width: 2rem;
|
||||
height: .4rem;
|
||||
border-radius: .1rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: .2rem;
|
||||
background: linear-gradient(90deg, #275AFF 0%, #2EBDFA 100%);
|
||||
color: #fff;
|
||||
cursor: pointer; /* 添加手型光标 */
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&:active {
|
||||
transform: scale(0.98);
|
||||
opacity: 0.9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
margin: .2rem 0;
|
||||
font-size: 0.32rem;
|
||||
text-align: center;
|
||||
color: #000;
|
||||
font-weight: 700;
|
||||
|
||||
.color {
|
||||
background: linear-gradient(to right, #0066FF, #66CCFF);
|
||||
/* 蓝到浅蓝渐变 */
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
color: transparent;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
.data {
|
||||
background: linear-gradient(to bottom, #fff, #f2f6fb, #fff);
|
||||
}
|
||||
|
||||
// 优势
|
||||
.advantage-list {
|
||||
padding: 0 .2rem;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.advantage-item {
|
||||
background: linear-gradient(to bottom, #ecf0fd, #fff);
|
||||
border-radius: .12rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 48%;
|
||||
padding: .2rem 0;
|
||||
padding-left: .1rem;
|
||||
margin-bottom: .1rem;
|
||||
|
||||
.icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding-bottom: 0;
|
||||
padding-left: .1rem;
|
||||
img {
|
||||
width: .4rem;
|
||||
height: .4rem;
|
||||
}
|
||||
}
|
||||
|
||||
.advantage-desc {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-left: .2rem;
|
||||
|
||||
.desc-title {
|
||||
font-size: .18rem;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
margin-bottom: .1rem;
|
||||
}
|
||||
|
||||
.desc-details {
|
||||
font-size: .14rem;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 功能
|
||||
.function {
|
||||
.title {
|
||||
margin-bottom: .2rem;
|
||||
}
|
||||
}
|
||||
|
||||
.function-list {
|
||||
width: 100%;
|
||||
padding: 0 .2rem;
|
||||
display: flex;
|
||||
// flex-wrap: wrap;
|
||||
|
||||
.function-group {
|
||||
margin-bottom: .3rem;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.function-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 33.33%;
|
||||
/* 每行显示3个 */
|
||||
margin-bottom: .2rem;
|
||||
padding: .15rem;
|
||||
box-sizing: border-box;
|
||||
|
||||
// 图标
|
||||
.function-icon {
|
||||
width: .8rem;
|
||||
height: .8rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: .1rem;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
}
|
||||
|
||||
// 描述
|
||||
.function-desc {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
|
||||
.desc-title {
|
||||
font-size: .18rem;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
margin-bottom: .08rem;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.desc-details {
|
||||
font-size: .14rem;
|
||||
color: #666;
|
||||
line-height: 1.4;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 场景
|
||||
.scene {
|
||||
.scene-switch {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.scene-item {
|
||||
padding: .2rem 0;
|
||||
font-size: .2rem;
|
||||
color: #000;
|
||||
transition: all 0.3s ease;
|
||||
width: 34%;
|
||||
text-align: center;
|
||||
cursor: pointer; /* 添加手型光标 */
|
||||
|
||||
&.active {
|
||||
border-bottom: .025rem solid #275AFF;
|
||||
color: #275AFF;
|
||||
}
|
||||
|
||||
&:active {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
|
||||
.scene-list {
|
||||
background: url('../images/scene.jpg') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
min-height: 4.5rem;
|
||||
border-radius: .12rem;
|
||||
overflow: hidden;
|
||||
margin: 0 .2rem;
|
||||
}
|
||||
|
||||
.scene-desc {
|
||||
padding: .3rem;
|
||||
|
||||
.top {
|
||||
padding-bottom: .2rem;
|
||||
border-bottom: .01rem solid rgba(216, 216, 216, 0.5);
|
||||
margin-bottom: .2rem;
|
||||
|
||||
.top-tit {
|
||||
font-weight: 600;
|
||||
font-size: .22rem;
|
||||
color: #000;
|
||||
margin-bottom: .1rem;
|
||||
}
|
||||
|
||||
.top-desc {
|
||||
font-size: .16rem;
|
||||
color: #6d7696;
|
||||
line-height: 1.5;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.bottom-item {
|
||||
width: 50% !important;
|
||||
padding: .15rem 0;
|
||||
// padding-right: .15rem;
|
||||
// box-sizing: border-box;
|
||||
|
||||
.bottom-tit {
|
||||
font-weight: 600;
|
||||
font-size: .18rem;
|
||||
color: #000;
|
||||
margin-bottom: .05rem;
|
||||
}
|
||||
|
||||
.bottom-desc {
|
||||
font-size: .16rem;
|
||||
color: #6d7696;
|
||||
line-height: 1.4;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 响应式调整
|
||||
@media (max-width: 768px) {
|
||||
.function-box {
|
||||
width: 50% !important; /* 小屏幕每行显示2个 */
|
||||
}
|
||||
|
||||
.scene-desc .bottom .bottom-item {
|
||||
width: 100% !important; /* 小屏幕每行显示1个 */
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
Before Width: | Height: | Size: 4.5 MiB |