Commit 8c5e1d2d by 前端

Merge branch 'liwk_dev_1.0.0' into 'master'

打开会话增加loading

See merge request !8
2 parents 3c01af63 6d3c5ac4
......@@ -8,7 +8,7 @@ const WxConfig = {
if (e == 'chooseImage') jsApiList.push('getLocalImgData')
})
let [redirectUrl] = window.location.href.split('#')
const { corpId } = util.getLocalStorage('dj_scrm_corpId') || util.getQuery()
const { corpId } = util.getQuery() || util.getLocalStorage('dj_scrm_corpId')
/** 获取企微应用AgentConfig */
let data = {
corpId,
......@@ -186,7 +186,11 @@ const WxConfig = {
},
/**打开会话 */
openEnterpriseChat ({ externalUserIds = [], groupName = '', userIds = [], chatId = '' }) {
openEnterpriseChat ({
externalUserIds = [],
groupName = '',
userIds = [],
chatId = '' }) {
return new Promise((resolve, reject) => {
userIds = userIds.join(';')
externalUserIds = externalUserIds.join(';')
......
<template>
</template>
<script type='text/ecmascript-6'>
......@@ -8,15 +7,20 @@ export default {
name: '',
data () {
return {
text:''
flag: false
}
},
activated () {
},
mounted () {
this.showLoading()
let { userId } = this.getQuery()
this.text = userId
wxConfig.init(['openEnterpriseChat']).then(() => {
this.hideLoading()
wxConfig.openEnterpriseChat({
externalUserIds: [userId]
}).then(res => {
console.log(res)
})
})
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!