Commit f81eed39 by 李伟康

修复BUG

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