Commit 6bdc8b62 by xinla

--no commit message

1 parent 03a3bd4a
...@@ -51,15 +51,15 @@ export default { ...@@ -51,15 +51,15 @@ export default {
props: { props: {
task: { task: {
type: Object, type: Object,
required: true required: true,
} },
}, },
data() { data() {
return { return {
showCopy: false, // 展示复制按钮 showCopy: false, // 展示复制按钮
touchDelay: 750, // 触发显示按钮的长按时常 touchDelay: 750, // 触发显示按钮的长按时常
copyEvent: null, copyEvent: null,
touch: false touch: false,
} }
}, },
methods: { methods: {
...@@ -68,30 +68,25 @@ export default { ...@@ -68,30 +68,25 @@ export default {
this.$toast.loading({ this.$toast.loading({
message: '正在发送...', message: '正在发送...',
duration: 0, duration: 0,
forbidClick: true forbidClick: true,
}) })
try { try {
let news = { let news = {
link: this.groupCodeUrl, link: this.groupCodeUrl,
title: this.task.taskName, title: this.task.taskName,
desc: this.task.welcomeMsg, desc: this.task.welcomeMsg,
imgUrl: this.imgUrl imgUrl: this.imgUrl,
} }
wx.invoke( wx.invoke(
'sendChatMessage', 'sendChatMessage',
{ {
msgtype: 'news', msgtype: 'news',
news news,
}, },
function(res) { function(res) {
if (res.err_msg == 'sendChatMessage:ok') { if ('sendChatMessage:cancel,sendChatMessage:ok'.indexOf(res.err_msg) < 0) {
} else {
if (res.err_code == 1) {
// 用户取消发送
} else {
_this.$dialog({ message: 'sendChatMessage失败:' + JSON.stringify(res) }) _this.$dialog({ message: 'sendChatMessage失败:' + JSON.stringify(res) })
} }
}
_this.$toast.clear() _this.$toast.clear()
} }
) )
...@@ -111,7 +106,7 @@ export default { ...@@ -111,7 +106,7 @@ export default {
clearTimeout(this.copyEvent) clearTimeout(this.copyEvent)
if (this.touch) this.showCopy = true if (this.touch) this.showCopy = true
this.touch = false this.touch = false
} },
}, },
computed: { computed: {
keywords() { keywords() {
...@@ -123,16 +118,24 @@ export default { ...@@ -123,16 +118,24 @@ export default {
let groupCodeInfo = this.task.groupCodeInfo let groupCodeInfo = this.task.groupCodeInfo
if (window.location.hash[0] === '#') { if (window.location.hash[0] === '#') {
return ( return (
window.location.origin + window.location.pathname + '#/groupCode?id=' + (groupCodeInfo && groupCodeInfo.id) window.location.origin +
window.location.pathname +
'#/groupCode?id=' +
(groupCodeInfo && groupCodeInfo.id)
) )
} }
return window.location.origin + window.location.pathname + '#/groupCode?id=' + (groupCodeInfo && groupCodeInfo.id) return (
window.location.origin +
window.location.pathname +
'#/groupCode?id=' +
(groupCodeInfo && groupCodeInfo.id)
)
}, },
imgUrl() { imgUrl() {
let groupCodeInfo = this.task.groupCodeInfo let groupCodeInfo = this.task.groupCodeInfo
return groupCodeInfo && groupCodeInfo.codeUrl ? groupCodeInfo.codeUrl : '' return groupCodeInfo && groupCodeInfo.codeUrl ? groupCodeInfo.codeUrl : ''
} },
}, },
mounted() { mounted() {
this.clipboard = new ClipboardJS('.copy-btn_' + this.task.taskId) this.clipboard = new ClipboardJS('.copy-btn_' + this.task.taskId)
...@@ -144,7 +147,7 @@ export default { ...@@ -144,7 +147,7 @@ export default {
this.clipboard.on('error', (e) => { this.clipboard.on('error', (e) => {
this.showCopy = false this.showCopy = false
}) })
} },
} }
</script> </script>
......
...@@ -52,7 +52,8 @@ export default { ...@@ -52,7 +52,8 @@ export default {
width: 100%; width: 100%;
& .sidebar-logo { & .sidebar-logo {
// height: 32px; max-height: 35px;
max-width: 170px;
vertical-align: middle; vertical-align: middle;
margin-right: 12px; margin-right: 12px;
} }
......
...@@ -167,7 +167,7 @@ export default { ...@@ -167,7 +167,7 @@ export default {
this.getCode() this.getCode()
this.getCookie() this.getCookie()
process.env.NODE_ENV !== 'development' && window.lwConfig.IS_PUBLISH_DIALOG &&
this.$alert( this.$alert(
'LinkWeChat V2.5 已正式发布,遇到使用上的问题欢迎提交 Issue,我们将光速修复。', 'LinkWeChat V2.5 已正式发布,遇到使用上的问题欢迎提交 Issue,我们将光速修复。',
'提示', '提示',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!