Commit a81e69a9 by 王志慧

commit

1 parent 49dd6588
// const url = 'http://192.168.1.64:8064/rop-scrm-entmicro/router' // const url = 'http://192.168.1.64:8064/rop-scrm-entmicro/router'
// const url = 'http://scrm.dev.glsx.com.cn/rop-scrm-entmicro/router'
const url = '/rop-scrm-entmicro/router' const url = '/rop-scrm-entmicro/router'
export default { export default {
/**获取群聊列表 */ /**获取群聊列表 */
......
...@@ -11,7 +11,7 @@ module.exports = { ...@@ -11,7 +11,7 @@ module.exports = {
envVersion: "develop", envVersion: "develop",
title: '嘀加企微管家', title: '嘀加企微管家',
request: { request: {
baseURL: 'https://scrm.dev.glsx.com.cn', // 本地测试项目地址, baseURL: 'http://scrm.dev.glsx.com.cn', // 本地测试项目地址,
// 设置超时时间 // 设置超时时间
timeout: 180000, timeout: 180000,
// 携带凭证 // 携带凭证
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
let config = require('./conf.js') let config = require('./conf.js')
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
export const fetchConfig = function(isEnv = true) { export const fetchConfig = function(isEnv = true) {
if (isEnv) { if (!isEnv) {
let { request } = config let { request } = config
Object.assign(request, { timeout }) Object.assign(request, { timeout })
return Promise.resolve(config) return Promise.resolve(config)
......
...@@ -119,13 +119,19 @@ export default { ...@@ -119,13 +119,19 @@ export default {
deactivated() {}, deactivated() {},
mounted() { mounted() {
this.initData() this.initData()
this.initWx()
}, },
methods: { methods: {
//初始化微信接口
initWx() {
wxConfig.init(['openEnterpriseChat','openExistedChatWithMsg']).then(() => {})
},
// 创建群聊or进入群聊 // 创建群聊or进入群聊
addGroup() { addGroup() {
console.log(this.addGroupParams, '-----') console.log(this.addGroupParams, '-----')
if (this.addGroupParams.chatId == '') { if (this.addGroupParams.chatId == '') {
wxConfig.openEnterpriseChat(this.addGroupParams).then(res => { wxConfig.openEnterpriseChat(this.addGroupParams).then(res => {
console.log(res,'res')
this.insertParams.chatId = res.chatId this.insertParams.chatId = res.chatId
this.insertParams.externalUserId = this.userId this.insertParams.externalUserId = this.userId
this.insertParams.templateId = this.templateId this.insertParams.templateId = this.templateId
...@@ -238,7 +244,8 @@ export default { ...@@ -238,7 +244,8 @@ export default {
let externalUserId = id let externalUserId = id
this.addGroupParams.externalUserIds.push(id) this.addGroupParams.externalUserIds.push(id)
this.getCustomerInfo(externalUserId) this.getCustomerInfo(externalUserId)
} else { }
else {
wxConfig.init(['getCurExternalContact', 'openEnterpriseChat', 'openExistedChatWithMsg']).then(() => { wxConfig.init(['getCurExternalContact', 'openEnterpriseChat', 'openExistedChatWithMsg']).then(() => {
//获取userId //获取userId
wxConfig wxConfig
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!