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 1f70d05c
authored
Feb 02, 2023
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
短链
1 parent
595d317c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
91 additions
and
77 deletions
linkwe-pc/src/views/intelligentShortLink/components/Add.vue
linkwe-pc/src/views/intelligentShortLink/components/PhonePreview.vue
linkwe-uniapp/pages/index/index.vue
linkwe-pc/src/views/intelligentShortLink/components/Add.vue
View file @
1f70d05
...
...
@@ -76,8 +76,24 @@ export default {
// 选择二维码确认按钮
submitSelectQrCode
(
data
)
{
this
.
form
.
qrCodeId
=
data
.
id
// this.form.qrCodeName = data.activityName
this
.
form
.
qrCode
=
data
.
codeUrl
||
data
.
qrCode
if
(
this
.
form
.
type
==
4
)
{
let
desc
=
[]
data
.
qrUserInfos
&&
data
.
qrUserInfos
.
forEach
((
element
)
=>
{
element
.
weQrUserList
&&
element
.
weQrUserList
.
forEach
((
el
)
=>
{
desc
.
push
(
el
.
userName
)
})
})
this
.
form
.
describe
=
desc
+
''
this
.
form
.
name
=
data
.
name
this
.
form
.
qrCode
=
data
.
qrCode
}
else
{
this
.
form
.
describe
=
data
.
tags
this
.
form
.
name
=
data
.
activityName
this
.
form
.
qrCode
=
data
.
codeUrl
}
// this.$refs.form.validateField('groupCodeId')
},
},
...
...
@@ -131,49 +147,40 @@ export default {
</
template
>
<!-- 员工活码,客群活码 -->
<
template
v-else-if=
"[4, 5
, 6, 8
].includes(+form.type)"
>
<
template
v-else-if=
"[4, 5].includes(+form.type)"
>
<el-form-item
prop=
"qrCodeId"
:label=
"touchTypeDict[form.type].name"
>
<!--
<el-form-item
prop=
"5"
:label=
"'选择' + touchTypeDict[form.type].name"
>
-->
<el-image
v-if=
"form.qrCode"
class=
"mr10"
style=
"width: 150px; height: 150px; vertical-align: middle"
:src=
"form.qrCode"
fit=
"fit"
></el-image>
<!-- 员工活码,客群活码 -->
<el-button
v-if=
"[4, 5].includes(+form.type)"
type=
"primary"
plain
@
click=
"choiceQqcode(form.type)"
>
选择
{{
touchTypeDict
[
form
.
type
].
name
}}
</el-button>
<!-- 门店导购活码,门店群活码 -->
<el-button
v-else-if=
"[6, 8].includes(+form.type) && !form.qrCode"
v-loading=
"storeLoading"
type=
"primary"
plain
@
click=
"$router.push('/drainageCode/qrCode/store/list')"
>
暂无
{{
touchTypeDict
[
form
.
type
].
name
}}
,去配置
<el-button
v-if=
"!form.qrCode"
type=
"primary"
plain
@
click=
"choiceQqcode(form.type)"
>
{{
'选择'
+
touchTypeDict
[
form
.
type
].
name
}}
</el-button>
<el-form
v-else
label-width=
""
>
<el-form-item
label=
"活码名称"
>
{{
form
.
name
}}
</el-form-item>
<el-form-item
:label=
"form.type == 4 ? '使用员工' : '活码客群'"
>
<tag-ellipsis
v-if=
"form.describe"
limit=
"2"
:list=
"form.describe.split(',')"
></tag-ellipsis>
</el-form-item>
<el-form-item
label=
"二维码"
>
<el-image
class=
"mr10 qrCode"
:src=
"form.qrCode"
fit=
"fit"
></el-image>
<el-button
type=
"text"
@
click=
"choiceQqcode(form.type)"
>
修改
</el-button>
</el-form-item>
</el-form>
</el-form-item>
</
template
>
<!-- 个人小程序 -->
<
template
v-else-if=
"form.type == 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=
"50"
show-word-limit
></el-input>
</el-form-item>
</
template
>
<!-- 企业小程序 -->
<
template
v-else-if=
"form.type == 9"
>
<!-- 门店导购活码,门店群活码 -->
<el-form-item
v-else-if=
"[6, 8].includes(+form.type)"
prop=
"5"
:label=
"'选择' + touchTypeDict[form.type].name"
>
<el-button
v-if=
"form.qrCode"
v-loading=
"storeLoading"
type=
"primary"
plain
@
click=
"$router.push('/drainageCode/qrCode/store/list')"
>
暂无{{ touchTypeDict[form.type].name }},去配置
</el-button>
<el-image
v-else
class=
"mr10 qrCode"
:src=
"form.qrCode"
fit=
"fit"
></el-image>
</el-form-item>
<!-- 个人小程序,企业小程序 -->
<
template
v-else-if=
"[7, 9].includes(+form.type)"
>
<el-form-item
prop=
"name"
label=
"小程序名称"
>
<el-input
clearable
v-model=
"form.name"
placeholder=
"请输入"
maxlength=
"15"
show-word-limit
></el-input>
</el-form-item>
...
...
@@ -181,16 +188,18 @@ export default {
<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-input
clearable
v-model=
"form.appId"
placeholder=
"请输入"
show-word-limit
></el-input>
</el-form-item>
<!--
<template
v-if=
"form.type == 0"
>
<el-form-item
prop=
"secret"
label=
"小程序Secret"
>
<el-input
clearable
v-model=
"form.secret"
placeholder=
"请输入"
maxlength=
"30"
show-word-limit
></el-input>
<el-input
clearable
v-model=
"form.secret"
placeholder=
"请输入"
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=
""
label=
"小程序原始ID"
>
<el-input
clearable
v-model=
"form.name"
placeholder=
"请输入"
show-word-limit
></el-input>
</el-form-item>
</
template
>
-->
<el-form-item
prop=
"longLink"
label=
"小程序页面路径"
>
<el-input
clearable
v-model=
"form.longLink"
placeholder=
"请输入"
maxlength=
"30"
show-word-limit
></el-input>
<el-input
clearable
v-model=
"form.longLink"
placeholder=
"请输入"
show-word-limit
></el-input>
</el-form-item>
</template>
</el-form>
...
...
@@ -220,4 +229,9 @@ export default {
color
:
#aaa
;
font-size
:
12px
;
}
::v-deep
.qrCode
{
width
:
150px
;
height
:
150px
;
vertical-align
:
bottom
;
}
</
style
>
linkwe-pc/src/views/intelligentShortLink/components/PhonePreview.vue
View file @
1f70d05
...
...
@@ -33,33 +33,29 @@ export default {
<div
class=
"cc ac g-card g-pad20"
style=
"width: 70%"
>
公众号文章示例
</div>
</div>
</
template
>
<
template
v-else-if=
"[7, 9].includes(+data.type)"
>
<div
class=
"g-card g-pad20 cc ac"
style=
"width: 70%; padding-bottom: 50px"
>
<div
v-else
class=
"g-card g-pad20 cc ac"
style=
"width: 70%; padding-bottom: 50px"
>
<!-- 个人小程序,企业小程序 -->
<
template
v-if=
"[7, 9].includes(+data.type)"
>
<div
class=
"mt10"
>
{{
data
.
name
||
'小程序'
}}
</div>
<div
class=
"mt20 mb20"
>
<el-image
style=
"width: 120px; height: 120px"
:src=
"data.avatar"
>
<!--
<div
slot=
"placeholder"
>
请设置
</div>
-->
</el-image>
<el-image
style=
"width: 120px; height: 120px"
:src=
"data.avatar"
></el-image>
</div>
<el-button
type=
"primary"
>
点击打开
{{
data
.
name
||
'小程序'
}}
</el-button>
</div>
</
template
>
<
template
v-else
>
<div
class=
"g-card g-pad20 cc ac"
style=
"width: 70%"
>
<div
class=
"al bfc-o"
>
<el-image
class=
"fl mr10"
style=
"width: 50px; height: 50px"
:src=
"data.avatar"
error=
"头像"
fit=
"fit"
></el-image>
</
template
>
<
template
v-else
>
<!-- 员工活码,客群活码-->
<div
v-if=
"[4, 5].includes(+data.type)"
class=
"mt10"
>
{{
data
.
name
||
'活码名称'
}}
</div>
<div
v-else
class=
"al bfc-o"
>
<el-image
class=
"fl mr10"
style=
"width: 50px; height: 50px"
:src=
"data.avatar"
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=
"data.qrCode"
fit=
"fit"
></el-image>
<div
class=
"mt20"
>
长按二维码
{{
touchTypeDict
[
data
.
type
].
previewMobileTitle
}}
</div>
</
div
>
</
template
>
</
template
>
</
div
>
</PhoneTemplate>
</div>
</div>
...
...
linkwe-uniapp/pages/index/index.vue
View file @
1f70d05
...
...
@@ -5,28 +5,32 @@
<web-view
:webview-styles=
"webviewStyles"
:src=
"data.longLink"
></web-view>
</div>
</
template
>
<
template
v-else-if=
"[7, 9].includes(+data.type)"
>
<div
class=
"g-card g-pad20 cc ac"
style=
"width: 70%"
>
<div
v-else
class=
"g-card g-pad20 cc ac"
style=
"width: 70%"
>
<!-- 个人小程序,企业小程序 -->
<
template
v-if=
"[7, 9].includes(+data.type)"
>
<div
class=
""
>
{{
data
.
name
||
'小程序'
}}
</div>
<div
class=
"mt20 mb20"
>
<image
style=
"width: 150px; height: 150px"
:src=
"data.avatar"
show-menu-by-longpress
fit=
"fit"
></image>
</div>
<button
type=
"primary"
@
tap=
"open()"
>
点击打开
{{
data
.
name
||
'小程序'
}}
</button>
</div>
</
template
>
<
template
v-else
>
<div
class=
"g-card g-pad20 cc ac"
style=
"width: 70%"
>
<div
class=
"al bfc-o"
>
<image
class=
"fl mr10"
style=
"width: 50px; height: 50px"
:src=
"data.avatar"
show-menu-by-longpress
fit=
"fit"
>
</
template
>
<
template
v-else
>
<!-- 员工活码,客群活码-->
<div
v-if=
"[4, 5].includes(+data.type)"
class=
"mt10"
>
{{
data
.
name
||
'活码名称'
}}
</div>
<div
v-else
class=
"al bfc-o"
>
<image
class=
"fl mr10"
style=
"width: 50px; height: 50px"
:src=
"data.avatar"
show-menu-by-longpress
>
</image>
<div
class=
"toe"
>
{{
data
.
name
||
'
无
名称'
}}
</div>
<div
class=
"tips mt20 toe"
>
{{
data
.
describe
||
'
无
描述'
}}
</div>
<div
class=
"toe"
>
{{
data
.
name
||
'名称'
}}
</div>
<div
class=
"tips mt20 toe"
>
{{
data
.
describe
||
'描述'
}}
</div>
</div>
<image
style=
"width: 180px; height: 180px; margin: 20px 0"
:src=
"data.qrCode"
show-menu-by-longpress
fit=
"fit"
>
<image
style=
"width: 180px; height: 180px; margin: 20px 0"
:src=
"data.qrCode"
show-menu-by-longpress
>
</image>
<div
class=
"mt20"
>
长按二维码
{{
touchTypeDict
[
data
.
type
].
previewMobileTitle
}}
</div>
</
div
>
</
template
>
</
template
>
</
div
>
</view>
</template>
...
...
@@ -47,7 +51,7 @@
}
},
onLoad
(
options
)
{
console
.
log
(
'onLoad options'
,
options
);
// 场景值为 1065
console
.
log
(
'onLoad options'
,
options
);
this
.
getDetail
(
options
.
id
)
},
created
()
{
...
...
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