Commit 2cacfe1e by 前端

Merge branch 'v3.5.0.1_fix' into 'master'

合并v3.5.0-0306线上代码

See merge request !16
2 parents f82db14d e36e34a2
...@@ -14,3 +14,20 @@ Since TypeScript cannot handle type information for `.vue` imports, they are shi ...@@ -14,3 +14,20 @@ Since TypeScript cannot handle type information for `.vue` imports, they are shi
2. Reload the VS Code window by running `Developer: Reload Window` from the command palette. 2. Reload the VS Code window by running `Developer: Reload Window` from the command palette.
You can learn more about Take Over mode [here](https://github.com/johnsoncodehk/volar/discussions/471). You can learn more about Take Over mode [here](https://github.com/johnsoncodehk/volar/discussions/471).
# 众筹 (crowdfunding)
* activited:已结束战报
* activiting:进行中战报
* goodNews:喜报
# 膨胀金 (/expansiongold)
* activited:已结束战报
* activiting:进行中战报
* goodNews:喜报
# saas+ 企微推送 (/sass)
...@@ -247,6 +247,7 @@ ...@@ -247,6 +247,7 @@
font-weight: 500; font-weight: 500;
color: #262525; color: #262525;
line-height: 32px; line-height: 32px;
padding-top: 11px;
.activty-flag { .activty-flag {
color: #ff363b; color: #ff363b;
font-size: 32px; font-size: 32px;
...@@ -259,7 +260,6 @@ ...@@ -259,7 +260,6 @@
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
line-height: 36px; line-height: 36px;
margin-top: 11px;
} }
} }
// 排行榜 // 排行榜
......
// 喜报
.wrapper-box {
font-size: 0;
}
.header-box {
position: relative;
.header-bg {
width: 100%;
}
.time-bg {
width: 435.9px;
height: 62px;
position: absolute;
left: 50%;
bottom: 18px;
transform: translateX(-50%);
}
.time {
position: absolute;
left: 50%;
bottom: 18px;
transform: translateX(-50%);font-weight: 600;
height: 60px;
line-height: 60px;
font-size: 26px;
color: #FFF2D0;
}
}
.content-box {
margin-top: -1px;
padding: 14px 16px 0;
font-size: 17px;
background-image: linear-gradient(180deg, #F36E23 0%, #EC3F26 100%);
.reel {
width: 726px;
height: 46px;
}
.content-bg {
margin-top: -7px;
background-image: url("@/assets/images/dj/content-bg.png");
background-repeat: repeat-y;
background-size: 726px 100%;
padding: 0 100px;
.content-list {
padding: 55px 6px 48px;
font-weight: 600;
font-size: 24px;
color: #493120;
border-bottom: 1px dashed #FD481B;
&:last-child {
border-bottom: none;
}
.content-item {
display: flex;
align-items: center;
margin-bottom: 32px;
&:last-child {
margin-bottom: 0;
}
.content-value {
display: flex;
align-items: center;
margin-left: 58px;
.number {
display: inline-block;
margin: 0 17px;
font-size: 48px;
color: #FC4614;
}
}
.price {
font-size: 48px;
color: #FC4614;
margin-left: 58px;
}
}
}
}
.logo {
display: flex;
width: 100%;
justify-content: center;
padding: 64px 0 100px;
img {
display: inline-block;
width: 216px;
height: 30px;
}
}
}
// 战报
.war-hearder {
position: relative;
width: 100%;
img {
width: 100%;
}
.header-time {
position: absolute;
right: 40px;
top: 60px;
font-size: 22px;
color: #FFF2D0;
border: 3px solid #FDD3A9;
border-radius: 24px;
padding: 0 16px;
line-height: 32px;
}
}
.war-box {
margin: 16px 46px 0;
background-image: linear-gradient(180deg, #FDECD2 1%, #FFE6C2 99%);
box-shadow: 0 10px 16px 4px rgba(229,54,16,0.60), inset 2px 2px 10px 0 #FFFFFF;
border-radius: 32px;
.order-item {
display: inline-block;
width: 50%;
text-align: center;
padding-top: 43px;
&.p-d {
padding-bottom: 48px;
}
.order-name {
display: inline-block;
width: 240px;
font-weight: 500;
font-size: 24px;
color: #CD5D26;
margin-bottom: 16px;
line-height: 44px;
background-image: linear-gradient(180deg, #FFDCB5 0%, #FED3BE 100%);
border-radius: 12px;
}
.order-value {
font-weight: 600;
font-size: 40px;
color: #7B3D32;
line-height: 56px;
}
}
}
.transform-box {
position: relative;
height: 432px;
.transform-title {
text-align: center;
img {
width: 280px;
height: 56px;
}
}
.funnel {
position: absolute;
top: 100px;
left: 132px;
img {
width: 440px;
height: 284px;
}
}
.funnel-label {
position: absolute;
left: 20px;
font-weight: 500;
font-size: 24px;
color: #CD5D26;
text-align: center;
width: 136px;
line-height: 40px;
background-image: linear-gradient(180deg, #FFDCB5 0%, #FED3BE 100%);
border-radius: 12px;
}
.foil {
top: 166px;
}
.experience {
top: 242px;
}
.deal {
top: 318px;
}
.funnel-value {
position: absolute;
width: 200px;
left: 255px;
text-align: center;
font-weight: 600;
font-size: 28px;
color: #7B3D32;
}
.foil-value {
top: 168px;
}
.experience-value {
top: 244px;
}
.deal-value {
top: 320px;
}
.order-transform {
position: absolute;
right: 48px;
bottom: 70px;
text-align: center;
font-weight: 600;
.order-rate {
font-size: 24px;
color: #F25D1E;
}
.order-value {
font-size: 40px;
color: #F25D1E;
}
}
}
.order-box {
.order-title {
text-align: center;
margin-bottom: 36px;
img {
width: 280px;
height: 56px;
}
}
.order-li {
box-sizing: border-box;
width: 100%;
padding: 0 12px 28px 32px;
.order-info {
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
font-weight: 400;
font-size: 26px;
color: #CD5D26;
padding-right: 20px;
margin-bottom: 8px;
.order-user {
display: flex;
align-items: center;
}
.user-name {
display: inline-block;
margin-right: 16px;
max-width: 130px;
text-overflow :ellipsis;
overflow : hidden;
white-space :nowrap;
}
.user-brand {
display: inline-block;
max-width: 266px;
text-overflow :ellipsis;
overflow : hidden;
white-space :nowrap;
}
}
.order-shop {
font-weight: 500;
font-size: 28px;
color: #7B3D32;
background-image: linear-gradient(180deg, #FFDCB5 0%, #FED3BE 100%);
border-radius: 12px;
padding: 16px;
.shop-item {
display: flex;
justify-content: space-between;
margin-top: 12px;
&:first-child {
margin-top: 0;
}
.shop-name {
width: 276px;
text-overflow :ellipsis;
overflow : hidden;
white-space :nowrap;
}
.shop-price {
font-weight: 600;
font-size: 32px;
}
}
}
}
}
.war-report {
position: relative;
padding-bottom: 220px;
}
.war-logo {
position: absolute;
bottom: 104px;
left: 50%;
transform: translateX(-50%);
}
.bg-footer {
position: absolute;
bottom: 40.94px;
width: 100%;
height: 126px;
}
.bg-center {
position: absolute;
left: 27px;
top: 722px;
width: 718px;
height: 540px;
}
$imgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/h5-posters/';
$v: '1.0.2';
$good-color: #ffd2b2;
.product-box {
top: 395px;
display: inline-block;
background: url("#{$imgUrl}goodNews/line-bg.png?v=#{$v}");
background-repeat: repeat-x;
background-size: 4px 57px;
width: auto;
// margin: 0 43px;
font-size: 23px;
color: $good-color;
line-height: 30px;
}
.product-name {
position: relative;
padding: 14px 0;
box-sizing: border-box;
div {
// width: 100%;
box-sizing: border-box;
max-width: 425px;
white-space: nowrap;
padding: 0 15px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.product-icon {
position: absolute;
width: 30px;
height: 57px;
}
.icon-left {
left: -29px;
top: 0;
}
.icon-right {
right: -29px;
top: 0;
}
.store-name {
top: 466px;
color: $good-color;
font-size: 22px;
font-weight: 500;
width: 100%;
text-align: center;
}
.employee-avatar {
top: 700px;
width: 124px;
height: 124px;
border-radius: 50%;
}
.ribbon {
top: 775px;
img {
width: 610px;
height: 70px;
}
&-content {
position: relative;
}
&-text {
display: flex;
bottom: 7px;
color: $good-color;
font-size: 22px;
height: 30px;
line-height: 30px;
span {
display: inline-block;
vertical-align: middle;
text-align: center;
}
span:first-child {
display: inline-block;
// transform: rotate(6deg);
}
span:last-child {
display: inline-block;
// transform: rotate(-6deg);
}
}
&-other-text {
display: flex;
justify-content: center;
align-items: baseline;
span {
display: inline-block;
max-width: 180px;
font-weight: 800;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
&-name {
flex: 1;
vertical-align: -webkit-baseline-middle;
// line-height: 46px;
padding: 0 12px;
font-weight: 800;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.ranking {
top: 1123px;
color: $good-color;
width: 405px;
background-color: #860a0f;
}
.sales {
display: flex;
align-items: baseline;
top: 850px;
color: $good-color;
font-size: 30px;
font-weight: 600;
// text-shadow: 0px 2px 5px rgba(50, 0, 0, 0.3);
div {
background-image: linear-gradient(-18deg, #ffb376 0%, #ffe6af 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.number {
display: inline-block;
font-size: 100px;
flex: 1;
padding: 0 16px;
font-weight: 800;
font-style: italic;
}
}
.table {
&-box {
display: inline-block;
padding-top: 4px;
font-size: 20px;
min-height: 300px;
}
&-header {
display: flex;
align-items: center;
height: 45px;
opacity: 0.7;
}
&-th,
&-td {
width: 20%;
text-align: center;
}
&-body {
width: 100%;
}
&-item {
display: flex;
align-items: center;
height: 40px;
margin-bottom: 16px;
background-color: #830e13;
border-radius: 20px;
}
// &-item:nth-child(odd) {
// background-color: #830e13;
// border-radius: 20px;
// }
&-avatar {
width: 30px;
height: 30px;
border-radius: 50%;
}
&-td {
&:first-child {
display: flex;
align-items: center;
justify-content: center;
}
position: relative;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.sales-number {
font-size: 32px;
font-weight: 600;
}
.first-ranking {
position: relative;
img {
width: 40px;
height: 33px;
}
.ranking-number {
color: #ffffff;
}
}
.ranking-bg {
width: 26px;
height: 26px;
background-color: #bf1c20;
border-radius: 50%;
}
.ranking-number {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.bg-top-box {
height: 1060px;
.bg-top {
width: 100%;
height: 100%;
}
}
.wrapper-bg {
position: relative;
background-color: #860a0f;
padding-bottom: 90px;
}
.wrapper-table {
// padding-top: 40px;
background: url("#{$imgUrl}goodNews/bg-line.png?v=#{$v}");
background-repeat: repeat-y;
background-size: 100% 10px;
text-align: center;
// margin-bottom: 90px;
margin-top: -1px;
.wrapper-header {
top: 1131px;
width: 100%;
img {
width: 100%;
}
}
.wrapper-footer {
width: 100%;
height: 110px;
img {
width: 100%;
height: 100%;
}
}
}
.table-bg {
background: url("@/assets/images/goodNews/ranking-line.png");
background-repeat: repeat-y;
background-size: 100% 10px;
}
.bg-footer {
width: 100%;
// position: relative;
// bottom: 0;
// left: 0;
// right: 0;
// height: 500px;
// z-index: -1;
.left-footer,
.right-footer {
width: 107px;
height: 500px;
position: absolute;
bottom: 0;
}
.left-footer {
left: 0;
}
.right-footer {
right: 0;
}
}
.long-ribbon {
position: absolute;
top: 222px;
width: 100%;
img {
width: 100%;
}
}
.left-ribbon {
position: absolute;
left: -4px;
top: 1070px;
width: 100%;
img {
width: 100%;
}
}
.right-ribbon {
position: absolute;
right: 0;
top: 1270px;
width: 100%;
img {
width: 100%;
}
}
.bottom-ribbon {
position: absolute;
bottom: 0;
height: 150px;
width: 100%;
img {
width: 100%;
height: 100%;
}
}
\ No newline at end of file \ No newline at end of file
...@@ -2,155 +2,160 @@ $imgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/h5-posters/'; ...@@ -2,155 +2,160 @@ $imgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/h5-posters/';
$v: '1.0.2'; $v: '1.0.2';
$good-color: #ffd2b2; $good-color: #ffd2b2;
.product-box { .wrapper-good {
top: 395px; min-height: 100vh;
display: inline-block;
background: url("#{$imgUrl}goodNews/line-bg.png?v=#{$v}");
background-repeat: repeat-x;
background-size: 4px 57px;
width: auto;
// margin: 0 43px;
font-size: 23px;
color: $good-color;
line-height: 30px;
}
.product-name {
position: relative;
padding: 14px 0;
box-sizing: border-box; box-sizing: border-box;
div { padding-bottom: 100px;
// width: 100%; background-image: linear-gradient(180deg, #f46538 0%, #f92b36 100%);
box-sizing: border-box;
max-width: 425px;
white-space: nowrap;
padding: 0 15px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.product-icon {
position: absolute;
width: 30px;
height: 57px;
}
.icon-left {
left: -29px;
top: 0;
}
.icon-right {
right: -29px;
top: 0;
}
.store-name {
top: 466px;
color: $good-color;
font-size: 22px;
font-weight: 500;
width: 100%;
text-align: center;
}
.employee-avatar {
top: 700px;
width: 124px;
height: 124px;
border-radius: 50%;
} }
.ribbon { .banner {
top: 775px; position: relative;
img { img {
width: 610px; width: 100%;
height: 70px; height: 688px;
}
&-content {
position: relative;
} }
&-text { .header-box {
display: flex; position: absolute;
bottom: 7px; top: 275px;
color: $good-color; left: 50%;
font-size: 22px; width: 100%;
height: 30px; transform: translateX(-50%);
line-height: 30px; text-align: center;
span { .acitvity-box {
display: inline-block; display: inline-block;
vertical-align: middle; font-size: 26px;
text-align: center; padding: 6px 30px;
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;
}
} }
span:first-child { .merchant-name {
display: inline-block; text-align: center;
// transform: rotate(6deg); font-size: 22px;
color: #F7432B;
margin-top: 14px;
} }
span:last-child { }
display: inline-block; }
// transform: rotate(-6deg); // 员工信息
.user-box {
position: relative;
width: 100%;
height: 719px;
margin-top: -120px;
background: url("@/assets/images/goodNews/user-bg.png") no-repeat;
background-size: 100%;
z-index: 1;
.user-avatar {
position: absolute;
width: 160px;
height: 160px;
border-radius: 50%;
top: 216px;
left: 50%;
transform: translateX(-50%);
}
.user-info {
position: absolute;
top: 420px;
display: flex;
align-items: baseline;
justify-content: center;
width: 100%;
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;
} }
} }
&-other-text { .user-order {
position: absolute;
bottom: 100px;
left: 50%;
transform: translateX(-50%);
display: flex; display: flex;
align-items: baseline;
justify-content: center; justify-content: center;
span { font-size: 36px;
display: inline-block; background-image:-webkit-linear-gradient(bottom,#e73507,#f6721b,#f57300);
max-width: 180px; -webkit-background-clip:text;
font-weight: 800; -webkit-text-fill-color:transparent;
white-space: nowrap; .order-value {
overflow: hidden; font-style: italic;
text-overflow: ellipsis; font-size: 120px;
padding: 0 20px;
} }
} }
&-name { }
flex: 1; .ranking-box {
vertical-align: -webkit-baseline-middle; box-sizing: border-box;
// line-height: 46px; width: calc(100% - 100px);
padding: 0 12px; margin: 40px 50px 0;
font-weight: 800; padding: 16px;
white-space: nowrap; border-radius: 10px 10px 10px 10px;
overflow: hidden; background: linear-gradient(-180deg, rgba(255,169,105,100), rgba(255,137,85,100));
text-overflow: ellipsis; .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));
.shop-title {
display: flex;
justify-content: center;
align-items: center;
font-size: 26px;
background-image:-webkit-linear-gradient(bottom,#e73507,#f6721b,#f57300);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
.icon-title {
width: 17px;
height: 10px;
}
.shop-name{
margin: 0 15px;
text-overflow :ellipsis;
overflow : hidden;
white-space :nowrap;
}
}
} }
} }
.ranking { .ranking {
top: 1123px;
color: $good-color; color: $good-color;
width: 405px; width: 100%;
background-color: #860a0f;
}
.sales {
display: flex;
align-items: baseline;
top: 850px;
color: $good-color;
font-size: 30px;
font-weight: 600;
// text-shadow: 0px 2px 5px rgba(50, 0, 0, 0.3);
div {
background-image: linear-gradient(-18deg, #ffb376 0%, #ffe6af 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.number {
display: inline-block;
font-size: 100px;
flex: 1;
padding: 0 16px;
font-weight: 800;
font-style: italic;
}
} }
.table { .table {
&-box { &-box {
display: inline-block; display: inline-block;
padding-top: 4px; padding-top: 20px;
font-size: 20px; font-size: 20px;
min-height: 300px; min-height: 300px;
} }
&-header { &-header {
display: flex; display: flex;
align-items: center; align-items: center;
height: 45px; height: 43px;
color: #A95E4A;
opacity: 0.7; font-weight: 500;
border-radius: 21.5px 21.5px 21.5px 21.5px;
background: rgba(255,237,209,1);
} }
&-th, &-th,
&-td { &-td {
...@@ -164,14 +169,12 @@ $good-color: #ffd2b2; ...@@ -164,14 +169,12 @@ $good-color: #ffd2b2;
display: flex; display: flex;
align-items: center; align-items: center;
height: 40px; height: 40px;
margin-bottom: 16px; color: #A95E4A;
background-color: #830e13; // margin-bottom: 16px;
height: 60px;
border: 1px solid rgba(253,231,207,1);
border-radius: 20px; border-radius: 20px;
} }
// &-item:nth-child(odd) {
// background-color: #830e13;
// border-radius: 20px;
// }
&-avatar { &-avatar {
width: 30px; width: 30px;
height: 30px; height: 30px;
...@@ -206,7 +209,7 @@ $good-color: #ffd2b2; ...@@ -206,7 +209,7 @@ $good-color: #ffd2b2;
.ranking-bg { .ranking-bg {
width: 26px; width: 26px;
height: 26px; height: 26px;
background-color: #bf1c20; background-color: #DF9866;
border-radius: 50%; border-radius: 50%;
} }
.ranking-number { .ranking-number {
...@@ -214,6 +217,7 @@ $good-color: #ffd2b2; ...@@ -214,6 +217,7 @@ $good-color: #ffd2b2;
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
color: #fff;
} }
.bg-top-box { .bg-top-box {
height: 1060px; height: 1060px;
...@@ -222,97 +226,9 @@ $good-color: #ffd2b2; ...@@ -222,97 +226,9 @@ $good-color: #ffd2b2;
height: 100%; height: 100%;
} }
} }
.wrapper-bg { .icon-bottom {
position: relative;
background-color: #860a0f;
padding-bottom: 90px;
}
.wrapper-table {
// padding-top: 40px;
background: url("#{$imgUrl}goodNews/bg-line.png?v=#{$v}");
background-repeat: repeat-y;
background-size: 100% 10px;
text-align: center;
// margin-bottom: 90px;
margin-top: -1px;
.wrapper-header {
top: 1131px;
width: 100%;
img {
width: 100%;
}
}
.wrapper-footer {
width: 100%;
height: 110px;
img {
width: 100%;
height: 100%;
}
}
}
.table-bg {
background: url("@/assets/images/goodNews/ranking-line.png");
background-repeat: repeat-y;
background-size: 100% 10px;
}
.bg-footer {
width: 100%;
// position: relative;
// bottom: 0;
// left: 0;
// right: 0;
// height: 500px;
// z-index: -1;
.left-footer,
.right-footer {
width: 107px;
height: 500px;
position: absolute;
bottom: 0;
}
.left-footer {
left: 0;
}
.right-footer {
right: 0;
}
}
.long-ribbon {
position: absolute;
top: 222px;
width: 100%;
img {
width: 100%;
}
}
.left-ribbon {
position: absolute;
left: -4px;
top: 1070px;
width: 100%;
img {
width: 100%;
}
}
.right-ribbon {
position: absolute;
right: 0;
top: 1270px;
width: 100%;
img {
width: 100%;
}
}
.bottom-ribbon {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
height: 150px;
width: 100%; width: 100%;
img { height: 115px;
width: 100%;
height: 100%;
}
} }
\ No newline at end of file \ No newline at end of file
/* /*
* @Description: * @Description:
* @Author: huyue * @Author: huyue
* @Date: 2022-10-10 10:54:14 * @Date: 2022-10-10 10:54:14
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2022-11-21 10:08:12 * @LastEditTime: 2023-03-07 10:21:50
*/ */
import { createApp } from 'vue' import { createApp } from 'vue'
import store from './store' import store from './store'
// import apis from './api/index' // import apis from './api/index'
import router, { setupRouter } from './router' import router, { setupRouter } from './router'
import App from './App.vue' import App from './App.vue'
import 'lib-flexible/flexible' import 'lib-flexible/flexible'
import 'utils/rem' import 'utils/rem'
import fetchConfig from './utils/config' import fetchConfig from './utils/config'
import VConsole from 'vconsole' import fetchConfig1 from './utils/config1'
import 'assets/styles/common.scss' import VConsole from 'vconsole'
const app = createApp(App) import 'assets/styles/common.scss'
let vConsole: object = {} const app = createApp(App)
import { components } from './libs/vant' let vConsole: object = {}
components.forEach(component => app.use(component)); import { components } from './libs/vant'
// 自动注册全局组件 components.forEach(component => app.use(component));
const modules = import.meta.globEager('./components/**/index.ts') // 自动注册全局组件
for (const path in modules) { const modules = import.meta.globEager('./components/**/index.ts')
app.use(modules[path].default) for (const path in modules) {
} app.use(modules[path].default)
fetchConfig().then(res => { }
app.provide('global', { fetchConfig().then(res => {
$imgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/h5-posters/', app.provide('global', {
version: res.version $imgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/h5-posters/',
}) version: res.version
localStorage.setItem('config', JSON.stringify(res)) })
// if (res.vconsole) vConsole = new VConsole() localStorage.setItem('config', JSON.stringify(res))
app.use(store) fetchConfig1().then(result => {
setupRouter(app) localStorage.setItem('config1', JSON.stringify(result))
router.isReady().then(() => { })
app.mount('#app') // if (res.vconsole) vConsole = new VConsole()
}) app.use(store)
}) setupRouter(app)
router.isReady().then(() => {
app.mount('#app')
})
})
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2022-10-10 10:54:14 * @Date: 2022-10-10 10:54:14
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2022-10-19 11:19:00 * @LastEditTime: 2023-02-08 15:31:08
*/ */
import HelloWorld from 'comps/HelloWorld.vue' import HelloWorld from 'comps/HelloWorld.vue'
...@@ -48,7 +48,47 @@ const staticRoutes = Object.freeze([ ...@@ -48,7 +48,47 @@ const staticRoutes = Object.freeze([
title: '订单补录', title: '订单补录',
backgroundColor: '#FFFFFF' backgroundColor: '#FFFFFF'
} }
},
// 膨胀金路由
{
path: '/gold/goodNews',
component: () => import('views/expansiongold/goodNews.vue'),
meta: {
title: '喜报',
backgroundColor: '#F8F6F5'
}
},
{
path: '/gold/activiting',
component: () => import('views/expansiongold/activiting.vue'),
meta: {
title: '进行中战报',
backgroundColor: '#FE3C41'
}
},
{
path: '/gold/activited',
component: () => import('views/expansiongold/activited.vue'),
meta: {
title: '已结束战报',
backgroundColor: '#FE3C41'
}
},
// dj园区店喜报战报
{
path: '/dj/goodNews',
component: () => import('views/dj/goodNews.vue'),
meta: {
title: '订单喜报'
}
},
{
path: '/dj/warReport',
component: () => import('views/dj/warReport.vue'),
meta: {
title: '膜业战报',
backgroundColor: '#FA6031'
}
} }
]) ])
export default staticRoutes export default staticRoutes
...@@ -3,10 +3,11 @@ ...@@ -3,10 +3,11 @@
* @Author: huyue * @Author: huyue
* @Date: 2022-10-10 10:54:14 * @Date: 2022-10-10 10:54:14
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2022-10-14 16:45:59 * @LastEditTime: 2023-03-07 09:31:38
*/ */
const fetchConfig = function (isEnv = true) { const fetchConfig = function (isEnv = true) {
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() // const $mockConfig = await fetchConfig()
export default fetchConfig export default fetchConfig
\ No newline at end of file \ No newline at end of file
/*
* @Description: 配置
* @Author: huyue
* @Date: 2022-10-10 10:54:14
* @LastEditors: huyue
* @LastEditTime: 2023-03-07 10:33:10
*/
const fetchConfig1 = function (isEnv = true) {
// return window.fetch('http://oss-config.dev.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/djposter-config', {}).then(res => res.json())
return window.fetch('https://oss-config.test.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/djposter-config', {}).then(res => res.json())
}
// const $mockConfig = await fetchConfig()
export default fetchConfig1
\ No newline at end of file \ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2022-08-23 11:04:56 * @Date: 2022-08-23 11:04:56
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2022-08-23 22:24:25 * @LastEditTime: 2023-02-07 15:14:49
*/ */
import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse, AxiosError } from 'axios' import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse, AxiosError } from 'axios'
import { Toast } from 'vant'; import { Toast } from 'vant';
...@@ -26,9 +26,9 @@ interface Config { ...@@ -26,9 +26,9 @@ interface Config {
sign: object, sign: object,
vconsole: boolean vconsole: boolean
} }
const config: Config = JSON.parse(options) const mockConfig: Config = JSON.parse(options)
const { response, request, sign, secret } = config const { response, request, sign, secret } = mockConfig
axios.defaults.baseURL = request.baseURL // axios.defaults.baseURL = request.baseURL
// 配置新建一个axios 实例 // 配置新建一个axios 实例
const service: AxiosInstance = axios.create({ const service: AxiosInstance = axios.create({
timeout: 50000, timeout: 50000,
...@@ -39,8 +39,9 @@ const service: AxiosInstance = axios.create({ ...@@ -39,8 +39,9 @@ const service: AxiosInstance = axios.create({
// 添加请求拦截器 // 添加请求拦截器
service.interceptors.request.use((config: AxiosRequestConfig) => { service.interceptors.request.use((config: AxiosRequestConfig) => {
let { data = {} } = config let { data = {}, domain } = config
data = createSign(Object.assign({}, sign, data), secret) data = createSign(Object.assign({}, sign, data), secret)
config.baseURL = mockConfig[domain].baseURL
if (config.method) { if (config.method) {
const method = config.method.toLowerCase() const method = config.method.toLowerCase()
if (method == 'get') { if (method == 'get') {
...@@ -57,10 +58,7 @@ service.interceptors.request.use((config: AxiosRequestConfig) => { ...@@ -57,10 +58,7 @@ service.interceptors.request.use((config: AxiosRequestConfig) => {
// 添加响应拦截器 // 添加响应拦截器
service.interceptors.response.use((r: AxiosResponse) => { service.interceptors.response.use((r: AxiosResponse) => {
const { data: res, config: { returnAll } } = r const { data: res, config: { returnAll } } = r
const { code_key, code_success_value, data_key = 'data', errId = 'errId',code_error_value, errId_logout_value } = response const { code_key, code_success_value, data_key = 'data', errId = 'errId', code_error_value, errId_logout_value } = response
// if (returnAll) {
// return res
// }
let codekey = Array.isArray(code_key) ? code_key.find(key => res.hasOwnProperty(key)) : code_key let codekey = Array.isArray(code_key) ? code_key.find(key => res.hasOwnProperty(key)) : code_key
let code = res[codekey] let code = res[codekey]
let errValue = res[errId] let errValue = res[errId]
......
/*
* @Description:
* @Author: huyue
* @Date: 2022-08-23 11:04:56
* @LastEditors: huyue
* @LastEditTime: 2023-03-07 10:24:47
*/
import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse, AxiosError } from 'axios'
import { Toast } from 'vant';
import qs from 'qs'
import { createSign } from './util'
const options: any = localStorage.getItem('config1')
interface Config {
response: {
'code_key': string,
'code_success_value': 0,
'data_key': string,
'errId_logout_value': string,
'errId'?: string,
'code_error_value': string
},
request: {
baseURL: string
},
secret: string,
sign: object,
vconsole: boolean
}
const mockConfig: Config = JSON.parse(options)
const { response, request, sign, secret } = mockConfig
// axios.defaults.baseURL = request.baseURL
// 配置新建一个axios 实例
const service: AxiosInstance = axios.create({
timeout: 50000,
headers: {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
}
})
// 添加请求拦截器
service.interceptors.request.use((config: AxiosRequestConfig) => {
let { data = {}, domain } = config
data = createSign(Object.assign({}, sign, data), secret)
config.baseURL = mockConfig[domain].baseURL
if (config.method) {
const method = config.method.toLowerCase()
if (method == 'get') {
config.params = data
} else if (method == 'post') {
config.data = qs.stringify(data)
}
}
return config
}, (error: AxiosError) => {
return Promise.reject(error)
})
// 添加响应拦截器
service.interceptors.response.use((r: AxiosResponse) => {
const { data: res, config: { returnAll } } = r
const { code_key, code_success_value, data_key = 'data', errId = 'errId', code_error_value, errId_logout_value } = response
let codekey = Array.isArray(code_key) ? code_key.find(key => res.hasOwnProperty(key)) : code_key
let code = res[codekey]
let errValue = res[errId]
// 特殊的code处理,可以增加
switch (code + '') {
case code_success_value + '':
if (returnAll) return res
break
case code_error_value + '':
if (errValue && errValue == errId_logout_value) {
localStorage.removeItem('sessionId')
const [href] = window.location.href.split('/#/')
location.href = `${href}/#/login`
}
Toast(res.message)
break
default:
Toast(res.message || res.msg || '出错了,请联系管理员')
break
}
if (returnAll) return res
return res[data_key]
}, error => {
Toast(error.message)
return Promise.reject(error)
})
export default service
\ No newline at end of file \ No newline at end of file
/*
* @Description:
* @Author: huyue
* @Date: 2022-12-06 16:17:36
* @LastEditors: huyue
* @LastEditTime: 2023-03-07 10:26:01
*/
import http from './http' import http from './http'
import http1 from './http1'
import { useUserStore } from '../store/user' import { useUserStore } from '../store/user'
const PATH = 'rop-scrm-shopmall/router' const PATH = 'rop-scrm-shopmall/router'
const DJPATH = 'rop-dj-smartcarlife/router'
const req: any = (url: string, data: any = {}, returnAll = false, method = 'POST', ) => { const req: any = (url: string, data: any = {}, returnAll = false, method = 'POST',) => {
let sessionId = useUserStore().getSession
// let sessionId = '2dfdf8ff-fe50-4b07-bfd4-bdaec96ad717'
// if (sessionId) data.loginSessionId = sessionId
data.method = url data.method = url
const options = { const options = {
domain: 'request',
url: PATH, url: PATH,
method, method,
data, data,
...@@ -15,5 +21,19 @@ const req: any = (url: string, data: any = {}, returnAll = false, method = 'POST ...@@ -15,5 +21,19 @@ const req: any = (url: string, data: any = {}, returnAll = false, method = 'POST
} }
return http(options) return http(options)
} }
const djReq: any = (url: string, data: any = {}, returnAll = false, method = 'POST',) => {
data.method = url
const options = {
domain: 'otherRequest',
url: DJPATH,
method,
data,
returnAll
}
return http1(options)
}
export default req
\ No newline at end of file \ No newline at end of file
export {
req,
djReq
}
\ No newline at end of file \ No newline at end of file
...@@ -896,7 +896,7 @@ ...@@ -896,7 +896,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, onMounted, reactive, nextTick, inject } from "vue"; import { ref, onMounted, reactive, nextTick, inject } from "vue";
import req from "../../utils/request"; import { req } from "../../utils/request";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import { DataInfo, Params, series } from "./activitingInterface"; import { DataInfo, Params, series } from "./activitingInterface";
import util from "../../utils/util"; import util from "../../utils/util";
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2022-10-11 17:41:38 * @Date: 2022-10-11 17:41:38
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2022-12-30 14:51:26 * @LastEditTime: 2023-02-24 11:36:27
--> -->
<template> <template>
<div v-show="!data.loading"> <div v-show="!data.loading">
...@@ -105,10 +105,13 @@ ...@@ -105,10 +105,13 @@
</div> </div>
<div class="box-activty"> <div class="box-activty">
<div class="activty-text"> <div class="activty-text">
活动已进行到第{{ data.activityInfo!.days }}天,已完成目标产值<span {{
class="activty-flag" data.activityInfo!.days! > 0
>{{ data.activityInfo!.volumeRate }}</span ? `活动已进行到第${data.activityInfo!.days}天`
> : "当前为活动预热期"
}},已完成目标产值<span class="activty-flag">{{
data.activityInfo!.volumeRate
}}</span>
</div> </div>
<div class="activty-tip"> <div class="activty-tip">
{{ {{
...@@ -398,7 +401,7 @@ ...@@ -398,7 +401,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, reactive, onMounted, nextTick, inject } from "vue"; import { ref, reactive, onMounted, nextTick, inject } from "vue";
import req from "../../utils/request"; import { req } from "../../utils/request";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import { DataInfo, Params } from "./activitingInterface"; import { DataInfo, Params } from "./activitingInterface";
const route = useRoute(); const route = useRoute();
......
...@@ -3,145 +3,95 @@ ...@@ -3,145 +3,95 @@
* @Author: huyue * @Author: huyue
* @Date: 2022-10-10 15:26:23 * @Date: 2022-10-10 15:26:23
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2022-12-30 14:39:44 * @LastEditTime: 2023-02-15 14:43:24
--> -->
<template> <template>
<div class="bg-top-box"> <div class="wrapper-good">
<img class="bg-top" :src="getImageUrl('bg-top')" alt="" /> <div class="banner">
<div class="product-box x-center"> <img :src="getImageUrl('banner')" alt="" />
<div class="product-name"> <div class="header-box">
<img <div class="acitvity-box">
class="icon-left product-icon" <div class="activity-name">{{ data.storeInfo!.activityName }}</div>
:src="getImageUrl('icon-left')"
alt=""
/>
<div>{{ data.storeInfo!.goodsName }}</div>
<img
class="icon-right product-icon"
:src="getImageUrl('icon-right')"
alt=""
/>
</div>
</div>
<div class="store-name x-center">{{ data.storeInfo!.merchantName }}</div>
<img
class="employee-avatar x-center"
:src="data.storeInfo!.avatar || getImageUrl('icon-avatar')"
alt=""
/>
<div class="ribbon x-center">
<div class="ribbon-content">
<img :src="getImageUrl('ribbon')" alt="" />
<div class="ribbon-text x-center">
<template v-if="data.storeInfo!.type == 2">
{{ data.storeInfo!.department }}
<span class="ribbon-name">{{ data.storeInfo!.name }}</span>
为团队助力
</template>
<template v-if="data.storeInfo!.type == 1">
<div class="ribbon-other-text">
<span>{{ data.storeInfo!.name }}</span
>为团队助力
</div>
</template>
</div> </div>
<div class="merchant-name">{{ data.storeInfo!.merchantName }}</div>
</div> </div>
</div> </div>
<div class="sales x-center"> <div class="user-box">
<div>第</div> <img
<div class="number">{{ data.storeInfo!.orderCount }}</div> class="user-avatar"
<div>单</div> :src="data.storeInfo!.avatar || getImageUrl('icon-avatar')"
alt=""
/>
<div class="user-info">
<span v-if="data.storeInfo!.type == 2">{{
data.storeInfo!.department
}}</span>
<div class="user-name">{{ data.storeInfo!.name }}</div>
为团队助力
</div>
<div class="user-order">
第
<div class="order-value">{{ data.storeInfo!.orderCount }}</div>
单
</div>
</div> </div>
</div> <div
class="ranking-box"
<div class="wrapper-bg"> v-for="(i, ind) in data.storeInfo!.orderRankList"
<div class="wrapper-table"> :key="ind"
<div class="table-bg"> >
<div class="wrapper-header"> <div class="ranking-list">
<img src="@/assets/images/goodNews/ranking-header.png" alt="" /> <div class="shop-title">
<img class="icon-title" :src="getImageUrl('icon-title')" alt="" />
<div class="shop-name">{{ i.goodsName }}</div>
<img class="icon-title" :src="getImageUrl('icon-title')" alt="" />
</div> </div>
<div class="wrapper-content"> <div class="table-box ranking">
<div class="table-box ranking"> <div class="table-header">
<div class="table-header"> <div class="table-th">排名</div>
<div class="table-th">排名</div> <div class="table-th">头像</div>
<div class="table-th">头像</div> <div class="table-th">部门</div>
<div class="table-th">部门</div> <div class="table-th">姓名</div>
<div class="table-th">姓名</div> <div class="table-th">单量</div>
<div class="table-th">单量</div> </div>
</div> <div class="table-body">
<div class="table-body"> <div class="table-item" v-for="(j, index) in i.rank" :key="index">
<div <template v-if="index < 3">
class="table-item" <div class="table-td first-ranking">
v-for="(item, index) in data.storeInfo!.orderRankList" <img :src="getImageUrl(data.medals![index])" alt="" />
:key="index" <span class="ranking-number" style="top: 44%">{{
> index + 1
<template v-if="index < 3"> }}</span>
<div class="table-td first-ranking"> </div>
<img :src="getImageUrl(data.medals![index])" alt="" /> </template>
<span class="ranking-number" style="top: 44%">{{ <template v-else>
index + 1
}}</span>
</div>
</template>
<template v-else>
<div class="table-td">
<span class="ranking-bg"></span>
<span class="ranking-number">{{ index + 1 }}</span>
</div>
</template>
<div class="table-td"> <div class="table-td">
<img <span class="ranking-bg"></span>
class="table-avatar" <span class="ranking-number">{{ index + 1 }}</span>
:src="item.avator || getImageUrl('icon-avatar')"
alt=""
/>
</div> </div>
<div class="table-td">{{ item.department }}</div> </template>
<div class="table-td">{{ item.name }}</div> <div class="table-td">
<div class="table-td sales-number">{{ item.orderCount }}</div> <img
class="table-avatar"
:src="j.avator || getImageUrl('icon-avatar')"
alt=""
/>
</div> </div>
<div class="table-td">{{ j.department }}</div>
<div class="table-td">{{ j.name }}</div>
<div class="table-td sales-number">{{ j.orderCount }}</div>
</div> </div>
</div> </div>
</div> </div>
<div class="wrapper-footer">
<img src="@/assets/images/goodNews/ranking-footer.png" alt="" />
</div>
</div>
<div class="bg-footer">
<img
class="left-footer"
src="@/assets/images/goodNews/left-footer.jpg"
alt=""
/>
<img
class="right-footer"
src="@/assets/images/goodNews/right-footer.png"
alt=""
/>
</div> </div>
</div> </div>
</div> <img class="icon-bottom" :src="getImageUrl('icon-bottom')" alt="" />
<div class="long-ribbon">
<img src="@/assets/images/goodNews/long-ribbon.png" alt="" />
</div>
<div class="left-ribbon">
<img :src="getImageUrl('left-ribbon')" alt="" />
</div>
<div class="right-ribbon">
<img :src="getImageUrl('right-ribbon')" alt="" />
</div>
<div class="bottom-ribbon">
<img src="@/assets/images/goodNews/bottom-ribbon.png" alt="" />
</div>
<div class="logo x-center">
<img :src="getImageUrl('logo', 'common')" alt="" />
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { reactive, onMounted, inject } from "vue"; import { reactive, onMounted, inject } from "vue";
import req from "../../utils/request"; import { req } from "../../utils/request";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import { DataInfo, Params } from "./interface"; import { DataInfo, Params } from "./interface";
const route = useRoute(); const route = useRoute();
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2022-11-16 18:18:59 * @Date: 2022-11-16 18:18:59
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2022-11-21 10:11:27 * @LastEditTime: 2023-02-14 14:24:26
*/ */
export interface OrderInfo { export interface OrderInfo {
avator: string; avator: string;
...@@ -11,15 +11,20 @@ export interface OrderInfo { ...@@ -11,15 +11,20 @@ export interface OrderInfo {
name: string; name: string;
orderCount: number; orderCount: number;
} }
export interface OrderRank {
goodsName: string;
rank: OrderInfo[]
}
export interface StoreInfo { export interface StoreInfo {
merchantName?: string; merchantName?: string;
goodsName?: string; goodsName?: string;
orderCount?: string; orderCount?: string;
name?: string; name?: string;
orderRankList?: OrderInfo[];
department?: string; department?: string;
avatar?: string; avatar?: string;
type?: number; type?: number;
activityName?: string;
orderRankList?: OrderRank[]
} }
export interface DataInfo { export interface DataInfo {
medals: string[]; medals: string[];
......
<!--
* @Description:
* @Author: huyue
* @Date: 2023-02-07 16:36:16
* @LastEditors: huyue
* @LastEditTime: 2023-03-01 18:17:43
-->
<template>
<div class="wrapper-box">
<div class="header-box">
<img class="header-bg" :src="getImageUrl('header-bg')" alt="" />
<img class="time-bg" :src="getImageUrl('time-bg')" alt="" />
<div class="time">{{ data.reportInfo!.time }}</div>
</div>
<div class="content-box">
<img class="reel" :src="getImageUrl('reel')" alt="" />
<div class="content-bg">
<div class="content-list">
<div class="content-item">
今日单量
<div class="content-value">
第
<span class="number">{{ data.reportInfo!.todayOrderCount }}</span>
单
</div>
</div>
<div class="content-item">
订单收款
<div class="price">¥{{ data.query?.orderMoney }}</div>
</div>
</div>
<div class="content-list">
<div class="content-item">
累计单量
<div class="content-value">
第
<span class="number">{{ data.reportInfo!.totalOrderCount }}</span>
单
</div>
</div>
<div class="content-item">
累计产值
<div class="price">¥{{ data.reportInfo!.totalOrderPrice }}</div>
</div>
</div>
</div>
<img class="reel" :src="getImageUrl('reel')" alt="" />
<div class="logo">
<img :src="getImageUrl('logo')" alt="" />
</div>
</div>
</div>
</template>
<script lang="ts" setup>
import { reactive, onMounted, inject } from "vue";
import { djReq } from "../../utils/request";
import { useRoute } from "vue-router";
import { DataInfo } from "./interface";
const route = useRoute();
// 获取全局对象
const global: any = inject("global");
const data = reactive<Partial<DataInfo>>({
reportInfo: {},
query: {},
});
const getInfo = async () => {
const query = {
merchantId: data.query?.merchantId,
};
data.reportInfo = await djReq(
"dj.api.smartcarlife.orderReport.stat.byGoodsNews",
query
);
};
const getImageUrl = (name: any, path = "dj") => {
return new URL(`./${path}/${name}.png?v=${global.version}`, global.$imgUrl)
.href;
};
onMounted(() => {
if (route.query) {
data.query = route.query;
getInfo();
}
});
</script>
<style lang="scss" scoped>
@import "src/assets/styles/dj.scss";
</style>
/*
* @Description:
* @Author: huyue
* @Date: 2022-11-16 18:18:59
* @LastEditors: huyue
* @LastEditTime: 2023-03-01 15:56:02
*/
export interface ReportInfo {
time?: string;
todayOrderCount?: number;
todayOrderPrice?: number;
totalOrderCount?: number;
totalOrderPrice?: number;
}
export interface DataInfo {
reportInfo: ReportInfo;
query: Params
}
export interface Params {
merchantId?: number | string;
orderMoney?: string;
}
export interface WarParams {
yqMerchantId?: number | string;
}
export interface WarDataInfo {
reportInfo: WarReportInfo
}
export interface WarReportInfo {
filmTimes?: number;
monthlyOrderMoneyTotal?: number;
monthlyOrderNum?: number;
upgradeTotal?: number;
yesterdayDate?: string;
yesterdayOrderMoneyTotal?: number;
yesterdayOrderNum?: number;
experienceTotal?: number;
upgradeRate?: string;
orderDetailList?: OrderDetail[]
}
export interface OrderDetail {
customerName: string;
carTypeName: string;
goodsNameList: Array<string>;
orderMoney: Array<number>;
payDate: string;
}
<template>
<div class="wrapper-box war-report">
<div class="war-hearder">
<img :src="getImageUrl('war-header')" alt="" />
<div class="header-time">
数据生成时间为{{ data.reportInfo!.yesterdayDate }}
</div>
</div>
<div class="war-box">
<div class="order-item">
<div class="order-name">昨日营业额/元</div>
<div class="order-value">
¥{{ data.reportInfo!.yesterdayOrderMoneyTotal || 0 }}
</div>
</div>
<div class="order-item">
<div class="order-name">昨日单量/单</div>
<div class="order-value">
{{ data.reportInfo!.yesterdayOrderNum || 0 }}
</div>
</div>
<div class="order-item p-d">
<div class="order-name">本月累计营业额/元</div>
<div class="order-value">
¥{{ data.reportInfo!.monthlyOrderMoneyTotal || 0 }}
</div>
</div>
<div class="order-item p-d">
<div class="order-name">本月累计单量/单</div>
<div class="order-value">
{{ data.reportInfo!.monthlyOrderNum || 0 }}
</div>
</div>
</div>
<div class="war-box transform-box">
<div class="transform-title">
<img :src="getImageUrl('transform-title')" alt="" />
</div>
<div class="funnel">
<img :src="getImageUrl('funnel')" alt="" />
</div>
<div class="funnel-label foil">贴膜台次</div>
<div class="funnel-label experience">体验量</div>
<div class="funnel-label deal">成交量</div>
<div class="funnel-value foil-value">
{{ data.reportInfo!.filmTimes || 0 }}
</div>
<div class="funnel-value experience-value">
{{ data.reportInfo!.experienceTotal || 0 }}
</div>
<div class="funnel-value deal-value">
{{ data.reportInfo!.upgradeTotal || 0 }}
</div>
<div class="order-transform">
<div class="order-value">{{ data.reportInfo!.upgradeRate || 0 }}%</div>
<div class="order-rate">订单转化率</div>
</div>
</div>
<div
class="war-box order-box"
v-if="data.reportInfo!.orderDetailList!.length"
>
<div class="order-title">
<img :src="getImageUrl('order-title')" alt="" />
</div>
<div
class="order-li"
v-for="(item,index) in data.reportInfo!.orderDetailList"
:key="index"
>
<div class="order-info">
<div class="order-user">
<span class="user-name">{{ item.customerName }}</span
><span class="user-brand">{{ item.carTypeName }}</span>
</div>
<div style="white-space: nowrap">{{ item.payDate }}</div>
</div>
<div class="order-shop">
<div
class="shop-item"
v-for="(i, idx) in item.goodsNameList"
:key="idx"
>
<div class="shop-name">{{ i }}</div>
<div class="shop-price">¥{{ item.orderMoney[idx] }}</div>
</div>
</div>
</div>
</div>
<img class="war-logo" :src="getImageUrl('logo')" alt="" />
<img class="bg-footer" :src="getImageUrl('bg-footer')" alt="" />
<img class="bg-center" :src="getImageUrl('bg-center')" alt="" />
</div>
</template>
<script lang="ts" setup>
import { reactive, onMounted, inject } from "vue";
import { djReq } from "../../utils/request";
import { useRoute } from "vue-router";
import { WarParams, WarDataInfo, OrderDetail } from "./interface";
const route = useRoute();
// 获取全局对象
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 () => {
data.reportInfo = await djReq(
"dj.api.smartcarlife.orderSummary.getYqMerchantOrderReport",
query
);
};
const getImageUrl = (name: any, path = "dj") => {
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/dj.scss";
</style>
import exp from "constants";
/*
* @Description:
* @Author: huyue
* @Date: 2022-11-16 18:25:15
* @LastEditors: huyue
* @LastEditTime: 2023-02-23 17:00:43
*/
export interface Params {
activityId?: number | string;
}
export interface ActivitedInfo {
predictVolume: number
conversionRate: string
orderCount: number
activityName: string
shareCount: number
goodsCategory: number,
goodsName: string,
merchantName: string,
departmentOrderRank: departmentOrder[],
departmentRank: []
userOrderRank: userOrder[],
userRank: []
qrcodeUrl: string,
coverRate: string,
seriesRank: series[],
touchVisitorCount: [],
touchOrderCount: [],
touchConversionRate: [],
workWechatMomentsRate: string,
workWechatShareRate: string,
coverRateValue: coverRate[],
workWechatRate: string,
wechatMomentsRate: string,
wechatShareRate: string,
WechatRate: string,
targetStock: number
fansCount: number
customerAssetSummary: string
volumeRate: string
volume: number | string
browseCount: number
volumeWan: number
signMerchantShareCount: number
signMerchantBrowseCount: number
signMerchantVisitorCount: number
signMerchantOrderCount: number
signMerchantProduceCount: number
days: number,
produceReportSummary: string
}
export interface departmentOrder {
department: string,
orderCount: number,
volume: number
}
export interface userOrder {
avator: string
name: string
orderCount: number
volume: number
}
export interface series {
name: string;
rate: string;
}
export interface coverRate {
name: string
value: number
}
export interface Header {
name: string,
prop: string,
}
export interface DataInfo {
currentValue: string
colorList: string[]
seriesRankColor: string[]
widthList: number[]
custemData: number[]
total: number
activitedInfo: Partial<ActivitedInfo>
activityInfo: Partial<ActivitedInfo>
departmentHeader: Header[]
orderHeader: Header[]
loading: boolean
}
<!--
* @Description: 喜报
* @Author: huyue
* @Date: 2022-10-10 15:26:23
* @LastEditors: huyue
* @LastEditTime: 2023-02-20 14:20:10
-->
<template>
<div class="bg-top-box">
<img class="bg-top" :src="getImageUrl('bg-top')" alt="" />
<div class="product-box x-center">
<div class="product-name">
<img
class="icon-left product-icon"
:src="getImageUrl('icon-left')"
alt=""
/>
<div>膨胀金</div>
<img
class="icon-right product-icon"
:src="getImageUrl('icon-right')"
alt=""
/>
</div>
</div>
<div class="store-name x-center">{{ data.storeInfo!.merchantName }}</div>
<img
class="employee-avatar x-center"
:src="data.storeInfo!.avatar || getImageUrl('icon-avatar')"
alt=""
/>
<div class="ribbon x-center">
<div class="ribbon-content">
<img :src="getImageUrl('ribbon')" alt="" />
<div class="ribbon-text x-center">
<template v-if="data.storeInfo!.type == 2">
{{ data.storeInfo!.department }}
<span class="ribbon-name">{{ data.storeInfo!.name }}</span>
为团队助力
</template>
<template v-if="data.storeInfo!.type == 1">
<div class="ribbon-other-text">
<span>{{ data.storeInfo!.name }}</span
>为团队助力
</div>
</template>
</div>
</div>
</div>
<div class="sales x-center">
<div>第</div>
<div class="number">{{ data.storeInfo!.orderCount }}</div>
<div>单</div>
</div>
</div>
<div class="wrapper-bg">
<div class="wrapper-table">
<div class="table-bg">
<div class="wrapper-header">
<img :src="getImageUrl('ranking-header')" alt="" />
</div>
<div class="wrapper-content">
<div class="table-box ranking">
<div class="table-header">
<div class="table-th">排名</div>
<div class="table-th">头像</div>
<div class="table-th">部门</div>
<div class="table-th">姓名</div>
<div class="table-th">单量</div>
</div>
<div class="table-body">
<div
class="table-item"
v-for="(item, index) in data.storeInfo!.orderRankList![0]!.rank"
:key="index"
>
<template v-if="index < 3">
<div class="table-td first-ranking">
<img :src="getImageUrl(data.medals![index])" alt="" />
<span class="ranking-number" style="top: 44%">{{
index + 1
}}</span>
</div>
</template>
<template v-else>
<div class="table-td">
<span class="ranking-bg"></span>
<span class="ranking-number">{{ index + 1 }}</span>
</div>
</template>
<div class="table-td">
<img
class="table-avatar"
:src="item.avator || getImageUrl('icon-avatar')"
alt=""
/>
</div>
<div class="table-td">{{ item.department }}</div>
<div class="table-td">{{ item.name }}</div>
<div class="table-td sales-number">{{ item.orderCount }}</div>
</div>
</div>
</div>
</div>
<div class="wrapper-footer">
<img :src="getImageUrl('ranking-footer')" alt="" />
</div>
</div>
<div class="bg-footer">
<img class="left-footer" :src="getImageUrl('left-footer')" alt="" />
<img class="right-footer" :src="getImageUrl('right-footer')" alt="" />
</div>
</div>
</div>
<div class="long-ribbon">
<img :src="getImageUrl('long-ribbon')" alt="" />
</div>
<div class="left-ribbon">
<img :src="getImageUrl('left-ribbon')" alt="" />
</div>
<div class="right-ribbon">
<img :src="getImageUrl('right-ribbon')" alt="" />
</div>
<div class="bottom-ribbon">
<img :src="getImageUrl('bottom-ribbon')" alt="" />
</div>
<div class="logo x-center">
<img :src="getImageUrl('logo', 'common')" alt="" />
</div>
</template>
<script lang="ts" setup>
import { reactive, onMounted, inject } from "vue";
import { req } from "../../utils/request";
import { useRoute } from "vue-router";
import { DataInfo, Params, OrderRank } from "./interface";
const route = useRoute();
// 获取全局对象
const global: any = inject("global");
let query: Params = {};
const data = reactive<Partial<DataInfo>>({
medals: ["first", "second", "third"],
storeInfo: {
orderRankList: [<OrderRank>{}],
},
});
const getInfo = async () => {
data.storeInfo = await req(
"scrm.api.shopmall.activity.good.report.param",
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/goldNews.scss";
</style>
/*
* @Description:
* @Author: huyue
* @Date: 2022-11-16 18:18:59
* @LastEditors: huyue
* @LastEditTime: 2023-02-14 14:23:54
*/
export interface OrderInfo {
avator: string;
department: string;
name: string;
orderCount: number;
}
export interface OrderRank {
goodsName: string;
rank: OrderInfo[]
}
export interface StoreInfo {
merchantName?: string;
goodsName?: string;
orderCount?: string;
name?: string;
orderRankList?: OrderRank[];
department?: string;
avatar?: string;
type?: number;
}
export interface DataInfo {
medals: string[];
storeInfo: StoreInfo;
}
export interface Params {
activityId?: number | string;
orderCode?: number | string;
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!