Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
glsx-posters
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7e84ec16
authored
Feb 13, 2023
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
saas+喜报联调
1 parent
1ef891b2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
99 additions
and
9 deletions
src/utils/request.ts
src/views/dj/goodNews.vue
src/views/dj/interface.ts
src/views/dj/warReport.vue
src/utils/request.ts
View file @
7e84ec1
import
http
from
'./http'
import
{
useUserStore
}
from
'../store/user'
const
PATH
=
'rop-scrm-shopmall/router'
const
DJPATH
=
'rop-dj-smartcarlife/router'
const
req
:
any
=
(
url
:
string
,
data
:
any
=
{},
returnAll
=
false
,
method
=
'POST'
,)
=>
{
data
.
method
=
url
const
options
=
{
...
...
@@ -17,7 +17,7 @@ const djReq: any = (url: string, data: any = {}, returnAll = false, method = 'PO
data
.
method
=
url
const
options
=
{
domain
:
'otherRequest'
,
url
:
PATH
,
url
:
DJ
PATH
,
method
,
data
,
returnAll
...
...
src/views/dj/goodNews.vue
View file @
7e84ec1
<!--
* @Description:
* @Author: huyue
* @Date: 2023-02-07 16:36:16
* @LastEditors: huyue
* @LastEditTime: 2023-02-13 17:19:27
-->
<
template
>
<div
class=
"wrapper-box"
>
<div
class=
"header-box"
>
<img
class=
"header-bg"
src=
"@/assets/images/dj/header-bg.png"
alt=
""
/>
<img
class=
"time-bg"
src=
"@/assets/images/dj/time-bg.png"
alt=
""
/>
<div
class=
"time"
>
2022-12-29 16:49:45
</div>
<div
class=
"time"
>
{{
data
.
reportInfo
.
time
}}
</div>
</div>
<div
class=
"content-box"
>
<img
class=
"reel"
src=
"@/assets/images/dj/reel.png"
alt=
""
/>
...
...
@@ -13,13 +20,13 @@
今日单量
<div
class=
"content-value"
>
第
<span
class=
"number"
>
8
</span>
<span
class=
"number"
>
{{
data
.
reportInfo
!
.
todayOrderCount
}}
</span>
单
</div>
</div>
<div
class=
"content-item"
>
订单收款
<div
class=
"price"
>
¥
5846.00
</div>
<div
class=
"price"
>
¥
{{
data
.
reportInfo
!
.
todayOrderPrice
}}
</div>
</div>
</div>
<div
class=
"content-list"
>
...
...
@@ -27,13 +34,13 @@
累计单量
<div
class=
"content-value"
>
第
<span
class=
"number"
>
8
</span>
<span
class=
"number"
>
{{
data
.
reportInfo
!
.
totalOrderCount
}}
</span>
单
</div>
</div>
<div
class=
"content-item"
>
累计产值
<div
class=
"price"
>
¥
999999999.00
</div>
<div
class=
"price"
>
¥
{{
data
.
reportInfo
!
.
totalOrderPrice
}}
</div>
</div>
</div>
</div>
...
...
@@ -44,7 +51,37 @@
</div>
</div>
</
template
>
<
script
lang=
"ts"
setup
></
script
>
<
script
lang=
"ts"
setup
>
import
{
reactive
,
onMounted
,
inject
}
from
"vue"
;
import
{
djReq
}
from
"../../utils/request"
;
import
{
useRoute
}
from
"vue-router"
;
import
{
DataInfo
,
Params
}
from
"./interface"
;
const
route
=
useRoute
();
// 获取全局对象
const
global
:
any
=
inject
(
"global"
);
let
query
:
Params
=
{};
const
data
=
reactive
<
Partial
<
DataInfo
>>
({
reportInfo
:
{},
});
const
getInfo
=
async
()
=>
{
data
.
reportInfo
=
await
djReq
(
"dj.api.smartcarlife.orderReport.stat.byGoodsNews"
,
query
);
// data.reportInfo.time = data.reportInfo.time.s
};
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
>
src/views/dj/interface.ts
0 → 100644
View file @
7e84ec1
/*
* @Description:
* @Author: huyue
* @Date: 2022-11-16 18:18:59
* @LastEditors: huyue
* @LastEditTime: 2023-02-13 17:06:37
*/
export
interface
ReportInfo
{
time
?:
string
;
todayOrderCount
?:
number
;
todayOrderPrice
?:
number
;
totalOrderCount
?:
number
;
totalOrderPrice
?:
number
;
}
export
interface
DataInfo
{
reportInfo
:
ReportInfo
;
}
export
interface
Params
{
merchantId
?:
number
|
string
;
}
export
interface
WarParams
{
yqMerchantId
?:
number
|
string
;
}
src/views/dj/warReport.vue
View file @
7e84ec1
...
...
@@ -101,7 +101,35 @@
<img
class=
"bg-center"
src=
"@/assets/images/dj/bg-center.png"
alt=
""
/>
</div>
</
template
>
<
script
lang=
"ts"
setup
></
script
>
<
script
lang=
"ts"
setup
>
import
{
reactive
,
onMounted
,
inject
}
from
"vue"
;
import
{
djReq
}
from
"../../utils/request"
;
import
{
useRoute
}
from
"vue-router"
;
import
{
DataInfo
,
WarParams
}
from
"./interface"
;
const
route
=
useRoute
();
// 获取全局对象
const
global
:
any
=
inject
(
"global"
);
let
query
:
WarParams
=
{};
const
data
=
reactive
<
Partial
<
DataInfo
>>
({
reportInfo
:
{},
});
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
>
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment