fix:账单服务界面
This commit is contained in:
@@ -7,11 +7,15 @@ const viewEn: any = {
|
|||||||
"view.billing_histories": "Historical",
|
"view.billing_histories": "Historical",
|
||||||
"view.billing_Rechargehistory":"Recharge history",
|
"view.billing_Rechargehistory":"Recharge history",
|
||||||
"view.billing_Internetdetails":"Internet details",
|
"view.billing_Internetdetails":"Internet details",
|
||||||
|
"view.billing_billservice":"Bill service",
|
||||||
"view.set-meal": "Package",
|
"view.set-meal": "Package",
|
||||||
"view.userInfo":"User Information",
|
"view.userInfo":"User Information",
|
||||||
"view.userInfo_profile":"Change Information",
|
"view.userInfo_profile":"Change Information",
|
||||||
"view.userInfo_resetpwd":"Reset Password",
|
"view.userInfo_resetpwd":"Reset Password",
|
||||||
"view.userInfo_device":"Device management",
|
"view.userInfo_device":"Device management",
|
||||||
|
"view.userInfo_access":"Currently connected device",
|
||||||
|
"view.userInfo_records":"History device",
|
||||||
|
"view.cdrlrecords":"CDR records",
|
||||||
};
|
};
|
||||||
|
|
||||||
const local: any = {
|
const local: any = {
|
||||||
@@ -542,6 +546,7 @@ const local: any = {
|
|||||||
Unpaid:'Unpaid',
|
Unpaid:'Unpaid',
|
||||||
},
|
},
|
||||||
Internetdetails:{
|
Internetdetails:{
|
||||||
|
title:"Internet Details",
|
||||||
month:"month",
|
month:"month",
|
||||||
year:"year",
|
year:"year",
|
||||||
starttime:"Start Time",
|
starttime:"Start Time",
|
||||||
@@ -580,7 +585,7 @@ const local: any = {
|
|||||||
devicename:"Device Name",
|
devicename:"Device Name",
|
||||||
mac:"Mac",
|
mac:"Mac",
|
||||||
speed:"Current Rate",
|
speed:"Current Rate",
|
||||||
currentdevice:"The device is currently connected",
|
currentdevice:"Currently connected",
|
||||||
refresh:"Refresh",
|
refresh:"Refresh",
|
||||||
},
|
},
|
||||||
usercard:{
|
usercard:{
|
||||||
@@ -588,6 +593,9 @@ const local: any = {
|
|||||||
resetpwd:"Reset password",
|
resetpwd:"Reset password",
|
||||||
KYC:"KYC Certification",
|
KYC:"KYC Certification",
|
||||||
deviceconsole:"Device management",
|
deviceconsole:"Device management",
|
||||||
|
access:"Currently connected device",
|
||||||
|
records:"History connected",
|
||||||
|
cdrlrecords: "CDR records",
|
||||||
},
|
},
|
||||||
device:{
|
device:{
|
||||||
title: "Device management",
|
title: "Device management",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ const viewZh: any = {
|
|||||||
"view.endpoint_records": "历史设备",
|
"view.endpoint_records": "历史设备",
|
||||||
"view.endpoint_cdrlrecords":"cdr记录",
|
"view.endpoint_cdrlrecords":"cdr记录",
|
||||||
"view.billing": "账单",
|
"view.billing": "账单",
|
||||||
|
"view.billing_billservice":"账单服务",
|
||||||
"view.billing_histories": "历史查询",
|
"view.billing_histories": "历史查询",
|
||||||
"view.billing_Rechargehistory":"充值记录",
|
"view.billing_Rechargehistory":"充值记录",
|
||||||
"view.billing_Internetdetails":"上网详单",
|
"view.billing_Internetdetails":"上网详单",
|
||||||
@@ -12,6 +13,9 @@ const viewZh: any = {
|
|||||||
"view.userInfo_profile":"修改信息",
|
"view.userInfo_profile":"修改信息",
|
||||||
"view.userInfo_resetpwd":"修改密码",
|
"view.userInfo_resetpwd":"修改密码",
|
||||||
"view.userInfo_device":"设备管理",
|
"view.userInfo_device":"设备管理",
|
||||||
|
"view.userInfo_accsee":"当前设备",
|
||||||
|
"view.userInfo_records":"历史设备",
|
||||||
|
"view.userInfo_cdrlrecords":"cdr记录",
|
||||||
};
|
};
|
||||||
|
|
||||||
const local:any = {
|
const local:any = {
|
||||||
@@ -542,6 +546,7 @@ const local:any = {
|
|||||||
Unpaid:'未支付',
|
Unpaid:'未支付',
|
||||||
},
|
},
|
||||||
Internetdetails:{
|
Internetdetails:{
|
||||||
|
title:"上网详单",
|
||||||
month:"月",
|
month:"月",
|
||||||
year:"年",
|
year:"年",
|
||||||
starttime:"起始时间",
|
starttime:"起始时间",
|
||||||
@@ -588,6 +593,9 @@ const local:any = {
|
|||||||
resetpwd:"修改密码",
|
resetpwd:"修改密码",
|
||||||
KYC:"KYC认证",
|
KYC:"KYC认证",
|
||||||
deviceconsole:"设备管理",
|
deviceconsole:"设备管理",
|
||||||
|
access:"当前设备",
|
||||||
|
records:"历史连接",
|
||||||
|
cdrlrecords: "CDR记录",
|
||||||
},
|
},
|
||||||
device:{
|
device:{
|
||||||
title: "设备管理",
|
title: "设备管理",
|
||||||
|
|||||||
@@ -121,4 +121,18 @@ export function fetchCDRHistory(params: Api.CDR.CDRQueryParams) {
|
|||||||
params
|
params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/** Get package list */
|
||||||
|
export function fetchPackageList() {
|
||||||
|
return request<Api.Package.PackageListResponse>({
|
||||||
|
url: '/u/package/list',
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/** Submit package order */
|
||||||
|
export function submitPackageOrder(packageId: string) {
|
||||||
|
return request({
|
||||||
|
url: '/u/order',
|
||||||
|
method: 'post',
|
||||||
|
data: { packageId }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
15
src/typings/api.d.ts
vendored
15
src/typings/api.d.ts
vendored
@@ -585,4 +585,19 @@ declare namespace Api {
|
|||||||
pageSize: number;
|
pageSize: number;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
namespace Package {
|
||||||
|
interface PackageItem {
|
||||||
|
id: string;
|
||||||
|
amount: number;
|
||||||
|
price: number;
|
||||||
|
description?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PackageListResponse {
|
||||||
|
code: number;
|
||||||
|
msg: string;
|
||||||
|
data: PackageItem[];
|
||||||
|
total?: number;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
src/typings/auto-imports.d.ts
vendored
2
src/typings/auto-imports.d.ts
vendored
@@ -102,6 +102,7 @@ declare global {
|
|||||||
const fetchHistoricalDevices: typeof import('../service/api/auth')['fetchHistoricalDevices']
|
const fetchHistoricalDevices: typeof import('../service/api/auth')['fetchHistoricalDevices']
|
||||||
const fetchIsRouteExist: typeof import('../service/api/route')['fetchIsRouteExist']
|
const fetchIsRouteExist: typeof import('../service/api/route')['fetchIsRouteExist']
|
||||||
const fetchLogin: typeof import('../service/api/auth')['fetchLogin']
|
const fetchLogin: typeof import('../service/api/auth')['fetchLogin']
|
||||||
|
const fetchPackageList: typeof import('../service/api/auth')['fetchPackageList']
|
||||||
const fetchRefreshToken: typeof import('../service/api/auth')['fetchRefreshToken']
|
const fetchRefreshToken: typeof import('../service/api/auth')['fetchRefreshToken']
|
||||||
const fetchRegister: typeof import('../service/api/auth')['fetchRegister']
|
const fetchRegister: typeof import('../service/api/auth')['fetchRegister']
|
||||||
const filterAuthRoutesByRoles: typeof import('../store/modules/route/shared')['filterAuthRoutesByRoles']
|
const filterAuthRoutesByRoles: typeof import('../store/modules/route/shared')['filterAuthRoutesByRoles']
|
||||||
@@ -200,6 +201,7 @@ declare global {
|
|||||||
const shallowRef: typeof import('vue')['shallowRef']
|
const shallowRef: typeof import('vue')['shallowRef']
|
||||||
const sortRoutesByOrder: typeof import('../store/modules/route/shared')['sortRoutesByOrder']
|
const sortRoutesByOrder: typeof import('../store/modules/route/shared')['sortRoutesByOrder']
|
||||||
const storeToRefs: typeof import('pinia')['storeToRefs']
|
const storeToRefs: typeof import('pinia')['storeToRefs']
|
||||||
|
const submitPackageOrder: typeof import('../service/api/auth')['submitPackageOrder']
|
||||||
const suite: typeof import('vitest')['suite']
|
const suite: typeof import('vitest')['suite']
|
||||||
const syncRef: typeof import('@vueuse/core')['syncRef']
|
const syncRef: typeof import('@vueuse/core')['syncRef']
|
||||||
const syncRefs: typeof import('@vueuse/core')['syncRefs']
|
const syncRefs: typeof import('@vueuse/core')['syncRefs']
|
||||||
|
|||||||
129
src/views/billing/billservice/index.vue
Normal file
129
src/views/billing/billservice/index.vue
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
|
import {
|
||||||
|
RightOutlined,
|
||||||
|
DollarOutlined,
|
||||||
|
CreditCardOutlined,
|
||||||
|
ContainerOutlined
|
||||||
|
|
||||||
|
} from '@ant-design/icons-vue';
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const menuItems = [
|
||||||
|
{
|
||||||
|
icon: CreditCardOutlined,
|
||||||
|
title: t('page.histories.Historicalbilling'),
|
||||||
|
path: '/billing/histories'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: DollarOutlined,
|
||||||
|
title: t('page.Rechargehistory.recharge'),
|
||||||
|
path: '/billing/Rechargehistory'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: ContainerOutlined,
|
||||||
|
title: t('page.Internetdetails.title'),
|
||||||
|
path: '/billing/internetdetails'
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const handleMenuClick = (path: string) => {
|
||||||
|
router.push(path);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="billing-service">
|
||||||
|
<div class="billing-service-content">
|
||||||
|
<!-- 菜单列表 -->
|
||||||
|
<div class="menu-list">
|
||||||
|
<div
|
||||||
|
v-for="item in menuItems"
|
||||||
|
:key="item.title"
|
||||||
|
class="menu-item"
|
||||||
|
@click="handleMenuClick(item.path)"
|
||||||
|
>
|
||||||
|
<div class="menu-content">
|
||||||
|
<div class="icon-wrapper">
|
||||||
|
<component :is="item.icon" />
|
||||||
|
</div>
|
||||||
|
<span>{{ item.title }}</span>
|
||||||
|
</div>
|
||||||
|
<RightOutlined />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.billing-service {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 100vh;
|
||||||
|
padding: 16px;
|
||||||
|
background-color: #f5f5f7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.billing-service-content {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 800px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-list {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
||||||
|
gap: 16px;
|
||||||
|
padding: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 20px;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 12px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-item:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-content {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-wrapper {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 8px;
|
||||||
|
background-color: #f0f5ff;
|
||||||
|
color: #1890ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 响应式布局调整 */
|
||||||
|
@media screen and (max-width: 768px) {
|
||||||
|
.menu-list {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
gap: 12px;
|
||||||
|
padding: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-item {
|
||||||
|
padding: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user