create 返回官网

This commit is contained in:
2025-12-15 11:58:05 +08:00
parent 67d7746719
commit 210399ca53
10 changed files with 211 additions and 86 deletions

View File

@@ -27,6 +27,15 @@
</el-sub-menu> </el-sub-menu>
</template> </template>
</el-menu> </el-menu>
<!-- 返回官网链接 -->
<div class="home-link-container">
<a href="https://www.tianyuanapi.com/" target="_blank" rel="noopener" class="home-link" @click="handleMenuSelect">
<el-icon class="menu-icon">
<HomeIcon />
</el-icon>
<span class="menu-title">返回官网</span>
</a>
</div>
</div> </div>
</el-aside> </el-aside>
</template> </template>
@@ -34,6 +43,7 @@
<script setup> <script setup>
import { useAppStore } from '@/stores/app' import { useAppStore } from '@/stores/app'
import { useUserStore } from '@/stores/user' import { useUserStore } from '@/stores/user'
import { HomeIcon } from '@heroicons/vue/24/outline'
import { onMounted, onUnmounted, watch } from 'vue' import { onMounted, onUnmounted, watch } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
@@ -178,6 +188,46 @@ watch(
width: 100%; width: 100%;
} }
/* 返回官网链接样式 */
.home-link-container {
padding: 8px;
border-top: 1px solid rgba(226, 232, 240, 0.6);
margin-top: auto;
flex-shrink: 0;
}
.home-link {
display: flex;
align-items: center;
padding: 12px 16px;
height: 50px;
line-height: 50px;
margin: 4px 8px;
transition: background-color 0.3s ease, color 0.3s ease;
border: 2px solid transparent;
border-radius: 48px;
text-decoration: none;
color: #1e293b;
cursor: pointer;
}
.home-link:hover {
background-color: #f5f7fa;
color: #409eff;
}
.home-link .menu-icon {
font-size: 18px;
margin-right: 12px;
width: 20px;
height: 20px;
}
.home-link .menu-title {
font-size: 14px;
font-weight: 500;
}
.menu-item { .menu-item {
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;
@@ -227,6 +277,21 @@ watch(
margin-right: 0; margin-right: 0;
} }
/* 折叠状态下的返回官网链接 */
.el-menu--collapse ~ .home-link-container .home-link {
justify-content: center;
padding: 12px;
margin: 4px 4px;
}
.el-menu--collapse ~ .home-link-container .home-link .menu-icon {
margin-right: 0;
}
.el-menu--collapse ~ .home-link-container .home-link .menu-title {
display: none;
}
/* 移动端样式 */ /* 移动端样式 */
.mobile-sidebar { .mobile-sidebar {
position: fixed; position: fixed;
@@ -281,6 +346,22 @@ watch(
.menu-title { .menu-title {
font-size: 13px; font-size: 13px;
} }
.home-link {
height: 44px;
line-height: 44px;
margin: 2px 4px;
padding: 10px 12px;
}
.home-link .menu-icon {
font-size: 16px;
margin-right: 8px;
}
.home-link .menu-title {
font-size: 13px;
}
} }
:global(body.sidebar-locked) { :global(body.sidebar-locked) {

View File

@@ -64,7 +64,7 @@
/> />
</FilterItem> </FilterItem>
<FilterItem label="消费时间" class="md:col-span-2"> <FilterItem label="消费时间" class="col-span-1 md:col-span-2">
<el-date-picker <el-date-picker
v-model="dateRange" v-model="dateRange"
type="datetimerange" type="datetimerange"
@@ -75,6 +75,7 @@
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
@change="handleTimeRangeChange" @change="handleTimeRangeChange"
class="w-full" class="w-full"
:size="isMobile ? 'small' : 'default'"
/> />
</FilterItem> </FilterItem>
@@ -255,6 +256,7 @@ import { userApi, walletTransactionApi } from '@/api'
import FilterItem from '@/components/common/FilterItem.vue' import FilterItem from '@/components/common/FilterItem.vue'
import FilterSection from '@/components/common/FilterSection.vue' import FilterSection from '@/components/common/FilterSection.vue'
import ListPageLayout from '@/components/common/ListPageLayout.vue' import ListPageLayout from '@/components/common/ListPageLayout.vue'
import { useMobileTable } from '@/composables/useMobileTable'
import { Back, Close, User } from '@element-plus/icons-vue' import { Back, Close, User } from '@element-plus/icons-vue'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { onMounted, reactive, ref, watch } from 'vue' import { onMounted, reactive, ref, watch } from 'vue'
@@ -263,6 +265,9 @@ import { useRoute, useRouter } from 'vue-router'
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
// 移动端检测
const { isMobile } = useMobileTable()
// 响应式数据 // 响应式数据
const loading = ref(false) const loading = ref(false)
const transactions = ref([]) const transactions = ref([])

View File

@@ -36,7 +36,7 @@
</el-select> </el-select>
</FilterItem> </FilterItem>
<FilterItem label="申请时间"> <FilterItem label="申请时间" class="col-span-1">
<el-date-picker <el-date-picker
v-model="dateRange" v-model="dateRange"
type="daterange" type="daterange"
@@ -47,6 +47,7 @@
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
@change="handleDateRangeChange" @change="handleDateRangeChange"
class="w-full" class="w-full"
:size="isMobile ? 'small' : 'default'"
/> />
</FilterItem> </FilterItem>
@@ -372,10 +373,14 @@ import { adminInvoiceApi } from '@/api'
import FilterItem from '@/components/common/FilterItem.vue' import FilterItem from '@/components/common/FilterItem.vue'
import FilterSection from '@/components/common/FilterSection.vue' import FilterSection from '@/components/common/FilterSection.vue'
import ListPageLayout from '@/components/common/ListPageLayout.vue' import ListPageLayout from '@/components/common/ListPageLayout.vue'
import { useMobileTable } from '@/composables/useMobileTable'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
const router = useRouter() const router = useRouter()
// 移动端检测
const { isMobile } = useMobileTable()
// 响应式数据 // 响应式数据
const loading = ref(false) const loading = ref(false)
const applications = ref([]) const applications = ref([])

View File

@@ -71,7 +71,7 @@
</el-select> </el-select>
</FilterItem> </FilterItem>
<FilterItem label="充值时间" class="md:col-span-2"> <FilterItem label="充值时间" class="col-span-1 md:col-span-2">
<el-date-picker <el-date-picker
v-model="dateRange" v-model="dateRange"
type="datetimerange" type="datetimerange"
@@ -82,6 +82,7 @@
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
@change="handleTimeRangeChange" @change="handleTimeRangeChange"
class="w-full" class="w-full"
:size="isMobile ? 'small' : 'default'"
/> />
</FilterItem> </FilterItem>
@@ -367,6 +368,7 @@ import ExportDialog from '@/components/common/ExportDialog.vue'
import FilterItem from '@/components/common/FilterItem.vue' import FilterItem from '@/components/common/FilterItem.vue'
import FilterSection from '@/components/common/FilterSection.vue' import FilterSection from '@/components/common/FilterSection.vue'
import ListPageLayout from '@/components/common/ListPageLayout.vue' import ListPageLayout from '@/components/common/ListPageLayout.vue'
import { useMobileTable } from '@/composables/useMobileTable'
import { Back, Close, Download, User } from '@element-plus/icons-vue' import { Back, Close, Download, User } from '@element-plus/icons-vue'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { onMounted, reactive, ref, watch } from 'vue' import { onMounted, reactive, ref, watch } from 'vue'
@@ -375,6 +377,9 @@ import { useRoute, useRouter } from 'vue-router'
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
// 移动端检测
const { isMobile } = useMobileTable()
// 响应式数据 // 响应式数据
const loading = ref(false) const loading = ref(false)
const rechargeRecords = ref([]) const rechargeRecords = ref([])

View File

@@ -64,7 +64,7 @@
/> />
</FilterItem> </FilterItem>
<FilterItem label="订阅时间"> <FilterItem label="订阅时间" class="col-span-1">
<el-date-picker <el-date-picker
v-model="filters.timeRange" v-model="filters.timeRange"
type="datetimerange" type="datetimerange"
@@ -75,6 +75,7 @@
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
@change="handleTimeRangeChange" @change="handleTimeRangeChange"
class="w-full" class="w-full"
:size="isMobile ? 'small' : 'default'"
/> />
</FilterItem> </FilterItem>

View File

@@ -66,7 +66,7 @@
/> />
</FilterItem> </FilterItem>
<FilterItem label="消费时间" class="md:col-span-2"> <FilterItem label="消费时间" class="col-span-1 md:col-span-2">
<el-date-picker <el-date-picker
v-model="dateRange" v-model="dateRange"
type="datetimerange" type="datetimerange"
@@ -77,6 +77,7 @@
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
@change="handleTimeRangeChange" @change="handleTimeRangeChange"
class="w-full" class="w-full"
:size="isMobile ? 'small' : 'default'"
/> />
</FilterItem> </FilterItem>

View File

@@ -80,17 +80,18 @@
</el-select> </el-select>
</FilterItem> </FilterItem>
<FilterItem label="调用时间" class="md:col-span-2"> <FilterItem label="调用时间" class="col-span-1 md:col-span-2">
<el-date-picker <el-date-picker
v-model="dateRange" v-model="dateRange"
type="datetimerange" type="datetimerange"
range-separator="" range-separator=""
start-placeholder="开始时间" :start-placeholder="isMobile ? '开始' : '开始时间'"
end-placeholder="结束时间" :end-placeholder="isMobile ? '结束' : '结束时间'"
format="YYYY-MM-DD HH:mm:ss" :format="isMobile ? 'YYYY-MM-DD HH:mm' : 'YYYY-MM-DD HH:mm:ss'"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
@change="handleTimeRangeChange" @change="handleTimeRangeChange"
class="w-full" :class="['date-picker-mobile', isMobile ? 'w-auto' : 'w-full']"
:size="isMobile ? 'small' : 'default'"
/> />
</FilterItem> </FilterItem>
</div> </div>
@@ -747,5 +748,15 @@ const handleExport = async (options) => {
.info-label { .info-label {
min-width: auto; min-width: auto;
} }
/* 移动端时间筛选器宽度限制 */
.date-picker-mobile {
max-width: 300px !important;
width: 100%;
}
.date-picker-mobile :deep(.el-date-editor) {
width: 100%;
}
} }
</style> </style>

View File

@@ -50,7 +50,7 @@
</el-select> </el-select>
</FilterItem> </FilterItem>
<FilterItem label="时间范围"> <FilterItem label="时间范围" class="col-span-1">
<el-date-picker <el-date-picker
v-model="dateRange" v-model="dateRange"
type="datetimerange" type="datetimerange"
@@ -61,6 +61,7 @@
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
@change="handleDateRangeChange" @change="handleDateRangeChange"
class="w-full" class="w-full"
:size="isMobile ? 'small' : 'default'"
/> />
</FilterItem> </FilterItem>
@@ -90,20 +91,20 @@
<div v-else class="bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden"> <div v-else class="bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden">
<div class="table-container"> <div class="table-container">
<el-table <el-table
:data="apiCalls" :data="apiCalls"
style="width: 100%" style="width: 100%"
:header-cell-style="{ :header-cell-style="{
background: '#f8fafc', background: '#f8fafc',
color: '#475569', color: '#475569',
fontWeight: '600', fontWeight: '600',
fontSize: '14px' fontSize: '14px'
}" }"
:cell-style="{ :cell-style="{
fontSize: '14px', fontSize: '14px',
color: '#1e293b' color: '#1e293b'
}" }"
> >
<el-table-column prop="transaction_id" label="交易ID" min-width="180"> <el-table-column prop="transaction_id" label="交易ID" min-width="180">
<template #default="{ row }"> <template #default="{ row }">
<span class="font-mono text-sm text-gray-600">{{ row.transaction_id }}</span> <span class="font-mono text-sm text-gray-600">{{ row.transaction_id }}</span>
@@ -193,16 +194,16 @@
<template #pagination> <template #pagination>
<div class="pagination-wrapper"> <div class="pagination-wrapper">
<el-pagination <el-pagination
v-if="total > 0" v-if="total > 0"
v-model:current-page="currentPage" v-model:current-page="currentPage"
v-model:page-size="pageSize" v-model:page-size="pageSize"
:page-sizes="[10, 20, 50, 100]" :page-sizes="[10, 20, 50, 100]"
:total="total" :total="total"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
/> />
</div> </div>
</template> </template>
@@ -281,8 +282,12 @@ import FilterItem from '@/components/common/FilterItem.vue'
import FilterSection from '@/components/common/FilterSection.vue' import FilterSection from '@/components/common/FilterSection.vue'
import ListPageLayout from '@/components/common/ListPageLayout.vue' import ListPageLayout from '@/components/common/ListPageLayout.vue'
import { useCertification } from '@/composables/useCertification' import { useCertification } from '@/composables/useCertification'
import { useMobileTable } from '@/composables/useMobileTable'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
// 移动端检测
const { isMobile } = useMobileTable()
// 认证相关 // 认证相关
const { const {
isCertified, isCertified,

View File

@@ -42,7 +42,7 @@
</div> </div>
</FilterItem> </FilterItem>
<FilterItem label="时间范围"> <FilterItem label="时间范围" class="col-span-1">
<el-date-picker <el-date-picker
v-model="dateRange" v-model="dateRange"
type="datetimerange" type="datetimerange"
@@ -53,6 +53,7 @@
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
@change="handleDateRangeChange" @change="handleDateRangeChange"
class="w-full" class="w-full"
:size="isMobile ? 'small' : 'default'"
/> />
</FilterItem> </FilterItem>
@@ -80,20 +81,20 @@
<div v-else class="bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden"> <div v-else class="bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden">
<div class="table-container"> <div class="table-container">
<el-table <el-table
:data="transactions" :data="transactions"
style="width: 100%" style="width: 100%"
:header-cell-style="{ :header-cell-style="{
background: '#f8fafc', background: '#f8fafc',
color: '#475569', color: '#475569',
fontWeight: '600', fontWeight: '600',
fontSize: '14px', fontSize: '14px',
}" }"
:cell-style="{ :cell-style="{
fontSize: '14px', fontSize: '14px',
color: '#1e293b', color: '#1e293b',
}" }"
> >
<el-table-column prop="transaction_id" label="交易ID" min-width="180"> <el-table-column prop="transaction_id" label="交易ID" min-width="180">
<template #default="{ row }"> <template #default="{ row }">
<span class="font-mono text-sm text-gray-700">{{ row.transaction_id }}</span> <span class="font-mono text-sm text-gray-700">{{ row.transaction_id }}</span>
@@ -127,16 +128,16 @@
<template #pagination> <template #pagination>
<div class="pagination-wrapper"> <div class="pagination-wrapper">
<el-pagination <el-pagination
v-if="total > 0" v-if="total > 0"
v-model:current-page="currentPage" v-model:current-page="currentPage"
v-model:page-size="pageSize" v-model:page-size="pageSize"
:page-sizes="[10, 20, 50, 100]" :page-sizes="[10, 20, 50, 100]"
:total="total" :total="total"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
/> />
</div> </div>
</template> </template>
@@ -200,8 +201,12 @@ import { financeApi } from '@/api'
import FilterItem from '@/components/common/FilterItem.vue' import FilterItem from '@/components/common/FilterItem.vue'
import FilterSection from '@/components/common/FilterSection.vue' import FilterSection from '@/components/common/FilterSection.vue'
import ListPageLayout from '@/components/common/ListPageLayout.vue' import ListPageLayout from '@/components/common/ListPageLayout.vue'
import { useMobileTable } from '@/composables/useMobileTable'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
// 移动端检测
const { isMobile } = useMobileTable()
// 响应式数据 // 响应式数据
const loading = ref(false) const loading = ref(false)
const transactions = ref([]) const transactions = ref([])

View File

@@ -35,7 +35,7 @@
</el-select> </el-select>
</FilterItem> </FilterItem>
<FilterItem label="开始时间"> <FilterItem label="开始时间" class="col-span-1">
<el-date-picker <el-date-picker
v-model="filters.start_time" v-model="filters.start_time"
type="datetime" type="datetime"
@@ -44,10 +44,11 @@
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
@change="handleFilterChange" @change="handleFilterChange"
class="w-full" class="w-full"
:size="isMobile ? 'small' : 'default'"
/> />
</FilterItem> </FilterItem>
<FilterItem label="结束时间"> <FilterItem label="结束时间" class="col-span-1">
<el-date-picker <el-date-picker
v-model="filters.end_time" v-model="filters.end_time"
type="datetime" type="datetime"
@@ -56,6 +57,7 @@
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
@change="handleFilterChange" @change="handleFilterChange"
class="w-full" class="w-full"
:size="isMobile ? 'small' : 'default'"
/> />
</FilterItem> </FilterItem>
@@ -81,20 +83,20 @@
<div v-else class="bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden"> <div v-else class="bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden">
<div class="table-container"> <div class="table-container">
<el-table <el-table
:data="records" :data="records"
style="width: 100%" style="width: 100%"
:header-cell-style="{ :header-cell-style="{
background: '#f8fafc', background: '#f8fafc',
color: '#475569', color: '#475569',
fontWeight: '600', fontWeight: '600',
fontSize: '14px' fontSize: '14px'
}" }"
:cell-style="{ :cell-style="{
fontSize: '14px', fontSize: '14px',
color: '#1e293b' color: '#1e293b'
}" }"
> >
<el-table-column prop="alipay_order_id" label="订单号"> <el-table-column prop="alipay_order_id" label="订单号">
<template #default="{ row }"> <template #default="{ row }">
<div class="space-y-1"> <div class="space-y-1">
@@ -168,16 +170,16 @@
<template #pagination> <template #pagination>
<div class="pagination-wrapper"> <div class="pagination-wrapper">
<el-pagination <el-pagination
v-if="total > 0" v-if="total > 0"
v-model:current-page="currentPage" v-model:current-page="currentPage"
v-model:page-size="pageSize" v-model:page-size="pageSize"
:page-sizes="[10, 20, 50, 100]" :page-sizes="[10, 20, 50, 100]"
:total="total" :total="total"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
/> />
</div> </div>
</template> </template>
</ListPageLayout> </ListPageLayout>
@@ -188,8 +190,12 @@ import { financeApi } from '@/api'
import FilterItem from '@/components/common/FilterItem.vue' import FilterItem from '@/components/common/FilterItem.vue'
import FilterSection from '@/components/common/FilterSection.vue' import FilterSection from '@/components/common/FilterSection.vue'
import ListPageLayout from '@/components/common/ListPageLayout.vue' import ListPageLayout from '@/components/common/ListPageLayout.vue'
import { useMobileTable } from '@/composables/useMobileTable'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
// 移动端检测
const { isMobile } = useMobileTable()
// 响应式数据 // 响应式数据
const loading = ref(false) const loading = ref(false)
const records = ref([]) const records = ref([])