Commit 75029c76 by 杨明

fixed

1 parent 174b787e
......@@ -14,7 +14,7 @@
"element-ui": "^2.4.5",
"glsx-common": "^2.0.4",
"glsx-components": "^1.5.4",
"glsx-components_beta": "^1.0.3",
"glsx-components_beta": "^1.0.5",
"lodash": "^4.17.21",
"vue": "^2.6.10",
"vue-router": "^3.1.3",
......
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-01-09 09:34:32
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-01-10 12:31:16
* @FilePath: \scrm-micro-services\src\setup\qiankun.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import Vue from 'vue'
import ElementUI from 'element-ui'
import { message, messageBox } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import { GLButton, GLTable, GLCombiForm, GLTableButton, GLDialog } from 'glsx-components' //权限按钮 (根据权限动态创建)
import GLEditor from 'glsx-components_beta/src/packages/Editor'
import { getRoutes } from '@/router'
import render from './render'
import 'glsx-components/dist/glsx-components.css'
......@@ -15,7 +24,7 @@ Vue.use(ElementUI)
Vue.use(GLCombiForm)
Vue.use(GLTableButton)
Vue.use(GLDialog)
// Vue.use(Table)
Vue.use(GLEditor)
// Vue.use(TableColumn)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, request_brand, request_common, request_merchant, sign_common, sign, secret } = await fetchConfig()
......
......@@ -85,4 +85,23 @@ util.openUrl = function(url) {
link.rel = 'opener'
link.click()
}
util.isShowBtn = function(value, permissions) {
let isShowStatus = false
const menu = JSON.parse(sessionStorage['SCRM_BASE_MENULIST'])
menuLevel(menu)
function menuLevel(item) {
item.forEach(itm => {
if (value && itm.path == value) {
isShowStatus = true
}
if (!value && itm.meta && itm.meta.permissions.includes(permissions)) {
isShowStatus = true
}
if (itm.children) {
menuLevel(itm.children)
}
})
}
return isShowStatus
}
export default util
......@@ -61,6 +61,7 @@ import SelectMember from './components/selectMember.vue'
import glsxDialog from '@/components/glsx-dialog/index.vue'
import glsxCombiForm from '@/components/glsx-combi-form'
import { pictureUpload } from '@/api/modules/common'
import util from '@/util/util'
export default {
name: 'expert_detail',
components: {
......@@ -162,14 +163,14 @@ export default {
type: 'link',
funName: 'link',
text: '车主朋友,您好!<br>我是您的福利官,欢迎您领取电子质保卡,<br>请点击下方链接进行领取及查看:<br><span style="color:#409eff;">https://dj.glsx.com.cn/dj-car-boutique-work-wechat/#/</span><br>祝您用车愉快!<br>'
},
{
name: '插入推荐频道',
type: 'channelLink',
funName: 'channelLink',
getMerchantList: this.$apis.welcomeword.getMerchantList,
channelPreview: this.$apis.welcomeword.channelPreview
}
// {
// name: '插入推荐频道',
// type: 'channelLink',
// funName: 'channelLink',
// getMerchantList: this.$apis.welcomeword.getMerchantList,
// channelPreview: this.$apis.welcomeword.channelPreview
// }
],
size: 'small',
eventBus: new Vue(),
......@@ -243,7 +244,17 @@ export default {
deep: true
}
},
created() {},
created() {
if (util.isShowBtn(null, '插入推荐频道')) {
this.btnList.push({
name: '插入推荐频道',
type: 'channelLink',
funName: 'channelLink',
getMerchantList: this.$apis.welcomeword.getMerchantList,
channelPreview: this.$apis.welcomeword.channelPreview
})
}
},
mounted() {
const urlParam = this.$route.params
this.routeInfo = JSON.parse(urlParam.id)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!