Commit abc1af9a by 前端

Merge branch 'v3.5.2' into 'master'

V3.5.2

See merge request !21
2 parents 2cacfe1e 29fc9111
$imgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/h5-posters/';
$v: '1.0.2';
$good-color: #ffd2b2;
.wrapper-good {
min-height: 100vh;
box-sizing: border-box;
padding-bottom: 100px;
background-image: linear-gradient(180deg, #f46538 0%, #f92b36 100%);
}
.banner {
position: relative;
img {
width: 100%;
height: 688px;
}
.header-box {
position: absolute;
top: 275px;
left: 50%;
width: 100%;
transform: translateX(-50%);
text-align: center;
.acitvity-box {
display: inline-block;
font-size: 26px;
padding: 6px 36px;
color: #FEEACE;
border-radius: 44px 44px 44px 44px;
background: linear-gradient(-180deg, rgba(253,243,219,100), rgba(252,234,180,100));
.activity-name {
font-size: 26px;
color: #FEEACE;
background-image: -webkit-linear-gradient(bottom,#dd0719,#ee4831,#f76a3e);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
}
}
.merchant-name {
text-align: center;
font-size: 22px;
color: #F7432B;
margin-top: 14px;
}
}
}
// 员工信息
.user-box {
position: relative;
.out-box {
width: calc(100% - 102px);
box-sizing: border-box;
// height: 719px;
margin: -100px 50px 0;
background-color: #FF8955;
border: 1px solid #FFD895;
border-radius: 10px;
padding: 16px;
}
.user-header {
position: absolute;
width: 100%;
height: 130px;
top: -28px;
}
.empty-bg {
width: 100%;
height: 624px; // 图片高度554 + 图片top: 70
}
.user-bg {
position: absolute;
left: 0;
top: 70px;
width: 100%;
height: 554px;
}
.inside-box {
width: 100%;
// height: 700px;
padding-bottom: 30px;
background-color: #FFF6DF;
border-radius: 10px;
}
.user-avatar {
position: absolute;
width: 160px;
height: 160px;
border-radius: 50%;
top: 188px;
left: 50%;
transform: translateX(-50%);
z-index: 1;
}
.user-info {
position: absolute;
top: 390px;
display: flex;
align-items: baseline;
justify-content: center;
width: calc(100% - 102px);
color: rgba(254, 234, 206, 1);
font-weight: 500;
font-size: 26px;
height: 40px;
background-image:-webkit-linear-gradient(bottom,#e73507,#f6721b,#f57300);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
.user-name {
color: rgba(254, 234, 206, 1);
font-weight: 600;
font-size: 32px;
margin: 0 16px;
max-width: 200px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.user-order {
position: absolute;
// bottom: 100px;
top: 460px;
left: 50%;
transform: translateX(-50%);
display: flex;
align-items: baseline;
justify-content: center;
font-size: 36px;
background-image:-webkit-linear-gradient(bottom,#e73507,#f6721b,#f57300);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
.order-value {
font-style: italic;
font-size: 120px;
padding: 0 20px;
font-weight: 600;
}
}
.order-number {
position: absolute;
top: 600px;
left: 50%;
transform: translateX(-50%);
width: 280px;
height: 27px;
display: flex;
justify-content: center;
align-items: center;
border-radius: 13.5px;
background: #fefaf1ff;
font-weight: 600;
.number {
font-size: 22px;
// color: #FEEACE;
background-image: -webkit-linear-gradient(top,#f76a3e,#ea382b,#dd0719);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
}
}
.shop-name {
font-size: 22px;
width: 100%;
color: #EE502C;
text-align: center;
line-height: 22px;
.name-item {
margin-bottom: 12px;
&:last-child {
margin-bottom: 0;
}
}
}
}
.ranking-box {
box-sizing: border-box;
width: calc(100% - 100px);
margin: 15px 50px;
padding: 16px;
border-radius: 10px 10px 10px 10px;
background: linear-gradient(-180deg, rgba(255,169,105,100), rgba(255,137,85,100));
.ranking-list {
width: calc(100% - 34px);
padding: 20px 17px;
border-radius: 10px 10px 10px 10px;
background: linear-gradient(-180deg, rgba(255,249,235,100), rgba(255,240,196,100));
.ranking-title {
display: flex;
justify-content: center;
align-items: center;
font-size: 20px;
height: 43px;
color: #A95E4A;
background-color: #FFEDD1;
border-radius: 21.5px;
}
.ranking-item {
display: flex;
align-items: baseline;
border-bottom: 2px solid #FDE7CF;
padding: 15px 0;
.ranking-index {
position: relative;
width: 67px;
height: 33px;
.ranking-medals {
position: absolute;
width: 40px;
height: 33px;
right: 0;
top: 0;
}
.ranking-number {
display: inline-flex;
justify-content: center;
align-items: center;
width: 40px;
height: 33px;
position: absolute;
right: 0;
top: 40%;
transform: translateY(-50%);
font-size: 20px;
color: #fff;
}
}
.ranking-bg {
position: relative;
width: 67px;
height: 33px;
// box-shadow: 0 2px 5px 0 #b34d0880,0 2px 0 0 #af621740;
.ranking-number {
display: inline-flex;
justify-content: center;
align-items: center;
width: 40px;
height: 33px;
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
font-size: 20px;
color: #666;
}
}
.user-content {
width: 100%;
color: #A95E4A;
margin-left: 20px;
padding-right: 20px;
.user-info {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
.user-left {
display: inline-flex;
align-items: center;
font-size: 20px;
}
.user-right {
font-size: 32px;
font-weight: 600;
}
.user-avatar {
width: 30px;
height: 30px;
margin-right: 14px;
}
}
.user-order {
display: flex;
.order-item {
width: 33.3%;
font-size: 20px;
border-right: 1px solid #A95E4A;
&:last-child {
border-right: 0;
text-align: right;
}
}
}
}
&:last-child {
border-bottom: 0;
}
}
}
}
.icon-bottom {
position: absolute;
bottom: 0;
width: 100%;
height: 115px;
}
.dj-logo {
position: absolute;
left: 50%;
bottom: 50px;
transform: translateX(-50%);
width: 205px;
height: 28px;
}
......@@ -22,7 +22,6 @@ $good-color: #ffd2b2;
// width: 100%;
box-sizing: border-box;
max-width: 425px;
white-space: nowrap;
padding: 0 15px;
white-space: nowrap;
overflow: hidden;
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-10-10 10:54:14
* @LastEditors: huyue
* @LastEditTime: 2023-02-08 15:31:08
* @LastEditTime: 2023-03-07 15:23:23
*/
import HelloWorld from 'comps/HelloWorld.vue'
......@@ -89,6 +89,14 @@ const staticRoutes = Object.freeze([
title: '膜业战报',
backgroundColor: '#FA6031'
}
},
{
path: '/dj/gladNews',
component: () => import('views/dj/gladNews.vue'),
meta: {
title: '产值喜报',
backgroundColor: '#FA6031'
}
}
])
export default staticRoutes
......@@ -3,11 +3,11 @@
* @Author: huyue
* @Date: 2022-10-10 10:54:14
* @LastEditors: huyue
* @LastEditTime: 2023-03-07 09:31:38
* @LastEditTime: 2023-03-09 16:22:33
*/
const fetchConfig = function (isEnv = true) {
return window.fetch('https://oss-config.dev.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/h5-config', {}).then(res => res.json())
// return window.fetch('https://oss-config.test.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/h5-config', {}).then(res => res.json())
// return window.fetch('https://oss-config.dev.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/h5-config', {}).then(res => res.json())
return window.fetch('https://oss-config.test.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/h5-config', {}).then(res => res.json())
}
// const $mockConfig = await fetchConfig()
export default fetchConfig
\ No newline at end of file
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-10-10 10:54:14
* @LastEditors: huyue
* @LastEditTime: 2023-03-07 10:33:10
* @LastEditTime: 2023-03-09 16:22:40
*/
const fetchConfig1 = function (isEnv = true) {
// return window.fetch('http://oss-config.dev.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/djposter-config', {}).then(res => res.json())
......
<!--
* @Description: 喜报
* @Author: huyue
* @Date: 2022-10-10 15:26:23
* @LastEditors: huyue
* @LastEditTime: 2023-03-13 17:02:29
-->
<template>
<div class="wrapper-good">
<div class="banner">
<img :src="getImageUrl('banner')" alt="" />
<div class="header-box">
<div class="acitvity-box">
<div class="activity-name">{{ data.dataInfo!.merchantName }}</div>
</div>
<!-- <div class="merchant-name">{{ data.dataInfo!.merchantName }}</div> -->
</div>
</div>
<div class="user-box">
<img
class="user-avatar"
:src="data.dataInfo!.staff!.avator || getImageUrl('icon-avatar')"
alt=""
/>
<div class="out-box">
<div class="inside-box">
<img class="user-bg" src="@/assets/images/dj/user-bg.png" alt="" />
<div class="user-info">
<span>{{
data.dataInfo!.staff!.staffJob == "其他"
? ""
: data.dataInfo!.staff!.staffJob
}}</span>
<div class="user-name">
{{ data.dataInfo!.staff!.staffName }}
</div>
为团队助力
</div>
<div class="user-order">
第
<div class="order-value">
{{ data.dataInfo!.merchantUpgradeCount }}
</div>
单
</div>
<div class="order-number">
<div class="number">升级金额 ¥{{ data.dataInfo!.totalPrice }}</div>
</div>
<!-- 定位模块脱离文档流,用一个空白块代替位置 -->
<div class="empty-bg"></div>
<div class="shop-name">
<div
class="name-item"
v-for="(i, ind) in data.dataInfo!.goodsNameList"
:key="ind"
>
{{ i }}
</div>
</div>
</div>
</div>
<img
class="user-header"
src="@/assets/images/dj/user-header.png"
alt=""
/>
</div>
<div class="ranking-box">
<div class="ranking-list">
<div class="ranking-title">员工产值排名</div>
<div
class="ranking-item"
v-for="(item, index) in data.dataInfo!.rankList"
:key="index"
>
<template v-if="index < 3">
<div class="ranking-index">
<img
class="ranking-medals"
:src="getImageUrl(data.medals![index])"
alt=""
/>
<span class="ranking-number">{{ index + 1 }}</span>
</div>
</template>
<template v-else>
<div class="ranking-bg">
<span class="ranking-number">{{ index + 1 }}</span>
</div>
</template>
<div class="user-content">
<div class="user-info">
<div class="user-left">
<img
class="user-avatar"
:src="item.avator || getImageUrl('icon-avatar')"
alt=""
/>
<div class="user-name">
{{ item.staffName }} ({{ item.staffJob }})
</div>
</div>
<div class="user-right">¥{{ item.orderMoney }}</div>
</div>
<div class="user-order">
<div class="order-item">
客单价 ¥{{ item.unitPricePerCustomer }}
</div>
<div class="order-item" style="text-align: center">
单量 {{ item.upgradeCount }}
</div>
<div class="order-item">转化率 {{ item.conversionRate }}%</div>
</div>
</div>
</div>
</div>
</div>
<img class="icon-bottom" :src="getImageUrl('icon-bottom')" alt="" />
<img class="dj-logo" src="@/assets/images/dj/dj-logo.png" alt="" />
</div>
</template>
<script lang="ts" setup>
import { reactive, onMounted, inject } from "vue";
import { djReq } from "../../utils/request";
import { useRoute } from "vue-router";
import { GladDataInfo, GladParams, GladData, StaffData } from "./interface";
const route = useRoute();
// 获取全局对象
const global: any = inject("global");
let query: GladParams = {};
const data = reactive<Partial<GladDataInfo>>({
medals: ["first", "second", "third"],
dataInfo: <GladData>{
staff: <StaffData>{},
},
});
const getInfo = async () => {
data.dataInfo = await djReq(
"dj.api.smarcarlife.staffDayReport.getSaGoodNewsData",
query
);
};
const getImageUrl = (name: any, path = "goodNews") => {
return new URL(`./${path}/${name}.png?v=${global.version}`, global.$imgUrl)
.href;
};
onMounted(() => {
if (route.query) {
query = route.query;
getInfo();
}
});
</script>
<style lang="scss" scoped>
@import "src/assets/styles/gladNews.scss";
</style>
......@@ -3,9 +3,9 @@
* @Author: huyue
* @Date: 2022-11-16 18:18:59
* @LastEditors: huyue
* @LastEditTime: 2023-03-01 15:56:02
* @LastEditTime: 2023-03-08 16:30:24
*/
export interface ReportInfo {
export interface ReportData {
time?: string;
todayOrderCount?: number;
todayOrderPrice?: number;
......@@ -13,8 +13,8 @@ export interface ReportInfo {
totalOrderPrice?: number;
}
export interface DataInfo {
reportInfo: ReportInfo;
query: Params
reportInfo: ReportData;
query: Params;
}
export interface Params {
merchantId?: number | string;
......@@ -25,9 +25,9 @@ export interface WarParams {
}
export interface WarDataInfo {
reportInfo: WarReportInfo
reportInfo: WarReportData
}
export interface WarReportInfo {
export interface WarReportData {
filmTimes?: number;
monthlyOrderMoneyTotal?: number;
monthlyOrderNum?: number;
......@@ -46,3 +46,40 @@ export interface OrderDetail {
orderMoney: Array<number>;
payDate: string;
}
// galdNews
export interface GladParams {
orderCode?: string;
}
export interface GladDataInfo {
medals: string[];
dataInfo: GladData;
}
export interface GladData {
rankList?: RankItem[];
goodsNameList?: string[];
totalPrice?: number;
merchantName?: string;
staff: StaffData;
merchantUpgradeCount: number;
}
export interface RankItem {
staffName: string;
staffJob: string;
avator: string;
upgradeCount: number;
notUpgradeCount: number;
orderMoney: number;
unitPricePerCustomer: number;
conversionRate: number;
}
export interface StaffData {
staffName: string;
staffJob: string;
avator: string;
upgradeCount: number;
notUpgradeCount: number;
orderMoney: number;
unitPricePerCustomer: number;
conversionRate: number;
}
\ No newline at end of file
......@@ -103,38 +103,7 @@ const global: any = inject("global");
let query: WarParams = {};
const data = reactive<Partial<WarDataInfo>>({
reportInfo: {
// yesterdayDate: "2023年02月14日 23:59:59",
// yesterdayOrderMoneyTotal: 5846,
// yesterdayOrderNum: 8,
// monthlyOrderMoneyTotal: 999999,
// monthlyOrderNum: 1200,
// filmTimes: 9999,
// experienceTotal: 80000,
// upgradeTotal: 180000,
// upgradeRate: "68%",
orderDetailList: [],
// {
// customerName: "张三",
// carTypeName: "比亚迪秦",
// goodsNameList: ["福膜太阳膜V70前档"],
// orderMoney: [1200],
// payDate: "02-14 16:10",
// },
// {
// customerName: "张三张三张三张三",
// carTypeName: "比亚迪秦比亚迪秦比亚迪秦比亚迪秦",
// goodsNameList: ["福膜太阳膜V70前档", "侧事故"],
// orderMoney: [1200, 10086],
// payDate: "02-14 16:10",
// },
// {
// customerName: "张三张三张三张三",
// carTypeName: "比亚迪秦比亚迪秦比亚迪秦比亚迪秦",
// goodsNameList: ["福膜太阳膜V70前档", "侧事故", "弗兰克家"],
// orderMoney: [1200, 10086, 1654652],
// payDate: "02-14 16:10",
// },
// ],
},
});
const getInfo = async () => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!