Commit b097374e by 前端

Merge branch 'saas+v4.22.0' into 'master'

合并Saas+v4.22.0

See merge request !12
2 parents ab121270 520db0a6
...@@ -59,7 +59,6 @@ export default { ...@@ -59,7 +59,6 @@ export default {
.van-tabbar { .van-tabbar {
background: linear-gradient(180deg, #ffffff 0%, #ffffff 100%); background: linear-gradient(180deg, #ffffff 0%, #ffffff 100%);
box-shadow: 0px -2px 4px 0px rgba(0, 0, 0, 0.04); box-shadow: 0px -2px 4px 0px rgba(0, 0, 0, 0.04);
border-radius: 10px 10px 0px 0px;
overflow: hidden; overflow: hidden;
z-index: 3; z-index: 3;
.van-tabbar-item--active { .van-tabbar-item--active {
......
...@@ -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: '//scrm.test.glsx.com.cn', // 本地测试项目地址,
// 设置超时时间 // 设置超时时间
timeout: 180000, timeout: 180000,
// 携带凭证 // 携带凭证
...@@ -57,6 +57,24 @@ module.exports = { ...@@ -57,6 +57,24 @@ module.exports = {
}, },
clew: { clew: {
path: '/dj-scrm-wx-work-attachment-clew/#/' path: '/dj-scrm-wx-work-attachment-clew/#/'
},
assistance: {
path: '/dj-scrm-wx-work-attachment-assistance/#/'
},
psd: {
path: '/dj-scrm-wx-work-attachment-psd/#/'
} }
},
//根据企微配置特殊菜单
specialMenuList: [
{
label: '喜报早报记录',
menuUrl: encodeURIComponent('chat/paper@psd|https://img01.glsx.com.cn/weapp/resource/scrm-mobile/main/paper.png'),
// corpIds: [],
corpIds: ['ww7d1c6fb5709cc884', 'wwa55ffac1225eb25e'],
parentLabel: '工作台',
parentIndex: 0
} }
],
} }
\ No newline at end of file \ No newline at end of file
...@@ -15,8 +15,8 @@ export const fetchConfig = function (isEnv = true) { ...@@ -15,8 +15,8 @@ export const fetchConfig = function (isEnv = true) {
Object.assign(request, { timeout }) Object.assign(request, { timeout })
return Promise.resolve(config) return Promise.resolve(config)
} }
/**测试mock */ return window.fetch('https://oss-config.dev.glsx.com.cn/mock/617918601072f92988f05a11/base/scrm-wx-work-main-config', {}).then(res => res.json()) // /**测试mock */ return window.fetch('https://oss-config.dev.glsx.com.cn/mock/617918601072f92988f05a11/base/scrm-wx-work-main-config', {}).then(res => res.json())
// /**生产 */ return window.fetch('https://oss-config.test.glsx.com.cn/mock/617918601072f92988f05a11/base/scrm-wx-work-main-config', {}).then(res => res.json()) /**生产 */ return window.fetch('https://oss-config.test.glsx.com.cn/mock/617918601072f92988f05a11/base/scrm-wx-work-main-config', {}).then(res => res.json())
} }
export const cfg = { export const cfg = {
install (vue, config) { install (vue, config) {
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
const { subsystemInfo } = window.$fetchConfig const { subsystemInfo, specialMenuList } = window.$fetchConfig
import { ssoApi } from '@/api' import { ssoApi } from '@/api'
export default { export default {
name: '', name: '',
...@@ -52,12 +52,25 @@ export default { ...@@ -52,12 +52,25 @@ export default {
if (data && data.length) { if (data && data.length) {
let [merchantProTreeResponses] = data[0].products[0].merchantProTreeResponses let [merchantProTreeResponses] = data[0].products[0].merchantProTreeResponses
if (merchantProTreeResponses) { if (merchantProTreeResponses) {
let list = merchantProTreeResponses.children let list = merchantProTreeResponses.children || []
if (list && list.length) { this.setMenuData(list)
} else this.setMenuData()
}
this.flag = true
})
},
mounted () {
},
methods: {
setMenuData (list = []) {
const { entmicroId } = this.getLocalStorage('dj_scrm_userInfo')
this.setSpecialMenuList(list)
list.map(e => { list.map(e => {
if (e.children) { specialMenuList.map(m => {
e.children.map(i => { if (e.label == m.parentLabel && m.corpIds.includes(entmicroId)) e.children.push(m)
let [url, item] = i.menuUrl.split('@') })
if (e.children) e.children.map(i => {
let [url, item] = decodeURIComponent(i.menuUrl).split('@')
let [target, icon] = item.split('|') let [target, icon] = item.split('|')
let [link, query] = url.split('?') let [link, query] = url.split('?')
i.icon = icon i.icon = icon
...@@ -65,19 +78,23 @@ export default { ...@@ -65,19 +78,23 @@ export default {
i.target = target i.target = target
i.query = query i.query = query
}) })
}
}) })
console.log(list)
this.list = list this.list = list
},
setSpecialMenuList (list) {
const { entmicroId } = this.getLocalStorage('dj_scrm_userInfo')
const titleItems = list.map(e => e.label) || []
specialMenuList.map(m => {
if (m.corpIds.includes(entmicroId) && !titleItems.includes(m.parentLabel)) {
titleItems.push(m.parentLabel)
list.splice(m.parentIndex, 0, {
label: m.parentLabel,
children: []
})
} }
}
}
this.flag = true
}) })
return list
}, },
mounted () { },
methods: {
jump (e) { jump (e) {
let sessionId = this.getSessionId() let sessionId = this.getSessionId()
let { corpId } = this.getLocalStorage('dj_scrm_corpId') let { corpId } = this.getLocalStorage('dj_scrm_corpId')
...@@ -93,7 +110,7 @@ export default { ...@@ -93,7 +110,7 @@ export default {
<style scoped lang='scss'> <style scoped lang='scss'>
.layout { .layout {
padding: 16px 16px 66px; padding: 16px 16px 84px;
.title { .title {
font-weight: 500; font-weight: 500;
font-size: 16px; font-size: 16px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!