Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-3
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
office
haoban-3
Commits
dcb560a6
Commit
dcb560a6
authored
Jul 20, 2022
by
crushh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: dist
parent
58b28a1a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
69 additions
and
119 deletions
+69
-119
api.js
src/api/api.js
+8
-8
detail.vue
...views/salesleads/actCodeManage/attractFlowLink/detail.vue
+13
-10
index.vue
src/views/salesleads/actCodeManage/attractFlowLink/index.vue
+2
-2
welcomesItem.vue
src/views/salesleads/components/welcomesItem.vue
+46
-99
No files found.
src/api/api.js
View file @
dcb560a6
...
...
@@ -91,14 +91,14 @@ Vue.axios.interceptors.response.use(
return
data
;
},
err
=>
{
//
if (err.response.status == 502) {
//
window.location.href = gicHost + '/gic-web/#/login?ishb=1';
//
Message.error({ message: '服务异常⊙﹏⊙∥' });
//
}
//
if (err.response.status != 403) {
//
window.location.href = gicHost + '/gic-web/#/login?ishb=1';
//
Message.error({ message: '登录失效!' });
//
}
if
(
err
.
response
.
status
==
502
)
{
window
.
location
.
href
=
gicHost
+
'/gic-web/#/login?ishb=1'
;
Message
.
error
({
message
:
'服务异常⊙﹏⊙∥'
});
}
if
(
err
.
response
.
status
!=
403
)
{
window
.
location
.
href
=
gicHost
+
'/gic-web/#/login?ishb=1'
;
Message
.
error
({
message
:
'登录失效!'
});
}
return
Promise
.
resolve
(
err
);
}
);
...
...
src/views/salesleads/actCodeManage/attractFlowLink/detail.vue
View file @
dcb560a6
...
...
@@ -102,7 +102,7 @@
</div>
<dm-sub-title
type=
"line"
>
欢迎语设置
</dm-sub-title>
<div
class=
"section"
>
<welcomeItem
@
getWelcomeId=
"getWelcomeId"
:welcomeIdP=
"form.welcomeId"
ref=
"welcomeItem"
:welcomeTyp
e=
"link"
></welcomeItem>
<welcomeItem
:welcomeId
.
sync=
"form.welcomeId"
:welcomeType
.
sync=
"welcomeType"
ref=
"welcomeItem"
welcomeNam
e=
"link"
></welcomeItem>
</div>
<dm-sub-title
type=
"line"
>
落地页配置
</dm-sub-title>
<div
class=
"section flex"
style=
"margin-bottom: 40px;"
>
...
...
@@ -162,7 +162,7 @@ export default {
pageNum
:
1
,
pageSize
:
20
},
link
:
'link'
,
welcomeType
:
1
,
landingLoading
:
false
,
loading
:
false
,
landingData
:
[],
...
...
@@ -178,10 +178,10 @@ export default {
storeData
:
[],
form
:
{
linkType
:
1
,
memberLabelName
:
''
,
memberLabelId
:
''
,
//
memberLabelName: '测试标签值名称重复- 温州青童时代店',
//
memberLabelId: 'edd3901afd1e418d93fdc3b50bb24784',
//
memberLabelName: '',
//
memberLabelId: '',
memberLabelName
:
'测试标签值名称重复- 温州青童时代店'
,
memberLabelId
:
'edd3901afd1e418d93fdc3b50bb24784'
,
storeList
:
[],
name
:
''
,
pageId
:
''
,
...
...
@@ -275,10 +275,12 @@ export default {
link
.
storeRuleJson
=
JSON
.
parse
(
link
.
storeRuleJson
);
link
.
storeList
=
link
.
storeList
?
link
.
storeList
:
[];
this
.
form
=
link
;
if
(
!
this
.
form
.
welcomeId
)
{
this
.
welcomeType
=
2
;
}
this
.
landingForm
=
page
;
this
.
getStoreList
();
}
console
.
log
(
result
);
})
.
finally
(
_
=>
{
this
.
loading
=
false
;
...
...
@@ -300,9 +302,7 @@ export default {
this
.
form
.
storeList
=
val
;
this
.
$refs
.
form
.
validateField
(
'storeList'
);
},
getWelcomeId
(
e
)
{
this
.
form
.
welcomeId
=
e
;
},
getList
()
{
this
.
landingLoading
=
true
;
guidePageList
(
this
.
landingPage
)
...
...
@@ -360,6 +360,9 @@ export default {
data
.
storeRuleJson
=
JSON
.
stringify
(
data
.
storeRuleJson
);
data
.
customRuleJson
=
JSON
.
stringify
(
data
.
customRuleJson
);
data
.
wxEnterpriseId
=
this
.
wxEnterpriseId
;
if
(
this
.
welcomeType
==
2
)
{
data
.
welcomeId
=
''
;
}
delete
data
.
memberLabelStatus
;
this
.
$refs
.
form
.
validate
(
val
=>
{
if
(
!
val
)
{
...
...
src/views/salesleads/actCodeManage/attractFlowLink/index.vue
View file @
dcb560a6
...
...
@@ -92,11 +92,11 @@ const tableHead = [
},
{
label
:
'今日点击人次'
,
prop
:
'click
Num
'
,
prop
:
'click
Times
'
,
width
:
'130'
,
sortable
:
'custom'
,
formatter
:
function
(
row
)
{
return
`<span>
${
row
.
click
Num
?
row
.
clickNum
:
'- -'
}
</span>`
;
return
`<span>
${
row
.
click
Times
?
row
.
clickTimes
:
'- -'
}
</span>`
;
}
},
{
...
...
src/views/salesleads/components/welcomesItem.vue
View file @
dcb560a6
...
...
@@ -3,37 +3,36 @@
<el-row>
<el-col
:span=
"17"
>
<el-form-item
label=
"设置欢迎语"
>
<el-radio-group
v-model=
"welcomesType"
@
change=
"radioChange"
>
<el-radio
:label=
"1"
v-if=
"welcomeType == 'code'"
>
活码欢迎语
</el-radio>
<el-radio
:label=
"1"
v-else
>
链接欢迎语
</el-radio>
<el-radio-group
@
change=
"radioChange"
v-model=
"welcomeType"
>
<el-radio
:label=
"1"
>
{{
welcomeName
==
'code'
?
'活码'
:
'链接'
}}
欢迎语
</el-radio>
<el-radio
:label=
"2"
>
不发送欢迎语
</el-radio>
</el-radio-group>
<ul
class=
"tabs"
v-if=
"welcome
s
Type == 1"
>
<ul
class=
"tabs"
v-if=
"welcomeType == 1"
>
<li>
1.下方的欢迎语取自【设置-欢迎语设置】中的“特殊欢迎语”;
</li>
<li>
2.配置“
<span>
{{
welcome
Typ
e
==
'code'
?
'活码'
:
'链接'
}}
</span
2.配置“
<span>
{{
welcome
Nam
e
==
'code'
?
'活码'
:
'链接'
}}
</span
>
欢迎语”后,通过此活码添加好友后,系统自动推送此处所配置的欢迎语
</li>
<li>
(根据企业微信规则,若所添加的该成员在企业微信后台已经配置了欢迎语,那么会推送企微后台所配置的欢迎语,不会推送此处的欢迎语)
</li>
</ul>
<ul
class=
"tabs"
v-if=
"welcome
s
Type == 2"
>
<ul
class=
"tabs"
v-if=
"welcomeType == 2"
>
<li>
通过此
<span>
{{
welcome
Typ
e
==
'code'
?
'活码'
:
'链接'
}}
</span
通过此
<span>
{{
welcome
Nam
e
==
'code'
?
'活码'
:
'链接'
}}
</span
>
添加好友后,系统不推送欢迎语,及时在【设置-欢迎语设置】中为该成员配置了欢迎语。
</li>
<li>
(根据企业微信规则,若所添加的该成员在企业微信后台已经配置了欢迎语,那么企微后台的欢迎语会照常推送)
</li>
</ul>
</el-form-item>
<el-form-item
label=
"选择欢迎语"
v-if=
"welcome
s
Type == 1"
>
<el-form-item
label=
"选择欢迎语"
v-if=
"welcomeType == 1"
>
<div
class=
"welcomeTable"
>
<div
class=
"wtabTop"
>
<el-input
class=
"w260"
placeholder=
"请输入标题"
v-model=
"welcomePage.title"
@
change=
"onSearch"
clearable
></el-input>
<el-input
class=
"w260"
placeholder=
"请输入标题"
v-model=
"welcomePage.title"
@
keyup
.
native=
"toInput"
clearable
@
clear=
"onSearch"
></el-input>
<el-button
plain
class=
"blueBtn"
@
click=
"changeRoute"
>
新建欢迎语
</el-button>
</div>
<el-table
:data=
"welcomeTableData"
max-height=
"300px"
>
<el-table-column
width=
"55"
>
<template
slot-scope=
"
scope
"
>
<el-radio
:label=
"
scope.$index"
@
change
.
native=
"getCurrentRow(scope.row)"
v-model=
"welcome
"
>
</el-radio>
<template
slot-scope=
"
{ row }
">
<el-radio
:label=
"
row.welcomeId"
@
change
.
native=
"getCurrentRow(row)"
v-model=
"welcomeId
"
>
</el-radio>
</
template
>
</el-table-column>
<el-table-column
prop=
"title"
label=
"标题"
width=
"158px"
></el-table-column>
...
...
@@ -58,9 +57,9 @@
</div>
</el-form-item>
</el-col>
<el-col
:span=
"7"
v-if=
"welcome
s
Type == 1 && welcomeContent != ''"
>
<el-col
:span=
"7"
v-if=
"welcomeType == 1 && welcomeContent != ''"
>
<p
class=
"welcomeTitle"
>
欢迎语预览
</p>
<previewWelcome
:welcomeContent=
"welcomeContent"
></previewWelcome>
<previewWelcome
:welcomeContent=
"welcomeContent"
:mediaList=
"welcomeMediaList"
></previewWelcome>
</el-col>
</el-row>
</div>
...
...
@@ -70,19 +69,20 @@
import
previewWelcome
from
'@/components/preview-welcome.vue'
;
import
{
postJsonRequest
}
from
'@/api/api'
;
import
{
getRequest
}
from
'../../../api/api'
;
import
{
_debounce
}
from
'@/common/js/public'
;
export
default
{
name
:
'welcomeItem'
,
components
:
{
previewWelcome
},
props
:
{
welcomeId
P
:
{
type
:
Object
,
default
:
null
welcomeId
:
{
type
:
[
String
,
Number
]
,
default
:
''
},
welcome
Typ
e
:
{
welcome
Nam
e
:
{
type
:
String
,
default
:
'code'
},
welcome
Set
Type
:
{
welcomeType
:
{
type
:
Number
,
default
:
1
}
...
...
@@ -98,11 +98,10 @@ export default {
6
:
'iconwenjianleixing-xiaochengxu'
,
// 带参小程序
7
:
'icongongzhonghao1'
// 带参公众号
},
welcomTypeFlag
:
true
,
welcomesType
:
1
,
welcomeTableData
:
[],
welcome
:
''
,
welcomeContent
:
''
,
welcomeMediaList
:
[],
// 欢迎语参数
welcomePage
:
{
wxEnterpriseId
:
sessionStorage
.
getItem
(
'userInfos'
)
?
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfos'
)).
wxEnterpriseId
:
''
,
...
...
@@ -111,16 +110,9 @@ export default {
pageNum
:
1
,
pageSize
:
20
},
totalNum
:
1
,
welcomeId
:
''
,
templateSelection
:
{},
currentWelcome
:
[],
isFlag
:
false
totalNum
:
1
};
},
activated
()
{
this
.
onSearch
();
},
mounted
()
{
this
.
getWelcomeTable
();
document
.
addEventListener
(
'visibilitychange'
,
()
=>
{
...
...
@@ -137,6 +129,9 @@ export default {
});
},
methods
:
{
toInput
:
_debounce
(
function
(
e
,
value
)
{
this
.
onSearch
();
},
500
),
onSearch
()
{
this
.
welcomePage
.
pageNum
=
1
;
this
.
getWelcomeTable
();
...
...
@@ -144,62 +139,45 @@ export default {
// 当前页变化
handleCurrentChange
(
val
)
{
this
.
welcomePage
.
pageNum
=
val
;
this
.
welcome
=
''
;
this
.
getWelcomeTable
();
},
// 选择欢迎语列表数据
async
getWelcomeTable
()
{
await
postJsonRequest
(
'/haoban-manage3-web/welcome/list'
,
this
.
welcomePage
).
then
(
res
=>
{
getWelcomeTable
()
{
postJsonRequest
(
'/haoban-manage3-web/welcome/list'
,
this
.
welcomePage
).
then
(
res
=>
{
this
.
welcomeTableData
=
res
.
data
.
result
.
result
;
this
.
totalNum
=
res
.
data
.
result
.
totalCount
;
if
(
this
.
isFlag
)
{
let
flag
=
this
.
welcomeTableData
.
map
(
item
=>
item
.
welcomeId
).
indexOf
(
this
.
currentWelcome
.
welcomeId
);
let
flag1
=
this
.
welcomeTableData
.
map
(
item
=>
item
.
welcomeId
).
includes
(
this
.
currentWelcome
.
welcomeId
);
// if (this.welcomePage.pageNum == 1) {
if
(
flag1
)
{
this
.
welcome
=
flag
;
// this.welcomeContent = this.currentWelcome.welcomeContent;
}
// else {
// this.welcomeTableData.unshift(this.currentWelcome);
// this.welcome = 0;
// this.welcomeContent = '';
// }
// this.welcomeContent = this.currentWelcome.welcomeContent;
// } else if (this.welcomePage.pageNum != 1) {
// if (flag1) {
// this.welcomeTableData.splice(flag, 1);
// }
// this.welcomeContent = '';
// }
}
});
},
// 新建欢迎语
changeRoute
()
{
this
.
$router
.
push
({
path
:
'/salutatorySet'
,
query
:
{
type
:
2
}
});
// let routeUrl = this.$router.resolve({ path: '/salutatorySet', query: { type: 2 } });
// window.open(routeUrl.href, '_blank');
},
getCurrentRow
(
row
)
{
// 获取选中数据 row表示选中这一行的数据,可以从里面提取所需要的值
this
.
templateSelection
=
row
;
this
.
welcomeContent
=
row
.
welcomeContent
;
this
.
welcome
Id
=
row
.
welcomeId
;
// this.$emit('getWelcomeId', this.welcomeId)
;
console
.
log
(
row
);
const
{
welcomeMediaList
,
welcomeContent
,
welcomeId
}
=
row
;
this
.
$emit
(
'update:welcomeId'
,
welcomeId
)
;
this
.
welcome
Content
=
welcomeContent
;
this
.
welcomeMediaList
=
welcomeMediaList
;
},
// 单选框点击事件
radioChange
(
e
)
{
this
.
$emit
(
'update:welcomeType'
,
e
);
if
(
e
==
1
)
{
this
.
getWelcomeTable
();
this
.
welcomeId
=
''
;
this
.
$emit
(
'getWelcomeId'
,
this
.
welcomeId
);
}
},
getDetail
()
{
getRequest
(
'/haoban-manage3-web/welcome/get'
,
{
welcomeId
:
this
.
welcomeId
,
enterpriseId
:
sessionStorage
.
getItem
(
'userInfos'
)
?
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfos'
)).
enterpriseId
:
''
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
0
&&
res
.
data
.
result
)
{
const
{
welcomeMediaList
,
welcomeContent
}
=
res
.
data
.
result
;
this
.
welcomeContent
=
welcomeContent
;
this
.
welcomeMediaList
=
welcomeMediaList
;
}
});
},
submit
()
{
if
(
this
.
welcomesType
==
2
)
return
true
;
this
.
$emit
(
'getWelcomeId'
,
this
.
welcomeId
);
if
(
this
.
welcomesType
==
1
&&
!
this
.
welcomeId
)
{
if
(
this
.
welcomeType
==
2
)
return
true
;
if
(
this
.
welcomeType
==
1
&&
!
this
.
welcomeId
)
{
this
.
$message
.
error
(
'请选择欢迎语'
);
return
false
;
}
else
{
...
...
@@ -208,44 +186,13 @@ export default {
}
},
watch
:
{
welcomeSetType
:
{
handler
:
function
(
val
)
{
console
.
log
(
val
);
if
(
val
==
1
)
{
this
.
welcomesType
=
1
;
}
},
immediate
:
true
},
welcomeIdP
:
{
welcomeId
:
{
handler
:
async
function
(
val
)
{
if
(
val
)
{
this
.
welcomesType
=
1
;
this
.
welcomeId
=
val
;
await
getRequest
(
'/haoban-manage3-web/welcome/get'
,
{
welcomeId
:
this
.
welcomeId
,
enterpriseId
:
sessionStorage
.
getItem
(
'userInfos'
)
?
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfos'
)).
enterpriseId
:
''
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
0
)
{
this
.
currentWelcome
=
res
.
data
.
result
||
[];
this
.
welcomeContent
=
this
.
currentWelcome
.
welcomeContent
;
this
.
isFlag
=
true
;
this
.
getWelcomeTable
();
}
});
this
.
getDetail
();
}
// if (val == null) {
// this.welcomesType = 2;
// }
},
immediate
:
true
,
deep
:
true
},
welcomesType
:
{
handler
:
function
(
val
)
{
if
(
val
==
2
)
{
this
.
welcomeId
=
''
;
}
},
immediate
:
true
,
deep
:
true
immediate
:
true
}
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment