Commit f2ddd239 by 王志慧

公共功能添加

1 parent 9fc4b772
......@@ -14,9 +14,12 @@ import '@/assets/css/public.scss'
import '@/components'
// import 'glsx-components/dist/glsx-components.css'
import { start } from '@/setup'
import { setMinHeight } from '@/common/constant'
Vue.config.productionTip = false
Vue.prototype.$apis = apis
Vue.prototype.size = 'small'
Vue.prototype.setMinHeight = setMinHeight
Vue.prototype.defaultLabelWidth = '154px'
start()
export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params)
......
......@@ -20,13 +20,16 @@ let instance = null
Vue.use(ElementUI)
Vue.use(GLTable)
export async function bootstrap({ history, common, messenger, globalState ,routerBase}) {
const { response, request, sign, secret, sign_common, request_common, request_merchant } = await fetchConfig(common)
const { response, request, sign, secret, sign_common, request_common, request_merchant ,merchantId} = await fetchConfig(common)
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
Vue.prototype.$common = common
Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox
Vue.prototype.$hmdMerchantId = merchantId
// 集团版集团账号
Vue.prototype.$isGroupUp = globalState.session.accountLevel != 4
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
Vue.prototype.$http_tag = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!