Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 05c82f36
authored
Jul 16, 2021
by
unknown
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
关键词拉群消息发送修改
1 parent
e8591dbd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
22 deletions
linkwe-mobile/src/App.vue
linkwe-mobile/src/views/communityOperating/keywords/panel.vue
linkwe-mobile/src/App.vue
View file @
05c82f3
...
...
@@ -30,8 +30,16 @@ export default {
this
.
agentId
=
query
.
agentId
// this.$toast('agentId:' + this.agentId)
this
.
$router
.
onReady
(()
=>
{
const
noAuth
=
this
.
$router
.
app
.
$route
.
meta
?
this
.
$router
.
app
.
$route
.
meta
.
noAuth
:
false
if
(
!
code
&&
!
noAuth
)
{
this
.
$toast
(
'未获得授权'
)
}
})
if
(
!
code
)
{
this
.
$toast
(
'未获得授权'
)
//
this.$toast('未获得授权')
return
}
let
{
data
}
=
await
getUserInfo
(
code
,
this
.
agentId
)
...
...
@@ -80,10 +88,11 @@ export default {
],
//必填
success
:
(
res
)
=>
{
// 回调
//
this.$toast('agentId成功:')
this
.
$toast
(
'agentId成功:'
)
this
.
$store
.
state
.
agentConfigStatus
=
true
},
fail
:
(
res
)
=>
{
console
.
log
(
'agent config 失败: '
,
res
)
this
.
$toast
(
'agentId失败:'
+
JSON
.
stringify
(
res
))
if
(
res
.
errMsg
.
indexOf
(
'function not exist'
)
>
-
1
)
{
alert
(
'版本过低请升级'
)
...
...
linkwe-mobile/src/views/communityOperating/keywords/panel.vue
View file @
05c82f3
...
...
@@ -21,7 +21,7 @@
</div>
<div
class=
"content"
>
<div>
<div
v-if=
"task.groupCodeInfo && task.groupCodeInfo.codeUrl"
>
<van-image
width=
"50"
:src=
"task.groupCodeInfo.codeUrl"
></van-image>
</div>
...
...
@@ -46,15 +46,13 @@ import ClipboardJS from 'clipboard'
export
default
{
name
:
'KeywordPanel'
,
props
:
{
task
:
{
type
:
Object
,
required
:
true
},
},
data
()
{
data
()
{
return
{
showCopy
:
false
,
// 展示复制按钮
touchDelay
:
750
,
// 触发显示按钮的长按时常
...
...
@@ -62,17 +60,16 @@ export default {
touch
:
false
,
}
},
methods
:
{
send
()
{
send
()
{
wx
.
invoke
(
"sendChatMessage"
,
{
msgtype
:
'news'
,
news
:
{
link
:
this
.
groupCodeUrl
,
title
:
'客户群活码'
,
desc
:
''
,
imgUrl
:
''
,
}
desc
:
'
客户群活码
'
,
imgUrl
:
this
.
imgUrl
,
}
,
},
function
(
res
)
{
if
(
res
.
err_msg
==
"sendChatMessage:ok"
)
{
}
else
{
...
...
@@ -80,38 +77,37 @@ export default {
}
)
},
touchStart
()
{
touchStart
()
{
clearTimeout
(
this
.
copyEvent
)
this
.
copyEvent
=
setTimeout
(()
=>
{
this
.
touch
=
true
},
this
.
touchDelay
)
},
touchEnd
()
{
touchEnd
()
{
clearTimeout
(
this
.
copyEvent
)
if
(
this
.
touch
)
this
.
showCopy
=
true
this
.
touch
=
false
}
},
computed
:
{
keywords
()
{
keywords
()
{
if
(
!
this
.
task
||
!
this
.
task
.
keywordList
)
return
[]
const
keywords
=
this
.
task
.
keywordList
.
map
((
k
)
=>
k
.
keyword
)
return
keywords
},
groupCodeUrl
()
{
groupCodeUrl
()
{
if
(
window
.
location
.
hash
[
0
]
===
'#'
)
{
return
window
.
location
.
origin
+
window
.
location
.
pathname
+
'#/groupCode?id='
+
this
.
task
.
groupCodeInfo
.
uu
id
return
window
.
location
.
origin
+
window
.
location
.
pathname
+
'#/groupCode?id='
+
this
.
task
.
groupCodeInfo
.
id
}
return
window
.
location
.
origin
+
window
.
location
.
pathname
+
'groupCode?id='
+
this
.
task
.
groupCodeInfo
.
uuid
return
window
.
location
.
origin
+
window
.
location
.
pathname
+
'groupCode?id='
+
this
.
task
.
groupCodeInfo
.
id
},
imgUrl
()
{
if
(
this
.
task
.
groupCodeInfo
&&
this
.
task
.
groupCodeInfo
.
codeUrl
)
return
this
.
task
.
groupCodeInfo
.
codeUrl
return
''
}
},
mounted
()
{
this
.
clipboard
=
new
ClipboardJS
(
'.copy-btn_'
+
this
.
task
.
taskId
)
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment