This commit is contained in:
GaoHao
2024-10-25 16:23:18 +08:00
61 changed files with 2793 additions and 1040 deletions

View File

@@ -2,18 +2,22 @@
<template>
<JeepayBackground :bgColorStyle="{}">
<!-- 导航条 -->
<JeepayCustomNavbar title="首页" textColor="#fff"
bgDefaultColor="linear-gradient(270deg, rgba(72, 192, 255, 1) 0%, rgba(51, 157, 255, 1) 100%)" />
<JeepayCustomNavbar title="首页" textColor="#fff" bgDefaultColor="#318AFE" />
<view class="income">
<view>总收入</view>
<view>{{totalRevenuedata}}</view>
<view>后海&双屿</view>
</view>
<!-- 统计 or 快捷扫码 -->
<Stats ref="statsRef" />
<!-- <Stats ref="statsRef" /> -->
<statistics @totalRevenue="totalRevenue"></statistics>
<!-- 导航栅格 -->
<JeepayNavigation :navList="navList" type="grid" />
</JeepayBackground>
</template>
<script setup>
import {
reactive,
ref,
@@ -32,20 +36,22 @@
} from '@/http/apiManager.js';
import go from '@/commons/utils/go.js';
import Stats from './components/Stats.vue';
import registerPush from '@/commons/utils/pushmsg/registerPush.js';
import pushMsgManage from '@/commons/utils/pushmsg/pushMsgManage.js';
import statistics from './components/statistics.vue'
import {
onPullDownRefresh,
onLoad
} from '@dcloudio/uni-app';
import storageManage from '@/commons/utils/storageManage.js';
import {
$adList
} from '@/http/apiManager.js';
import {hasPermission} from '@/commons/utils/hasPermission.js'
hasPermission
} from '@/commons/utils/hasPermission.js'
uni.hideTabBar()
onLoad((options) => {});
onLoad((options) => {
});
let totalRevenuedata = ref()
let totalRevenue= (d)=>{
totalRevenuedata.value=d
}
// 导航列表
const navList = [
// {
@@ -62,9 +68,9 @@
title: '代客下单',
icon: '/static/indexImg/icon-substitute-ordering.svg',
pageUrl: 'PAGES_CREATE_ORDER',
clickFunc:()=>{
hasPermission('允许下单').then(res=>{
if(res){
clickFunc: () => {
hasPermission('允许下单').then(res => {
if (res) {
go.to('PAGES_CREATE_ORDER')
}
})
@@ -94,7 +100,7 @@
title: '会员管理',
icon: '/static/indexImg/icon-user.svg',
pageUrl: 'PAGES_USER_CONTROL',
},{
}, {
title: '员工管理',
icon: '/static/indexImg/icon-staff.svg',
pageUrl: 'PAGES_STAFF'
@@ -119,11 +125,11 @@
icon: '/static/indexImg/icon-work.svg',
pageUrl: 'PAGES_WORK_INDEX',
},
{
title: '极速开票',
icon: '/static/indexImg/red-envelope.svg',
pageUrl: 'PAGES_INVOICE'
},
// {
// title: '极速开票',
// icon: '/static/indexImg/red-envelope.svg',
// pageUrl: 'PAGES_INVOICE'
// },
{
title: '排队',
icon: '/static/indexImg/icon-line-up.svg',
@@ -144,6 +150,11 @@
icon: '/static/coupon/icon_coupon.svg',
pageUrl: 'PAGES_COUPON_INDEX',
},
{
title: '订阅通知',
icon: '/static/indexImg/icon-notification.svg',
pageUrl: 'PAGES_NOTIFICATION_INDEX',
},
// // // {
// // // title: '进销存',
// // // icon: '/static/indexImg/icon-invoicing.svg',
@@ -219,26 +230,25 @@
// pageUrl: 'PAGES_AD_LIST',
// entId: 'ENT_ADVERT_CONTROL'
// },
// {
// title: '营销红包',
// icon: '/static/indexImg/red-envelope.svg',
// pageUrl: 'PAGES_RED_INDEX',
// entId: 'ENT_MCH_MEMBER'
// },
// {
// title: '优惠券',
// icon: '/static/indexImg/red-envelope.svg',
// pageUrl: 'PAGES_COUPON_INDEX'
// },
// {
// title: '营销红包',
// icon: '/static/indexImg/red-envelope.svg',
// pageUrl: 'PAGES_RED_INDEX',
// entId: 'ENT_MCH_MEMBER'
// },
{
title: '退出登录',
icon: '/static/indexImg/PAGE_SALES_SUMMARY.svg',
icon: '/static/indexImg/icon-login-out.svg',
pageUrl: 'PAGES_LOGIN',
clickFunc:()=>{
clickFunc: () => {
storageManage.cleanByLogout()
go.to('PAGES_LOGIN',{},'redirect')
go.to('PAGES_LOGIN', {}, 'redirect')
}
}
@@ -250,14 +260,13 @@
navList.splice(index, 1);
}
}
const statsRef = ref();
const vdata = reactive({
noticeList: [], // 公告列表
adList: [],
shareImgUrl: '' //分享图片
});
// 公告的点击事件。
const listviewClickFunc = (isClickMore, record) => {
if (isClickMore) {
@@ -313,4 +322,30 @@
});
</script>
<style lang="scss" scoped></style>
<style lang="scss" scoped>
.income {
>view {
text-align: center;
color: #FFFFFF;
font-family: Source Han Sans CN, Source Han Sans CN;
}
>view:nth-child(1) {
font-weight: 400;
font-size: 28rpx;
margin-top: 84rpx;
}
>view:nth-child(2) {
margin-top: 20rpx;
font-weight: 500;
font-size: 64rpx;
}
>view:nth-child(3) {
font-weight: 400;
font-size: 28rpx;
margin-top: 50rpx;
}
}
</style>