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
edef9910
Commit
edef9910
authored
Sep 25, 2018
by
王
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
公众号表情
parent
952ef504
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
index.vue
src/components/framework/Emotion/index.vue
+1
-1
autoReply.vue
src/components/weChat/autoReply.vue
+2
-2
focusReply.vue
src/components/weChat/focusReply.vue
+2
-3
No files found.
src/components/framework/Emotion/index.vue
View file @
edef9910
...
@@ -38,7 +38,7 @@ export default {
...
@@ -38,7 +38,7 @@ export default {
},
},
methods
:
{
methods
:
{
clickHandler
(
i
)
{
clickHandler
(
i
)
{
let
emotion
=
`
#
${
i
}
;
`
let
emotion
=
`
/
${
i
}
`
this
.
$emit
(
'emotion'
,
emotion
)
this
.
$emit
(
'emotion'
,
emotion
)
}
}
},
},
...
...
src/components/weChat/autoReply.vue
View file @
edef9910
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<div
v-for=
"(item, index) in JSON.parse(props.row.desc)"
>
<div
v-for=
"(item, index) in JSON.parse(props.row.desc)"
>
<span
v-if=
"item.content && item.type==='text'"
>
<span
v-if=
"item.content && item.type==='text'"
>
回复
{{
index
+
1
}}
:
回复
{{
index
+
1
}}
:
<span
v-html=
"item.content.replace(/\
#[\u4E00-\u9FA5]
{1,3}\;
/gi, emotion)">
</span>
<span
v-html=
"item.content.replace(/\
/[\u4E00-\u9FA5]
{1,3}
/gi, emotion)">
</span>
</span>
</span>
<span
v-if=
"item.content && item.type==='image'"
>
回复
{{
index
+
1
}}
:
<img
class=
"img"
:src=
"item.content"
/></span>
<span
v-if=
"item.content && item.type==='image'"
>
回复
{{
index
+
1
}}
:
<img
class=
"img"
:src=
"item.content"
/></span>
<span
v-if=
"item.variable"
>
回复
{{
index
+
1
}}
:老师二维码
</span>
<span
v-if=
"item.variable"
>
回复
{{
index
+
1
}}
:老师二维码
</span>
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
methods
:
{
methods
:
{
// 将匹配结果替换表情图片
// 将匹配结果替换表情图片
emotion
(
res
)
{
emotion
(
res
)
{
let
word
=
res
.
replace
(
/
\
#
|
\;
/gi
,
''
)
let
word
=
res
.
replace
(
/
\
/
/gi
,
''
)
const
list
=
[
'微笑'
,
'撇嘴'
,
'色'
,
'发呆'
,
'得意'
,
'流泪'
,
'害羞'
,
'闭嘴'
,
'睡'
,
'大哭'
,
'尴尬'
,
'发怒'
,
'调皮'
,
'呲牙'
,
'惊讶'
,
'难过'
,
'酷'
,
'冷汗'
,
'抓狂'
,
'吐'
,
'偷笑'
,
'可爱'
,
'白眼'
,
'傲慢'
,
'饥饿'
,
'困'
,
'惊恐'
,
'流汗'
,
'憨笑'
,
'大兵'
,
'奋斗'
,
'咒骂'
,
'疑问'
,
'嘘'
,
'晕'
,
'折磨'
,
'衰'
,
'骷髅'
,
'敲打'
,
'再见'
,
'擦汗'
,
'抠鼻'
,
'鼓掌'
,
'糗大了'
,
'坏笑'
,
'左哼哼'
,
'右哼哼'
,
'哈欠'
,
'鄙视'
,
'委屈'
,
'快哭了'
,
'阴险'
,
'亲亲'
,
'吓'
,
'可怜'
,
'菜刀'
,
'西瓜'
,
'啤酒'
,
'篮球'
,
'乒乓'
,
'咖啡'
,
'饭'
,
'猪头'
,
'玫瑰'
,
'凋谢'
,
'示爱'
,
'爱心'
,
'心碎'
,
'蛋糕'
,
'闪电'
,
'炸弹'
,
'刀'
,
'足球'
,
'瓢虫'
,
'便便'
,
'月亮'
,
'太阳'
,
'礼物'
,
'拥抱'
,
'强'
,
'弱'
,
'握手'
,
'胜利'
,
'抱拳'
,
'勾引'
,
'拳头'
,
'差劲'
,
'爱你'
,
'NO'
,
'OK'
,
'爱情'
,
'飞吻'
,
'跳跳'
,
'发抖'
,
'怄火'
,
'转圈'
,
'磕头'
,
'回头'
,
'跳绳'
,
'挥手'
,
'激动'
,
'街舞'
,
'献吻'
,
'左太极'
,
'右太极'
]
const
list
=
[
'微笑'
,
'撇嘴'
,
'色'
,
'发呆'
,
'得意'
,
'流泪'
,
'害羞'
,
'闭嘴'
,
'睡'
,
'大哭'
,
'尴尬'
,
'发怒'
,
'调皮'
,
'呲牙'
,
'惊讶'
,
'难过'
,
'酷'
,
'冷汗'
,
'抓狂'
,
'吐'
,
'偷笑'
,
'可爱'
,
'白眼'
,
'傲慢'
,
'饥饿'
,
'困'
,
'惊恐'
,
'流汗'
,
'憨笑'
,
'大兵'
,
'奋斗'
,
'咒骂'
,
'疑问'
,
'嘘'
,
'晕'
,
'折磨'
,
'衰'
,
'骷髅'
,
'敲打'
,
'再见'
,
'擦汗'
,
'抠鼻'
,
'鼓掌'
,
'糗大了'
,
'坏笑'
,
'左哼哼'
,
'右哼哼'
,
'哈欠'
,
'鄙视'
,
'委屈'
,
'快哭了'
,
'阴险'
,
'亲亲'
,
'吓'
,
'可怜'
,
'菜刀'
,
'西瓜'
,
'啤酒'
,
'篮球'
,
'乒乓'
,
'咖啡'
,
'饭'
,
'猪头'
,
'玫瑰'
,
'凋谢'
,
'示爱'
,
'爱心'
,
'心碎'
,
'蛋糕'
,
'闪电'
,
'炸弹'
,
'刀'
,
'足球'
,
'瓢虫'
,
'便便'
,
'月亮'
,
'太阳'
,
'礼物'
,
'拥抱'
,
'强'
,
'弱'
,
'握手'
,
'胜利'
,
'抱拳'
,
'勾引'
,
'拳头'
,
'差劲'
,
'爱你'
,
'NO'
,
'OK'
,
'爱情'
,
'飞吻'
,
'跳跳'
,
'发抖'
,
'怄火'
,
'转圈'
,
'磕头'
,
'回头'
,
'跳绳'
,
'挥手'
,
'激动'
,
'街舞'
,
'献吻'
,
'左太极'
,
'右太极'
]
let
index
=
list
.
indexOf
(
word
)
let
index
=
list
.
indexOf
(
word
)
return
`<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/
${
index
}
.gif" align="middle">`
return
`<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/
${
index
}
.gif" align="middle">`
...
...
src/components/weChat/focusReply.vue
View file @
edef9910
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
<!--
<div
v-if=
"scope.row.type === 'text'"
>
-->
<!--
<div
v-if=
"scope.row.type === 'text'"
>
-->
<!--
{{
scope
.
row
.
content
}}
-->
<!--
{{
scope
.
row
.
content
}}
-->
<!--
</div>
-->
<!--
</div>
-->
<div
v-if=
"scope.row.type === 'text'"
v-html=
"scope.row.content.replace(/\
#[\u4E00-\u9FA5]
{1,3}\;
/gi, emotion)">
</div>
<div
v-if=
"scope.row.type === 'text'"
v-html=
"scope.row.content.replace(/\
/[\u4E00-\u9FA5]
{1,3}
/gi, emotion)">
</div>
<a
v-else-if=
"scope.row.type === 'image' && scope.row.content"
:href=
"scope.row.content"
target=
"_blank"
>
<a
v-else-if=
"scope.row.type === 'image' && scope.row.content"
:href=
"scope.row.content"
target=
"_blank"
>
<img
class=
"shotcut"
:src=
"scope.row.content"
>
<img
class=
"shotcut"
:src=
"scope.row.content"
>
</a>
</a>
...
@@ -168,8 +168,7 @@
...
@@ -168,8 +168,7 @@
},
},
methods
:{
methods
:{
emotion
(
res
)
{
emotion
(
res
)
{
console
.
log
(
'emotion'
,
res
)
let
word
=
res
.
replace
(
/
\/
/gi
,
''
)
let
word
=
res
.
replace
(
/
\#
|
\;
/gi
,
''
)
const
list
=
[
'微笑'
,
'撇嘴'
,
'色'
,
'发呆'
,
'得意'
,
'流泪'
,
'害羞'
,
'闭嘴'
,
'睡'
,
'大哭'
,
'尴尬'
,
'发怒'
,
'调皮'
,
'呲牙'
,
'惊讶'
,
'难过'
,
'酷'
,
'冷汗'
,
'抓狂'
,
'吐'
,
'偷笑'
,
'可爱'
,
'白眼'
,
'傲慢'
,
'饥饿'
,
'困'
,
'惊恐'
,
'流汗'
,
'憨笑'
,
'大兵'
,
'奋斗'
,
'咒骂'
,
'疑问'
,
'嘘'
,
'晕'
,
'折磨'
,
'衰'
,
'骷髅'
,
'敲打'
,
'再见'
,
'擦汗'
,
'抠鼻'
,
'鼓掌'
,
'糗大了'
,
'坏笑'
,
'左哼哼'
,
'右哼哼'
,
'哈欠'
,
'鄙视'
,
'委屈'
,
'快哭了'
,
'阴险'
,
'亲亲'
,
'吓'
,
'可怜'
,
'菜刀'
,
'西瓜'
,
'啤酒'
,
'篮球'
,
'乒乓'
,
'咖啡'
,
'饭'
,
'猪头'
,
'玫瑰'
,
'凋谢'
,
'示爱'
,
'爱心'
,
'心碎'
,
'蛋糕'
,
'闪电'
,
'炸弹'
,
'刀'
,
'足球'
,
'瓢虫'
,
'便便'
,
'月亮'
,
'太阳'
,
'礼物'
,
'拥抱'
,
'强'
,
'弱'
,
'握手'
,
'胜利'
,
'抱拳'
,
'勾引'
,
'拳头'
,
'差劲'
,
'爱你'
,
'NO'
,
'OK'
,
'爱情'
,
'飞吻'
,
'跳跳'
,
'发抖'
,
'怄火'
,
'转圈'
,
'磕头'
,
'回头'
,
'跳绳'
,
'挥手'
,
'激动'
,
'街舞'
,
'献吻'
,
'左太极'
,
'右太极'
]
const
list
=
[
'微笑'
,
'撇嘴'
,
'色'
,
'发呆'
,
'得意'
,
'流泪'
,
'害羞'
,
'闭嘴'
,
'睡'
,
'大哭'
,
'尴尬'
,
'发怒'
,
'调皮'
,
'呲牙'
,
'惊讶'
,
'难过'
,
'酷'
,
'冷汗'
,
'抓狂'
,
'吐'
,
'偷笑'
,
'可爱'
,
'白眼'
,
'傲慢'
,
'饥饿'
,
'困'
,
'惊恐'
,
'流汗'
,
'憨笑'
,
'大兵'
,
'奋斗'
,
'咒骂'
,
'疑问'
,
'嘘'
,
'晕'
,
'折磨'
,
'衰'
,
'骷髅'
,
'敲打'
,
'再见'
,
'擦汗'
,
'抠鼻'
,
'鼓掌'
,
'糗大了'
,
'坏笑'
,
'左哼哼'
,
'右哼哼'
,
'哈欠'
,
'鄙视'
,
'委屈'
,
'快哭了'
,
'阴险'
,
'亲亲'
,
'吓'
,
'可怜'
,
'菜刀'
,
'西瓜'
,
'啤酒'
,
'篮球'
,
'乒乓'
,
'咖啡'
,
'饭'
,
'猪头'
,
'玫瑰'
,
'凋谢'
,
'示爱'
,
'爱心'
,
'心碎'
,
'蛋糕'
,
'闪电'
,
'炸弹'
,
'刀'
,
'足球'
,
'瓢虫'
,
'便便'
,
'月亮'
,
'太阳'
,
'礼物'
,
'拥抱'
,
'强'
,
'弱'
,
'握手'
,
'胜利'
,
'抱拳'
,
'勾引'
,
'拳头'
,
'差劲'
,
'爱你'
,
'NO'
,
'OK'
,
'爱情'
,
'飞吻'
,
'跳跳'
,
'发抖'
,
'怄火'
,
'转圈'
,
'磕头'
,
'回头'
,
'跳绳'
,
'挥手'
,
'激动'
,
'街舞'
,
'献吻'
,
'左太极'
,
'右太极'
]
let
index
=
list
.
indexOf
(
word
)
let
index
=
list
.
indexOf
(
word
)
return
`<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/
${
index
}
.gif" align="middle">`
return
`<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/
${
index
}
.gif" align="middle">`
...
...
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