fix: 优化样式!完美!
This commit is contained in:
@@ -1,71 +1,86 @@
|
||||
<template>
|
||||
<view class="work-container">
|
||||
|
||||
<!-- 宫格组件 -->
|
||||
<uni-section title="常用功能" v-show="auth.hasPermi('invest:accountDealRecord:list')" type="line"></uni-section>
|
||||
<view class="grid-body">
|
||||
<uni-grid :column="4" :showBorder="false">
|
||||
<uni-grid-item v-for="(item, index) in commonGridList" :key="index" v-show="auth.hasPermi(item.permission)" @click="navigateTo(item.path)">
|
||||
<view class="grid-item-box">
|
||||
<uni-icons :type="item.icon" size="30"></uni-icons>
|
||||
<text class="text">{{ item.text }}</text>
|
||||
<!-- 常用功能 -->
|
||||
<view class="section-header" v-show="auth.hasPermi('invest:accountDealRecord:list')">
|
||||
<text class="section-title">常用功能</text>
|
||||
</view>
|
||||
<view class="grid-body" v-show="auth.hasPermi('invest:accountDealRecord:list')">
|
||||
<view class="grid-wrapper">
|
||||
<view
|
||||
v-for="(item, index) in commonGridList"
|
||||
:key="index"
|
||||
v-show="auth.hasPermi(item.permission)"
|
||||
@click="navigateTo(item.path)"
|
||||
class="grid-item">
|
||||
<view class="item-icon" :style="{ background: item.color }">
|
||||
<uni-icons :type="item.icon" size="22" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
</uni-grid>
|
||||
<text class="item-text">{{ item.text }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 宫格组件 -->
|
||||
<uni-section title="账单管理" v-show="auth.hasPermi('invest:installmentHistory:list')" type="line"></uni-section>
|
||||
<view class="grid-body">
|
||||
<uni-grid :column="4" :showBorder="false">
|
||||
<uni-grid-item v-for="(item, index) in billGridList" :key="index" v-show="auth.hasPermi(item.permission)" @click="navigateTo(item.path)">
|
||||
<view class="grid-item-box">
|
||||
<uni-icons :type="item.icon" size="30"></uni-icons>
|
||||
<text class="text">{{ item.text }}</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
</uni-grid>
|
||||
<!-- 账单管理 -->
|
||||
<view class="section-header" v-show="auth.hasPermi('invest:installmentHistory:list')">
|
||||
<text class="section-title">账单管理</text>
|
||||
</view>
|
||||
<!-- 宫格组件 -->
|
||||
<uni-section title="记账管理" v-show="auth.hasPermi('invest:accounts:list')" type="line"></uni-section>
|
||||
<view class="grid-body">
|
||||
<uni-grid :column="4" :showBorder="false">
|
||||
<uni-grid-item v-for="(item, index) in accountGridList" :key="index" v-show="auth.hasPermi(item.permission)" @click="navigateTo(item.path)">
|
||||
<view class="grid-item-box">
|
||||
<uni-icons :type="item.icon" size="30"></uni-icons>
|
||||
<text class="text">{{ item.text }}</text>
|
||||
<view class="grid-body" v-show="auth.hasPermi('invest:installmentHistory:list')">
|
||||
<view class="grid-wrapper">
|
||||
<view
|
||||
v-for="(item, index) in billGridList"
|
||||
:key="index"
|
||||
v-show="auth.hasPermi(item.permission)"
|
||||
@click="navigateTo(item.path)"
|
||||
class="grid-item">
|
||||
<view class="item-icon" :style="{ background: item.color }">
|
||||
<uni-icons :type="item.icon" size="22" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
</uni-grid>
|
||||
<text class="item-text">{{ item.text }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 宫格组件 -->
|
||||
<uni-section title="基础信息" v-show="auth.hasPermi('invest:bankcard:list')" type="line"></uni-section>
|
||||
<view class="grid-body">
|
||||
<uni-grid :column="4" :showBorder="false">
|
||||
<uni-grid-item v-for="(item, index) in baseGridList" :key="index" v-show="auth.hasPermi(item.permission)" @click="navigateTo(item.path)">
|
||||
<view class="grid-item-box">
|
||||
<uni-icons :type="item.icon" size="30"></uni-icons>
|
||||
<text class="text">{{ item.text }}</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
</uni-grid>
|
||||
|
||||
<!-- 记账管理 -->
|
||||
<view class="section-header" v-show="auth.hasPermi('invest:accounts:list')">
|
||||
<text class="section-title">记账管理</text>
|
||||
</view>
|
||||
<!-- 宫格组件
|
||||
<uni-section title="心路历程" v-show="auth.hasPermi('invest:heartJourney:list')" type="line"></uni-section>
|
||||
<view class="grid-body">
|
||||
<uni-grid :column="4" :showBorder="false">
|
||||
<uni-grid-item v-for="(item, index) in heartJourneyGridList" :key="index" v-show="auth.hasPermi(item.permission)" @click="navigateTo(item.path)">
|
||||
<view class="grid-item-box">
|
||||
<uni-icons :type="item.icon" size="30"></uni-icons>
|
||||
<text class="text">{{ item.text }}</text>
|
||||
<view class="grid-body" v-show="auth.hasPermi('invest:accounts:list')">
|
||||
<view class="grid-wrapper">
|
||||
<view
|
||||
v-for="(item, index) in accountGridList"
|
||||
:key="index"
|
||||
v-show="auth.hasPermi(item.permission)"
|
||||
@click="navigateTo(item.path)"
|
||||
class="grid-item">
|
||||
<view class="item-icon" :style="{ background: item.color }">
|
||||
<uni-icons :type="item.icon" size="22" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
</uni-grid>
|
||||
</view> -->
|
||||
<text class="item-text">{{ item.text }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 基础信息 -->
|
||||
<view class="section-header" v-show="auth.hasPermi('invest:bankcard:list')">
|
||||
<text class="section-title">基础信息</text>
|
||||
</view>
|
||||
<view class="grid-body" v-show="auth.hasPermi('invest:bankcard:list')">
|
||||
<view class="grid-wrapper">
|
||||
<view
|
||||
v-for="(item, index) in baseGridList"
|
||||
:key="index"
|
||||
v-show="auth.hasPermi(item.permission)"
|
||||
@click="navigateTo(item.path)"
|
||||
class="grid-item">
|
||||
<view class="item-icon" :style="{ background: item.color }">
|
||||
<uni-icons :type="item.icon" size="22" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<text class="item-text">{{ item.text }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -74,49 +89,38 @@ import auth from "@/plugins/auth"; // 建议使用auth进行鉴权操作
|
||||
// 也可以使用下面的方式
|
||||
import { ref } from "vue";
|
||||
const commonGridList=ref([
|
||||
{ path: '/pages/work/heartJourney/list', text: '心路历程', icon: 'heart', permission: 'invest:heartJourney:list' },
|
||||
{ path: '/pages/work/accounts/accountDealRecord/list', text: '账户交易记录', icon: 'paperclip', permission: 'invest:accountDealRecord:list' },
|
||||
{ path: '/pages/work/accounts/posadvice/list', text: 'POS刷卡推荐', icon: 'paperplane', permission: 'invest:posmachine:list' },
|
||||
{ path: '/pages/work/accounts/posTransferRecord/list', text: 'POS机刷卡记账', icon: 'reload', permission: 'invest:posmachine:list' },
|
||||
{ path: '/pages/work/accounts/creditTransferRecord/list', text: '信用卡还款', icon: 'arrow-left', permission: 'invest:creditCard' },
|
||||
{ path: '/pages/work/accounts/investAccountDeal/list', text: '投资交易记录', icon: 'chatboxes', permission: 'invest:futureStocks:list' },
|
||||
{ path: '/pages/work/accounts/investTransferRecord/list', text: '投资账户记账', icon: 'auth-filled', permission: 'invest:futureStocks:list' },
|
||||
{ path: '/pages/work/accounts/debitTransferRecord/list', text: '储蓄账户转账', icon: 'tune', permission: 'invest:debitCard' },
|
||||
// { path: '/pages/work/accounts/accounts/commonList', text: '记账账户', icon: 'staff', permission: 'invest:accounts:list' },
|
||||
{ path: '/pages/work/bill/creditCardBill/list', text: '信用卡账单', icon: 'list', permission: 'invest:creditCardBill:list' },
|
||||
{ path: '/pages/work/bill/onlineLendHistory/list', text: '贷款账单', icon: 'settings', permission: 'invest:onlineLend' },
|
||||
{ path: '/pages/work/bill/creditInstallmentHistory/list', text: '信用卡分期账单', icon: 'bars', permission: 'invest:creditCard' },
|
||||
{ path: '/pages/work/bill/creditQueryRecord/list', text: '征信查询记录', icon: 'search', permission: 'invest:creditQueryRecord:list' }
|
||||
{ path: '/pages/work/heartJourney/list', text: '心路历程', icon: 'heart-filled', color: 'linear-gradient(135deg, #f093fb 0%, #f5576c 100%)', permission: 'invest:heartJourney:list' },
|
||||
{ path: '/pages/work/accounts/accountDealRecord/list', text: '账户交易记录', icon: 'list', color: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)', permission: 'invest:accountDealRecord:list' },
|
||||
{ path: '/pages/work/accounts/posadvice/list', text: 'POS刷卡推荐', icon: 'star-filled', color: 'linear-gradient(135deg, #43e97b 0%, #38f9d7 100%)', permission: 'invest:posmachine:list' },
|
||||
{ path: '/pages/work/accounts/posTransferRecord/list', text: 'POS机刷卡记账', icon: 'reload', color: 'linear-gradient(135deg, #fa709a 0%, #fee140 100%)', permission: 'invest:posmachine:list' },
|
||||
{ path: '/pages/work/accounts/creditTransferRecord/list', text: '信用卡还款', icon: 'redo', color: 'linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)', permission: 'invest:creditCard' },
|
||||
{ path: '/pages/work/accounts/investAccountDeal/list', text: '投资交易记录', icon: 'chatboxes', color: 'linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%)', permission: 'invest:futureStocks:list' },
|
||||
{ path: '/pages/work/accounts/investTransferRecord/list', text: '投资账户记账', icon: 'checkbox-filled', color: 'linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%)', permission: 'invest:futureStocks:list' },
|
||||
{ path: '/pages/work/accounts/debitTransferRecord/list', text: '储蓄账户转账', icon: 'loop', color: 'linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%)', permission: 'invest:debitCard' },
|
||||
{ path: '/pages/work/bill/creditCardBill/list', text: '信用卡账单', icon: 'wallet-filled', color: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)', permission: 'invest:creditCardBill:list' },
|
||||
{ path: '/pages/work/bill/onlineLendHistory/list', text: '贷款账单', icon: 'fire-filled', color: 'linear-gradient(135deg, #f857a6 0%, #ff5858 100%)', permission: 'invest:onlineLend' },
|
||||
{ path: '/pages/work/bill/creditInstallmentHistory/list', text: '信用卡分期账单', icon: 'calendar-filled', color: 'linear-gradient(135deg, #fddb92 0%, #d1fdff 100%)', permission: 'invest:creditCard' },
|
||||
{ path: '/pages/work/bill/creditQueryRecord/list', text: '征信查询记录', icon: 'search', color: 'linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%)', permission: 'invest:creditQueryRecord:list' }
|
||||
])
|
||||
const baseGridList=ref([
|
||||
{ path: '/pages/work/base/debitCard/list', text: '储蓄账户管理', icon: 'wallet-filled', permission: 'invest:debitCard' },
|
||||
{ path: '/pages/work/base/creditCard/list', text: '信用卡管理', icon: 'wallet', permission: 'invest:creditCard' },
|
||||
{ path: '/pages/work/base/lend/list', text: '借贷账户管理', icon: 'upload', permission: 'invest:onlineLend' },
|
||||
{ path: '/pages/work/base/posmachine/list', text: 'pos机管理', icon: 'shop-filled', permission: 'invest:posmachine:list' },
|
||||
{ path: '/pages/work/base/financials/list', text: '理财账户管理', icon: 'calendar', permission: 'invest:futureStocks:list' },
|
||||
{ path: '/pages/work/base/stocks/list', text: '股票账户管理', icon: 'auth-filled', permission: 'invest:futureStocks:list' },
|
||||
{ path: '/pages/work/base/futures/list', text: '期货账户管理', icon: 'paperplane-filled', permission: 'invest:futureStocks:list' },
|
||||
{ path: '/pages/work/product/productInfor/list', text: '商品信息', icon: 'list', permission: 'invest:productInfor:list' }
|
||||
{ path: '/pages/work/base/debitCard/list', text: '储蓄账户管理', icon: 'wallet-filled', color: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)', permission: 'invest:debitCard' },
|
||||
{ path: '/pages/work/base/creditCard/list', text: '信用卡管理', icon: 'wallet', color: 'linear-gradient(135deg, #f093fb 0%, #f5576c 100%)', permission: 'invest:creditCard' },
|
||||
{ path: '/pages/work/base/lend/list', text: '借贷账户管理', icon: 'upload-filled', color: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)', permission: 'invest:onlineLend' },
|
||||
{ path: '/pages/work/base/posmachine/list', text: 'pos机管理', icon: 'shop-filled', color: 'linear-gradient(135deg, #43e97b 0%, #38f9d7 100%)', permission: 'invest:posmachine:list' },
|
||||
{ path: '/pages/work/base/financials/list', text: '理财账户管理', icon: 'star', color: 'linear-gradient(135deg, #fa709a 0%, #fee140 100%)', permission: 'invest:futureStocks:list' },
|
||||
{ path: '/pages/work/base/stocks/list', text: '股票账户管理', icon: 'bars', color: 'linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)', permission: 'invest:futureStocks:list' },
|
||||
{ path: '/pages/work/base/futures/list', text: '期货账户管理', icon: 'navigate', color: 'linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%)', permission: 'invest:futureStocks:list' },
|
||||
{ path: '/pages/work/product/productInfor/list', text: '商品信息', icon: 'gift-filled', color: 'linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%)', permission: 'invest:productInfor:list' }
|
||||
])
|
||||
const billGridList=ref([
|
||||
// { path: '/pages/work/bill/creditCardBill/list', text: '信用卡账单', icon: 'list', permission: 'invest:creditCardBill:list' },
|
||||
// { path: '/pages/work/bill/creditInstallmentHistory/list', text: '信用卡分期账单', icon: 'bars', permission: 'invest:creditCard' },
|
||||
// { path: '/pages/work/bill/onlineLendHistory/list', text: '贷款账单', icon: 'settings', permission: 'invest:onlineLend' },
|
||||
{ path: '/pages/work/bill/peopleLendHistory/list', text: '人情账单', icon: 'staff-filled', permission: 'invest:onlineLend' },
|
||||
{ path: '/pages/work/bill/futuresBill/list', text: '期货账单', icon: 'map', permission: 'invest:futureStocksBill:list' },
|
||||
{ path: '/pages/work/bill/stocksBill/list', text: '股票账单', icon: 'paperplane', permission: 'invest:futureStocksBill:list' }
|
||||
{ path: '/pages/work/bill/peopleLendHistory/list', text: '人情账单', icon: 'person-filled', color: 'linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%)', permission: 'invest:onlineLend' },
|
||||
{ path: '/pages/work/bill/futuresBill/list', text: '期货账单', icon: 'navigate-filled', color: 'linear-gradient(135deg, #fddb92 0%, #d1fdff 100%)', permission: 'invest:futureStocksBill:list' },
|
||||
{ path: '/pages/work/bill/stocksBill/list', text: '股票账单', icon: 'flag-filled', color: 'linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%)', permission: 'invest:futureStocksBill:list' }
|
||||
])
|
||||
const accountGridList=ref([
|
||||
{ path: '/pages/work/accounts/accounts/list', text: '记账账户', icon: 'staff', permission: 'invest:accounts:list' },
|
||||
// { path: '/pages/work/accounts/posadvice/list', text: 'POS刷卡推荐', icon: 'paperplane', permission: 'invest:posmachine:list' },
|
||||
// { path: '/pages/work/accounts/posTransferRecord/list', text: 'POS机刷卡记账', icon: 'reload', permission: 'invest:posmachine:list' },
|
||||
// { path: '/pages/work/accounts/creditTransferRecord/list', text: '信用卡还款', icon: 'arrow-left', permission: 'invest:creditCard' },
|
||||
// { path: '/pages/work/accounts/investTransferRecord/list', text: '投资账户记账', icon: 'auth-filled', permission: 'invest:futureStocks:list' },
|
||||
// { path: '/pages/work/accounts/investAccountDeal/list', text: '投资交易记录', icon: 'chatboxes', permission: 'invest:futureStocks:list' },
|
||||
// { path: '/pages/work/accounts/debitTransferRecord/list', text: '储蓄账户记账', icon: 'tune', permission: 'invest:debitCard' },
|
||||
{ path: '/pages/work/accounts/lendTransferRecord/list', text: '借贷账户记账', icon: 'link', permission: 'invest:onlineLend' },
|
||||
{ path: '/pages/work/product/productPriceRecord/list', text: '物价记录', icon: 'map', permission: 'invest:productPriceRecord:list' }
|
||||
// { path: '/pages/work/accounts/accountDealRecord/list', text: '账户交易记录', icon: 'paperclip', permission: 'invest:accountDealRecord:list' }
|
||||
{ path: '/pages/work/accounts/accounts/list', text: '记账账户', icon: 'home-filled', color: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)', permission: 'invest:accounts:list' },
|
||||
{ path: '/pages/work/accounts/lendTransferRecord/list', text: '借贷账户记账', icon: 'link', color: 'linear-gradient(135deg, #f093fb 0%, #f5576c 100%)', permission: 'invest:onlineLend' },
|
||||
{ path: '/pages/work/product/productPriceRecord/list', text: '物价记录', icon: 'cart-filled', color: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)', permission: 'invest:productPriceRecord:list' }
|
||||
])
|
||||
const heartJourneyGridList=ref([
|
||||
{ path: '/pages/work/heartJourney/list', text: '心路历程', icon: 'heart', permission: 'invest:heartJourney:list' }
|
||||
@@ -134,72 +138,82 @@ import auth from "@/plugins/auth"; // 建议使用auth进行鉴权操作
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
background-color: #f5f7fa;
|
||||
min-height: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
view {
|
||||
font-size: 14px;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
|
||||
.text {
|
||||
.work-container {
|
||||
padding: 12rpx 0;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
padding: 12rpx 24rpx 8rpx;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 28rpx;
|
||||
font-weight: 700;
|
||||
color: #333;
|
||||
position: relative;
|
||||
padding-left: 16rpx;
|
||||
}
|
||||
|
||||
.section-title::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 6rpx;
|
||||
height: 28rpx;
|
||||
background: linear-gradient(135deg, #667eea, #764ba2);
|
||||
border-radius: 3rpx;
|
||||
}
|
||||
|
||||
.grid-body {
|
||||
padding: 0 16rpx;
|
||||
}
|
||||
|
||||
.grid-wrapper {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.grid-item {
|
||||
width: 25%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 16rpx 8rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.item-icon {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 12rpx;
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.grid-item:active .item-icon {
|
||||
transform: scale(0.95);
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.item-text {
|
||||
text-align: center;
|
||||
font-size: 22rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.grid-item-box {
|
||||
flex: 1;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px 0;
|
||||
}
|
||||
|
||||
.uni-margin-wrap {
|
||||
width: 690rpx;
|
||||
width: 100%;
|
||||
;
|
||||
}
|
||||
|
||||
.swiper {
|
||||
height: 300rpx;
|
||||
}
|
||||
|
||||
.swiper-box {
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.swiper-item {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
height: 300rpx;
|
||||
line-height: 300rpx;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 500px) {
|
||||
.uni-swiper-dot-box {
|
||||
width: 400px;
|
||||
/* #ifndef APP-NVUE */
|
||||
margin: 0 auto;
|
||||
/* #endif */
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.image {
|
||||
width: 100%;
|
||||
}
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
line-height: 1.3;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user