Commit f81eed39 by 李伟康

修复BUG

1 parent a66cc77f
......@@ -19,7 +19,7 @@
</noscript>
<div id="app"></div>
<script src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script src="https://open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js"></script>
<script src="//open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js"></script>
<!-- 使用CDN加速的JS文件,配置在vue.config.js下 -->
<% for (var i in htmlWebpackPlugin.options.cdn&&htmlWebpackPlugin.options.cdn.js) { %>
<script src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
......
......@@ -24,22 +24,25 @@ const WxConfig = {
})
.then(obj => {
if (obj) {
wx.agentConfig({
corpid: obj.corpId, // 必填,企业微信的corpid,必须与当前登录的企业一致
agentid: obj.agentId, // 必填,企业微信的应用id (e.g. 1000247)
timestamp: obj.timestamp, // 必填,生成签名的时间戳
nonceStr: obj.nonceStr, // 必填,生成签名的随机串
signature: obj.signature, // 必填,签名,见附录-JS-SDK使用权限签名算法,
jsApiList,
success (res) {
console.log(res, 'wx_config')
resolve()
},
fail (err) {
console.log(err, 'wx_config')
reject(err)
}
})
setTimeout(() => {
console.log('wx.agentConfig:', wx.agentConfig)
wx.agentConfig({
corpid: obj.corpId, // 必填,企业微信的corpid,必须与当前登录的企业一致
agentid: obj.agentId, // 必填,企业微信的应用id (e.g. 1000247)
timestamp: obj.timestamp, // 必填,生成签名的时间戳
nonceStr: obj.nonceStr, // 必填,生成签名的随机串
signature: obj.signature, // 必填,签名,见附录-JS-SDK使用权限签名算法,
jsApiList,
success (res) {
console.log(res, 'wx_config')
resolve()
},
fail (err) {
console.log(err, 'wx_config')
reject(err)
}
})
}, 500)
} else {
Notify('网络异常')
}
......
......@@ -11,7 +11,7 @@ module.exports = {
envVersion: 'trial',
title: '嘀加企微管家',
request: {
baseURL: 'http://scrm.test.glsx.com.cn', // 本地测试项目地址,
baseURL: 'http://scrm.dev.glsx.com.cn', // 本地测试项目地址,
// 设置超时时间
timeout: 180000,
// 携带凭证
......
......@@ -176,37 +176,46 @@ export default {
}
},
click (e) {
let { status, taskId, id, taskType } = e
let { status, id, taskType } = e
if (status == 2 && taskType != 6) return
wwbenchApi.updateTasks({ id }).then(res => {
if (taskType == 3 || taskType == 4) {
Dialog.alert({
message: `请去企业微信“消息”列表-“${text}”中进行转发`,
theme: 'round-button',
confirmButtonText: '我知道了',
confirmButtonColor: '#3975C6'
})
} else {
let sessionId = this.getSessionId()
let { corpId } = this.getLocalStorage('dj_scrm_corpId')
let link = {
1: 'customerDetails',
2: 'customerGroup/mass',
5: 'customer/information',
6: 'home'
}[taskType]
if (link) {
let { path } = subsystemInfo[{
5: 'customer',
6: 'sop'
}[taskType]]
if (!['prod', 'production'].includes(process.env.NODE_ENV)) path = '/dj-scrm-wx-work-main-lwk/#/'
let url = `${path}${link}?sessionId=${sessionId}&corpId=${corpId}`
if (taskId) url = `${url}&taskId=${taskId}`
window.location.href = url
if (taskType == 6) {
this.jump(e)
} else {
wwbenchApi.updateTasks({ id }).then(res => {
if (taskType == 3 || taskType == 4) {
Dialog.alert({
message: `请去企业微信“消息”列表-“${text}”中进行转发`,
theme: 'round-button',
confirmButtonText: '我知道了',
confirmButtonColor: '#3975C6'
})
} else {
this.jump(e)
}
}
})
})
}
},
jump (e) {
let { taskId, taskType } = e
let sessionId = this.getSessionId()
let { corpId } = this.getLocalStorage('dj_scrm_corpId')
let link = {
1: 'customerDetails',
2: 'customerGroup/mass',
5: 'customer/information',
6: 'home'
}[taskType]
let { path } = subsystemInfo[{
5: 'customer',
6: 'sop'
}[taskType]]
if (link) {
if (!['prod', 'production'].includes(process.env.NODE_ENV)) path = '/dj-scrm-wx-work-main-lwk/#/'
let url = `${path}${link}?sessionId=${sessionId}&corpId=${corpId}`
if (taskId) url = `${url}&taskId=${taskId}`
window.location.href = url
}
}
}
}
......@@ -3,7 +3,10 @@
<div class="title flex">
{{item.materialName}}
<template v-if="!hidePYQ">
<div class="sprite-icon icon-PYQ" @click="onEmit('share',item)"></div>
<div
class="sprite-icon icon-PYQ"
@click="onEmit('share',item)"
></div>
</template>
</div>
<div class="content">
......@@ -12,7 +15,10 @@
</template>
<template v-else-if="item.materialType == 2">链接</template>
<template v-else>
<div v-html="decodeURIComponent(item.materialUrl)" class="hide"></div>
<div
v-html="decodeURIComponent(item.materialUrl)"
class="hide"
></div>
</template>
</div>
<div class="bottom flex">
......@@ -81,9 +87,12 @@ export default {
padding: 10px 16px;
font-size: 12px;
color: #999999;
.hide{
height: 120px;
overflow: hidden;
.hide {
max-height: 150px;
overflow-y: scroll;
/deep/img {
height: auto;
}
}
}
.bottom {
......
......@@ -21,15 +21,15 @@
</div>
<div class="content">
<template v-if="flag">
<template v-if="list.length">
<template v-if="nothing">
<scroll-view
:class="['list-box']"
@ReachBottom="onReachBottom"
ref="scrollView"
>
<div :class="['box',{'search-style':searchStyle}]">
<template v-for="(i,index) in list">
<template v-if="!searchStyle">
<template v-if="!searchStyle">
<template v-for="(i,index) in list">
<div
:key="index"
class="item"
......@@ -45,31 +45,40 @@
</div>
</div>
</template>
<template v-else>
<div
class="search-item"
:key="index"
>
<!-- type 1 素材组 2 素材 -->
<template v-if="i.type == 1">
</template>
<template v-else>
<template v-if="list.materialGroupListRpcResponses && list.materialGroupListRpcResponses.length">
<template v-for="i in list.materialGroupListRpcResponses">
<div
class="search-item"
:key="i.id"
>
<div
class="group flex"
@click="jump(i.id)"
>
<div class="sprite-icon icon-file"></div>
{{i.materialName}}
{{i.materialGroupName}}
<div class="arrow">
<img src="https://img01.glsx.com.cn/weapp/resource/scrm-mobile/psd/arrow.png" />
</div>
</div>
</template>
<psd
v-else
:item="i"
@send="sendMessage"
@share="shareToExternalMoments"
/>
</div>
</div>
</template>
</template>
<template v-if="list.materialToCRpcResponses && list.materialToCRpcResponses.length">
<template v-for="i in list.materialToCRpcResponses">
<div
class="search-item"
:key="i.id"
>
<psd
:item="i"
@send="sendMessage"
@share="shareToExternalMoments"
/>
</div>
</template>
</template>
</template>
</div>
......@@ -106,7 +115,8 @@ export default {
list: [],
userInfo: window.vm.getLocalStorage('dj_scrm_userInfo'),
materialName: '',
searchStyle: false
searchStyle: false,
nothing: false
}
},
mounted () {
......@@ -145,6 +155,7 @@ export default {
this.list = data
this.hideLoading()
this.flag = true
this.nothing = materialName ? data.materialGroupListRpcResponses && data.materialToCRpcResponses : data.length
})
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!