bootGuide.vue
8.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
<template>
<div class="boot-guide">
<div class="top">
<span class="title">
还差最后一步:设置应用侧边栏。即可完成基础权限配置,使用{{ lwConfig.SYSTEM_NAME }}系统功能啦~
</span>
<el-steps class="g-card" style="margin-top: 10px" :active="currentActive" align-center finish-status="success">
<el-step title="应用:客户画像"></el-step>
<el-step title="应用:聊天素材"></el-step>
<el-step title="应用:关键词群"></el-step>
<el-step title="应用:红包"></el-step>
</el-steps>
</div>
<div class="content-box">
<div v-for="(list, i) in stepDataList" :key="i" class="content">
<div v-show="currentActive === i" class="tab">
<div v-for="(item, index) in list.boxData" :key="index">
<div class="title-one">
<span class="left">{{ index + 1 }}、</span>
<div class="right">
{{ item.title }}
</div>
</div>
<div class="box">
<img :src="item.url" alt="" />
</div>
</div>
<div class="title-one">
<span class="left">{{ list.boxDataTwo.step }}、</span>
<div class="right">
<div class="right-text">
{{ list.boxDataTwo.title1 }}
</div>
<div class="right-text">
输入页面名称:{{ list.boxDataTwo.title2 }}
<el-button type="primary" size="mini" @click="handleCopy(list.boxDataTwo.title2)">复制名称</el-button>
</div>
<div class="right-text">{{ list.boxDataTwo.title3 }}</div>
<div class="right-text">
{{ list.boxDataTwo.title4 }}
<el-button type="primary" size="mini" @click="handleCopy(list.boxDataTwo.title4)">复制链接</el-button>
</div>
</div>
</div>
<div class="box">
<img :src="list.boxDataTwo.url" alt="" />
</div>
<div class="bottom">
<div class="bottom-content">
<el-button type="primary" @click="back()" v-if="currentActive > 0">{{ list.buttonData.one }}</el-button>
<el-button type="primary" @click="next()" v-if="currentActive < 4">{{ list.buttonData.two }}</el-button>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { getToken } from '@/utils/auth'
import { noviceGuideInfo } from '@/api/login.js'
export default {
name: 'customer-service-manage-add',
data() {
return {
currentActive: 0,
stepDataList: [
{
boxData: [
{
title: `管理员账号登录企业微信管理后台——进入【应用管理】——点击【${lwConfig.SYSTEM_NAME_MOBILE}】`,
url: require('@/assets/register/guid/customer-portrait-one.png'),
},
{
title: `在【${lwConfig.SYSTEM_NAME_MOBILE}】应用内找到“配置到聊天工具栏”功能中的“配置”按钮`,
url: require('@/assets/register/guid/customer-portrait-two.png'),
},
{
title: '进入“配置到聊天工具栏”功能页后点击“配置页面”按钮配置路径',
url: require('@/assets/register/guid/customer-portrait-three.png'),
},
],
boxDataTwo: {
step: 4,
title1: '配置【客户画像】功能页,请按照以下信息进行填写',
title2: '客户画像',
title3: '输入页面内容:选择“自定义”,内容链接为:',
title4: 'https://×××××××',
url: require('@/assets/register/guid/customer-portrait-four.png'),
},
buttonData: {
one: '返回上一步',
two: '我已配置,进入下一步',
},
},
{
boxData: [
{
title: '在当前页面内点击“继续配置”按钮',
url: require('@/assets/register/guid/chat-material-five.png'),
},
],
boxDataTwo: {
step: 2,
title1: '配置【聊天素材】功能页,请按照以下信息进行填写',
title2: '聊天素材',
title3: '输入页面内容:选择“自定义”,内容链接为:',
title4: 'https://×××××××',
url: require('@/assets/register/guid/chat-material-six.png'),
},
buttonData: {
one: '返回上一步',
two: '我已配置,进入下一步',
},
},
{
boxData: [
{
title: '在当前页面内点击“继续配置”按钮',
url: require('@/assets/register/guid/keyword-group-seven.png'),
},
],
boxDataTwo: {
step: 2,
title1: '配置【关键词群】功能页,请按照以下信息进行填写',
title2: '关键词群',
title3: '输入页面内容:选择“自定义”,内容链接为:',
title4: 'https://×××××××',
url: require('@/assets/register/guid/keyword-group-eight.png'),
},
buttonData: {
one: '返回上一步',
two: '我已配置,进入下一步',
},
},
{
boxData: [
{
title: '在当前页面内点击“继续配置”按钮',
url: require('@/assets/register/guid/red-envelopes-nine.png'),
},
],
boxDataTwo: {
step: 2,
title1: '配置【红包】功能页,请按照以下信息进行填写',
title2: '红包',
title3: '输入页面内容:选择“自定义”,内容链接为:',
title4: 'https://×××××××',
url: require('@/assets/register/guid/red-envelopes-ten.png'),
},
buttonData: {
one: '返回上一步',
two: '配置完成,进入系统',
},
},
],
}
},
components: {},
methods: {
// 复制文本
handleCopy(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' })
},
// 上一步
back() {
this.currentActive--
},
// 下一步
next() {
if (this.currentActive === 3) {
this.$router.push({
path: '/',
})
} else {
this.currentActive++
}
},
},
mounted() {
let token = getToken()
noviceGuideInfo(token).then((res) => {
this.stepDataList[0].boxDataTwo.title2 = res.data.customerPortraitName
this.stepDataList[0].boxDataTwo.title4 = res.data.customerPortraitUrl
this.stepDataList[1].boxDataTwo.title2 = res.data.materialName
this.stepDataList[1].boxDataTwo.title4 = res.data.materialUrl
this.stepDataList[2].boxDataTwo.title2 = res.data.wordGroupName
this.stepDataList[2].boxDataTwo.title4 = res.data.wordGroupUrl
this.stepDataList[3].boxDataTwo.title2 = res.data.redEnvelopesName
this.stepDataList[3].boxDataTwo.title4 = res.data.redEnvelopesUrl
})
},
created() {},
}
</script>
<style lang="scss" scoped>
svg.svg-icon {
width: 30px;
height: 30px;
}
.boot-guide {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
.top {
width: 80%;
height: 146px;
border-radius: 4px;
background-color: #fff;
padding-top: 20px;
margin-top: 20px;
margin-bottom: 10px;
.title {
margin-left: 120px;
font-size: 16px;
}
}
.content-box {
width: 80%;
padding: 20px;
background: #fff;
padding-bottom: 60px;
}
.content {
// width: 80%;
}
.tab {
background: #fff;
border-top: 1px solid #f1f1f1;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
// margin-top: 10px;
// padding: 20px;
overflow: auto;
height: calc(100vh - 340px);
.title-one {
width: 100%;
line-height: 40px;
padding-left: 20px;
background-color: #ecf5ff;
margin-bottom: 20px;
border-radius: 4px;
font-size: 16px;
display: flex;
.left {
color: var(--color);
font-weight: 600;
}
.right {
.el-button {
margin-left: 10px;
}
}
}
.box {
width: 100%;
// margin-bottom: 20px;
img {
width: 100%;
}
}
.bottom {
.bottom-content {
position: fixed;
bottom: 40px;
left: 60%;
}
}
}
</style>