Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
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 b7c1c7c8
authored
Jan 17, 2023
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
短链
1 parent
b3318a56
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
282 additions
and
2 deletions
linkwe-pc/src/views/intelligentShortLink/addEdit.vue
linkwe-pc/src/views/intelligentShortLink/components/Add.vue
linkwe-pc/src/views/intelligentShortLink/components/PhonePreview.vue
linkwe-pc/src/views/intelligentShortLink/components/mixin.js
linkwe-pc/src/views/intelligentShortLink/detail.vue
linkwe-pc/src/views/intelligentShortLink/addEdit.vue
View file @
b7c1c7c
This diff is collapsed.
Click to expand it.
linkwe-pc/src/views/intelligentShortLink/components/Add.vue
0 → 100644
View file @
b7c1c7c
<
script
>
import
{
touchTypeDict
}
from
'./components/mixin'
export
default
{
name
:
''
,
components
:
{},
props
:
{
form
:
{
type
:
Object
,
},
},
data
()
{
return
{
touchTypeDict
,
prefixFormLabel
:
Object
.
freeze
({
1
:
'公众号'
,
2
:
'微信'
,
3
:
'微信群'
,
10
:
'小程序'
,
}),
}
},
computed
:
{},
watch
:
{},
created
()
{},
mounted
()
{},
methods
:
{},
}
</
script
>
<
template
>
<div>
<el-form
ref=
"form"
:model=
"form"
label-suffix=
":"
label-width=
"140px"
:rules=
"rules"
>
<el-form-item
label=
"短链类型"
>
<span>
{{
touchTypeDict
[
form
.
touchType
].
allName
}}
</span>
</el-form-item>
<el-form-item
label=
"短链名称"
prop=
"shortLinkName"
>
<el-input
clearable
v-model=
"form.shortLinkName"
placeholder=
"请输入"
maxlength=
"30"
show-word-limit
></el-input>
</el-form-item>
<!-- 公众号文章 -->
<template
v-if=
"form.touchType == 0"
>
<el-form-item
prop=
"longLink"
label=
"公众号文章链接"
>
<el-input
clearable
v-model=
"form.longLink"
placeholder=
"请输入"
></el-input>
<div
class=
"tips"
>
请在公众号后台文章发布列表页中获取并复制文章的永久链接
</div>
</el-form-item>
</
template
>
<!-- 公众号二维码,个人二维码,群二维码,小程序二维码 -->
<
template
v-else-if=
"Object.keys(prefixFormLabel).includes(form.touchType + '')"
>
<el-form-item
prop=
"name"
:label=
"prefixFormLabel[form.touchType] + '名称'"
>
<el-input
clearable
v-model=
"form.name"
placeholder=
"请输入"
maxlength=
"15"
show-word-limit
></el-input>
</el-form-item>
<el-form-item
prop=
"describe"
:label=
"prefixFormLabel[form.touchType] + '描述'"
>
<el-input
clearable
v-model=
"form.describe"
placeholder=
"请输入"
maxlength=
"30"
show-word-limit
></el-input>
</el-form-item>
<el-form-item
prop=
"avatar"
:label=
"prefixFormLabel[form.touchType] + '头像'"
>
<upload
class=
"image-uploader"
:fileUrl
.
sync=
"form.avatar"
></upload>
</el-form-item>
<el-form-item
prop=
"qrCode"
:label=
"prefixFormLabel[form.touchType] + '二维码'"
>
<upload
class=
"image-uploader"
:fileUrl
.
sync=
"form.qrCode"
></upload>
</el-form-item>
</
template
>
<!-- 员工活码,客群活码 -->
<
template
v-else-if=
"[4, 5].includes(+form.touchType)"
>
<el-form-item
prop=
"qrCodeId"
:label=
"'选择' + touchTypeDict[form.touchType].name"
>
<el-button
type=
"primary"
plain
@
click=
"choiceQqcode(form.touchType, '选择' + touchTypeDict[form.touchType].name)"
>
选择
{{
touchTypeDict
[
form
.
touchType
].
name
}}
</el-button>
</el-form-item>
</
template
>
<!-- 门店导购活码,门店群活码 -->
<
template
v-else-if=
"[6, 8].includes(+form.touchType)"
>
<el-form-item
prop=
"qrCodeId"
:label=
"touchTypeDict[form.touchType].name"
>
<el-button
type=
"primary"
plain
@
click=
"choiceQqcode(form.touchType, '选择' + touchTypeDict[form.touchType].name)"
>
暂无
{{
touchTypeDict
[
form
.
touchType
].
name
}}
,去配置
</el-button>
</el-form-item>
</
template
>
<!-- 个人小程序 -->
<
template
v-else-if=
"form.touchType == 7"
>
<el-form-item
prop=
"name"
label=
"小程序名称"
>
<el-input
clearable
v-model=
"form.name"
placeholder=
"请输入"
maxlength=
"15"
show-word-limit
></el-input>
</el-form-item>
<el-form-item
prop=
"avatar"
label=
"小程序头像"
>
<upload
class=
"image-uploader"
:fileUrl
.
sync=
"form.avatar"
></upload>
</el-form-item>
<el-form-item
prop=
"appId"
label=
"小程序AppID"
>
<el-input
clearable
v-model=
"form.appId"
placeholder=
"请输入"
maxlength=
"30"
show-word-limit
></el-input>
</el-form-item>
<el-form-item
prop=
"longLink"
label=
"小程序页面路径"
>
<el-input
clearable
v-model=
"form.longLink"
placeholder=
"请输入"
maxlength=
"30"
show-word-limit
></el-input>
</el-form-item>
</
template
>
<!-- 企业小程序 -->
<
template
v-else-if=
"form.touchType == 9"
>
<el-form-item
prop=
"name"
label=
"小程序名称"
>
<el-input
clearable
v-model=
"form.name"
placeholder=
"请输入"
maxlength=
"15"
show-word-limit
></el-input>
</el-form-item>
<el-form-item
prop=
"avatar"
label=
"小程序头像"
>
<upload
class=
"image-uploader"
:fileUrl
.
sync=
"form.avatar"
></upload>
</el-form-item>
<el-form-item
prop=
"appId"
label=
"小程序AppID"
>
<el-input
clearable
v-model=
"form.appId"
placeholder=
"请输入"
maxlength=
"30"
show-word-limit
></el-input>
</el-form-item>
<el-form-item
prop=
"secret"
label=
"小程序Secret"
>
<el-input
clearable
v-model=
"form.secret"
placeholder=
"请输入"
maxlength=
"30"
show-word-limit
></el-input>
</el-form-item>
<el-form-item
prop=
""
label=
"小程序原始ID"
>
<el-input
clearable
v-model=
"form.name"
placeholder=
"请输入"
maxlength=
"30"
show-word-limit
></el-input>
</el-form-item>
<el-form-item
prop=
"longLink"
label=
"小程序页面路径"
>
<el-input
clearable
v-model=
"form.longLink"
placeholder=
"请输入"
maxlength=
"30"
show-word-limit
></el-input>
</el-form-item>
</
template
>
</el-form>
</div>
</template>
<
style
lang=
"scss"
scoped
></
style
>
linkwe-pc/src/views/intelligentShortLink/components/PhonePreview.vue
0 → 100644
View file @
b7c1c7c
// 短链移动端样式预览
<
script
>
import
{
touchTypeDict
}
from
'./components/mixin'
export
default
{
name
:
''
,
components
:
{},
props
:
{
data
:
{
type
:
Object
,
},
},
data
()
{
return
{
touchTypeDict
,
}
},
computed
:
{},
watch
:
{},
created
()
{},
mounted
()
{},
methods
:
{},
}
</
script
>
<
template
>
<div>
<div
class=
"title"
>
预览
</div>
<PhoneTemplate
:title=
"touchTypeDict[data.touchType].previewMobileTitle"
>
<template
v-if=
"data.touchType == 0"
>
<div
class=
"mask"
style=
"position: absolute"
>
<div
class=
"cc ac g-card g-pad20"
style=
"width: 70%"
>
公众号文章示例
</div>
</div>
</
template
>
<
template
v-else-if=
"[7, 9, 10].includes(+data.touchType)"
>
<div
class=
"g-card g-pad20 cc ac"
style=
"width: 80%"
>
小程序
<el-image
style=
"width: 120px; height: 120px"
:src=
"data.avatar"
error=
"头像"
fit=
"fit"
></el-image>
<el-button
type=
"primary"
>
点击打开小程序
</el-button>
</div>
</
template
>
<
template
v-else
>
<div
class=
"g-card g-pad20 cc ac"
style=
"width: 80%"
>
<div
class=
"al bfc-o"
>
<el-image
class=
"fl mr10"
style=
"width: 50px; height: 50px"
:src=
"data.avatar"
error=
"头像"
fit=
"fit"
></el-image>
<div
class=
"toe"
>
{{
data
.
name
||
'名称'
}}
</div>
<div
class=
"tips mt20 toe"
>
{{
data
.
describe
||
'描述'
}}
</div>
</div>
<el-image
style=
"width: 120px; height: 120px; margin: 20px 0"
:src=
"url"
:fit=
"fit"
></el-image>
<div
class=
"mt20"
>
长按二维码
{{
touchTypeDict
[
data
.
touchType
].
previewMobileTitle
}}
</div>
</div>
</
template
>
</PhoneTemplate>
</div>
</template>
<
style
lang=
"scss"
scoped
></
style
>
linkwe-pc/src/views/intelligentShortLink/components/mixin.js
0 → 100644
View file @
b7c1c7c
export
const
typeDict
=
Object
.
freeze
({
1
:
{
name
:
'公众号'
,
touchType
:
{
0
:
{
name
:
'文章'
,
allName
:
'跳入微信-公众号-文章'
,
tip
:
'跳转进入微信后,打开一篇公众号文章'
,
previewMobileTitle
:
'公众号标题'
,
},
1
:
{
name
:
'二维码'
,
allName
:
'跳入微信-公众号-二维码'
,
tip
:
'跳转进入微信后,展示一张公众号二维码,长按引导关注'
,
previewMobileTitle
:
'添加公众号'
,
},
},
},
2
:
{
name
:
'个人微信'
,
touchType
:
{
2
:
{
name
:
'个人二维码'
,
allName
:
'跳入微信-个人微信-个人二维码'
,
tip
:
'跳转进入微信后,展示一张个人二维码,长按扫码添加好友'
,
previewMobileTitle
:
'添加微信'
,
},
3
:
{
name
:
'群二维码'
,
allName
:
'跳入微信-个人微信-群二维码'
,
tip
:
'跳转进入微信后,展示一张微信群二维码,长按扫码入群'
,
previewMobileTitle
:
'添加微信群'
,
},
},
},
3
:
{
name
:
'企业微信'
,
touchType
:
{
4
:
{
name
:
'员工活码'
,
allName
:
'跳入微信-企业微信-员工活码'
,
tip
:
'跳转进入微信后,展示一张企微员工活码,长按扫码添加企业员工'
,
previewMobileTitle
:
'添加企业员工'
,
},
5
:
{
name
:
'客群活码'
,
allName
:
'跳入微信-企业微信-客群活码'
,
tip
:
'跳转进入微信后,展示一张企微客群活码,长按扫码入群'
,
previewMobileTitle
:
'添加企业客群'
,
},
6
:
{
name
:
'门店导购活码'
,
allName
:
'跳入微信-企业微信-门店导购码'
,
tip
:
'跳转进入微信后,展示一张门店导购码,长按扫码添加附近门店的导购'
,
previewMobileTitle
:
'添加门店导购'
,
},
8
:
{
name
:
'门店群活码'
,
allName
:
'跳入微信-企业微信-门店群活码'
,
tip
:
'跳转进入微信后,展示一张门店群活码,长按扫码进入附近的门店群'
,
previewMobileTitle
:
'添加门店群'
,
},
},
},
4
:
{
name
:
'小程序'
,
touchType
:
{
7
:
{
name
:
'个人小程序'
,
allName
:
'跳入微信-小程序-个人小程序'
,
tip
:
'跳转进入微信后,直接打开一个个人小程序'
,
previewMobileTitle
:
'打开小程序'
,
},
9
:
{
name
:
'企业小程序'
,
allName
:
'跳入微信-小程序-企业小程序'
,
tip
:
'跳转进入微信后,直接打开一个企业小程序'
,
previewMobileTitle
:
'打开小程序'
,
},
10
:
{
name
:
'小程序二维码'
,
allName
:
'跳入微信-小程序-小程序二维码'
,
tip
:
'跳转进入微信后,展示一张小程序二维码,长按扫码打开小程序'
,
previewMobileTitle
:
'打开小程序'
,
},
},
},
})
const
touchTypeDict
=
{}
Object
.
values
(
typeDict
).
forEach
((
element
)
=>
Object
.
assign
(
touchTypeDict
,
element
.
touchType
))
export
{
touchTypeDict
}
linkwe-pc/src/views/intelligentShortLink/detail.vue
View file @
b7c1c7c
...
@@ -4,12 +4,12 @@ export default {
...
@@ -4,12 +4,12 @@ export default {
name
:
''
,
name
:
''
,
components
:
{
components
:
{
TimeSearchTitle
:
()
=>
import
(
'@/components/common/TimeSearchTitle'
),
TimeSearchTitle
:
()
=>
import
(
'@/components/common/TimeSearchTitle'
),
PhonePreview
:
()
=>
import
(
'./components/PhonePreview.vue'
),
},
},
data
()
{
data
()
{
return
{
return
{
loading
:
false
,
loading
:
false
,
form
:
{},
form
:
{},
dateRange
:
[
new
Date
().
setDate
(
-
7
)],
data
:
[],
data
:
[],
xData
:
[],
xData
:
[],
series
:
[],
series
:
[],
...
@@ -94,6 +94,7 @@ export default {
...
@@ -94,6 +94,7 @@ export default {
endTime
:
data
.
endTime
,
endTime
:
data
.
endTime
,
}
}
getLineAnalysis
(
query
).
then
(({
data
})
=>
{
getLineAnalysis
(
query
).
then
(({
data
})
=>
{
this
.
series
=
[]
this
.
xData
=
data
.
map
((
e
)
=>
e
.
xtime
)
this
.
xData
=
data
.
map
((
e
)
=>
e
.
xtime
)
this
.
series
.
push
(
data
.
map
((
e
)
=>
e
.
addCnt
))
this
.
series
.
push
(
data
.
map
((
e
)
=>
e
.
addCnt
))
this
.
series
.
push
(
data
.
map
((
e
)
=>
e
.
lostCnt
))
this
.
series
.
push
(
data
.
map
((
e
)
=>
e
.
lostCnt
))
...
@@ -110,10 +111,11 @@ export default {
...
@@ -110,10 +111,11 @@ export default {
<div
style=
"width: 40%"
>
<div
style=
"width: 40%"
>
<div
class=
"g-card g-pad20"
>
<div
class=
"g-card g-pad20"
>
<div
class=
"title"
>
短链内容
</div>
<div
class=
"title"
>
短链内容
</div>
<Add
:form=
"data"
/>
</div>
</div>
</div>
</div>
<div
class=
"g-card g-pad20"
style=
"width: 40%; margin-top: 0"
>
<div
class=
"g-card g-pad20"
style=
"width: 40%; margin-top: 0"
>
<Phone
Template
:title=
"dictDesc[form.touchType].previewMobileTitle"
></PhoneTemplate
>
<Phone
Preview
:data=
"data"
/
>
</div>
</div>
</div>
</div>
<div
class=
"g-card g-pad20"
>
<div
class=
"g-card g-pad20"
>
...
...
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