feat:平台首页

This commit is contained in:
wangzenghua 2025-01-21 08:29:53 +00:00
parent 38c19cbf06
commit 370d0f0aa8
9 changed files with 194 additions and 256 deletions

View File

@ -5,4 +5,6 @@ VITE_APP_BASE_API = "https://mock.mengxuegu.com/mock/664ef7fee45d2156fa209ee4/ap
VITE_APP_BASE_URL = 'http://192.168.18.158:9080'
VITE_APP_SUB_VUE = '//localhost:9526/sub-vue/'
VITE_APP_SUB_ADMIN = '//localhost:9527/sub-admin/'
VITE_APP_SUB_GAS = '//localhost:9528/suv-government-affairs-service/'

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,219 +1,10 @@
export const GenKey = (key, prefix = 'EGGY_TEAM_STORE_') => {
const { VITE_APP_NAME } = import.meta.env;
export const GenKey = (key, prefix = `${VITE_APP_NAME}_`) => {
return prefix ? prefix + key : key;
};
export const CONSTANTS = {
PREFIX: 'EGGY_TEAM_STORE_',
PREFIX: `${VITE_APP_NAME}_`,
PRIMARY: '#409eff',
// 总部商品可编辑属性
EDITLIST: ['amount', 'originalPrice', 'activityPrice', 'usePoints', 'points', 'status', 'sortOrder', 'perUseValue', 'displayChannelList'],
// 活动管理
LATITUDE: [
{
label: '副本【x】通关计分榜',
value: 10,
},
{
label: '副本【x】速通榜',
value: 11,
},
{
label: '副本【x】大师榜失误最少',
value: 12,
},
{
label: '副本【x】巅峰榜',
value: 13,
},
{
label: '最强闯关计分榜',
value: 14,
},
{
label: '挑战模式通关计分榜',
value: 20,
},
{
label: '挑战模式第【x】关速通榜',
value: 21,
},
{
label: '挑战模式大师榜(失误最少)',
value: 22,
},
{
label: '挑战模式巅峰榜',
value: 23,
},
],
// 维度说明
LATITUDETIPS: {
default: '榜单常驻,用户所有的游戏通关数据得分累计排列显示,不管用户参与什么模式,是否通关,只要游戏结束时候的分数累计进行排行',
10: '在榜单发起时间内,指定某个副本的通关分数总和(不通关则不计入总分)',
11: '在榜单发起时间内,指定某个副本的通关时间最快(只刷新计入最快的那次)',
12: '在榜单发起时间内,指定某个副本的扣分最少(只刷新计入扣分最少的那次)',
13: '在榜单发起时间内,指定某个副本的得分最高(只刷新计入得分最高的那次)',
14: '在榜单发起时间内,任意副本的得分总和排名(不通关则不计入总分)',
20: '在榜单发起时间内,挑战模式的通关分数总和(不通关则不计入总分)',
21: '在榜单发起时间内,指定挑战模式的某些关卡的通关时间最快(只刷新计入最快的那次)',
22: '在榜单发起时间内,挑战模式的扣分最少(只刷新计入扣分最少的那次)',
23: '在榜单发起时间内,挑战模式的得分最高(只刷新计入得分最高的那次)',
},
// 支付方式
PAYTYPE: {
prop: 'payType',
label: '支付方式',
type: 'select',
dicData: [
{
label: '余额',
value: 1,
},
{
label: '微信',
value: 2,
},
{
label: '支付宝',
value: 3,
},
{
label: '商家券',
value: 4,
},
{
label: '平台券',
value: 5,
},
{
label: '商场券',
value: 6,
},
{
label: '积分',
value: 7,
},
{
label: '美团',
value: 8,
},
{
label: '现金',
value: 9,
},
{
label: '抖音',
value: 10,
},
{
label: '小红书',
value: 11,
},
{
label: '线下优惠券',
value: 12,
},
{
label: '首单立减',
value: 13,
},
{
label: '其它一',
value: 20,
},
{
label: '其它二',
value: 21,
},
{
label: '其它三',
value: 22,
},
],
formatter: (row) => {
let value = '';
switch (row.payType) {
case 1: {
value = '余额';
break;
}
case 2: {
value = '微信';
break;
}
case 3: {
value = '支付宝';
break;
}
case 4: {
value = '商家券';
break;
}
case 5: {
value = '平台券';
break;
}
case 6: {
value = '商场券';
break;
}
case 7: {
value = '积分';
break;
}
case 8: {
value = '美团';
break;
}
case 9: {
value = '现金';
break;
}
case 10: {
value = '抖音';
break;
}
case 11: {
value = '小红书';
break;
}
case 12: {
value = '线下优惠券';
break;
}
case 13: {
value = '首单立减';
break;
}
case 20: {
value = '其它一';
break;
}
case 21: {
value = '其它二';
break;
}
case 22: {
value = '其它三';
break;
}
}
return value;
},
},
// 支付分类
PAY_CATEGORIES: [
{ prop: 'weixin', name: '微信' },
{ prop: 'alipay', name: '支付宝' },
{ prop: 'cash', name: '现金' },
{ prop: 'balance', name: '余额' },
{ prop: 'market', name: '商场券' },
{ prop: 'platform', name: '平台券' },
{ prop: 'store', name: '门店券' },
{ prop: 'meituan', name: '美团' },
{ prop: 'tiktok', name: '抖音' },
{ prop: 'xiaohongshu', name: '小红书' },
{ prop: 'offline', name: '线下优惠券' },
{ prop: 'firstOrder', name: '首单立减' },
],
};

View File

@ -1,21 +1,71 @@
import actions from './actions';
const { VITE_APP_SUB_VUE, VITE_APP_SUB_ADMIN } = import.meta.env;
const { VITE_APP_SUB_VUE, VITE_APP_SUB_ADMIN, VITE_APP_SUB_GAS } = import.meta.env;
export const microApps = [
export const leftApps = [
{
name: 'suv-vue',
name: 'sub-vue',
entry: VITE_APP_SUB_VUE,
activeRule: '/sub-vue/',
title: '管理后台',
title: '运营服务',
icon: 'platform/icon-home.png',
},
{
name: 'sub-admin',
entry: VITE_APP_SUB_ADMIN,
activeRule: '/sub-admin/',
title: '管理后台',
icon: 'platform/icon-admin.png',
},
{
name: 'sub-app',
entry: VITE_APP_SUB_ADMIN,
activeRule: '/sub-app/',
title: 'APP',
icon: 'platform/icon-app.png',
},
{
name: 'sub-screen',
entry: VITE_APP_SUB_ADMIN,
activeRule: '/sub-screen/',
title: '数据大屏',
icon: 'platform/icon-screen.png',
},
];
export const rightApps = [
{
name: 'sub-government-affairs-service',
entry: VITE_APP_SUB_GAS,
activeRule: '/sub-government-affairs-service/',
title: '政务服务',
icon: 'platform/icon-home.png',
},
{
name: 'sub-government-admin',
entry: VITE_APP_SUB_ADMIN,
activeRule: '/sub-government-admin/',
title: '管理后台',
icon: 'platform/icon-admin.png',
},
{
name: 'sub-government-app',
entry: VITE_APP_SUB_ADMIN,
activeRule: '/sub-government-app/',
title: 'APP',
icon: 'platform/icon-app.png',
},
{
name: 'sub-government-screen',
entry: VITE_APP_SUB_ADMIN,
activeRule: '/sub-government-screen/',
title: '数据大屏',
icon: 'platform/icon-screen.png',
},
];
export const microApps = [...leftApps, ...rightApps];
const apps = microApps.map((item) => {
return {
...item,

View File

@ -1,12 +1,134 @@
<template>
<div class="platform">
<h2>平台首页</h2>
<custom-echart-bar height="50vh" :option="{ title: { text: '销售额排行', left: 'center' } }" />
<h2 class="platform-title">数字农业产业管理平台</h2>
<div class="platform-panel">
<div class="platform-panel-item">
<div class="icon"><img src="@/assets/images/platform/icon-yy.png" /></div>
<b>农业产业运营服务平台</b>
<ul class="entry">
<li v-for="item in leftApps" :key="item.name" @click="gotoPage(item)">
<span class="entry-icon">
<img :src="getAssetsFile(item.icon)" />
</span>
<span class="entry-name">{{ item.title }} </span>
</li>
</ul>
</div>
<div class="platform-panel-item">
<div class="icon"><img src="@/assets/images/platform/icon-zw.png" /></div>
<b>农业产业政务服务平台</b>
<ul class="entry">
<li v-for="item in rightApps" :key="item.name" @click="gotoPage(item)">
<span class="entry-icon">
<img :src="getAssetsFile(item.icon)" />
</span>
<span class="entry-name">{{ item.title }} </span>
</li>
</ul>
</div>
</div>
</div>
</template>
<script setup>
import { reactive } from 'vue';
const state = reactive({});
<script setup>
import { leftApps, rightApps, microApps } from '@/micro/app';
import actions from '@/micro/actions';
import { getAssetsFile } from '@/utils';
const gotoPage = (row) => {
const data = {};
const curentApp = microApps.find((item) => row.name === item.name);
actions.setGlobalState({
curentApp,
});
window.history.pushState({}, row.name, row.activeRule);
};
</script>
<style lang="scss" scoped>
.platform {
width: 100%;
height: 100%;
background-image: url('@/assets/images/platform/bg.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
&-title {
width: 1200px;
height: 156px;
margin: 0 auto 20px;
padding-top: 120px;
text-indent: -999rem;
background-image: url('@/assets/images/platform/title.png');
background-size: 100%;
background-repeat: no-repeat;
background-position: center;
}
&-panel {
width: 1200px;
margin: 0 auto;
box-sizing: border-box;
@include flex-row();
align-items: center;
justify-content: space-between;
&-item {
width: 480px;
margin: 0 40px;
text-align: center;
@include flex-column();
.icon {
width: 280px;
height: 280px;
margin: 0 auto 24px;
img {
width: 100%;
}
}
b {
line-height: 48px;
color: #fff;
font-size: 40px;
font-weight: normal;
}
.entry {
width: 100%;
height: 140px;
border-radius: 20px;
margin-top: 44px;
background-color: rgba(255, 255, 255, 0.3);
border: 2px solid rgba(255, 255, 255, 1);
color: #fff;
@include flex-row();
align-items: center;
&-icon {
width: 48px;
height: 48px;
margin: 0 auto 24px;
img {
width: 100%;
}
}
&-name {
font-size: 20px;
}
li {
@include flex-column();
flex: 1;
justify-content: center;
cursor: pointer;
}
}
}
}
}
</style>

View File

@ -2,9 +2,9 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/svg+xml" href="/logo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>EGGY TEAM</title>
<title>SUB-ADMIN</title>
</head>
<body>
<div id="app"></div>

BIN
sub-admin/public/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1260,7 +1260,7 @@ available-typed-arrays@^1.0.7:
dependencies:
possible-typed-array-names "^1.0.0"
axios@^1.6.5, axios@^1.6.8:
axios@^1.6.5:
version "1.7.9"
resolved "https://registry.npmmirror.com/axios/-/axios-1.7.9.tgz#d7d071380c132a24accda1b2cfc1535b79ec650a"
integrity sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==
@ -1614,11 +1614,6 @@ clone@^2.1.1:
resolved "https://registry.npmmirror.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f"
integrity sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==
clones@^1.2.0:
version "1.2.0"
resolved "https://registry.npmmirror.com/clones/-/clones-1.2.0.tgz#b34c872045446a9f264ccceb7731bca05c529b71"
integrity sha512-FXDYw4TjR8wgPZYui2LeTqWh1BLpfQ8lB6upMtlpDF6WlOOxghmTTxWyngdKTgozqBgKnHbTVwTE+hOHqAykuQ==
collapse-white-space@^1.0.2:
version "1.0.6"
resolved "https://registry.npmmirror.com/collapse-white-space/-/collapse-white-space-1.0.6.tgz#e63629c0016665792060dbbeb79c42239d2c5287"
@ -2109,7 +2104,7 @@ electron-to-chromium@^1.5.73:
resolved "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.5.83.tgz#3f74078f0c83e24bf7e692eaa855a998d1bec34f"
integrity sha512-LcUDPqSt+V0QmI47XLzZrz5OqILSMGsPFkDYus22rIbgorSvBYEFqq854ltTmUdHkY92FSdAAvsh4jWEULMdfQ==
element-plus@^2.7.1, element-plus@^2.7.2:
element-plus@^2.7.2:
version "2.9.3"
resolved "https://registry.npmmirror.com/element-plus/-/element-plus-2.9.3.tgz#9d44f9aa5a810009490ecb814052aed560d77bb0"
integrity sha512-6tSLp5XytDS4TMZ0P3aGZnr7MXTagfNycepNfIDitd9IgwM9y01+Ssu6mglNi8RiXYhek6LBWNOd/cvpIO12+w==
@ -4207,7 +4202,7 @@ mockjs@^1.1.0:
dependencies:
commander "*"
moment@^2.30.0, moment@^2.30.1:
moment@^2.30.1:
version "2.30.1"
resolved "https://registry.npmmirror.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae"
integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==
@ -5229,13 +5224,6 @@ safe-regex@^1.1.0:
resolved "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
safer-eval@^1.3.6:
version "1.3.6"
resolved "https://registry.npmmirror.com/safer-eval/-/safer-eval-1.3.6.tgz#ee51e3348c39fdc4117a47dfb4b69df56a2e40cf"
integrity sha512-DN9tBsZgtUOHODzSfO1nGCLhZtxc7Qq/d8/2SNxQZ9muYXZspSh1fO7HOsrf4lcelBNviAJLCxB/ggmG+jV1aw==
dependencies:
clones "^1.2.0"
sass@^1.70.0:
version "1.83.4"
resolved "https://registry.npmmirror.com/sass/-/sass-1.83.4.tgz#5ccf60f43eb61eeec300b780b8dcb85f16eec6d1"
@ -6530,20 +6518,7 @@ vue-router@^4.2.5:
dependencies:
"@vue/devtools-api" "^6.6.4"
vue3-custom-component@1.1.17:
version "1.1.17"
resolved "https://registry.npmmirror.com/vue3-custom-component/-/vue3-custom-component-1.1.17.tgz#2fc4b5d60405c36ab1047416ed74ff3dc63757e5"
integrity sha512-xsWxE0NiRDt61eEOQcSYVCxJFbW3+GyQ3mf9yj45rG0hsZfoPC+yZ3zOEb6Vf1RXCnZ2aT2k4i+MRzhM6iCqxw==
dependencies:
axios "^1.6.8"
echarts "^5.5.0"
element-plus "^2.7.1"
lodash "^4.17.21"
moment "^2.30.0"
safer-eval "^1.3.6"
vue "^3.4.26"
vue@^3.3.11, vue@^3.4.26:
vue@^3.3.11:
version "3.5.13"
resolved "https://registry.npmmirror.com/vue/-/vue-3.5.13.tgz#9f760a1a982b09c0c04a867903fc339c9f29ec0a"
integrity sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==