a42b3256
wuxw
HC小区管理系统前段vue版正在开发中
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import i18n from './i18n'
Vue.prototype.hasPrivilege = function(privilegeCode) {
// 这里实现你的权限检查逻辑
// 例如从 Vuex store 或本地存储中获取用户权限列表
const userPrivileges = []
return userPrivileges.includes(privilegeCode)
}
Vue.prototype.toDoc = function(url) {
window.open('http://www.homecommunity.cn/'+url, '_blank')
}
Vue.prototype.$getUser = function() {
let user = JSON.parse(localStorage.getItem('user'))
return user
}
Vue.use(ElementUI)
Vue.config.productionTip = false
new Vue({
router,
i18n,
render: h => h(App)
}).$mount('#app')
|