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,6 +24,8 @@ const WxConfig = { ...@@ -24,6 +24,8 @@ const WxConfig = {
}) })
.then(obj => { .then(obj => {
if (obj) { if (obj) {
setTimeout(() => {
console.log('wx.agentConfig:', wx.agentConfig)
wx.agentConfig({ wx.agentConfig({
corpid: obj.corpId, // 必填,企业微信的corpid,必须与当前登录的企业一致 corpid: obj.corpId, // 必填,企业微信的corpid,必须与当前登录的企业一致
agentid: obj.agentId, // 必填,企业微信的应用id (e.g. 1000247) agentid: obj.agentId, // 必填,企业微信的应用id (e.g. 1000247)
...@@ -40,6 +42,7 @@ const WxConfig = { ...@@ -40,6 +42,7 @@ const WxConfig = {
reject(err) 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,8 +176,12 @@ export default { ...@@ -176,8 +176,12 @@ 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
if (taskType == 6) {
this.jump(e)
} else {
wwbenchApi.updateTasks({ id }).then(res => { wwbenchApi.updateTasks({ id }).then(res => {
if (taskType == 3 || taskType == 4) { if (taskType == 3 || taskType == 4) {
Dialog.alert({ Dialog.alert({
...@@ -187,6 +191,13 @@ export default { ...@@ -187,6 +191,13 @@ export default {
confirmButtonColor: '#3975C6' confirmButtonColor: '#3975C6'
}) })
} else { } else {
this.jump(e)
}
})
}
},
jump (e) {
let { taskId, taskType } = e
let sessionId = this.getSessionId() let sessionId = this.getSessionId()
let { corpId } = this.getLocalStorage('dj_scrm_corpId') let { corpId } = this.getLocalStorage('dj_scrm_corpId')
let link = { let link = {
...@@ -195,18 +206,16 @@ export default { ...@@ -195,18 +206,16 @@ export default {
5: 'customer/information', 5: 'customer/information',
6: 'home' 6: 'home'
}[taskType] }[taskType]
if (link) {
let { path } = subsystemInfo[{ let { path } = subsystemInfo[{
5: 'customer', 5: 'customer',
6: 'sop' 6: 'sop'
}[taskType]] }[taskType]]
if (link) {
if (!['prod', 'production'].includes(process.env.NODE_ENV)) path = '/dj-scrm-wx-work-main-lwk/#/' if (!['prod', 'production'].includes(process.env.NODE_ENV)) path = '/dj-scrm-wx-work-main-lwk/#/'
let url = `${path}${link}?sessionId=${sessionId}&corpId=${corpId}` let url = `${path}${link}?sessionId=${sessionId}&corpId=${corpId}`
if (taskId) url = `${url}&taskId=${taskId}` if (taskId) url = `${url}&taskId=${taskId}`
window.location.href = url 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,26 +45,34 @@ ...@@ -45,26 +45,34 @@
</div> </div>
</div> </div>
</template> </template>
</template>
<template v-else> <template v-else>
<template v-if="list.materialGroupListRpcResponses && list.materialGroupListRpcResponses.length">
<template v-for="i in list.materialGroupListRpcResponses">
<div <div
class="search-item" class="search-item"
:key="index" :key="i.id"
> >
<!-- type 1 素材组 2 素材 -->
<template v-if="i.type == 1">
<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>
</div>
</template> </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 <psd
v-else
:item="i" :item="i"
@send="sendMessage" @send="sendMessage"
@share="shareToExternalMoments" @share="shareToExternalMoments"
...@@ -72,6 +80,7 @@ ...@@ -72,6 +80,7 @@
</div> </div>
</template> </template>
</template> </template>
</template>
</div> </div>
</scroll-view> </scroll-view>
</template> </template>
...@@ -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!