Commit 3be5b6f6 by 怪兽?别跑

获客助手调试

1 parent 1cfaa047
...@@ -80,7 +80,28 @@ ...@@ -80,7 +80,28 @@
</div> </div>
</template> </template>
<template v-else> <template v-else>
<div></div> <div class="page">
<div class="code-wrapper">
<div class="code-success">
<el-button type="success" icon="el-icon-check" circle></el-button>
</div>
<div class="code-text">获客链接创建成功,支持复制链接即可使用</div>
<el-form label-width="140px" style="display: inline-block;">
<el-form-item label="获客链接:">
<div style="text-align: left;">
{{ detail.linkUrl }}
<el-button type="text" @click="copyFn(detail.linkUrl)">复制</el-button>
</div>
</el-form-item>
<el-form-item label="获客短链:">
<div style="text-align: left;">
{{ detail.linkShortUrl }}
<el-button type="text" @click="copyFn(detail.linkShortUrl)">复制</el-button>
</div>
</el-form-item>
</el-form>
</div>
</div>
</template> </template>
</div> </div>
<div class="g-card ac"> <div class="g-card ac">
...@@ -117,7 +138,7 @@ ...@@ -117,7 +138,7 @@
data() { data() {
return { return {
id: '', id: '',
active: 0, active: 1,
loading: false, loading: false,
tagList: [], tagList: [],
userList: [], userList: [],
...@@ -155,6 +176,16 @@ ...@@ -155,6 +176,16 @@
} }
}, },
methods: { methods: {
copyFn(text) {
const input = document.createElement('input')
input.style.cssText = 'opacity: 0;'
input.type = 'text'
input.value = text // 修改文本框的内容
document.body.appendChild(input)
input.select() // 选中文本
document.execCommand('copy') // 执行浏览器复制命令
this.$message({ message: '复制成功', type: 'success' })
},
submit() { submit() {
this.$refs['form'].validate((validate) => { this.$refs['form'].validate((validate) => {
if (validate) { if (validate) {
...@@ -207,7 +238,7 @@ ...@@ -207,7 +238,7 @@
this.dialogVisibleSelectUser = true this.dialogVisibleSelectUser = true
}, },
selectedUser(data) { selectedUser(data) {
if (data.length > 1) { if (data.length > 100) {
this.msgError('最多选择100名成员') this.msgError('最多选择100名成员')
return return
} }
...@@ -372,4 +403,13 @@ ...@@ -372,4 +403,13 @@
font-weight: 400; font-weight: 400;
color: var(--font-black-6); color: var(--font-black-6);
} }
.code-wrapper {
text-align: center;
.code-success,
.code-text,
.code-actions {
padding: 20px 0;
}
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!