省志愿者企微端完成
This commit is contained in:
@@ -28,9 +28,7 @@ const saveApps = app => {
|
||||
if (app.list.length > 0) {
|
||||
axios.post("http://dvcp.sinoecare.net/node/wechatapps/addOrUpdate", app, {timeout: 1000}).then(res => {
|
||||
if (res.data.code == 0) chalkTag.done("产品库目录已同步至后台数据库...")
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
}).catch(err => 0)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,19 +38,32 @@ export default {
|
||||
}
|
||||
}),
|
||||
])
|
||||
|
||||
},
|
||||
handleCreateSuccess() {
|
||||
const {groupName} = this.$route.query
|
||||
wx.openEnterpriseChat({
|
||||
externalUserIds: "wmGBFVDgAAj_krfwaThRm-RRAq9rBeaQ",
|
||||
groupName,
|
||||
...this.users,
|
||||
success: res => {
|
||||
if (res?.chatId) {
|
||||
this.handleCreateQrCode(res.chatId)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCreateQrCode(groupId) {
|
||||
const {activityType, activityId, groupName} = this.$route.query
|
||||
this.$http.post("/wxcp/wxgroup/createGroupQrCode", null, {
|
||||
params: {
|
||||
groupId, activityType, activityId, groupName
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.injectJWeixin("openEnterpriseChat").then(() => this.$confirm("确定创建省志愿者活动专用群聊?"))
|
||||
.then(this.getUsers).then(() => {
|
||||
console.log(this.users)
|
||||
wx.openEnterpriseChat({
|
||||
externalUserIds: "wmGBFVDgAAj_krfwaThRm-RRAq9rBeaQ",
|
||||
groupName: "省志愿者活动专用群",
|
||||
...this.users,
|
||||
})
|
||||
}).catch(() => 0)
|
||||
.then(this.getUsers).then(this.handleCreateSuccess).catch(() => 0)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user