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 = { ...@@ -8,7 +8,7 @@ const WxConfig = {
if (e == 'chooseImage') jsApiList.push('getLocalImgData') if (e == 'chooseImage') jsApiList.push('getLocalImgData')
}) })
let [redirectUrl] = window.location.href.split('#') 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 */ /** 获取企微应用AgentConfig */
let data = { let data = {
corpId, corpId,
...@@ -186,7 +186,11 @@ const WxConfig = { ...@@ -186,7 +186,11 @@ const WxConfig = {
}, },
/**打开会话 */ /**打开会话 */
openEnterpriseChat ({ externalUserIds = [], groupName = '', userIds = [], chatId = '' }) { openEnterpriseChat ({
externalUserIds = [],
groupName = '',
userIds = [],
chatId = '' }) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
userIds = userIds.join(';') userIds = userIds.join(';')
externalUserIds = externalUserIds.join(';') externalUserIds = externalUserIds.join(';')
......
<template> <template>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
...@@ -8,15 +7,20 @@ export default { ...@@ -8,15 +7,20 @@ export default {
name: '', name: '',
data () { data () {
return { return {
text:'' flag: false
} }
}, },
activated () {
},
mounted () { mounted () {
this.showLoading()
let { userId } = this.getQuery() let { userId } = this.getQuery()
this.text = userId
wxConfig.init(['openEnterpriseChat']).then(() => { wxConfig.init(['openEnterpriseChat']).then(() => {
this.hideLoading()
wxConfig.openEnterpriseChat({ wxConfig.openEnterpriseChat({
externalUserIds: [userId] 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!