Commit 890b0fbb by 李伟康

Merge branch 'v1.0.0' of http://192.168.3.233:8090/app/sales-assist-mobile into v1.0.0

2 parents da497650 0be2eb11
<template> <template>
<view class="module-entry-grid"> <view :class="gridClass">
<view class="module-entry-grid__list"> <view class="module-entry-grid__list">
<view v-for="(item, index) in entryItems" <view v-for="(item, index) in entryItems"
:key="index" :key="index"
class="module-entry-grid__item" class="module-entry-grid__item"
:class="getItemKey(item) == activeKey ? 'module-entry-grid__item--active' : ''" :class="getItemClass(item)"
@click="onEntryClick(getItemKey(item))"> @click="onEntryClick(getItemKey(item))">
<image class="module-entry-grid__icon" <image class="module-entry-grid__icon"
mode="aspectFit" mode="aspectFit"
:src="getItemIconSrc(item)" /> :src="getItemIconSrc(item)" />
<text class="module-entry-grid__label">{{ getItemLabel(item) }}</text> <text :class="getLabelClass(item)">{{ getItemLabel(item) }}</text>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script setup lang="uts"> <script setup lang="uts">
import { computed } from "vue"; import { computed, type Ref } from "vue";
import { useOrientation } from "@/services/adapter/hooks/index.uts";
const props = defineProps<{ const props = defineProps<{
items: UTSJSONObject[] items: UTSJSONObject[]
...@@ -27,10 +29,24 @@ const emit = defineEmits<{ ...@@ -27,10 +29,24 @@ const emit = defineEmits<{
change: [key: string] change: [key: string]
}>(); }>();
const orientationHook = useOrientation();
const entryItems = computed((): UTSJSONObject[] => { const entryItems = computed((): UTSJSONObject[] => {
return props.items; return props.items;
}); });
const gridClass = computed((): string => {
const isPortraitRef = orientationHook.isPortrait as Ref<boolean>;
if (isPortraitRef.value == true) {
return "module-entry-grid";
}
const windowHeightRef = orientationHook.windowHeight as Ref<number>;
if (windowHeightRef.value <= 430) {
return "module-entry-grid module-entry-grid--landscape module-entry-grid--compact";
}
return "module-entry-grid module-entry-grid--landscape";
});
function getItemKey(item: UTSJSONObject): string { function getItemKey(item: UTSJSONObject): string {
const value = item["key"]; const value = item["key"];
return value != null ? `${value}` : ""; return value != null ? `${value}` : "";
...@@ -48,6 +64,18 @@ function getItemIconSrc(item: UTSJSONObject): string { ...@@ -48,6 +64,18 @@ function getItemIconSrc(item: UTSJSONObject): string {
return value != null ? `${value}` : ""; return value != null ? `${value}` : "";
} }
function isItemActive(item: UTSJSONObject): boolean {
return getItemKey(item) == props.activeKey;
}
function getItemClass(item: UTSJSONObject): string {
return isItemActive(item) ? "module-entry-grid__item--active" : "";
}
function getLabelClass(item: UTSJSONObject): string {
return isItemActive(item) ? "module-entry-grid__label module-entry-grid__label--active" : "module-entry-grid__label";
}
function onEntryClick(key: string): void { function onEntryClick(key: string): void {
if (key == props.activeKey) return; if (key == props.activeKey) return;
emit("change", key); emit("change", key);
...@@ -70,49 +98,94 @@ function onEntryClick(key: string): void { ...@@ -70,49 +98,94 @@ function onEntryClick(key: string): void {
min-height: 40px; min-height: 40px;
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: var(--module-entry-grid-list-direction, row); flex-direction: row;
flex-wrap: var(--module-entry-grid-list-wrap, nowrap); flex-wrap: nowrap;
align-items: stretch; align-items: stretch;
align-content: flex-start; align-content: flex-start;
box-sizing: border-box; box-sizing: border-box;
padding: var(--module-entry-grid-list-padding, 0px); padding: 0px;
} }
.module-entry-grid__item { .module-entry-grid__item {
width: var(--module-entry-grid-item-width, 88px); flex: 1;
min-height: 40px; min-height: 40px;
height: var(--module-entry-grid-item-height, 40px); height: 40px;
flex-shrink: 0; flex-shrink: 1;
display: flex; display: flex;
flex-direction: var(--module-entry-grid-item-direction, row); flex-direction: row;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border-radius: var(--module-entry-grid-item-radius, 7px); border-radius: 7px;
background-color: var(--module-entry-grid-item-bg, transparent); background-color: var(--module-entry-grid-item-bg, transparent);
box-sizing: border-box; box-sizing: border-box;
margin-right: var(--module-entry-grid-item-gap, 0px); margin-right: 0px;
margin-bottom: var(--module-entry-grid-item-bottom-gap, 0px); margin-bottom: 0px;
border-bottom: var(--module-entry-grid-item-border-bottom, 0px solid transparent);
} }
.module-entry-grid__item--active { .module-entry-grid__item--active {
background-color: var(--module-entry-grid-item-active-bg, #f6f9ff); background-color: var(--module-entry-grid-item-active-bg, #f6f9ff);
border-bottom: var(--module-entry-grid-active-border-bottom, var(--module-entry-grid-item-border-bottom, 0px solid transparent));
} }
.module-entry-grid__icon { .module-entry-grid__icon {
width: var(--module-entry-grid-icon-size, 16px); width: 15px;
height: var(--module-entry-grid-icon-size, 16px); height: 15px;
margin-right: var(--module-entry-grid-icon-margin-right, 4px); margin-right: 4px;
margin-bottom: var(--module-entry-grid-icon-margin-bottom, 0px); margin-bottom: 0px;
} }
.module-entry-grid__label { .module-entry-grid__label {
font-size: var(--module-entry-grid-label-size, 13px); font-size: 13px;
color: var(--module-entry-grid-label-color, #202939); color: var(--module-entry-grid-label-color, #202939);
font-weight: 400; font-weight: 400;
} }
.module-entry-grid__item--active .module-entry-grid__label { .module-entry-grid__label--active {
color: var(--tasks-primary, #2f6af7); color: var(--entry-grid-primary, var(--tasks-primary, #2f6af7));
font-weight: 600; font-weight: 600;
} }
.module-entry-grid--landscape .module-entry-grid__list {
flex-wrap: wrap;
padding: 22px 14px;
}
.module-entry-grid--landscape .module-entry-grid__item {
flex: 0 0 50%;
width: 50%;
height: 82px;
flex-direction: column;
border-radius: 8px;
margin-bottom: 16px;
}
.module-entry-grid--landscape .module-entry-grid__item--active {
background-color: #f6f9ff;
border-bottom: 0px solid transparent;
}
.module-entry-grid--landscape .module-entry-grid__icon {
width: 34px;
height: 34px;
margin-right: 0px;
margin-bottom: 8px;
}
.module-entry-grid--landscape .module-entry-grid__label {
font-size: 15px;
}
.module-entry-grid--compact .module-entry-grid__list {
padding: 18px 10px;
}
.module-entry-grid--compact .module-entry-grid__item {
height: 74px;
}
.module-entry-grid--compact .module-entry-grid__icon {
width: 30px;
height: 30px;
}
</style> </style>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
import { computed, onMounted, onShow, type Ref } from "vue"; import { computed, onMounted, onShow, type Ref } from "vue";
import SettingBox from "@/pages/person/SettingBox.uvue"; import SettingBox from "@/pages/person/SettingBox.uvue";
import { useOrientation } from "@/services/adapter/hooks/index.uts"; import { updateOrientation, useOrientation } from "@/services/adapter/hooks/index.uts";
import { requestRecordPermission } from "@/utils/permission.uts"; import { requestRecordPermission } from "@/utils/permission.uts";
import { storage } from "@/utils/storage.uts"; import { storage } from "@/utils/storage.uts";
import { hideNativeTabBar } from "@/utils/tabBarShell.uts"; import { hideNativeTabBar } from "@/utils/tabBarShell.uts";
...@@ -102,11 +102,13 @@ function onTabChange(name: string | number): void { ...@@ -102,11 +102,13 @@ function onTabChange(name: string | number): void {
} }
onMounted((): void => { onMounted((): void => {
updateOrientation(true);
requestRecordPermission(); requestRecordPermission();
hideNativeTabBar(); hideNativeTabBar();
}); });
onShow(() => { onShow(() => {
updateOrientation(true);
hideNativeTabBar(); hideNativeTabBar();
}); });
</script> </script>
......
...@@ -68,16 +68,20 @@ export const HOME_FRAME_TABS: TabItem[] = [ ...@@ -68,16 +68,20 @@ export const HOME_FRAME_TABS: TabItem[] = [
iconSrcActive: "/static/images/tabbar/tasks-active.png", iconSrcActive: "/static/images/tabbar/tasks-active.png",
iconSrcInactive: "/static/images/tabbar/tasks.png" iconSrcInactive: "/static/images/tabbar/tasks.png"
}, },
{
label: "报表",
icon: "home",
name: "Reports",
iconSrcActive: "/static/images/tabbar/home-active.png",
iconSrcInactive: "/static/images/tabbar/home.png"
}
]; ];
function reLaunchPage(pagesJsonPath: string): void { function reLaunchPage(pagesJsonPath: string): void {
const trimmed = pagesJsonPath.startsWith("/") ? pagesJsonPath.substring(1) : pagesJsonPath; const trimmed = pagesJsonPath.startsWith("/") ? pagesJsonPath.substring(1) : pagesJsonPath;
const withSlash = "/" + trimmed; const withSlash = "/" + trimmed;
uni.reLaunch({ uni.reLaunch({
url: withSlash, url: withSlash
fail: (_err: any) => {
uni.reLaunch({ url: trimmed });
}
}); });
} }
...@@ -119,6 +123,10 @@ export function navigateToTab(index: number, currentTabIndex: number): void { ...@@ -119,6 +123,10 @@ export function navigateToTab(index: number, currentTabIndex: number): void {
uni.navigateTo({ url: "/pages/common/orderEntry/index" }); uni.navigateTo({ url: "/pages/common/orderEntry/index" });
return; return;
} }
if (index == 4) {
switchTabPage("pages/reports/reports");
return;
}
} }
export function useHomeFrameTabbar(source: HomeFrameTabbarSource) { export function useHomeFrameTabbar(source: HomeFrameTabbarSource) {
......
...@@ -108,6 +108,13 @@ ...@@ -108,6 +108,13 @@
"navigationStyle": "custom", "navigationStyle": "custom",
"navigationBarTitleText": "录单" "navigationBarTitleText": "录单"
} }
},
{
"path": "pages/reports/reports",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "报表"
}
} }
], ],
...@@ -160,7 +167,13 @@ ...@@ -160,7 +167,13 @@
"text": "我的", "text": "我的",
"iconPath": "static/images/tabbar/study.png", "iconPath": "static/images/tabbar/study.png",
"selectedIconPath": "static/images/tabbar/study-active.png" "selectedIconPath": "static/images/tabbar/study-active.png"
} },
{
"pagePath": "pages/reports/reports",
"text": "报表",
"iconPath": "static/images/tabbar/home.png",
"selectedIconPath": "static/images/tabbar/home-active.png"
},
] ]
}, },
"uniIdRouter": {} "uniIdRouter": {}
......
<template>
<scroll-view
class="reports-scroll"
scroll-y="true"
:show-scrollbar="false">
<view class="reports-content">
<view class="reports-metric-grid">
<view v-for="(item, index) in currentMetrics"
:key="index"
class="reports-metric-card">
<text class="reports-metric-card__value"
:class="item.valueClass">{{ item.value }}</text>
<text class="reports-metric-card__label">{{ item.label }}</text>
<text class="reports-metric-card__trend"
:class="item.trendClass">{{ item.trend }}</text>
</view>
</view>
<view class="reports-chart-card">
<view class="reports-chart-title">
<text class="reports-chart-title__icon">📊</text>
<text class="reports-chart-title__text">月度趋势</text>
</view>
<view class="reports-chart-body">
<view v-for="(item, index) in chartItems"
:key="index"
class="reports-chart-item">
<view class="reports-chart-bar"
:class="item.heightClass + ' ' + item.colorClass"></view>
<text class="reports-chart-label">{{ item.month }}</text>
</view>
</view>
</view>
</view>
</scroll-view>
</template>
<script setup lang="uts">
import { computed } from "vue";
type ReportMetric = {
value: string
label: string
trend: string
valueClass: string
trendClass: string
}
type ChartItem = {
month: string
heightClass: string
colorClass: string
}
const props = defineProps<{
entryKey: string
}>();
const personalMetrics: ReportMetric[] = [
{
value: "¥4499",
label: "本月销售额",
trend: "↑ 12%",
valueClass: "reports-metric-card__value--blue",
trendClass: "reports-metric-card__trend--up"
},
{
value: "2",
label: "本月订单",
trend: "↑ 3单",
valueClass: "reports-metric-card__value--green",
trendClass: "reports-metric-card__trend--up"
},
{
value: "92分",
label: "最新质检分",
trend: "↑ 5分",
valueClass: "reports-metric-card__value--orange",
trendClass: "reports-metric-card__trend--up"
},
{
value: "68%",
label: "转化率",
trend: "↓ 3%",
valueClass: "reports-metric-card__value--red",
trendClass: "reports-metric-card__trend--down"
}
];
const storeMetrics: ReportMetric[] = [
{
value: "¥12.8万",
label: "本月销售额",
trend: "↑ 9%",
valueClass: "reports-metric-card__value--blue",
trendClass: "reports-metric-card__trend--up"
},
{
value: "36",
label: "本月订单",
trend: "↑ 8单",
valueClass: "reports-metric-card__value--green",
trendClass: "reports-metric-card__trend--up"
},
{
value: "89分",
label: "最新质检分",
trend: "↑ 3分",
valueClass: "reports-metric-card__value--orange",
trendClass: "reports-metric-card__trend--up"
},
{
value: "61%",
label: "转化率",
trend: "↑ 2%",
valueClass: "reports-metric-card__value--red",
trendClass: "reports-metric-card__trend--up"
}
];
const brandMetrics: ReportMetric[] = [
{
value: "¥38.6万",
label: "本月销售额",
trend: "↑ 15%",
valueClass: "reports-metric-card__value--blue",
trendClass: "reports-metric-card__trend--up"
},
{
value: "108",
label: "本月订单",
trend: "↑ 18单",
valueClass: "reports-metric-card__value--green",
trendClass: "reports-metric-card__trend--up"
},
{
value: "91分",
label: "最新质检分",
trend: "↑ 4分",
valueClass: "reports-metric-card__value--orange",
trendClass: "reports-metric-card__trend--up"
},
{
value: "66%",
label: "转化率",
trend: "↑ 5%",
valueClass: "reports-metric-card__value--red",
trendClass: "reports-metric-card__trend--up"
}
];
const summaryMetrics: ReportMetric[] = [
{
value: "¥52.4万",
label: "本月销售额",
trend: "↑ 11%",
valueClass: "reports-metric-card__value--blue",
trendClass: "reports-metric-card__trend--up"
},
{
value: "146",
label: "本月订单",
trend: "↑ 21单",
valueClass: "reports-metric-card__value--green",
trendClass: "reports-metric-card__trend--up"
},
{
value: "90分",
label: "最新质检分",
trend: "↑ 4分",
valueClass: "reports-metric-card__value--orange",
trendClass: "reports-metric-card__trend--up"
},
{
value: "64%",
label: "转化率",
trend: "↑ 3%",
valueClass: "reports-metric-card__value--red",
trendClass: "reports-metric-card__trend--up"
}
];
const chartItems: ChartItem[] = [
{ month: "1月", heightClass: "reports-chart-bar--h60", colorClass: "" },
{ month: "2月", heightClass: "reports-chart-bar--h46", colorClass: "reports-chart-bar--light" },
{ month: "3月", heightClass: "reports-chart-bar--h82", colorClass: "" },
{ month: "4月", heightClass: "reports-chart-bar--h56", colorClass: "reports-chart-bar--light" },
{ month: "5月", heightClass: "reports-chart-bar--h92", colorClass: "" },
{ month: "6月", heightClass: "reports-chart-bar--h72", colorClass: "reports-chart-bar--light" },
{ month: "7月", heightClass: "reports-chart-bar--h98", colorClass: "" }
];
const currentMetrics = computed((): ReportMetric[] => {
if (props.entryKey == "store") return storeMetrics;
if (props.entryKey == "brand") return brandMetrics;
if (props.entryKey == "summary") return summaryMetrics;
return personalMetrics;
});
</script>
<style scoped lang="scss">
@import "../styles/common.scss";
</style>
export type ReportEntryKey = "personal" | "store" | "brand" | "summary";
export const REPORT_ENTRY_CONFIGS: UTSJSONObject[] = [
{
key: "personal",
label: "个人",
iconSrc: "/static/images/tabbar/record.png",
activeIconSrc: "/static/images/tabbar/record-active.png"
} as UTSJSONObject,
{
key: "store",
label: "门店",
iconSrc: "/static/images/tabbar/record.png",
activeIconSrc: "/static/images/tabbar/record-active.png"
} as UTSJSONObject,
{
key: "brand",
label: "品牌",
iconSrc: "/static/images/tabbar/record.png",
activeIconSrc: "/static/images/tabbar/record-active.png"
} as UTSJSONObject,
{
key: "summary",
label: "汇总",
iconSrc: "/static/images/tabbar/record.png",
activeIconSrc: "/static/images/tabbar/record-active.png"
} as UTSJSONObject
];
<template>
<TabBarShell ref="shellRef"
:active-tab-index="4"
:page-vars="reportPageVars as UTSJSONObject">
<view class="reports-page">
<view class="reports-layout">
<view class="reports-entry-panel">
<EntryGrid
:items="reportEntryConfigs"
:active-key="activeEntryKey"
@change="onEntryChange" />
</view>
<view class="reports-content-panel">
<ReportOverview :entry-key="activeEntryKey" />
</view>
</view>
</view>
</TabBarShell>
</template>
<script setup lang="uts">
import { ref } from "vue";
import EntryGrid from "@/components/EntryGrid.uvue";
import TabBarShell from "@/components/TabBar/TabBarShell.uvue";
import ReportOverview from "./components/ReportOverview.uvue";
import { REPORT_ENTRY_CONFIGS, type ReportEntryKey } from "./constants/reportEntries.uts";
import reportPageVars from "./styles/index.vars.uts";
const shellRef = ref(null);
const reportEntryConfigs = REPORT_ENTRY_CONFIGS;
const activeEntryKey = ref<ReportEntryKey>("personal");
function onEntryChange(key: string): void {
activeEntryKey.value = key as ReportEntryKey;
}
</script>
<style scoped lang="scss">
@import "./styles/common.scss";
</style>
.reports-page {
width: 100%;
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
background-color: var(--reports-page-bg, #f3f5f9);
box-sizing: border-box;
overflow: hidden;
}
.reports-layout {
flex: 1;
min-width: 0;
min-height: 0;
display: flex;
flex-direction: var(--reports-layout-direction, column);
padding: var(--reports-layout-padding, 10px 0 0);
box-sizing: border-box;
overflow: hidden;
}
.reports-entry-panel {
flex: var(--reports-entry-flex, 0 0 auto);
width: var(--reports-entry-width, 100%);
height: var(--reports-entry-height, auto);
min-height: var(--reports-entry-min-height, 38px);
display: flex;
flex-direction: column;
background-color: var(--module-entry-grid-bg, #ffffff);
border-radius: var(--module-entry-grid-radius, 8px);
margin-right: var(--reports-entry-margin-right, 0px);
margin-bottom: var(--reports-entry-margin-bottom, 12px);
box-sizing: border-box;
overflow: hidden;
}
.reports-content-panel {
flex: 1;
min-width: 0;
min-height: 0;
display: flex;
flex-direction: column;
background-color: var(--reports-content-bg, transparent);
border: var(--reports-content-border, 0px solid transparent);
border-radius: var(--reports-content-radius, 0px);
padding: var(--reports-content-padding, 0px);
box-sizing: border-box;
overflow: hidden;
}
.reports-scroll {
flex: 1;
min-height: 0;
width: 100%;
}
.reports-content {
display: flex;
flex-direction: column;
padding-bottom: 16px;
box-sizing: border-box;
}
.reports-metric-grid {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
margin-bottom: var(--reports-metric-card-margin-bottom, 8px);
}
.reports-metric-card {
width: var(--reports-metric-card-width, 48.8%);
height: var(--reports-metric-card-height, 94px);
background-color: var(--reports-card-bg, #ffffff);
border-radius: 8px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
margin-bottom: 8px;
}
.reports-metric-card__value {
font-size: 27px;
line-height: 30px;
font-weight: 700;
}
.reports-metric-card__value--blue {
color: #2f6af7;
}
.reports-metric-card__value--green {
color: #16a34a;
}
.reports-metric-card__value--orange {
color: #ff9f1c;
}
.reports-metric-card__value--red {
color: #ef3e52;
}
.reports-metric-card__label {
margin-top: 4px;
font-size: 13px;
color: var(--reports-text-secondary, #8b97aa);
}
.reports-metric-card__trend {
margin-top: 3px;
font-size: 12px;
font-weight: 600;
}
.reports-metric-card__trend--up {
color: #16a34a;
}
.reports-metric-card__trend--down {
color: #ef3e52;
}
.reports-chart-card {
height: var(--reports-chart-height, 184px);
background-color: var(--reports-card-bg, #ffffff);
border-radius: 10px;
padding: 18px 18px 14px;
box-sizing: border-box;
display: flex;
flex-direction: column;
}
.reports-chart-title {
display: flex;
flex-direction: row;
align-items: center;
height: 24px;
}
.reports-chart-title__icon {
font-size: 15px;
margin-right: 6px;
}
.reports-chart-title__text {
font-size: 15px;
font-weight: 700;
color: var(--reports-text-primary, #111827);
}
.reports-chart-body {
flex: 1;
min-height: 0;
display: flex;
flex-direction: row;
align-items: flex-end;
justify-content: center;
margin-top: 6px;
}
.reports-chart-item {
width: var(--reports-chart-bar-width, 40px);
margin-right: var(--reports-chart-gap, 8px);
display: flex;
flex-direction: column;
align-items: center;
}
.reports-chart-item:last-child {
margin-right: 0px;
}
.reports-chart-bar {
width: 100%;
background-color: #2f6af7;
border-radius: 4px 4px 0 0;
}
.reports-chart-bar--light {
background-color: #4b83ee;
}
.reports-chart-bar--h46 {
height: 46px;
}
.reports-chart-bar--h56 {
height: 56px;
}
.reports-chart-bar--h60 {
height: 60px;
}
.reports-chart-bar--h72 {
height: 72px;
}
.reports-chart-bar--h82 {
height: 82px;
}
.reports-chart-bar--h92 {
height: 92px;
}
.reports-chart-bar--h98 {
height: 98px;
}
.reports-chart-label {
margin-top: 8px;
font-size: 12px;
color: #8490a4;
}
export default {
common: {
"--content-box-padding-side": "10px",
"--tasks-primary": "#2f6af7",
"--reports-primary": "#2f6af7",
"--reports-page-bg": "#f3f5f9",
"--reports-card-bg": "#ffffff",
"--reports-text-primary": "#111827",
"--reports-text-secondary": "#8b97aa"
},
portrait: {
"--reports-layout-direction": "column",
"--reports-layout-padding": "10px 0 0",
"--reports-entry-flex": "0 0 auto",
"--reports-entry-width": "100%",
"--reports-entry-height": "38px",
"--reports-entry-min-height": "38px",
"--reports-entry-margin-right": "0px",
"--reports-entry-margin-bottom": "12px",
"--reports-content-bg": "transparent",
"--reports-content-border": "0px solid transparent",
"--reports-content-radius": "0px",
"--reports-content-padding": "0px",
"--reports-metric-card-width": "48.8%",
"--reports-metric-card-height": "94px",
"--reports-metric-card-margin-bottom": "8px",
"--reports-chart-height": "184px",
"--reports-chart-bar-width": "40px",
"--reports-chart-gap": "8px"
},
landscape: {
"--content-box-padding-side": "12px",
"--reports-layout-direction": "row",
"--reports-layout-padding": "12px 0 12px",
"--reports-entry-flex": "0 0 auto",
"--reports-entry-width": "276px",
"--reports-entry-height": "100%",
"--reports-entry-min-height": "260px",
"--reports-entry-margin-right": "20px",
"--reports-entry-margin-bottom": "0px",
"--reports-content-bg": "#f7faff",
"--reports-content-border": "1px solid #e6edf8",
"--reports-content-radius": "16px",
"--reports-content-padding": "16px",
"--reports-metric-card-width": "23.5%",
"--reports-metric-card-height": "108px",
"--reports-metric-card-margin-bottom": "16px",
"--reports-chart-height": "220px",
"--reports-chart-bar-width": "54px",
"--reports-chart-gap": "18px"
},
resolutions: {
"landscape-816x393": {
"--reports-entry-width": "220px",
"--reports-entry-height": "100%",
"--reports-metric-card-height": "92px",
"--reports-chart-height": "176px",
"--reports-chart-bar-width": "42px",
"--reports-chart-gap": "12px"
}
}
}
...@@ -10,19 +10,19 @@ export const TASK_ENTRY_CONFIGS: UTSJSONObject[] = [ ...@@ -10,19 +10,19 @@ export const TASK_ENTRY_CONFIGS: UTSJSONObject[] = [
{ {
key: "study", key: "study",
label: "学习", label: "学习",
iconSrc: "/static/images/tabbar/study.png", iconSrc: "/static/images/tabbar/record.png",
activeIconSrc: "/static/images/tabbar/study-active.png" activeIconSrc: "/static/images/tabbar/record-active.png"
} as UTSJSONObject, } as UTSJSONObject,
{ {
key: "strategy", key: "strategy",
label: "策略", label: "策略",
iconSrc: "/static/images/home/scene-change.png", iconSrc: "/static/images/tabbar/record.png",
activeIconSrc: "/static/images/home/scene-change.png" activeIconSrc: "/static/images/tabbar/record-active.png"
} as UTSJSONObject, } as UTSJSONObject,
{ {
key: "review", key: "review",
label: "审阅", label: "审阅",
iconSrc: "/static/images/home/setting.png", iconSrc: "/static/images/tabbar/record.png",
activeIconSrc: "/static/images/home/setting.png" activeIconSrc: "/static/images/tabbar/record-active.png"
} as UTSJSONObject } as UTSJSONObject
]; ];
...@@ -8,9 +8,7 @@ export default { ...@@ -8,9 +8,7 @@ export default {
"--tasks-bg-page": "#f3f5f9", "--tasks-bg-page": "#f3f5f9",
"--tasks-bg-card": "#ffffff", "--tasks-bg-card": "#ffffff",
"--tasks-card-radius": "12px", "--tasks-card-radius": "12px",
"--tasks-segment-radius": "8px", "--tasks-segment-radius": "8px"
"--module-entry-grid-bg": "#ffffff",
"--module-entry-grid-radius": "8px"
}, },
portrait: { portrait: {
"--content-box-padding-side": "14px", "--content-box-padding-side": "14px",
...@@ -22,18 +20,6 @@ export default { ...@@ -22,18 +20,6 @@ export default {
"--tasks-entry-panel-min-height": "40px", "--tasks-entry-panel-min-height": "40px",
"--tasks-entry-panel-margin-right": "0px", "--tasks-entry-panel-margin-right": "0px",
"--tasks-entry-panel-margin-bottom": "12px", "--tasks-entry-panel-margin-bottom": "12px",
"--module-entry-grid-list-direction": "row",
"--module-entry-grid-list-wrap": "nowrap",
"--module-entry-grid-list-padding": "0px",
"--module-entry-grid-item-width": "88px",
"--module-entry-grid-item-height": "40px",
"--module-entry-grid-item-direction": "row",
"--module-entry-grid-item-gap": "0px",
"--module-entry-grid-item-bottom-gap": "0px",
"--module-entry-grid-icon-size": "15px",
"--module-entry-grid-icon-margin-right": "4px",
"--module-entry-grid-icon-margin-bottom": "0px",
"--module-entry-grid-label-size": "13px",
"--tasks-daily-form-padding": "16px", "--tasks-daily-form-padding": "16px",
"--tasks-daily-field-width": "48%", "--tasks-daily-field-width": "48%",
"--tasks-daily-textarea-height": "60px", "--tasks-daily-textarea-height": "60px",
...@@ -120,18 +106,6 @@ export default { ...@@ -120,18 +106,6 @@ export default {
"--tasks-entry-panel-min-height": "260px", "--tasks-entry-panel-min-height": "260px",
"--tasks-entry-panel-margin-right": "20px", "--tasks-entry-panel-margin-right": "20px",
"--tasks-entry-panel-margin-bottom": "0px", "--tasks-entry-panel-margin-bottom": "0px",
"--module-entry-grid-list-direction": "row",
"--module-entry-grid-list-wrap": "wrap",
"--module-entry-grid-list-padding": "22px 14px",
"--module-entry-grid-item-width": "33.33%",
"--module-entry-grid-item-height": "72px",
"--module-entry-grid-item-direction": "column",
"--module-entry-grid-item-gap": "0px",
"--module-entry-grid-item-bottom-gap": "16px",
"--module-entry-grid-icon-size": "28px",
"--module-entry-grid-icon-margin-right": "0px",
"--module-entry-grid-icon-margin-bottom": "8px",
"--module-entry-grid-label-size": "14px",
"--tasks-daily-form-padding": "20px", "--tasks-daily-form-padding": "20px",
"--tasks-daily-field-width": "48%", "--tasks-daily-field-width": "48%",
"--tasks-daily-textarea-height": "72px", "--tasks-daily-textarea-height": "72px",
...@@ -217,9 +191,6 @@ export default { ...@@ -217,9 +191,6 @@ export default {
"landscape-816x393": { "landscape-816x393": {
"--tasks-entry-panel-width": "220px", "--tasks-entry-panel-width": "220px",
"--tasks-entry-panel-height": "100%", "--tasks-entry-panel-height": "100%",
"--module-entry-grid-list-padding": "18px 10px",
"--module-entry-grid-item-height": "64px",
"--module-entry-grid-icon-size": "24px",
"--tasks-course-card-width": "46%", "--tasks-course-card-width": "46%",
"--tasks-course-card-min-width": "140px", "--tasks-course-card-min-width": "140px",
"--tasks-strategy-card-width": "100%", "--tasks-strategy-card-width": "100%",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!