Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-sensitive-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.foundation.frontend
pica-sensitive-admin
提交
5070f21b
提交
5070f21b
编写于
11月 27, 2020
作者:
huangwensu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
漏斗接口联调
上级
fc396ea6
变更
4
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
194 行增加
和
99 行删除
+194
-99
env.js
src/common/env.js
+5
-0
add-funnel.vue
src/views/user-path/add-funnel.vue
+83
-18
funnel-data.vue
src/views/user-path/funnel-data.vue
+103
-78
funnel.vue
src/views/user-path/funnel.vue
+3
-3
未找到文件。
src/common/env.js
浏览文件 @
5070f21b
...
@@ -19,6 +19,7 @@ export const getAddress = () => {
...
@@ -19,6 +19,7 @@ export const getAddress = () => {
let
ipAddress
=
"https://"
+
window
.
location
.
host
;
let
ipAddress
=
"https://"
+
window
.
location
.
host
;
// let ipAddress = "http://localhost:8099";
// let ipAddress = "http://localhost:8099";
let
env
=
getTestEnv
(
ipAddress
);
let
env
=
getTestEnv
(
ipAddress
);
let
versionUrl
=
""
;
let
preViewUrl
=
""
let
preViewUrl
=
""
let
qiniuImgUrl
=
""
;
let
qiniuImgUrl
=
""
;
let
qiniuFileUrl
=
''
;
let
qiniuFileUrl
=
''
;
...
@@ -41,6 +42,7 @@ export const getAddress = () => {
...
@@ -41,6 +42,7 @@ export const getAddress = () => {
//本地
//本地
if
(
ipAddress
.
indexOf
(
"localhost"
)
>
-
1
||
ipAddress
.
indexOf
(
"10.177.10.118"
)
>
-
1
||
ipAddress
.
indexOf
(
"test-kf"
)
>
-
1
)
{
if
(
ipAddress
.
indexOf
(
"localhost"
)
>
-
1
||
ipAddress
.
indexOf
(
"10.177.10.118"
)
>
-
1
||
ipAddress
.
indexOf
(
"test-kf"
)
>
-
1
)
{
ipAddress
=
"http://localhost:7070"
;
ipAddress
=
"http://localhost:7070"
;
versionUrl
=
'https://dev-dev.yunqueyi.com'
;
preViewUrl
=
"http://localhost:9090/#/template"
;
preViewUrl
=
"http://localhost:9090/#/template"
;
qiniuImgUrl
=
"https://test1-file.yunqueyi.com"
;
qiniuImgUrl
=
"https://test1-file.yunqueyi.com"
;
resource_url
=
"https://test-file.yunqueyi.com"
;
resource_url
=
"https://test-file.yunqueyi.com"
;
...
@@ -64,6 +66,7 @@ export const getAddress = () => {
...
@@ -64,6 +66,7 @@ export const getAddress = () => {
qiniuFileUrl
=
"http://dev-sc.yunqueyi.com/contents/admin/qiniu/token1"
;
qiniuFileUrl
=
"http://dev-sc.yunqueyi.com/contents/admin/qiniu/token1"
;
qiniuResourceUrl
=
"https://test1-videos.yunqueyi.com"
;
qiniuResourceUrl
=
"https://test1-videos.yunqueyi.com"
;
}
else
if
(
isNotEmptyUtils
(
env
))
{
//测试test1 test2 uat
}
else
if
(
isNotEmptyUtils
(
env
))
{
//测试test1 test2 uat
versionUrl
=
'https://'
+
env
+
'-dev.yunqueyi.com'
;
preViewUrl
=
"https://"
+
env
+
"-phome.yunqueyi.com"
+
"/template/#/template"
preViewUrl
=
"https://"
+
env
+
"-phome.yunqueyi.com"
+
"/template/#/template"
qiniuFileUrl
=
"https://"
+
env
+
"-sc.yunqueyi.com"
+
"/contents/admin/qiniu/token1"
;
qiniuFileUrl
=
"https://"
+
env
+
"-sc.yunqueyi.com"
+
"/contents/admin/qiniu/token1"
;
qiniuImgUrl
=
"https://test1-file.yunqueyi.com"
;
qiniuImgUrl
=
"https://test1-file.yunqueyi.com"
;
...
@@ -97,6 +100,7 @@ export const getAddress = () => {
...
@@ -97,6 +100,7 @@ export const getAddress = () => {
lectureUrl
=
"https://"
+
env
+
"-sc.yunqueyi.com"
lectureUrl
=
"https://"
+
env
+
"-sc.yunqueyi.com"
}
}
}
else
{
//生产环境
}
else
{
//生产环境
versionUrl
=
'https://dev.yunqueyi.com'
;
preViewUrl
=
"https://phome.yunqueyi.com"
+
"/template/#/template"
preViewUrl
=
"https://phome.yunqueyi.com"
+
"/template/#/template"
qiniuFileUrl
=
"https://sc.yunqueyi.com"
+
"/contents/admin/qiniu/token1"
;
qiniuFileUrl
=
"https://sc.yunqueyi.com"
+
"/contents/admin/qiniu/token1"
;
qiniuImgUrl
=
"https://files.yunqueyi.com"
;
//qiniu存储域名
qiniuImgUrl
=
"https://files.yunqueyi.com"
;
//qiniu存储域名
...
@@ -116,6 +120,7 @@ export const getAddress = () => {
...
@@ -116,6 +120,7 @@ export const getAddress = () => {
qiniuResourceUrl
=
"https://video.yunqueyi.com"
;
//qiniu存储域名
qiniuResourceUrl
=
"https://video.yunqueyi.com"
;
//qiniu存储域名
exam_url
=
"https://sc.yunqueyi.com/exams"
;
exam_url
=
"https://sc.yunqueyi.com/exams"
;
}
}
localStorage
.
setItem
(
"versionUrl"
,
versionUrl
);
localStorage
.
setItem
(
"preViewUrl"
,
preViewUrl
);
localStorage
.
setItem
(
"preViewUrl"
,
preViewUrl
);
localStorage
.
setItem
(
"qiniuFileUrl"
,
qiniuFileUrl
);
localStorage
.
setItem
(
"qiniuFileUrl"
,
qiniuFileUrl
);
localStorage
.
setItem
(
"qiniuImgUrl"
,
qiniuImgUrl
);
localStorage
.
setItem
(
"qiniuImgUrl"
,
qiniuImgUrl
);
...
...
src/views/user-path/add-funnel.vue
浏览文件 @
5070f21b
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<el-form
ref=
"form"
:model=
"searchParam"
label-suffix=
":"
style=
"width:100%;"
>
<el-form
ref=
"form"
:model=
"searchParam"
label-suffix=
":"
style=
"width:100%;"
>
<el-col
:span=
"21"
>
<el-col
:span=
"21"
>
<el-form-item
label=
"漏斗名称"
>
<el-form-item
label=
"漏斗名称"
>
<el-input
v-model=
"searchParam.name"
maxlength=
"
2
0"
placeholder=
"请输入漏斗名称"
style=
"width:288px;"
></el-input>
<el-input
v-model=
"searchParam.name"
maxlength=
"
3
0"
placeholder=
"请输入漏斗名称"
style=
"width:288px;"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"3"
style=
"padding:0;text-align:right;padding-right:15px;"
>
<el-col
:span=
"3"
style=
"padding:0;text-align:right;padding-right:15px;"
>
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
<div
class=
"add-step"
>
<div
class=
"add-step"
>
<p>
请以用户逐步触发的事件为依据,构造漏斗、系统会自动计算整个过程的转化率。如果事件之间不连续,转化率为0!
</p>
<p>
请以用户逐步触发的事件为依据,构造漏斗、系统会自动计算整个过程的转化率。如果事件之间不连续,转化率为0!
</p>
</div>
</div>
<div
class=
"step-content"
v-for=
"(item,index) in s
tepArray
"
:key=
"index"
>
<div
class=
"step-content"
v-for=
"(item,index) in s
earchParam.actionModelList
"
:key=
"index"
>
<span>
步骤
{{
index
+
1
}}
</span>
<span>
步骤
{{
index
+
1
}}
</span>
<el-form
<el-form
ref=
"form"
ref=
"form"
...
@@ -31,17 +31,17 @@
...
@@ -31,17 +31,17 @@
style=
"width:100%;"
>
style=
"width:100%;"
>
<el-col
:span=
"11"
>
<el-col
:span=
"11"
>
<el-form-item
label=
"步骤名称"
>
<el-form-item
label=
"步骤名称"
>
<el-input
v-model=
"item.
name"
maxlength=
"2
0"
placeholder=
"请输入步骤名称"
style=
"width:200px;"
></el-input>
<el-input
v-model=
"item.
actionName"
maxlength=
"3
0"
placeholder=
"请输入步骤名称"
style=
"width:200px;"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"11"
>
<el-col
:span=
"11"
>
<el-form-item
label=
"触发事件"
>
<el-form-item
label=
"触发事件"
>
<el-select
v-model=
"item.event
"
placeholder=
"请选择用户触发事件"
style=
"width:200px"
>
<el-select
v-model=
"item.event
Id"
filterable
placeholder=
"请选择用户触发事件"
style=
"width:200px"
>
<el-option
<el-option
v-for=
"(eItem,eIndex) in eventSelect"
v-for=
"(eItem,eIndex) in eventSelect"
:key=
"eIndex"
:key=
"eIndex"
:label=
"eItem.
label
"
:label=
"eItem.
eventName
"
:value=
"eItem.
value
"
>
:value=
"eItem.
eventId
"
>
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
...
@@ -56,35 +56,100 @@
...
@@ -56,35 +56,100 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
openLoading
,
closeLoading
}
from
"../../common/utils"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
funnelId
:
''
,
searchParam
:
{
searchParam
:
{
name
:
''
name
:
''
,
},
actionModelList
:
[
stepArray
:
[
{
{
n
ame
:
''
,
actionN
ame
:
''
,
event
:
''
event
Id
:
''
}
}
]
]
,
}
,
eventSelect
:
[]
eventSelect
:
[]
}
}
},
},
created
()
{
this
.
funnelId
=
this
.
$route
.
query
.
id
;
},
mounted
()
{
this
.
getEventList
();
if
(
this
.
funnelId
)
this
.
getFunnelDetail
();
},
methods
:
{
methods
:
{
// 封装一下请求通用的方法
getData
(
type
,
url
,
req
,
callback
)
{
openLoading
(
this
);
this
.
$axios
[
type
](
localStorage
.
getItem
(
"lectureUrl"
)
+
url
,
req
)
.
then
(
res
=>
{
closeLoading
(
this
);
let
data
=
res
.
data
;
if
(
data
.
code
==
"000000"
)
{
if
(
callback
)
callback
(
data
);
}
else
{
this
.
$message
.
error
(
data
.
message
);
}
})
},
// 获取触发事件列表
getEventList
()
{
let
req
=
this
.
searchParam
.
name
;
this
.
getData
(
"get"
,
`/session/funnel/eventList?searchName=
${
req
}
`
,
{},
res
=>
{
this
.
eventSelect
=
res
.
data
;
}
);
},
// 编辑获取漏斗详情
getFunnelDetail
()
{
this
.
getData
(
"get"
,
`/session/funnel/detail/
${
this
.
funnelId
}
`
,
{},
res
=>
{
if
(
res
.
code
==
'000000'
)
{
this
.
searchParam
=
res
.
data
;
}
}
);
},
// 保存
// 保存
saveAddAndEdit
()
{
saveAddAndEdit
()
{
if
(
!
this
.
searchParam
.
name
)
{
this
.
$message
.
error
(
'请输入漏斗名称'
);
return
;
}
for
(
let
i
=
0
;
i
<
this
.
searchParam
.
actionModelList
.
length
;
i
++
)
{
if
(
!
this
.
searchParam
.
actionModelList
[
i
].
eventId
)
{
this
.
$message
.
error
(
'触发事件不能为空'
);
return
;
}
}
let
req
=
this
.
searchParam
;
this
.
getData
(
"post"
,
`/session/funnel/save`
,
req
,
res
=>
{
if
(
res
.
code
==
'000000'
)
{
this
.
$message
.
success
(
'转化漏斗创建成功'
);
this
.
$router
.
push
({
path
:
'user-path'
});
}
else
{
this
.
$message
.
error
(
res
.
message
);
}
}
);
},
},
// 删除步骤
// 删除步骤
deleteSteps
(
i
)
{
deleteSteps
(
i
)
{
this
.
stepArray
.
splice
(
i
,
1
);
this
.
$message
.
success
(
'删除成功'
);
this
.
searchParam
.
actionModelList
.
splice
(
i
,
1
);
},
},
// 增加步骤
// 增加步骤
addSteps
()
{
addSteps
()
{
this
.
s
tepArray
.
push
({
this
.
s
earchParam
.
actionModelList
.
push
({
n
ame
:
''
,
actionN
ame
:
''
,
event
:
''
event
Id
:
''
});
});
}
}
}
}
...
...
src/views/user-path/funnel-data.vue
浏览文件 @
5070f21b
此差异已折叠。
点击以展开。
src/views/user-path/funnel.vue
浏览文件 @
5070f21b
...
@@ -114,12 +114,12 @@ export default {
...
@@ -114,12 +114,12 @@ export default {
this
.
$router
.
push
({
path
:
'add-funnel'
});
this
.
$router
.
push
({
path
:
'add-funnel'
});
},
},
// 查看数据
// 查看数据
visitData
()
{
visitData
(
row
)
{
this
.
$router
.
push
({
path
:
'path-data'
});
this
.
$router
.
push
({
path
:
'path-data'
,
query
:
{
id
:
row
.
id
,
name
:
row
.
name
}
});
},
},
// 编辑
// 编辑
editColumn
(
row
)
{
editColumn
(
row
)
{
this
.
$router
.
push
({
path
:
'add-funnel'
,
query
:
{
id
:
row
.
id
}});
this
.
$router
.
push
({
path
:
'add-funnel'
,
query
:
{
id
:
row
.
id
}});
},
},
// 删除确认框
// 删除确认框
deleteConfirm
(
row
)
{
deleteConfirm
(
row
)
{
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录