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 4875075e
authored
Jan 31, 2023
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
短链
1 parent
f84b7613
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
27 deletions
linkwe-pc/src/api/intelligentShortLink.js
linkwe-pc/src/views/intelligentShortLink/addEdit.vue
linkwe-pc/src/views/intelligentShortLink/components/Add.vue
linkwe-pc/src/api/intelligentShortLink.js
View file @
4875075
...
@@ -38,7 +38,7 @@ export function add(data) {
...
@@ -38,7 +38,7 @@ export function add(data) {
// 修改
// 修改
export
function
update
(
data
)
{
export
function
update
(
data
)
{
return
request
({
return
request
({
url
:
service
+
'/update/'
+
id
,
url
:
service
+
'/update/'
+
data
.
id
,
method
:
'PUT'
,
method
:
'PUT'
,
data
,
data
,
})
})
...
...
linkwe-pc/src/views/intelligentShortLink/addEdit.vue
View file @
4875075
...
@@ -28,6 +28,7 @@ export default {
...
@@ -28,6 +28,7 @@ export default {
watch
:
{},
watch
:
{},
created
()
{},
created
()
{},
mounted
()
{
mounted
()
{
this
.
$route
.
query
.
id
&&
this
.
getDetail
()
this
.
clipboard
=
new
this
.
ClipboardJS
(
'.copy-btn'
)
this
.
clipboard
=
new
this
.
ClipboardJS
(
'.copy-btn'
)
},
},
destroyed
()
{
destroyed
()
{
...
@@ -38,8 +39,8 @@ export default {
...
@@ -38,8 +39,8 @@ export default {
this
.
loading
=
true
this
.
loading
=
true
let
id
=
this
.
$route
.
query
.
id
let
id
=
this
.
$route
.
query
.
id
getDetail
(
id
)
getDetail
(
id
)
.
then
((
res
)
=>
{
.
then
((
{
data
}
)
=>
{
this
.
form
=
res
this
.
form
=
data
})
})
.
catch
((
e
)
=>
{
.
catch
((
e
)
=>
{
console
.
log
(
e
)
console
.
log
(
e
)
...
...
linkwe-pc/src/views/intelligentShortLink/components/Add.vue
View file @
4875075
<
script
>
<
script
>
import
{
touchTypeDict
}
from
'./mixin'
import
{
touchTypeDict
}
from
'./mixin'
import
{
getCode
}
from
'@/api/drainageCode/store'
export
default
{
export
default
{
components
:
{
components
:
{},
SelectQrCode
:
()
=>
import
(
'@/components/SelectQrCode.vue'
),
SelectStaffQrCode
:
()
=>
import
(
'@/components/SelectStaffQrCode.vue'
),
},
props
:
{
props
:
{
form
:
{
form
:
{
type
:
Object
,
type
:
Object
,
...
@@ -39,8 +37,13 @@ export default {
...
@@ -39,8 +37,13 @@ export default {
3
:
'微信群'
,
3
:
'微信群'
,
10
:
'小程序'
,
10
:
'小程序'
,
}),
}),
selectQrCodeVisible
:
false
,
selectStaffQrCodeVisible
:
false
,
selectQrCode
:
()
=>
import
(
'@/components/SelectQrCode.vue'
),
selectStaffQrCode
:
()
=>
import
(
'@/components/SelectStaffQrCode.vue'
),
component
:
''
,
qrCodeVisible
:
false
,
storeLoading
:
false
,
}
}
},
},
computed
:
{
computed
:
{
...
@@ -48,12 +51,27 @@ export default {
...
@@ -48,12 +51,27 @@ export default {
return
this
.
$route
.
path
.
endsWith
(
'/detail'
)
return
this
.
$route
.
path
.
endsWith
(
'/detail'
)
},
},
},
},
watch
:
{},
watch
:
{
'form.type'
(
val
)
{
if
([
6
,
8
].
includes
(
+
val
))
{
this
.
storeLoading
=
true
getCode
({
6
:
1
,
8
:
2
}[
val
])
.
then
(({
data
})
=>
{
this
.
form
.
qrCode
=
data
&&
data
.
storeCodeConfigQr
this
.
storeLoading
=
false
})
.
finally
(()
=>
{
this
.
storeLoading
=
false
})
}
},
},
created
()
{},
created
()
{},
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
choiceQqcode
(
type
)
{
choiceQqcode
(
type
)
{
this
[
type
==
4
?
'selectStaffQrCodeVisible'
:
'selectQrCodeVisible'
]
=
true
this
.
qrCodeVisible
=
true
this
.
component
=
this
[
type
==
4
?
'selectStaffQrCode'
:
'selectQrCode'
]
},
},
// 选择二维码确认按钮
// 选择二维码确认按钮
submitSelectQrCode
(
data
)
{
submitSelectQrCode
(
data
)
{
...
@@ -111,29 +129,34 @@ export default {
...
@@ -111,29 +129,34 @@ export default {
<upload
class=
"image-uploader"
:fileUrl
.
sync=
"form.qrCode"
></upload>
<upload
class=
"image-uploader"
:fileUrl
.
sync=
"form.qrCode"
></upload>
</el-form-item>
</el-form-item>
</
template
>
</
template
>
<!-- 员工活码,客群活码 -->
<!-- 员工活码,客群活码 -->
<
template
v-else-if=
"[4, 5].includes(+form.type)"
>
<
template
v-else-if=
"[4, 5, 6, 8].includes(+form.type)"
>
<el-form-item
prop=
"5"
:label=
"'选择' + touchTypeDict[form.type].name"
>
<el-form-item
prop=
"qrCodeId"
:label=
"touchTypeDict[form.type].name"
>
<!--
<el-form-item
prop=
"5"
:label=
"'选择' + touchTypeDict[form.type].name"
>
-->
<el-image
<el-image
v-if=
"form.qrCode"
v-if=
"form.qrCode"
class=
"mr10"
class=
"mr10"
style=
"width: 1
00px; height: 10
0px; vertical-align: middle"
style=
"width: 1
50px; height: 15
0px; vertical-align: middle"
:src=
"form.qrCode"
:src=
"form.qrCode"
fit=
"fit"
></el-image>
fit=
"fit"
></el-image>
<!--
<span>
{{
form
.
qrCodeName
}}
</span>
-->
<el-button
type=
"primary"
plain
@
click=
"choiceQqcode(form.type, '选择' + touchTypeDict[form.type].name)"
>
<!-- 员工活码,客群活码 -->
<el-button
v-if=
"[4, 5].includes(+form.type)"
type=
"primary"
plain
@
click=
"choiceQqcode(form.type)"
>
选择
{{
touchTypeDict
[
form
.
type
].
name
}}
选择
{{
touchTypeDict
[
form
.
type
].
name
}}
</el-button>
</el-button>
</el-form-item>
<!-- 门店导购活码,门店群活码 -->
</
template
>
<el-button
<!-- 门店导购活码,门店群活码 -->
v-else-if=
"[6, 8].includes(+form.type) && !form.qrCode"
<
template
v-else-if=
"[6, 8].includes(+form.type)"
>
v-loading=
"storeLoading"
<el-form-item
prop=
"qrCodeId"
:label=
"touchTypeDict[form.type].name"
>
type=
"primary"
<el-button
type=
"primary"
plain
@
click=
"choiceQqcode(form.type, '选择' + touchTypeDict[form.type].name)"
>
plain
@
click=
"$router.push('/drainageCode/qrCode/store/list')"
>
暂无
{{
touchTypeDict
[
form
.
type
].
name
}}
,去配置
暂无
{{
touchTypeDict
[
form
.
type
].
name
}}
,去配置
</el-button>
</el-button>
</el-form-item>
</el-form-item>
</
template
>
</
template
>
<!-- 个人小程序 -->
<!-- 个人小程序 -->
<
template
v-else-if=
"form.type == 7"
>
<
template
v-else-if=
"form.type == 7"
>
<el-form-item
prop=
"name"
label=
"小程序名称"
>
<el-form-item
prop=
"name"
label=
"小程序名称"
>
...
@@ -172,17 +195,23 @@ export default {
...
@@ -172,17 +195,23 @@ export default {
</
template
>
</
template
>
</el-form>
</el-form>
<
template
v-if=
"isDetail"
>
<keepAlive>
<SelectQrCode
<component
:is=
"component"
:visible
.
sync=
"qrCodeVisible"
@
success=
"submitSelectQrCode"
:selected=
"[form.qrCodeId].filter((e) => !!e)"
/>
<!-- <SelectQrCode
:visible.sync="selectQrCodeVisible"
:visible.sync="selectQrCodeVisible"
@success="submitSelectQrCode"
@success="submitSelectQrCode"
:selected=
"[form.qrCodeId]"
></SelectQrCode>
:selected="[form.qrCodeId]
.filter((e) => !!e)
"></SelectQrCode>
<SelectStaffQrCode
<SelectStaffQrCode
:visible.sync="selectStaffQrCodeVisible"
:visible.sync="selectStaffQrCodeVisible"
@success="submitSelectQrCode"
@success="submitSelectQrCode"
:selected=
"[form.qrCodeId]
"
></SelectStaffQrCode
>
:selected="[form.qrCodeId]
.filter((e) => !!e)"></SelectStaffQrCode> --
>
</
templat
e
>
</
keepAliv
e>
</div>
</div>
</template>
</template>
...
...
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