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 f1b21ee5
authored
Jun 12, 2023
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
6月需求
1 parent
91ee7c38
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
123 additions
and
14 deletions
src/utils/emo.ts
src/views/dj/gladNews.vue
src/views/dj/interface.ts
src/views/dj/morning.vue
src/views/dj/morningInterface.ts
src/views/dj/personalGoodNews.vue
src/views/dj/personalInterface.ts
src/utils/emo.ts
0 → 100644
View file @
f1b21ee
/*
* @Description: 表情列表
* @Author: huyue
* @Date: 2023-06-08 17:32:17
* @LastEditors: huyue
* @LastEditTime: 2023-06-08 17:32:40
*/
const
emoji
=
[
[
'微笑'
,
'撇嘴'
,
'色'
,
'发呆'
,
'得意'
,
'流泪'
,
'害羞'
,
'闭嘴'
],
[
'睡'
,
'大哭'
,
'尴尬'
,
'发怒'
,
'调皮'
,
'呲牙'
,
'惊讶'
,
'难过'
],
[
'酷'
,
'囧'
,
'抓狂'
,
'吐'
,
'微笑'
,
'愉快'
,
'白眼'
,
'傲慢'
],
[
'饥饿'
,
'困'
,
'惊恐'
,
'流汗'
,
'憨笑'
,
'大兵'
,
'奋斗'
,
'咒骂'
],
[
'疑问'
,
'嘘'
,
'晕'
,
'折磨'
,
'衰'
,
'骷髅'
,
'敲打'
,
'再见'
],
[
'擦汗'
,
'抠鼻'
,
'鼓掌'
,
'糗大了'
,
'坏笑'
,
'左哼哼'
,
'右哼哼'
,
'哈欠'
],
[
'鄙视'
,
'委屈'
,
'快哭了'
,
'阴险'
,
'亲亲'
,
'吓'
,
'可怜'
,
'菜刀'
],
[
'西瓜'
,
'啤酒'
,
'篮球'
,
'乒乓'
,
'咖啡'
,
'饭'
,
'猪头'
,
'玫瑰'
],
[
'凋谢'
,
'示爱'
,
'爱心'
,
'心碎'
,
'蛋糕'
,
'闪电'
,
'炸弹'
,
'刀'
],
[
'足球'
,
'瓢虫'
,
'便便'
,
'月亮'
,
'太阳'
,
'礼物'
,
'拥抱'
,
'强'
],
[
'弱'
,
'握手'
,
'胜利'
,
'抱拳'
,
'勾引'
,
'拳头'
,
'差劲'
,
'爱你'
],
[
'NO'
,
'OK'
,
'爱情'
,
'飞吻'
,
'跳跳'
,
'发抖'
,
'怄火'
,
'转圈'
],
[
'磕头'
,
'回头'
,
'跳绳'
,
'投降'
,
'挥手'
,
'激动'
,
'街舞'
,
'左太极'
],
[
'右太极'
,
'嘿哈'
,
'捂脸'
,
'奸笑'
,
'机智'
,
'皱眉'
,
'耶'
,
'社会社会'
],
[
'让我看看'
,
'666'
,
'红包'
,
'蜡烛'
,
'烟花'
,
'福'
,
'庆祝'
,
'爆竹'
]
]
export
default
emoji
\ No newline at end of file
src/views/dj/gladNews.vue
View file @
f1b21ee
...
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-10-10 15:26:23
* @LastEditors: huyue
* @LastEditTime: 2023-0
3-13 17:02:29
* @LastEditTime: 2023-0
6-12 10:32:03
-->
<
template
>
<div
class=
"wrapper-good"
>
...
...
@@ -48,7 +48,7 @@
</div>
<!-- 定位模块脱离文档流,用一个空白块代替位置 -->
<div
class=
"empty-bg"
></div>
<div
class=
"shop-name"
>
<div
class=
"shop-name"
v-if=
"data.goodsSwitch"
>
<div
class=
"name-item"
v-for=
"(i, ind) in data.dataInfo!.goodsNameList"
...
...
@@ -65,7 +65,7 @@
alt=
""
/>
</div>
<div
class=
"ranking-box"
>
<div
class=
"ranking-box"
v-if=
"data.dataInfo!.rankList!.length != 0"
>
<div
class=
"ranking-list"
>
<div
class=
"ranking-title"
>
员工产值排名
</div>
<div
...
...
@@ -124,7 +124,7 @@
import
{
reactive
,
onMounted
,
inject
}
from
"vue"
;
import
{
djReq
}
from
"../../utils/request"
;
import
{
useRoute
}
from
"vue-router"
;
import
{
GladDataInfo
,
GladParams
,
GladData
,
StaffData
}
from
"./interface"
;
import
{
GladDataInfo
,
GladParams
,
GladData
,
StaffData
,
RankItem
}
from
"./interface"
;
const
route
=
useRoute
();
// 获取全局对象
...
...
@@ -135,7 +135,9 @@ const data = reactive<Partial<GladDataInfo>>({
medals
:
[
"first"
,
"second"
,
"third"
],
dataInfo
:
<
GladData
>
{
staff
:
<
StaffData
>
{},
rankList
:
[
<
RankItem
>
{}]
},
goodsSwitch
:
true
});
const
getInfo
=
async
()
=>
{
...
...
@@ -143,6 +145,8 @@ const getInfo = async () => {
"dj.api.smarcarlife.staffDayReport.getSaGoodNewsData"
,
query
);
const
switchList
=
data
.
dataInfo
?.
switchList
||
[]
data
.
goodsSwitch
=
switchList
.
find
(
item
=>
item
.
switchType
===
401
)?.
switchStatus
===
'Y'
};
const
getImageUrl
=
(
name
:
any
,
path
=
"goodNews"
)
=>
{
return
new
URL
(
`./
${
path
}
/
${
name
}
.png?v=
${
global
.
version
}
`
,
global
.
$imgUrl
)
...
...
src/views/dj/interface.ts
View file @
f1b21ee
...
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-11-16 18:18:59
* @LastEditors: huyue
* @LastEditTime: 2023-0
3-08 16:30:24
* @LastEditTime: 2023-0
6-09 16:29:42
*/
export
interface
ReportData
{
time
?:
string
;
...
...
@@ -54,6 +54,7 @@ export interface GladParams {
export
interface
GladDataInfo
{
medals
:
string
[];
dataInfo
:
GladData
;
goodsSwitch
:
boolean
;
}
export
interface
GladData
{
rankList
?:
RankItem
[];
...
...
@@ -62,6 +63,7 @@ export interface GladData {
merchantName
?:
string
;
staff
:
StaffData
;
merchantUpgradeCount
:
number
;
switchList
:
SwitchType
[];
}
export
interface
RankItem
{
staffName
:
string
;
...
...
@@ -82,4 +84,9 @@ export interface StaffData {
orderMoney
:
number
;
unitPricePerCustomer
:
number
;
conversionRate
:
number
;
}
\ No newline at end of file
}
export
interface
SwitchType
{
switchType
:
number
;
switchStatus
:
string
;
}
src/views/dj/morning.vue
View file @
f1b21ee
...
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2023-04-03 14:13:32
* @LastEditors: huyue
* @LastEditTime: 2023-0
4-24 11:00:14
* @LastEditTime: 2023-0
6-09 14:58:21
-->
<!--
* @Description:
...
...
@@ -115,7 +115,7 @@
</div>
</div>
</div>
<div
class=
"mold-box"
style=
"padding-bottom: 48px"
>
<div
class=
"mold-box"
style=
"padding-bottom: 48px"
v-if=
"data.showCustomeFollow"
>
<div
class=
"mold-title"
>
<img
class=
"title-name"
:src=
"getImageUrl('title-name')"
alt=
""
/>
<div
class=
"merchant-name"
>
客户跟进
</div>
...
...
@@ -196,13 +196,18 @@ const data = reactive<Partial<DataInfo>>({
customerInvitationList
:
[],
monthlyOrderMoneyTotalGrowth
:
0
,
waitToInviteNum
:
0
,
switchList
:
[]
},
showCustomeFollow
:
true
});
const
getInfo
=
async
()
=>
{
data
.
posterInfo
=
await
djReq
(
"dj.api.smartcarlife.orderSummary.getShopMerchantOrderReport"
,
query
);
const
switchList
=
data
.
posterInfo
?.
switchList
||
[]
data
.
showCustomeFollow
=
switchList
.
find
(
item
=>
item
.
switchType
===
201
)?.
switchStatus
===
'Y'
console
.
log
(
switchList
.
find
(
item
=>
item
.
switchType
===
201
)?.
switchStatus
===
'Y'
);
};
const
getImageUrl
=
(
name
:
any
,
path
=
"dj"
)
=>
{
return
new
URL
(
`./
${
path
}
/
${
name
}
.png?v=
${
global
.
version
}
`
,
global
.
$imgUrl
)
...
...
src/views/dj/morningInterface.ts
View file @
f1b21ee
...
...
@@ -3,13 +3,14 @@
* @Author: huyue
* @Date: 2023-04-19 11:48:06
* @LastEditors: huyue
* @LastEditTime: 2023-0
4-24 10:20:43
* @LastEditTime: 2023-0
6-09 14:15:16
*/
export
interface
Params
{
merchantId
?:
number
|
string
;
}
export
interface
DataInfo
{
posterInfo
:
PosterInfo
;
showCustomeFollow
:
boolean
;
}
export
interface
PosterInfo
{
...
...
@@ -32,6 +33,12 @@ export interface PosterInfo {
monthlyOrderMoneyTotalGrowthExist
?:
boolean
;
yesterdayNotUpgradeOrderNum
?:
number
;
monthlyNotUpgradeOrderNum
?:
number
;
switchList
:
SwitchType
[];
}
export
interface
SwitchType
{
switchType
:
number
;
switchStatus
:
string
;
}
export
interface
CustomerList
{
...
...
src/views/dj/personalGoodNews.vue
View file @
f1b21ee
...
...
@@ -47,7 +47,7 @@
<
div
class
=
"label"
>
客户姓名
<
/div>
<
div
class
=
"value"
>
{{
data
.
newsInfo
!
.
customerName
}}
<
/div>
<
/div>
<
div
class
=
"customer-item"
>
<
div
class
=
"customer-item"
v
-
if
=
"data.carTypeSwitch"
>
<
div
class
=
"label"
>
客户车型
<
/div>
<
div
class
=
"value"
>
{{
data
.
newsInfo
!
.
carBrand
}}
-
...
...
@@ -55,7 +55,7 @@
{{
data
.
newsInfo
!
.
carSeriesName
}}
<
/div>
<
/div>
<
div
class
=
"customer-item"
v
-
if
=
"data.newsInfo!.channelType != 2"
>
<
div
class
=
"customer-item"
v
-
if
=
"data.
goodsSwitch && data.
newsInfo!.channelType != 2"
>
<
div
class
=
"label"
>
开单商品
<
/div>
<
div
class
=
"value"
>
<
div
...
...
@@ -69,6 +69,7 @@
<
/div>
<
/div>
<
/div>
<
div
v
-
if
=
"data.scriptSwitch"
class
=
"customer-info html-info"
v
-
html
=
"data.content"
><
/div>
<
div
class
=
"tips-text"
>
感谢您前期的铺垫和大力支持,加油!
<
/div>
<
div
class
=
"logo"
>
<
img
class
=
"red-logo"
:
src
=
"getImageUrl('logo')"
alt
=
""
/>
...
...
@@ -78,7 +79,8 @@
<
/div>
<
/template>
<
script
lang
=
"ts"
setup
>
import
{
reactive
,
onMounted
,
inject
}
from
"vue"
;
import
emoji
from
'../../utils/emo'
;
import
{
ref
,
reactive
,
onMounted
,
inject
}
from
"vue"
;
import
{
djReq
}
from
"../../utils/request"
;
import
{
useRoute
}
from
"vue-router"
;
import
{
Params
,
DataInfo
,
NewsInfo
,
StaffInfo
}
from
"./personalInterface"
;
...
...
@@ -91,13 +93,27 @@ const data = reactive<Partial<DataInfo>>({
staff
:
<
StaffInfo
>
{
}
,
}
,
upgradeCount
:
0
,
content
:
""
,
carTypeSwitch
:
true
,
goodsSwitch
:
true
,
payTypeSwitch
:
true
,
scriptSwitch
:
true
,
}
);
const
getInfo
=
async
()
=>
{
data
.
content
=
htmFormat
(
data
.
content
)
data
.
newsInfo
=
await
djReq
(
"dj.api.smarcarlife.staffDayReport.getSaPersonalGoodNewsData"
,
query
);
data
.
upgradeCount
=
convertToChinaNum
(
data
.
newsInfo
?.
staff
?.
upgradeCount
);
const
switchList
=
data
.
newsInfo
?.
switchList
||
[]
data
.
carTypeSwitch
=
switchList
.
find
(
item
=>
item
.
switchType
===
501
)?.
switchStatus
===
'Y'
data
.
goodsSwitch
=
switchList
.
find
(
item
=>
item
.
switchType
===
502
)?.
switchStatus
!==
'Y'
data
.
payTypeSwitch
=
switchList
.
find
(
item
=>
item
.
switchType
===
503
)?.
switchStatus
!==
'Y'
data
.
scriptSwitch
=
switchList
.
find
(
item
=>
item
.
switchType
===
504
)?.
switchStatus
!==
'Y'
if
(
data
.
scriptSwitch
)
data
.
content
=
switchList
.
find
(
item
=>
item
.
switchType
===
504
)?.
switchText
// if (data.scriptSwitch) data.content = '<div>[晕][调皮][惊讶]的首发式地方时尚短发[发呆]\n打法十大啊\n恭喜发财啊![玫瑰]\n[太阳]\n[拥抱][爱情]</div>'
console
.
log
(
data
.
scriptSwitch
);
}
;
/**
* 功能:获取图片地址
...
...
@@ -159,6 +175,22 @@ const convertToChinaNum = (num: any) => {
return
result
;
}
;
// 格式化内容
const
htmFormat
=
(
val
:
any
)
=>
{
let
htm
=
val
.
replace
(
/
\[[\u
4E00-
\u
9FA56
]
{1,4
}
]/gi
,
function
(
res
)
{
let
word
=
res
.
replace
(
/
\[
|
\]
/gi
,
''
)
const
list
=
emoji
.
flat
(
Infinity
)
let
index
=
parseInt
(
list
.
indexOf
(
word
))
+
1
if
(
index
<
10
)
{
index
=
'00'
+
index
}
else
if
(
index
>=
10
&&
index
<
100
)
{
index
=
'0'
+
index
}
return
`<img class="icon-emo" src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index
}
.png" alt="" />`
}
).
replace
(
/
\n
/gi
,
'<br/></div><div>'
)
return
htm
}
onMounted
(()
=>
{
if
(
route
.
query
)
{
query
=
route
.
query
;
...
...
@@ -169,3 +201,19 @@ onMounted(() => {
<
style
lang
=
"scss"
scoped
>
@
import
"src/assets/styles/personalGoodNews.scss"
;
<
/style>
<
style
lang
=
"scss"
>
.
html
-
info
{
font
-
size
:
24
px
;
color
:
#
3
B0000
;
line
-
height
:
34
px
;
div
{
display
:
flex
;
align
-
items
:
center
;
}
.
icon
-
emo
{
width
:
24
px
;
height
:
24
px
;
line
-
height
:
24
px
;
}
}
<
/style>
\ No newline at end of file
src/views/dj/personalInterface.ts
View file @
f1b21ee
...
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2023-03-23 10:48:13
* @LastEditors: huyue
* @LastEditTime: 2023-0
5-10 16:28:35
* @LastEditTime: 2023-0
6-09 15:53:57
*/
export
interface
Params
{
orderCode
?:
string
;
...
...
@@ -12,6 +12,12 @@ export interface Params {
export
interface
DataInfo
{
newsInfo
:
NewsInfo
;
upgradeCount
:
number
|
string
;
content
:
string
;
carTypeSwitch
:
boolean
;
goodsSwitch
:
boolean
;
payTypeSwitch
:
boolean
;
scriptSwitch
:
boolean
;
scriptText
:
string
;
}
export
interface
NewsInfo
{
...
...
@@ -27,6 +33,7 @@ export interface NewsInfo {
sunshineInspiration
?:
string
;
goodsNames
?:
string
[];
channelType
?:
number
;
switchList
:
SwitchType
[];
}
export
interface
StaffInfo
{
...
...
@@ -38,4 +45,10 @@ export interface StaffInfo {
orderMoney
:
number
;
unitPricePerCustomer
:
number
;
conversionRate
:
number
;
}
\ No newline at end of file
}
export
interface
SwitchType
{
switchType
:
number
;
switchStatus
:
string
;
switchText
:
string
;
}
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