This commit is contained in:
ping 2025-10-09 18:04:45 +08:00
commit d8f65b3dc5
6 changed files with 998 additions and 292 deletions

View File

@ -314,7 +314,7 @@ export const asyncRoutes = [
children: [ children: [
{ {
path: "overview", path: "overview",
component: () => import('@/views/product/productHome/productIndex/index.vue'), component: () => import('../views/customer/orderManagement/index.vue'),
name: 'ProductOverview', name: 'ProductOverview',
meta: { meta: {
title: "资源概览", title: "资源概览",

View File

@ -0,0 +1,36 @@
// src/utils/language.js
import Vue from 'vue'
// 创建一个事件总线用于组件通信
export const languageBus = new Vue()
// 语言状态管理
export const languageStore = {
state: {
language: 'zh'
},
setLanguage(lang) {
if (lang === 'zh' || lang === 'en') {
this.state.language = lang
localStorage.setItem('language', lang)
// 触发语言改变事件
languageBus.$emit('language-changed', lang)
}
},
getLanguage() {
return this.state.language
},
init() {
const savedLanguage = localStorage.getItem('language')
if (savedLanguage && (savedLanguage === 'zh' || savedLanguage === 'en')) {
this.state.language = savedLanguage
}
return this.state.language
}
}
// 初始化
languageStore.init()

View File

@ -452,7 +452,7 @@ export default {
padding-top: 25px; padding-top: 25px;
//margin-top: -20px; //margin-top: -20px;
display: flex; display: flex;
justify-content: flex-start; justify-content: center ;
align-items: center; align-items: center;
//margin-right: 25%; //margin-right: 25%;
list-style: none; list-style: none;
@ -516,6 +516,7 @@ export default {
} }
.itemMobile { .itemMobile {
height: auto !important; height: auto !important;
} }
} }

View File

@ -1,124 +1,219 @@
<template> <template>
<div class="orderManagement"> <div class="orderManagement">
<!-- 搜索框 --> <!-- 移动端搜索框 -->
<el-card class="mobileCaed" v-if="isMobile"> <el-card class="mobileCaed" v-if="isMobile">
<el-row :span="24"> <el-row :span="24">
<el-col :span="24" class="search"> <el-col :span="24" class="search">
<el-select v-model="select" filterable @change="selectSearch" class="searchSelect" placeholder="请选择" <el-select v-model="select" filterable @change="selectSearch" class="searchSelect" placeholder="请选择"
size="small"> size="small">
<!-- <el-option label="全部" value="all" /> --> <el-option label="订单号" value="id" />
<el-option label="订单号" value="id"/> <el-option label="订单日期" value="order_date" />
<el-option label="订单日期" value="order_date"/> <el-option label="订单状态:未支付" value="0" />
<el-option label="订单状态:未支付" value="0"/> <el-option label="订单状态:已支付" value="1" />
<el-option label="订单状态:已支付" value="1"/> <el-option label="订单状态:已取消" value="3" />
<el-option label="订单状态:已取消" value="3"/>
</el-select> </el-select>
<el-input size="small" v-show="this.select=='id'" placeholder="请输入内容" class="input-with-select" <el-input size="small" v-show="this.select == 'id'" placeholder="请输入内容" class="input-with-select"
@input="input" v-model="searchValue" clearable></el-input> @input="input" v-model="searchValue" clearable></el-input>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24" style="margin-top:5px;"> <el-col :span="24" style="margin-top:5px;">
<div v-if="select=='order_date'"> <div v-if="select == 'order_date'">
<div class="datePicker"> <div class="datePicker">
<el-date-picker size="small" @change="change" v-model="value1" type="daterange" range-separator="" <el-date-picker size="small" @change="change" v-model="value1" type="daterange" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy 年 MM 月 dd 日" start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd">
value-format="yyyy-MM-dd">
</el-date-picker> </el-date-picker>
</div> </div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<!-- 筛选状态显示 -->
<el-row v-if="hasActiveFilters" style="margin-top: 5px;">
<el-col :span="24">
<div class="filter-status">
<span class="filter-label">当前筛选: </span>
<el-tag v-if="businessOpFilter" size="small" closable @close="clearBusinessOpFilter">
{{ getOrderTypeConfig(businessOpFilter).text }}
</el-tag>
<el-tag v-if="orderStatusFilter" size="small" closable @close="clearOrderStatusFilter"
:type="orderStatusFilter === '1' ? 'success' : orderStatusFilter === '0' ? 'danger' : 'info'">
{{ getOrderStatusText(orderStatusFilter) }}
</el-tag>
</div>
</el-col>
</el-row>
<!-- 移动端类型筛选 -->
<el-row style="margin-top: 10px;">
<el-col :span="24">
<div class="mobile-filter">
<span class="filter-label">类型:</span>
<el-button
v-for="(config, type) in orderTypes"
:key="type"
size="mini"
:type="businessOpFilter === type ? config.buttonType : ''"
@click="handleBusinessOpFilter(type)">
{{ config.text }}
</el-button>
</div>
</el-col>
</el-row>
<!-- 移动端状态筛选 -->
<el-row style="margin-top: 5px;">
<el-col :span="24">
<div class="mobile-filter">
<span class="filter-label">状态:</span>
<el-button
v-for="status in orderStatuses"
:key="status.value"
size="mini"
:type="orderStatusFilter === status.value ? status.buttonType : ''"
@click="handleOrderStatusFilter(status.value)">
{{ status.text }}
</el-button>
</div>
</el-col>
</el-row>
<el-row class="allPrice"> <el-row class="allPrice">
<el-col :span="24"> <el-col :span="24">
<span class="price" style="font-size: 18px">支付总金额:¥ {{ all_price }}</span> <span class="price" style="font-size: 18px">支付总金额:¥ {{ all_price }}</span>
<el-button type="primary" class="searchSelectIcon" @click="set">重置</el-button> <el-button type="primary" class="searchSelectIcon" @click="resetAllFilters">重置</el-button>
</el-col> </el-col>
</el-row> </el-row>
</el-card> </el-card>
<el-card class="pcCard" v-else style="height:80px;display: flex;justify-content: flex-start;align-items: center;"> <!-- PC端头部 -->
<el-row :span="24"> <el-card class="pcCard" v-else>
<el-col :span="24" class="search" style="display: flex;justify-content: flex-start;align-items: center"> <div class="header-container">
<el-select v-model="select" filterable @change="selectSearch" class="searchSelect" placeholder="请选择" <div class="search-group">
width="130px" size="small"> <el-select v-model="select" filterable @change="selectSearch" class="search-select" placeholder="请选择"
<!-- <el-option label="全部" value="all" /> --> size="small" style="width: 100px">
<el-option label="订单号" value="id"/> <el-option label="订单号" value="id" />
<el-option label="订单日期" value="order_date"/> <el-option label="订单日期" value="order_date" />
<el-option label="订单状态:未支付" value="0"/> <!-- <el-option label="订单状态:未支付" value="0" />
<el-option label="订单状态:已支付" value="1"/> <el-option label="订单状态:已支付" value="1" />
<el-option label="订单状态:已取消" value="3"/> <el-option label="订单状态:已取消" value="3" /> -->
</el-select> </el-select>
<el-input style="width: 150px;margin-left:10px;" size="small" v-show="this.select=='id'"
placeholder="请输入内容" class="input-with-select" @input="input" v-model="searchValue" <el-input size="small" v-show="select == 'id'" placeholder="请输入内容" class="search-input" @input="input"
clearable></el-input> v-model="searchValue" clearable style="width: 180px; margin-left: 10px">
<div v-if="select=='order_date'"> </el-input>
<div style="display:flex;margin-left:10px;">
<el-date-picker size="small" @change="change" v-model="value1" type="daterange" range-separator="" <div v-if="select == 'order_date'" class="date-picker-container">
start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy 年 MM 月 dd 日" <el-date-picker size="small" @change="change" v-model="value1" type="daterange" range-separator=""
value-format="yyyy-MM-dd"> start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd"
</el-date-picker> style="width: 240px; margin-left: 10px">
</el-date-picker>
</div>
</div>
<!-- 筛选状态显示 -->
<div v-if="hasActiveFilters" class="filter-status-pc">
<span class="filter-label">当前筛选: </span>
<el-tag v-if="businessOpFilter" size="small" closable @close="clearBusinessOpFilter">
{{ getOrderTypeConfig(businessOpFilter).text }}
</el-tag>
<el-tag v-if="orderStatusFilter" size="small" closable @close="clearOrderStatusFilter"
:type="orderStatusFilter === '1' ? 'success' : orderStatusFilter === '0' ? 'danger' : 'info'">
{{ getOrderStatusText(orderStatusFilter) }}
</el-tag>
</div>
<div class="stats-group">
<div class="stat-item">
<span class="stat-label">累计支付总金额:</span>
<div class="stat-value">
<el-skeleton animated v-if="all_price_show" :rows="1" style="width: 80px" />
<span v-else class="price-text">¥ {{ all_price || '0.00' }}</span>
</div> </div>
</div> </div>
<el-button type="primary" style="padding: 0 5px;height: 30px; margin-left:10px;" class="searchSelectIcon" <div class="stat-item">
@click="set">重置 <span class="stat-label">累计优惠总金额:</span>
</el-button> <div class="stat-value">
<span <el-skeleton animated v-if="all_price_show" :rows="1" style="width: 80px" />
style="font-size: 16px;padding-left:15px;display: flex;justify-content: center;align-items: center">支付总金额: <span v-else class="price-text">¥ {{ all_discount || '0.00' }}</span>
<div style="width: 250px;line-height: 36px"> </div>
<el-skeleton animated v-if="all_price_show" rows="2"/> </div>
<span v-else> ¥ {{ all_price }}</span> </div>
</div>
</span> <!-- 类型筛选 -->
</el-col> <div class="type-filter">
</el-row> <span>订单类型筛选</span>
<el-button
v-for="(config, type) in orderTypes"
:key="type"
:type="businessOpFilter === type ? config.buttonType : ''"
@click="handleBusinessOpFilter(type)">
{{ config.text }}
</el-button>
</div>
<!-- 状态筛选 -->
<div class="status-filter">
<span>订单状态筛选</span>
<el-button
v-for="status in orderStatuses"
:key="status.value"
:type="orderStatusFilter === status.value ? status.buttonType : ''"
@click="handleOrderStatusFilter(status.value)">
{{ status.text }}
</el-button>
</div>
<!-- 重置按钮 -->
<div class="reset">
<el-button type="primary" size="small" class="reset-btn" @click="resetAllFilters"
style="margin-left: 10px; padding: 7px 15px">
重置
</el-button>
</div>
</div>
</el-card> </el-card>
<!-- 表格 -->
<!-- 表格部分 -->
<el-card class="orderList"> <el-card class="orderList">
<el-table border :data="tableData" class="table" height="calc(100vh - 200px)" v-loading="all_price_show"> <el-table border :data="tableData" class="table" height="calc(100vh - 264px)" v-loading="all_price_show">
<el-table-column min-width="200" align="center" header-align="center" prop="id" <el-table-column label="序号" width="180">
label="订单号"></el-table-column>
<el-table-column min-width="80" align="center" header-align="center" label="原价">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <div style="padding-left: 35px">--> {{ (pagination.page - 1) * pagination.size + scope.$index + 1 }}
{{ scope.row.countprice }}
<!-- </div>-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column min-width="80" align="center" header-align="center" label="折后实付价"> <el-table-column align="center" min-width="180" header-align="center" prop="product_name" label="产品名称">
</el-table-column>
<el-table-column align="center" min-width="180" header-align="center" prop="id" label="订单号"></el-table-column>
<el-table-column align="center" header-align="center" label="订单原价" prop="list_price">
<template slot-scope="scope">
{{ scope.row.list_price }}
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="订单折后价">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.amount ? "¥" + scope.row.amount : "-" }} {{ scope.row.amount ? "¥" + scope.row.amount : "-" }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column min-width="80" align="center" header-align="center" label="订单类型"> <el-table-column align="center" header-align="center" label="订单类型">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- {{ orderTypeMap(scope.row.business_op) }}--> <el-tag :style="{ padding: '0 8px' }" :type="getOrderTypeConfig(scope.row.business_op).type">
<el-tag :style="{ padding: '0 8px' }" :type="orderTypeMap(scope.row.business_op).type"> {{ getOrderTypeConfig(scope.row.business_op).text }}
{{ orderTypeMap(scope.row.business_op).text }}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column min-width="150" align="center" header-align="center" prop="order_date" <el-table-column align="center" header-align="center" label="订单状态">
label="订单日期"></el-table-column>
<el-table-column min-width="150" align="center" header-align="center" label="订单状态">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.order_status==='0'" style="padding: 0 5px" type="warning" effect="dark"> <el-tag :style="{ padding: '0 5px' }" :type="getOrderStatusConfig(scope.row.order_status).tagType" effect="dark">
{{ getResult(scope.row.order_status) }} {{ getOrderStatusConfig(scope.row.order_status).text }}
</el-tag>
<el-tag v-else-if="scope.row.order_status==='1'" style="padding: 0 5px" type="success" effect="dark">
{{ getResult(scope.row.order_status) }}
</el-tag>
<el-tag v-else style="padding: 0 5px" type="info" effect="dark">
{{ getResult(scope.row.order_status) }}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" header-align="center" prop="order_date" label="订单日期"></el-table-column>
<el-table-column align="center" header-align="center" label="操作"> <el-table-column align="center" header-align="center" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="small" v-if="scope.row.order_status==='0'" type="primary" @click="orderDetails(scope.row)" <el-button size="small" v-if="scope.row.order_status === '0'" type="primary"
style="padding: 8px 15px">去支付 @click="orderDetails(scope.row)" style="padding: 8px 15px">去支付
</el-button> </el-button>
<el-button size="small" v-else type="primary" @click="orderDetails(scope.row)" style="padding: 8px"> <el-button size="small" v-else type="primary" @click="orderDetails(scope.row)" style="padding: 8px">
查看详情 查看详情
@ -126,22 +221,35 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页 -->
<div class="page">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page="pagination.page" :page-sizes="[10, 20, 50, 100]" :page-size="pagination.size"
layout="total, sizes, prev, pager, next, jumper" :total="pagination.total">
</el-pagination>
</div>
</el-card> </el-card>
</div> </div>
</template> </template>
<script> <script>
import {getOrderAPI} from "@/api/product/product"; import { getOrderAPI } from "@/api/product/product";
export default { export default {
name: 'OrderManagement',
data() { data() {
return { return {
all_price_show: true,// pagination: {
// P page: 1,
size: 10,
total: 0
},
all_price_show: true,
userAgent: window.navigator.userAgent, userAgent: window.navigator.userAgent,
//
isMobile: false, isMobile: false,
all_price: '', all_price: '',
all_discount: '0.00',
showDate: false, showDate: false,
pickerOptions: { pickerOptions: {
shortcuts: [{ shortcuts: [{
@ -173,11 +281,30 @@ export default {
value1: '', value1: '',
select: "", select: "",
tableData: [], tableData: [],
page: 1,
searchValue: null, searchValue: null,
order_status_select: null, order_status_select: null,
userId: sessionStorage.getItem("userId"), userId: sessionStorage.getItem("userId"),
dialogVisible: false, dialogVisible: false,
//
businessOpFilter: null,
//
orderStatusFilter: null,
//
orderTypes: {
'BUY_REVERSE': { text: '退费', type: 'danger', buttonType: 'danger' },
'RENEW': { text: '续费', type: 'primary', buttonType: 'primary' },
'BUY': { text: '购买', type: 'success', buttonType: 'success' }
},
//
orderStatuses: [
{ value: '1', text: '已支付', buttonType: 'success', tagType: 'success' },
{ value: '0', text: '未支付', buttonType: 'danger', tagType: 'warning' },
{ value: '3', text: '已取消', buttonType: 'info', tagType: 'info' }
],
orderDetail: { orderDetail: {
order_goods: [ order_goods: [
{ {
@ -192,81 +319,31 @@ export default {
}, },
}; };
}, },
computed: {
//
hasActiveFilters() {
return this.businessOpFilter || this.orderStatusFilter;
}
},
created() { created() {
this.getOrder(); this.getOrder();
this.isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(this.userAgent); this.isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(this.userAgent);
}, },
methods: { methods: {
orderTypeMap(type) { //
switch (type) { getOrderTypeConfig(type) {
case 'BUY_REVERSE': return this.orderTypes[type] || { text: "-", type: "primary", buttonType: "" };
// return <el-tag type="danger"></el-tag>;
return {text: "退款", type: "danger"};
case 'RENEW':
return {text: "续费", type: "primary"};
case 'BUY':
return {text: "购买", type: "success"};
default:
return {text: "-", type: "primary"};
}
}, },
getOrder(data) {//
let params = {};
if (this.select) {
if (this.select === 'id' && this.searchValue) {
params['type'] = '200'
params['id'] = this.searchValue
}
if (this.select === 'order_date' && this.value1) {
params['start_time'] = data[0]
params['end_time'] = data[1]
params['type'] = '200'
}
if (this.select == '0') {
params['type'] = '200'
params['order_status'] = '0'
}
if (this.select == '1') {
params['type'] = '200'
params['order_status'] = '1'
}
if (this.select == '3') {
params['type'] = '200'
params['order_status'] = '3'
}
}
getOrderAPI(params).then((res) => {
this.all_price_show = false
if (res.status == true) {
this.tableData = res.data;
this.all_price = res.all_price
}
});
},
change(e) {//
this.value1 = e
this.getOrder(e)
},
set() {//
this.value1 = null
this.searchValue = null
this.select = null
this.getOrder()
//
getOrderStatusConfig(status) {
const statusConfig = this.orderStatuses.find(s => s.value === status);
return statusConfig || { text: this.getOrderStatusText(status), tagType: 'info' };
}, },
selectSearch(e) { //
this.select = e //
this.getOrder(e) getOrderStatusText(status) {
}, switch (status) {
input(e) {//input
this.searchValue = e
this.getOrder(e)
},
orderDetails(row) { //
this.$router.push({name: "orderDetil", query: {id: row.id}});
},
getResult(data) {
switch (data) {
case "0": case "0":
return "未支付"; return "未支付";
case "1": case "1":
@ -277,31 +354,197 @@ export default {
return "已取消"; return "已取消";
case "4": case "4":
return "后付费"; return "后付费";
default:
return "未知状态";
} }
}, },
},
//
handleBusinessOpFilter(type) {
console.log("订单类型筛选:", type, this.getOrderTypeConfig(type).text);
//
if (this.businessOpFilter === type) {
this.businessOpFilter = null;
} else {
this.businessOpFilter = type;
}
this.pagination.page = 1;
this.getOrder();
},
//
clearBusinessOpFilter() {
this.businessOpFilter = null;
this.pagination.page = 1;
this.getOrder();
},
//
handleOrderStatusFilter(status) {
console.log("订单状态筛选:", status, this.getOrderStatusText(status));
//
if (this.orderStatusFilter === status) {
this.orderStatusFilter = null;
} else {
this.orderStatusFilter = status;
}
this.pagination.page = 1;
this.getOrder();
},
//
clearOrderStatusFilter() {
this.orderStatusFilter = null;
this.pagination.page = 1;
this.getOrder();
},
//
resetAllFilters() {
this.value1 = null;
this.searchValue = null;
this.select = null;
this.businessOpFilter = null;
this.orderStatusFilter = null;
this.pagination.page = 1;
this.getOrder();
},
//
getOrder() {
let params = {
page: this.pagination.page,
size: this.pagination.size,
type: '200' // type
};
//
if (this.select === 'id' && this.searchValue) {
params['id'] = this.searchValue;
}
//
if (this.select === 'order_date' && this.value1) {
params['start_time'] = this.value1[0];
params['end_time'] = this.value1[1];
}
//
if (['0', '1', '3'].includes(this.select)) {
params['order_status'] = this.select;
}
// -
if (this.orderStatusFilter) {
params['order_status'] = this.orderStatusFilter;
}
//
if (this.businessOpFilter) {
params['business_op'] = this.businessOpFilter;
}
console.log("API请求参数:", params);
this.all_price_show = true;
getOrderAPI(params).then((res) => {
this.all_price_show = false;
console.log("API响应数据:", res);
if (res.status === true || res.code === 200) {
this.tableData = res.data || [];
this.all_price = res.all_price || '0.00';
this.all_discount = res.all_discount || '0.00';
//
if (res.pagination && res.pagination.total !== undefined) {
this.pagination.total = res.pagination.total;
} else if (res.total !== undefined) {
this.pagination.total = res.total;
} else {
this.pagination.total = this.tableData.length;
}
//
if (this.businessOpFilter) {
const filteredData = this.tableData.filter(item => item.business_op === this.businessOpFilter);
console.log(`类型筛选结果: ${this.getOrderTypeConfig(this.businessOpFilter).text}`, filteredData);
}
} else {
this.$message.error(res.message || '获取数据失败');
}
}).catch(error => {
console.error("获取订单数据失败:", error);
this.all_price_show = false;
this.$message.error('请求失败,请检查网络连接');
});
},
handleSizeChange(val) {
this.pagination.size = val;
this.pagination.page = 1;
this.getOrder();
},
handleCurrentChange(val) {
this.pagination.page = val;
this.getOrder();
},
change(e) {
this.value1 = e;
this.pagination.page = 1;
this.getOrder();
},
selectSearch(e) {
this.select = e;
//
if (['0', '1', '3'].includes(e)) {
this.getOrder();
} else {
//
if (e !== 'order_date') {
this.value1 = null;
}
if (e !== 'id') {
this.searchValue = null;
}
}
},
input(e) {
this.searchValue = e;
this.pagination.page = 1;
this.getOrder();
},
orderDetails(row) {
this.$router.push({ name: "orderDetil", query: { id: row.id } });
}
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
* {
padding: 0;
margin: 0;
}
.orderManagement { .orderManagement {
height: 100%; height: calc(100vh - 180px);
.mobileCaed { .mobileCaed {
height: 100px; height: auto;
display: flex; display: flex;
flex-direction: column;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: flex-start;
padding: 10px;
.search { .search {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
width: 100%;
.searchSelect { .searchSelect {
width: 150px; width: 150px;
@ -313,13 +556,52 @@ export default {
} }
} }
.filter-status {
display: flex;
align-items: center;
gap: 8px;
width: 100%;
.filter-label {
font-size: 14px;
color: #606266;
white-space: nowrap;
}
.el-tag {
cursor: pointer;
}
}
.mobile-filter {
display: flex;
align-items: center;
margin-bottom: 5px;
.filter-label {
margin-right: 8px;
font-size: 14px;
color: #606266;
white-space: nowrap;
}
.el-button {
margin-right: 5px;
padding: 4px 8px;
font-size: 12px;
}
}
.allPrice { .allPrice {
margin-top: 5px; margin-top: 10px;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
.searchSelectIcon { .searchSelectIcon {
padding: 0 5px; padding: 0 5px;
height: 20px; height: 20px;
margin-left: 10px;
} }
.price { .price {
@ -335,40 +617,167 @@ export default {
} }
} }
// PC
.pcCard { .pcCard {
.search { margin-bottom: 10px;
text-align: left;
.input-with-select { .header-container {
width: 60%; display: flex;
align-items: center;
justify-content: flex-start;
// height: 60px;
flex-wrap: wrap;
.searchSelect { .search-group {
width: 150px; display: flex;
align-items: center;
.search-select {
width: 130px;
} }
.searchSelectIcon { .search-input {
width: 30px; width: 180px;
}
.date-picker-container {
display: flex;
align-items: center;
} }
} }
}
.orderList { .filter-status-pc {
margin-top: 5px; display: flex;
height: calc(100vh - 180px); align-items: center;
gap: 8px;
margin-left: 8px;
.table { .filter-label {
width: 100%; font-size: 14px;
color: #606266;
white-space: nowrap;
}
.el-tag {
cursor: pointer;
}
}
.stats-group {
display: flex;
align-items: center;
.stat-item {
display: flex;
align-items: center;
font-size: 14px;
margin-left: 10px;
.stat-label {
color: #606266;
margin-right: 8px;
white-space: nowrap;
}
.stat-value {
min-width: 80px;
.price-text {
color: #e6a23c;
font-weight: 600;
font-size: 16px;
}
}
}
}
.type-filter, .status-filter {
display: flex;
align-items: center;
margin-left: 20px;
span {
margin-right: 8px;
font-size: 14px;
color: #606266;
white-space: nowrap;
}
.el-button {
margin-right: 5px;
padding: 7px 12px;
}
}
.reset {
display: flex;
align-items: center;
} }
} }
} }
.orderList {
margin-top: 10px;
height: calc(100vh - 180px);
.table {
width: 100%;
}
}
} }
</style>
<style> .page {
.el-table .el-table__header { text-align: center;
margin: 20px;
}
//
::v-deep .el-table .el-table__header {
background-color: #d0cff8; background-color: #d0cff8;
} }
::v-deep .el-tag { ::v-deep .el-tag {
padding: 0 8px !important; padding: 0 8px !important;
} }
//
@media screen and (max-width: 1200px) {
.pcCard .header-container {
height: auto;
padding: 10px 0;
.search-group,
.stats-group,
.type-filter,
.status-filter,
.reset {
margin-bottom: 10px;
}
}
}
//
::v-deep .el-button--primary:focus,
::v-deep .el-button--primary:hover,
::v-deep .el-button--success:focus,
::v-deep .el-button--success:hover,
::v-deep .el-button--danger:focus,
::v-deep .el-button--danger:hover {
opacity: 0.8;
}
//
@media screen and (max-width: 768px) {
.mobile-filter {
flex-wrap: wrap;
.filter-label {
width: 100%;
margin-bottom: 5px;
}
.el-button {
margin-bottom: 5px;
}
}
}
</style> </style>

View File

@ -268,6 +268,9 @@ import { reqApplyChannel } from "@/api/customer/channel";
import store from "@/store"; import store from "@/store";
// //
import { getHomePath } from '@/views/setting/tools' import { getHomePath } from '@/views/setting/tools'
//
import { languageStore, languageBus } from '@/utils/language'
export default Vue.extend({ export default Vue.extend({
name: "TopBox", name: "TopBox",
data() { data() {
@ -287,7 +290,7 @@ export default Vue.extend({
threeData: [], // threeData: [], //
fourData: [], // 使 fourData: [], // 使
product_service: [], // product_service: [], //
language: 'zh', // language: languageStore.getLanguage(), //
translations: { translations: {
zh: { zh: {
home: '首页', home: '首页',
@ -336,11 +339,10 @@ export default Vue.extend({
// //
this.init() this.init()
// //
const savedLanguage = localStorage.getItem('language'); languageBus.$on('language-changed', (lang) => {
if (savedLanguage && (savedLanguage === 'zh' || savedLanguage === 'en')) { this.language = lang
this.language = savedLanguage; })
}
}, },
mounted() { mounted() {
// sessionStorage // sessionStorage
@ -361,6 +363,10 @@ export default Vue.extend({
// //
this.initData() this.initData()
}, },
beforeDestroy() {
//
languageBus.$off('language-changed')
},
computed: { computed: {
// ncmatchHome // ncmatchHome
isNcmatchHome() { isNcmatchHome() {
@ -404,10 +410,10 @@ export default Vue.extend({
this.$router.push('/operation/supplierManagement') this.$router.push('/operation/supplierManagement')
} }
}, },
// // - 使
toggleLanguage() { toggleLanguage() {
this.language = this.language === 'zh' ? 'en' : 'zh'; const newLanguage = this.language === 'zh' ? 'en' : 'zh';
localStorage.setItem('language', this.language); languageStore.setLanguage(newLanguage)
}, },
// Logo // Logo
init() { init() {

View File

@ -3,7 +3,7 @@
<!-- 粘性导航组件 --> <!-- 粘性导航组件 -->
<HomePageSticky <HomePageSticky
ref="stickyNav" ref="stickyNav"
:sections="stickySections" :sections="getStickySections()"
@navigate="handleNavigation" @navigate="handleNavigation"
:show-threshold-element-selector="'.tagUl'" :show-threshold-element-selector="'.tagUl'"
:show-offset="0" :show-offset="0"
@ -14,30 +14,30 @@
<div class="centerBox"> <div class="centerBox">
<span style="margin-top: 100px" class="title"> <span style="margin-top: 100px" class="title">
<span v-if="JSON.stringify(logoInfoNew) !== '{}'" class="leftText"> <span v-if="JSON.stringify(logoInfoNew) !== '{}'" class="leftText">
{{ logoInfoNew.home.bannerTitle || "" }} {{ getBannerTitle() }}
</span> </span>
<span class="rightText"> 您身边的AI管家</span> <span class="rightText"> {{ translations[language].aiButler }}</span>
</span> </span>
<!-- 当滚动到这个元素位置时显示粘性导航 --> <!-- 当滚动到这个元素位置时显示粘性导航 -->
<ul style="margin-top: 50px" class="tagUl"> <ul style="margin-top: 50px" class="tagUl">
<li> AI </li> <li>{{ translations[language].slogan }}</li>
</ul> </ul>
</div> </div>
<div style="cursor: pointer" class="tag"> <div style="cursor: pointer" class="tag">
<span @click="openTalk" class="product"> <span @click="openTalk" class="product">
<span class="productName">4090 裸金属</span> <span class="productName">{{ translations[language].product1Name }}</span>
<span class="price"> <span class="price">
<span class="smallText"></span> <span class="smallText"></span>
<span class="bigText">6000</span> <span class="bigText">6000</span>
<span class="smallText">//</span> <span class="smallText">/{{ translations[language].month }}</span>
</span> </span>
</span> </span>
<span @click="goBaiduFn" style="top: 180px" class="product"> <span @click="goBaiduFn" style="top: 180px" class="product">
<span class="productName">云资源</span> <span class="productName">{{ translations[language].product2Name }}</span>
<span class="price"> <span class="price">
<span style="margin-top: 15px" class="smallText"> <span style="margin-top: 15px" class="smallText">
直降 {{ translations[language].discount }}
<span style="font-size: 30px; display: inline-block" class="bigText">20%</span> <span style="font-size: 30px; display: inline-block" class="bigText">20%</span>
</span> </span>
</span> </span>
@ -50,18 +50,18 @@
<div class="bg"></div> <div class="bg"></div>
<div class="itemTitle"> <div class="itemTitle">
<span class="topText"> <span class="topText">
<span>云筑</span> <span>{{ translations[language].baseTitle1 }}</span>
<span class="commonTextColor">企业基座</span> <span class="commonTextColor">{{ translations[language].baseTitle2 }}</span>
</span> </span>
<span class="bottomText">多云融合 让上云更简单</span> <span class="bottomText">{{ translations[language].baseSubtitle }}</span>
</div> </div>
<ul class="myTab"> <ul class="myTab">
<li <li
v-for="menu in baseMenu" v-for="menu in getBaseMenu()"
:class="currentBaseMenu === menu.id ? 'activeMenu' : ''" :class="currentBaseMenu === menu.id ? 'activeMenu' : ''"
@click="clickBaseMenu(menu)" @click="clickBaseMenu(menu)"
:key="menu.name" :key="menu.id"
> >
<img :src="currentBaseMenu === menu.id ? menu.icon : menu.activeIcon" alt="" /> <img :src="currentBaseMenu === menu.id ? menu.icon : menu.activeIcon" alt="" />
{{ menu.name }} {{ menu.name }}
@ -74,10 +74,10 @@
:style="{ backgroundImage: 'url(' + baseItem.bgImgUrl + ')' }" :style="{ backgroundImage: 'url(' + baseItem.bgImgUrl + ')' }"
class="itemContent" class="itemContent"
> >
<span class="title">{{ baseItem.title }}</span> <span class="title">{{ getBaseItemTitle() }}</span>
<p style="line-height: 2" class="description">{{ baseItem.description }}</p> <p style="line-height: 2" class="description">{{ getBaseItemDescription() }}</p>
<ul class="itemContentTag"> <ul class="itemContentTag">
<li v-for="(item, index) in baseItem.list" :key="index"> <li v-for="(item, index) in getBaseItemList()" :key="index">
<img :src="item.icon" alt="" /> <img :src="item.icon" alt="" />
<span <span
v-if="item.name" v-if="item.name"
@ -95,16 +95,16 @@
</span> </span>
<div class="twoBtn"> <div class="twoBtn">
<div class="butStyle" @click="goBaiduFn(baseItem)"> <div class="butStyle" @click="goBaiduFn(baseItem)">
立即购买 {{ translations[language].buyNow }}
<span style="display: inline-block; margin-left: 5px; color: white">></span> <span style="display: inline-block; margin-left: 5px; color: white">></span>
</div> </div>
<div v-show="false" class="lookDetailStyle"> <div v-show="false" class="lookDetailStyle">
查看详情&nbsp;&nbsp;> {{ translations[language].viewDetails }}&nbsp;&nbsp;>
<span style="display: inline-block; margin-left: 5px;"></span> <span style="display: inline-block; margin-left: 5px;"></span>
</div> </div>
</div> </div>
<span class="discountStyle"> <span class="discountStyle">
<span style="font-size: 18px">官网折扣</span> <span style="font-size: 18px">{{ translations[language].officialDiscount }}</span>
<span style="font-size: 24px">{{ baseItem.discount }}</span> <span style="font-size: 24px">{{ baseItem.discount }}</span>
</span> </span>
</div> </div>
@ -115,18 +115,18 @@
<div class="bg"></div> <div class="bg"></div>
<div class="itemTitle"> <div class="itemTitle">
<span class="topText"> <span class="topText">
<span>智算</span> <span>{{ translations[language].suanTitle1 }}</span>
<span class="commonTextColor">未来征程</span> <span class="commonTextColor">{{ translations[language].suanTitle2 }}</span>
</span> </span>
<span class="bottomText">多元异构 灵活短租</span> <span class="bottomText">{{ translations[language].suanSubtitle }}</span>
</div> </div>
<ul class="myTab"> <ul class="myTab">
<li <li
v-for="menu in suanMenu" v-for="menu in getSuanMenu()"
:class="currentSuanMenu === menu.id ? 'activeMenu' : ''" :class="currentSuanMenu === menu.id ? 'activeMenu' : ''"
@click="clickSuanMenu(menu)" @click="clickSuanMenu(menu)"
:key="menu.name" :key="menu.id"
> >
<img :src="currentSuanMenu === menu.id ? menu.icon : menu.activeIcon" alt="" /> <img :src="currentSuanMenu === menu.id ? menu.icon : menu.activeIcon" alt="" />
{{ menu.name }} {{ menu.name }}
@ -135,9 +135,9 @@
<transition name="slide-fade" mode="out-in"> <transition name="slide-fade" mode="out-in">
<div :key="currentSuanMenu" class="itemContentSuan"> <div :key="currentSuanMenu" class="itemContentSuan">
<span class="title">{{ suanItem.title }}</span> <span class="title">{{ getSuanItemTitle() }}</span>
<ul class="itemContentTag"> <ul class="itemContentTag">
<li v-for="(item, index) in suanItem.list" :key="index"> <li v-for="(item, index) in getSuanItemList()" :key="index">
<img :src="item.icon" alt="" /> <img :src="item.icon" alt="" />
<span <span
v-if="item.name" v-if="item.name"
@ -153,16 +153,16 @@
<span style="font-weight: bold;"></span> <span style="font-weight: bold;"></span>
<span style="font-weight: bold; font-size: 48px">{{ suanItem.price }}</span> <span style="font-weight: bold; font-size: 48px">{{ suanItem.price }}</span>
<span style="color: #7a82a0">/{{ suanItem.price_unit }}</span> <span style="color: #7a82a0">/{{ suanItem.price_unit }}</span>
<span style="color: #222f60">可短租</span> <span style="color: #222f60">{{ translations[language].shortRent }}</span>
</span> </span>
<div style="margin-top: 10px !important;" class="twoBtn"> <div style="margin-top: 10px !important;" class="twoBtn">
<div class="butStyle" @click="openTalk"> <div class="butStyle" @click="openTalk">
立即咨询 {{ translations[language].consultNow }}
<span style="display: inline-block; margin-left: 5px; color: white">></span> <span style="display: inline-block; margin-left: 5px; color: white">></span>
</div> </div>
<div v-show="false" class="lookDetailStyle"> <div v-show="false" class="lookDetailStyle">
查看详情&nbsp;&nbsp;> {{ translations[language].viewDetails }}&nbsp;&nbsp;>
<span style="display: inline-block; margin-left: 5px;"></span> <span style="display: inline-block; margin-left: 5px;"></span>
</div> </div>
</div> </div>
@ -174,17 +174,17 @@
<div class="bg"></div> <div class="bg"></div>
<div class="itemTitle"> <div class="itemTitle">
<span class="topText"> <span class="topText">
<span>网织</span> <span>{{ translations[language].netTitle1 }}</span>
<span class="commonTextColor">智能经纬</span> <span class="commonTextColor">{{ translations[language].netTitle2 }}</span>
</span> </span>
<span class="bottomText">云算网融合 让连接更简单</span> <span class="bottomText">{{ translations[language].netSubtitle }}</span>
</div> </div>
<ul class="myTab"> <ul class="myTab">
<li <li
v-for="menu in netMenu" v-for="menu in getNetMenu()"
:class="currentNetMenu === menu.id ? 'activeMenu' : ''" :class="currentNetMenu === menu.id ? 'activeMenu' : ''"
@click="clickNetMenu(menu)" @click="clickNetMenu(menu)"
:key="menu.name" :key="menu.id"
> >
<img :src="currentBaseMenu === menu.id ? menu.icon : menu.activeIcon" alt="" /> <img :src="currentBaseMenu === menu.id ? menu.icon : menu.activeIcon" alt="" />
{{ menu.name }} {{ menu.name }}
@ -193,29 +193,29 @@
<transition name="slide-fade" mode="out-in"> <transition name="slide-fade" mode="out-in">
<div :key="currentNetMenu" class="itemContentNet"> <div :key="currentNetMenu" class="itemContentNet">
<span style="margin-bottom: 15px" class="title">{{ netItem.title }}</span> <span style="margin-bottom: 15px" class="title">{{ getNetItemTitle() }}</span>
<p style="line-height: 2; margin-bottom: 15px" class="description"> <p style="line-height: 2; margin-bottom: 15px" class="description">
{{ netItem.description }} {{ getNetItemDescription() }}
</p> </p>
<span class="subTitle">产品优势</span> <span class="subTitle">{{ translations[language].productAdvantage }}</span>
<ul class="itemContentTag"> <ul class="itemContentTag">
<li v-for="(item, index) in netItem.advantageList" :key="index"> <li v-for="(item, index) in getNetAdvantageList()" :key="index">
<img :src="item.icon" alt="" /> <img :src="item.icon" alt="" />
<span style="width: fit-content !important;" class="tagTitle">{{ item.name }}</span> <span style="width: fit-content !important;" class="tagTitle">{{ item.name }}</span>
<span class="tagContent">{{ item.content }}</span> <span class="tagContent">{{ item.content }}</span>
</li> </li>
</ul> </ul>
<span class="subTitle">应用场景</span> <span class="subTitle">{{ translations[language].applicationScenario }}</span>
<ul class="netTagUl"> <ul class="netTagUl">
<li v-for="(i, d) in netItem.tagList" :key="d">{{ i.name }}</li> <li v-for="(i, d) in getNetTagList()" :key="d">{{ i.name }}</li>
</ul> </ul>
<div class="twoBtn"> <div class="twoBtn">
<div @click="openTalk" class="butStyle"> <div @click="openTalk" class="butStyle">
立即咨询 {{ translations[language].consultNow }}
<span style="display: inline-block; margin-left: 5px; color: white">></span> <span style="display: inline-block; margin-left: 5px; color: white">></span>
</div> </div>
<div @click="goDetail(netItem.id)" class="lookDetailStyle"> <div @click="goDetail(netItem.id)" class="lookDetailStyle">
查看详情&nbsp;&nbsp;> {{ translations[language].viewDetails }}&nbsp;&nbsp;>
<span style="display: inline-block; margin-left: 5px;"></span> <span style="display: inline-block; margin-left: 5px;"></span>
</div> </div>
</div> </div>
@ -225,7 +225,7 @@
<div style="margin-top: 80px; margin-bottom: 50px" class="itemTitle"> <div style="margin-top: 80px; margin-bottom: 50px" class="itemTitle">
<span class="topText"> <span class="topText">
<span></span> <span></span>
<span class="commonTextColor">合作伙伴</span> <span class="commonTextColor">{{ translations[language].partners }}</span>
</span> </span>
</div> </div>
<div <div
@ -239,31 +239,31 @@
<div class="bg"></div> <div class="bg"></div>
<div style="margin-top: 140px" class="itemTitle"> <div style="margin-top: 140px" class="itemTitle">
<span class="topText"> <span class="topText">
<span>算力</span> <span>{{ translations[language].resourcesTitle1 }}</span>
<span class="commonTextColor">资源</span> <span class="commonTextColor">{{ translations[language].resourcesTitle2 }}</span>
</span> </span>
</div> </div>
<div class="mapBox"> <div class="mapBox">
<div style="display: flex; justify-content: space-around; width: 100%;"> <div style="display: flex; justify-content: space-around; width: 100%;">
<div class="map"> <div class="map">
<span class="mapItem" style="top: 130px; right: 149px"> <span class="mapItem" style="top: 130px; right: 149px">
<span class="title">北京</span> <span class="title">{{ translations[language].beijing }}</span>
<img src="./img/map.png" alt="" /> <img src="./img/map.png" alt="" />
</span> </span>
<span class="mapItem" style="top: 154px; right: 124px"> <span class="mapItem" style="top: 154px; right: 124px">
<span class="title">天津</span> <span class="title">{{ translations[language].tianjin }}</span>
<img src="./img/map.png" alt="" /> <img src="./img/map.png" alt="" />
</span> </span>
<span class="mapItem" style="top: 278px; right: 310px"> <span class="mapItem" style="top: 278px; right: 310px">
<span class="title">四川</span> <span class="title">{{ translations[language].sichuan }}</span>
<img src="./img/map.png" alt="" /> <img src="./img/map.png" alt="" />
</span> </span>
<span class="mapItem" style="top: 291px; right: 136px"> <span class="mapItem" style="top: 291px; right: 136px">
<span class="title">上海</span> <span class="title">{{ translations[language].shanghai }}</span>
<img src="./img/map.png" alt="" /> <img src="./img/map.png" alt="" />
</span> </span>
<span class="mapItem" style="top: 261px; right: 174px"> <span class="mapItem" style="top: 261px; right: 174px">
<span class="title">江苏</span> <span class="title">{{ translations[language].jiangsu }}</span>
<img src="./img/map.png" alt="" /> <img src="./img/map.png" alt="" />
</span> </span>
</div> </div>
@ -274,7 +274,7 @@
8 8
<span class="mapTag">+</span> <span class="mapTag">+</span>
</span> </span>
<span style="color: #222f60; font-size: 18px; margin-top: 5px">算力中心接入</span> <span style="color: #222f60; font-size: 18px; margin-top: 5px">{{ translations[language].computeCenters }}</span>
</div> </div>
</li> </li>
<li> <li>
@ -283,7 +283,7 @@
2000 2000
<span style="right: -35px" class="mapTag">P+</span> <span style="right: -35px" class="mapTag">P+</span>
</span> </span>
<span style="color: #222f60; font-size: 18px; margin-top: 5px">算力</span> <span style="color: #222f60; font-size: 18px; margin-top: 5px">{{ translations[language].computingPower }}</span>
</div> </div>
</li> </li>
<li> <li>
@ -292,7 +292,7 @@
10 10
<span style="right: -35px" class="mapTag">ms</span> <span style="right: -35px" class="mapTag">ms</span>
</span> </span>
<span style="color: #222f60; font-size: 18px; margin-top: 5px">实时算力响应</span> <span style="color: #222f60; font-size: 18px; margin-top: 5px">{{ translations[language].realTimeResponse }}</span>
</div> </div>
</li> </li>
<li> <li>
@ -301,7 +301,7 @@
100,000 100,000
<span class="mapTag">+</span> <span class="mapTag">+</span>
</span> </span>
<span style="color: #222f60; font-size: 18px; margin-top: 5px">注册用户</span> <span style="color: #222f60; font-size: 18px; margin-top: 5px">{{ translations[language].registeredUsers }}</span>
</div> </div>
</li> </li>
</ul> </ul>
@ -311,7 +311,7 @@
<div class="tiyan"> <div class="tiyan">
<div> <div>
<el-input v-model="phone" placeholder="请输入您的手机号" class="custom-input"> <el-input v-model="phone" :placeholder="translations[language].phonePlaceholder" class="custom-input">
<template #append> <template #append>
<span <span
@click=" @click="
@ -321,7 +321,7 @@
}) })
" "
class="experience-btn" class="experience-btn"
>立即体验</span >{{ translations[language].experienceNow }}</span
> >
</template> </template>
</el-input> </el-input>
@ -336,23 +336,23 @@
:before-close="handleClose" :before-close="handleClose"
width="30%" width="30%"
> >
<span class="title">官方申明</span> <span class="title">{{ translations[language].officialStatement }}</span>
<p>尊敬用户</p> <p>{{ translations[language].dearUser }}</p>
<p>您好~~</p> <p>{{ translations[language].greeting }}</p>
<p>本平台公示的所有产品折扣活动均真实有效价格体系严格遵循公开透明原则</p> <p>{{ translations[language].statement1 }}</p>
<p> <p>
特别说明<span style="color: #7a82a0 !important;" {{ translations[language].specialNote }}<span style="color: #7a82a0 !important;"
>云服务产品页面所示价格属参考性标价实际交易金额须以资源清单订单页面为准</span >{{ translations[language].statement2 }}</span
> >
</p> </p>
<p>请您知悉上述条款并放心进行购买决策如有任何疑问可随时联系平台官方客服我们将为您详细说明</p> <p>{{ translations[language].statement3 }}</p>
<div style="margin-top: 85px" class="footerBox"> <div style="margin-top: 85px" class="footerBox">
<div class="item"> <div class="item">
<span style="margin-bottom: 10px">客服热线</span> <span style="margin-bottom: 10px">{{ translations[language].customerService }}</span>
<span style="color: #7a82a0 !important;">4006150805</span> <span style="color: #7a82a0 !important;">4006150805</span>
</div> </div>
<div style="margin-right: 50px" class="item"> <div style="margin-right: 50px" class="item">
<span>2025年6月30日</span> <span>{{ translations[language].currentDate }}</span>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
@ -368,6 +368,8 @@ import { mapState } from "vuex";
import IndexTwo from "@/views/homePage/mainPage/logoG/indexTwo.vue"; import IndexTwo from "@/views/homePage/mainPage/logoG/indexTwo.vue";
import HomePageSticky from "@/components/HomePageSticky/index.vue"; import HomePageSticky from "@/components/HomePageSticky/index.vue";
//
import { languageStore, languageBus } from '@/utils/language'
export default Vue.extend({ export default Vue.extend({
name: "mainPage", name: "mainPage",
@ -379,55 +381,195 @@ export default Vue.extend({
currentBaseMenu: "hot", currentBaseMenu: "hot",
currentNetMenu: "hot", currentNetMenu: "hot",
currentSuanMenu: 'hot', currentSuanMenu: 'hot',
suanMenu: [
{ id: "hot", name: "热门推荐", icon: require("../newImg/niu.png"), activeIcon: require("../newImg/niuActive.png") },
{ id: "4090", name: "4090", icon: require("./img/suan/1.png"), activeIcon: require("./img/suan/1.png") },
{ id: "A100", name: "A100", icon: require("./img/suan/2.png"), activeIcon: require("./img/suan/2.png") },
{ id: "A800", name: "A800", icon: require("./img/suan/3.png"), activeIcon: require("./img/suan/3.png") },
{ id: "910B", name: "910B", icon: require("./img/suan/5.png"), activeIcon: require("./img/suan/5.png") }
],
baseMenu: [
{ id: "hot", name: "热门推荐", icon: require("../newImg/niu.png"), activeIcon: require("../newImg/niuActive.png") },
{ id: "computing", name: "计算", icon: require("../newImg/computing.png"), activeIcon: require("../newImg/computingActive.png") },
{ id: "storage", name: "存储", icon: require("../newImg/cun.png"), activeIcon: require("../newImg/cunActive.png") },
{ id: "database", name: "数据库", icon: require("../newImg/database.png"), activeIcon: require("../newImg/databaseActive.png") },
{ id: "container", name: "人脸识别", icon: require("../newImg/container.png"), activeIcon: require("../newImg/containerActive.png") }
],
netMenu: [
{ id: "hot", name: "热门推荐", icon: require("../newImg/niu.png"), activeIcon: require("../newImg/niuActive.png") },
{ id: "hlzx", name: "互联网专线", icon: require("./img/net/1.png"), activeIcon: require("./img/net/1.png") },
{ id: "SDWAN", name: "SDWAN", icon: require("./img/net/2.png"), activeIcon: require("./img/net/2.png") },
{ id: "DCI", name: "DCI", icon: require("./img/net/3.png"), activeIcon: require("./img/net/3.png") },
{ id: "AI", name: "AI专线", icon: require("./img/net/4.png"), activeIcon: require("./img/net/4.png") }
],
base: {}, base: {},
baseItem: {}, baseItem: {},
net: {}, net: {},
netItem: {}, netItem: {},
suan: {}, suan: {},
suanItem: {}, suanItem: {},
// //
stickySections: [ language: languageStore.getLanguage(),
{ title: '云筑企业基座', ref: 'baseSection' }, translations: {
{ title: '智算未来征程', ref: 'suanSection' }, zh: {
{ title: '网织智能经纬', ref: 'netSection' }, // Banner
] aiButler: '您身边的AI管家',
slogan: '全 球 领 先 的 AI 服 务 运 营 商',
product1Name: '4090 裸金属',
product2Name: '云资源',
month: '台/月',
discount: '直降',
//
baseTitle1: '云筑',
baseTitle2: '企业基座',
baseSubtitle: '多云融合 让上云更简单',
//
suanTitle1: '智算',
suanTitle2: '未来征程',
suanSubtitle: '多元异构 灵活短租',
shortRent: '可短租',
//
netTitle1: '网织',
netTitle2: '智能经纬',
netSubtitle: '云算网融合 让连接更简单',
productAdvantage: '产品优势',
applicationScenario: '应用场景',
partners: '合作伙伴',
//
resourcesTitle1: '算力',
resourcesTitle2: '资源',
beijing: '北京',
tianjin: '天津',
sichuan: '四川',
shanghai: '上海',
jiangsu: '江苏',
computeCenters: '算力中心接入',
computingPower: '算力',
realTimeResponse: '实时算力响应',
registeredUsers: '注册用户',
//
buyNow: '立即购买',
consultNow: '立即咨询',
viewDetails: '查看详情',
experienceNow: '立即体验',
officialDiscount: '官网折扣',
//
phonePlaceholder: '请输入您的手机号',
//
officialStatement: '官方申明',
dearUser: '尊敬用户',
greeting: '您好~~',
statement1: '本平台公示的所有产品折扣活动均真实有效,价格体系严格遵循公开透明原则。',
specialNote: '特别说明',
statement2: '云服务产品页面所示价格属参考性标价,实际交易金额须以资源清单订单页面为准。',
statement3: '请您知悉上述条款并放心进行购买决策,如有任何疑问,可随时联系平台官方客服,我们将为您详细说明。',
customerService: '客服热线',
currentDate: '2025年6月30日',
//
hotRecommend: '热门推荐',
computing: '计算',
storage: '存储',
database: '数据库',
container: '人脸识别',
internetLine: '互联网专线',
sdwan: 'SDWAN',
dci: 'DCI',
aiLine: 'AI专线',
//
stickyBase: '云筑企业基座',
stickySuan: '智算未来征程',
stickyNet: '网织智能经纬'
},
en: {
// Banner
aiButler: 'Your AI Butler',
slogan: 'Leading AI Service Operator Worldwide',
product1Name: '4090 Bare Metal',
product2Name: 'Cloud Resources',
month: 'unit/month',
discount: 'Off',
//
baseTitle1: 'Cloud Build',
baseTitle2: 'Enterprise Foundation',
baseSubtitle: 'Multi-cloud integration makes cloud migration easier',
//
suanTitle1: 'Intelligent Computing',
suanTitle2: 'Future Journey',
suanSubtitle: 'Multi-source heterogeneous Flexible short-term rental',
shortRent: 'Short rent available',
//
netTitle1: 'Network Weaving',
netTitle2: 'Smart Framework',
netSubtitle: 'Cloud-computing-network integration makes connection easier',
productAdvantage: 'Product Advantages',
applicationScenario: 'Application Scenarios',
partners: 'Partners',
//
resourcesTitle1: 'Computing',
resourcesTitle2: 'Resources',
beijing: 'Beijing',
tianjin: 'Tianjin',
sichuan: 'Sichuan',
shanghai: 'Shanghai',
jiangsu: 'Jiangsu',
computeCenters: 'Compute Centers Access',
computingPower: 'Computing Power',
realTimeResponse: 'Real-time Response',
registeredUsers: 'Registered Users',
//
buyNow: 'Buy Now',
consultNow: 'Consult Now',
viewDetails: 'View Details',
experienceNow: 'Experience Now',
officialDiscount: 'Official Discount',
//
phonePlaceholder: 'Please enter your phone number',
//
officialStatement: 'Official Statement',
dearUser: 'Dear User',
greeting: 'Hello~~',
statement1: 'All product discount activities displayed on this platform are valid and the pricing system strictly follows the principle of transparency.',
specialNote: 'Special Note',
statement2: 'The prices shown on cloud service product pages are reference prices, and the actual transaction amount shall be subject to the resource list order page.',
statement3: 'Please be aware of the above terms and make purchase decisions with confidence. If you have any questions, please contact our official customer service at any time for detailed explanation.',
customerService: 'Customer Service',
currentDate: 'June 30, 2025',
//
hotRecommend: 'Hot Recommend',
computing: 'Computing',
storage: 'Storage',
database: 'Database',
container: 'Face Recognition',
internetLine: 'Internet Line',
sdwan: 'SDWAN',
dci: 'DCI',
aiLine: 'AI Line',
//
stickyBase: 'Cloud Enterprise Foundation',
stickySuan: 'Intelligent Computing Journey',
stickyNet: 'Smart Network Framework'
}
}
} }
}, },
created() {
//
languageBus.$on('language-changed', (lang) => {
this.language = lang
})
},
mounted() { mounted() {
// sticky // sticky
document.getElementById("homeOut").addEventListener('scroll', (e) =>{ document.getElementById("homeOut").addEventListener('scroll', (e) =>{
if (e.target.scrollTop > 500) {
// console.log("",e.target.scrollTop); document.getElementById('sticky').style.display = 'block'
if (e.target.scrollTop > 500) { } else {
document.getElementById('sticky').style.display = 'block' document.getElementById('sticky').style.display = 'none'
} else { }
document.getElementById('sticky').style.display = 'none'
}
}) })
this.initData() this.initData()
}, },
beforeDestroy() {
//
languageBus.$off('language-changed')
},
computed: { computed: {
...mapState({ ...mapState({
logoInfoNew: state => state.product.logoInfoNew, logoInfoNew: state => state.product.logoInfoNew,
@ -438,6 +580,120 @@ export default Vue.extend({
}, },
}, },
methods: { methods: {
//
getStickySections() {
return [
{ title: this.translations[this.language].stickyBase, ref: 'baseSection' },
{ title: this.translations[this.language].stickySuan, ref: 'suanSection' },
{ title: this.translations[this.language].stickyNet, ref: 'netSection' },
]
},
//
getBaseMenu() {
return [
{ id: "hot", name: this.translations[this.language].hotRecommend, icon: require("../newImg/niu.png"), activeIcon: require("../newImg/niuActive.png") },
{ id: "computing", name: this.translations[this.language].computing, icon: require("../newImg/computing.png"), activeIcon: require("../newImg/computingActive.png") },
{ id: "storage", name: this.translations[this.language].storage, icon: require("../newImg/cun.png"), activeIcon: require("../newImg/cunActive.png") },
{ id: "database", name: this.translations[this.language].database, icon: require("../newImg/database.png"), activeIcon: require("../newImg/databaseActive.png") },
{ id: "container", name: this.translations[this.language].container, icon: require("../newImg/container.png"), activeIcon: require("../newImg/containerActive.png") }
]
},
//
getSuanMenu() {
return [
{ id: "hot", name: this.translations[this.language].hotRecommend, icon: require("../newImg/niu.png"), activeIcon: require("../newImg/niuActive.png") },
{ id: "4090", name: "4090", icon: require("./img/suan/1.png"), activeIcon: require("./img/suan/1.png") },
{ id: "A100", name: "A100", icon: require("./img/suan/2.png"), activeIcon: require("./img/suan/2.png") },
{ id: "A800", name: "A800", icon: require("./img/suan/3.png"), activeIcon: require("./img/suan/3.png") },
{ id: "910B", name: "910B", icon: require("./img/suan/5.png"), activeIcon: require("./img/suan/5.png") }
]
},
//
getNetMenu() {
return [
{ id: "hot", name: this.translations[this.language].hotRecommend, icon: require("../newImg/niu.png"), activeIcon: require("../newImg/niuActive.png") },
{ id: "hlzx", name: this.translations[this.language].internetLine, icon: require("./img/net/1.png"), activeIcon: require("./img/net/1.png") },
{ id: "SDWAN", name: this.translations[this.language].sdwan, icon: require("./img/net/2.png"), activeIcon: require("./img/net/2.png") },
{ id: "DCI", name: this.translations[this.language].dci, icon: require("./img/net/3.png"), activeIcon: require("./img/net/3.png") },
{ id: "AI", name: this.translations[this.language].aiLine, icon: require("./img/net/4.png"), activeIcon: require("./img/net/4.png") }
]
},
// Banner
getBannerTitle() {
if (this.language === 'en') {
// banner
return this.logoInfoNew.home.bannerTitle || ""
}
return this.logoInfoNew.home.bannerTitle || ""
},
//
getBaseItemTitle() {
if (this.language === 'en') {
//
return this.baseItem.title || ""
}
return this.baseItem.title || ""
},
//
getBaseItemDescription() {
if (this.language === 'en') {
//
return this.baseItem.description || ""
}
return this.baseItem.description || ""
},
//
getBaseItemList() {
//
return this.baseItem.list || []
},
//
getSuanItemTitle() {
if (this.language === 'en') {
return this.suanItem.title || ""
}
return this.suanItem.title || ""
},
//
getSuanItemList() {
return this.suanItem.list || []
},
//
getNetItemTitle() {
if (this.language === 'en') {
return this.netItem.title || ""
}
return this.netItem.title || ""
},
//
getNetItemDescription() {
if (this.language === 'en') {
return this.netItem.description || ""
}
return this.netItem.description || ""
},
//
getNetAdvantageList() {
return this.netItem.advantageList || []
},
//
getNetTagList() {
return this.netItem.tagList || []
},
goBaiduFn(item) { goBaiduFn(item) {
if (this.loginState) { if (this.loginState) {
this.$store.commit('setRedirectUrl', item.url) this.$store.commit('setRedirectUrl', item.url)
@ -507,7 +763,7 @@ export default Vue.extend({
// //
handleNavigation(index) { handleNavigation(index) {
console.log('父组件接收到导航事件,索引:', index); console.log('父组件接收到导航事件,索引:', index);
const sectionRef = this.stickySections[index]?.ref; const sectionRef = this.getStickySections()[index]?.ref;
if (sectionRef && this.$refs[sectionRef]) { if (sectionRef && this.$refs[sectionRef]) {
// 使 scrollIntoView // 使 scrollIntoView
this.$refs[sectionRef].scrollIntoView({ this.$refs[sectionRef].scrollIntoView({
@ -515,14 +771,16 @@ export default Vue.extend({
block: 'start', block: 'start',
inline: 'start' inline: 'start'
}); });
} }
} }
}, }
}) })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
// ...
// //
.slide-fade-enter-active { .slide-fade-enter-active {
transition: all 0.3s ease; transition: all 0.3s ease;
@ -1365,7 +1623,3 @@ export default Vue.extend({
} }
</style> </style>