Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
admin-base
Project
Project
Details
Activity
Releases
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
new-sing
admin-base
Commits
60340656
Commit
60340656
authored
Oct 22, 2018
by
王
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加小程序自动回复
parent
2a1214d4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
19 deletions
+39
-19
index.js
config/index.js
+2
-2
autoReply.vue
src/components/weChat/autoReply.vue
+13
-2
autoReplyDialog.vue
src/components/weChat/autoReplyDialog.vue
+10
-6
focusReply.vue
src/components/weChat/focusReply.vue
+1
-0
focusReplyDialog.vue
src/components/weChat/focusReplyDialog.vue
+13
-9
No files found.
config/index.js
View file @
60340656
...
...
@@ -12,8 +12,8 @@ module.exports = {
//本地代理设置
proxyTable
:
{
'/api'
:
{
target
:
'http://local.base-api.sing.com'
,
// 接口的域名
//
target: 'https://wechat-test.changchangenglish.com/',
//
target: 'http://local.base-api.sing.com', // 接口的域名
target
:
'https://wechat-test.changchangenglish.com/'
,
changeOrigin
:
true
,
// 如果接口跨域,需要进行这个参数配置
}
},
...
...
src/components/weChat/autoReply.vue
View file @
60340656
...
...
@@ -5,6 +5,10 @@
<el-button
type=
"success"
plain
@
click=
"add"
v-if=
"!$store.state.readonly"
>
添加回复
</el-button>
</el-col>
</el-row>
<el-tabs
v-model=
"activeName"
type=
"card"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"公众号关键词回复"
name=
"keywords_reply"
></el-tab-pane>
<el-tab-pane
label=
"小程序关键词回复"
name=
"mini_keywords_reply"
></el-tab-pane>
</el-tabs>
<el-table
:data=
"list"
style=
"width: 100%"
>
...
...
@@ -101,6 +105,7 @@
show
:
false
,
id
:
''
},
activeName
:
'keywords_reply'
,
list
:
[]
}
},
...
...
@@ -139,7 +144,7 @@
this
.
dialogObj
.
show
=
data
},
getList
(){
getConfigListApi
({
key
:
'keywords_reply'
}).
then
(
res
=>
{
getConfigListApi
({
key
:
this
.
activeName
}).
then
(
res
=>
{
this
.
list
=
res
.
list
})
},
...
...
@@ -147,6 +152,7 @@
this
.
dialogObj
.
id
=
''
;
this
.
dialogObj
.
value
=
''
;
this
.
dialogObj
.
desc
=
''
;
this
.
dialogObj
.
key
=
this
.
activeName
;
this
.
dialogObj
.
show
=
true
},
edit
(
data
){
...
...
@@ -154,6 +160,7 @@
this
.
dialogObj
.
id
=
res
.
id
;
this
.
dialogObj
.
value
=
res
.
value
;
this
.
dialogObj
.
desc
=
res
.
desc
;
this
.
dialogObj
.
key
=
this
.
activeName
;
this
.
dialogObj
.
show
=
true
;
});
},
...
...
@@ -171,7 +178,11 @@
});
});
});
}
},
handleClick
(
tab
)
{
this
.
activeName
=
tab
.
name
;
this
.
getList
();
},
}
}
</
script
>
...
...
src/components/weChat/autoReplyDialog.vue
View file @
60340656
...
...
@@ -70,11 +70,11 @@
append-to-body
>
<div>
<el-tabs
v-if=
"showType"
v-model=
"type"
type=
"card"
>
<el-tab-pane
label=
"图文消息"
name=
"news"
></el-tab-pane>
<el-tab-pane
v-if=
"form.key !== 'mini_keywords_reply'"
label=
"图文消息"
name=
"news"
></el-tab-pane>
<el-tab-pane
label=
"文字"
name=
"text"
></el-tab-pane>
<el-tab-pane
label=
"图片"
name=
"image"
></el-tab-pane>
<el-tab-pane
label=
"语音"
name=
"voice"
></el-tab-pane>
<el-tab-pane
label=
"视频"
name=
"video"
></el-tab-pane>
<el-tab-pane
v-if=
"form.key !== 'mini_keywords_reply'"
label=
"图片"
name=
"image"
></el-tab-pane>
<el-tab-pane
v-if=
"form.key !== 'mini_keywords_reply'"
label=
"语音"
name=
"voice"
></el-tab-pane>
<el-tab-pane
v-if=
"form.key !== 'mini_keywords_reply'"
label=
"视频"
name=
"video"
></el-tab-pane>
</el-tabs>
<div
v-if=
"showType"
class=
"more-info clear-both"
>
<
template
v-if=
"type=== 'text'"
>
...
...
@@ -98,8 +98,8 @@
<span
class=
"icon_emotion emotion_switch"
></span>
</el-button>
</el-popover>
<el-button
@
click=
"addTeacherName"
type=
"warning"
plain
>
添加老师名字
</el-button>
<el-button
@
click=
"addTeacherAlias"
type=
"success"
plain
>
添加老师别名
</el-button>
<el-button
v-if=
"form.key !== 'mini_keywords_reply'"
@
click=
"addTeacherName"
type=
"warning"
plain
>
添加老师名字
</el-button>
<el-button
v-if=
"form.key !== 'mini_keywords_reply'"
@
click=
"addTeacherAlias"
type=
"success"
plain
>
添加老师别名
</el-button>
</div>
</
template
>
<
template
v-if=
"type==='image'"
>
...
...
@@ -438,8 +438,12 @@
if
(
this
.
dialogObj
.
id
)
{
this
.
id
=
this
.
dialogObj
.
id
;
}
console
.
log
(
'this.dialogObj'
,
this
.
dialogObj
)
this
.
form
.
value
=
this
.
dialogObj
.
value
;
this
.
form
.
desc
=
this
.
dialogObj
.
desc
;
if
(
this
.
dialogObj
.
key
)
{
this
.
form
.
key
=
this
.
dialogObj
.
key
}
this
.
loading
=
false
;
this
.
showType
=
false
;
},
...
...
src/components/weChat/focusReply.vue
View file @
60340656
...
...
@@ -9,6 +9,7 @@
<el-tab-pane
label=
"无课用户关注"
name=
"focus_reply_no_course"
></el-tab-pane>
<el-tab-pane
label=
"有课用户关注"
name=
"focus_reply_course"
></el-tab-pane>
<el-tab-pane
label=
"自动回复"
name=
"auto_reply"
></el-tab-pane>
<el-tab-pane
label=
"小程序自动回复"
name=
"mini_auto_reply"
></el-tab-pane>
</el-tabs>
<el-table
:data=
"list"
...
...
src/components/weChat/focusReplyDialog.vue
View file @
60340656
...
...
@@ -8,17 +8,17 @@
<div
class=
"content"
>
<div
class=
"inner"
v-loading=
"loading"
>
<ul
class=
"weui-desktop-msg-sender__tabs"
>
<li
class=
"weui-desktop-msg-sender__tab weui-desktop-msg-sender__tab_appmsg"
:class=
"type === 'news' ? 'weui-desktop-msg-sender__tab_selected' : ''"
@
click=
"onChangeType('news')"
>
图文
</li>
<li
v-if=
"dialogObj && dialogObj.key !== 'mini_auto_reply'"
class=
"weui-desktop-msg-sender__tab weui-desktop-msg-sender__tab_appmsg"
:class=
"type === 'news' ? 'weui-desktop-msg-sender__tab_selected' : ''"
@
click=
"onChangeType('news')"
>
图文
</li>
<li
class=
"weui-desktop-msg-sender__tab weui-desktop-msg-sender__tab_text"
:class=
"type === 'text' ? 'weui-desktop-msg-sender__tab_selected' : ''"
@
click=
"onChangeType('text')"
>
文字
</li>
<li
class=
"weui-desktop-msg-sender__tab weui-desktop-msg-sender__tab_img"
:class=
"type === 'image' ? 'weui-desktop-msg-sender__tab_selected' : ''"
@
click=
"onChangeType('image')"
>
图片
</li>
<li
class=
"weui-desktop-msg-sender__tab weui-desktop-msg-sender__tab_audio"
:class=
"type === 'voice' ? 'weui-desktop-msg-sender__tab_selected' : ''"
@
click=
"onChangeType('voice')"
>
语音
</li>
<li
class=
"weui-desktop-msg-sender__tab weui-desktop-msg-sender__tab_video"
:class=
"type === 'video' ? 'weui-desktop-msg-sender__tab_selected' : ''"
@
click=
"onChangeType('video')"
>
视频
</li>
<li
v-if=
"dialogObj && dialogObj.key !== 'mini_auto_reply'"
class=
"weui-desktop-msg-sender__tab weui-desktop-msg-sender__tab_img"
:class=
"type === 'image' ? 'weui-desktop-msg-sender__tab_selected' : ''"
@
click=
"onChangeType('image')"
>
图片
</li>
<li
v-if=
"dialogObj && dialogObj.key !== 'mini_auto_reply'"
class=
"weui-desktop-msg-sender__tab weui-desktop-msg-sender__tab_audio"
:class=
"type === 'voice' ? 'weui-desktop-msg-sender__tab_selected' : ''"
@
click=
"onChangeType('voice')"
>
语音
</li>
<li
v-if=
"dialogObj && dialogObj.key !== 'mini_auto_reply'"
class=
"weui-desktop-msg-sender__tab weui-desktop-msg-sender__tab_video"
:class=
"type === 'video' ? 'weui-desktop-msg-sender__tab_selected' : ''"
@
click=
"onChangeType('video')"
>
视频
</li>
</ul>
<div
class=
"inner-bottom"
>
<div
class=
"img-action"
v-if=
"type === 'image'"
>
<template
v-if=
"imageContent"
>
<div
class=
"my-teacher"
v-if=
"imageContent.variable"
>
我的老师二维码
</div>
<img
style=
"max-width: 80%"
v-if=
"imageContent.content"
:src=
"imageContent.content"
/>
<img
style=
"max-width: 80%
;
"
v-if=
"imageContent.content"
:src=
"imageContent.content"
/>
</
template
>
<div
class=
"display-b"
>
<div
class=
"img-create-access"
v-if=
"!showMedia"
>
...
...
@@ -222,8 +222,8 @@
<span
class=
"icon_emotion emotion_switch"
></span>
</el-button>
</el-popover>
<el-button
@
click=
"addTeacherName"
type=
"warning"
plain
>
添加老师名字
</el-button>
<el-button
@
click=
"addTeacherAlias"
type=
"success"
plain
>
添加老师别名
</el-button>
<el-button
v-if=
"dialogObj && dialogObj.key !== 'mini_auto_reply'"
@
click=
"addTeacherName"
type=
"warning"
plain
>
添加老师名字
</el-button>
<el-button
v-if=
"dialogObj && dialogObj.key !== 'mini_auto_reply'"
@
click=
"addTeacherAlias"
type=
"success"
plain
>
添加老师别名
</el-button>
</div>
</div>
</div>
...
...
@@ -329,8 +329,12 @@
this
.
index
=
this
.
dialogObj
.
index
this
.
list
=
this
.
dialogObj
.
list
||
[]
if
(
this
.
index
===
-
1
)
{
this
.
type
=
'news'
this
.
newsContent
=
''
if
(
this
.
dialogObj
.
key
===
'mini_auto_reply'
)
{
this
.
type
=
'text'
}
else
{
this
.
type
=
'news'
this
.
newsContent
=
''
}
}
else
{
this
.
type
=
this
.
list
[
this
.
index
].
type
;
if
(
this
.
type
===
'text'
)
{
...
...
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