This action will force synchronization from java110/MicroCommunityWeb, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
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 'formiojs/dist/formio.full.min.css'import i18n from './i18n'import {getCommunityName,getCommunityId} from '@/api/community/communityApi'// 验证全局脚本是否正确加载Vue.prototype.getCommunityId = function(){return getCommunityId()}Vue.prototype.getCommunityName = function(){return getCommunityName()}Vue.prototype.hasPrivilege = function(_privaleges) {// 确保 _privaleges 是数组,如果不是则转换为数组const privilegesToCheck = Array.isArray(_privaleges) ? _privaleges : [_privaleges];// 从本地存储获取用户权限let userPrivileges = localStorage.getItem('hc_staff_privilege');// 如果存在用户权限,则转换为数组if (userPrivileges) {userPrivileges = userPrivileges.split(',');} else {// 如果没有权限数据,直接返回 falsereturn false;}// 检查用户是否有任一所需权限return privilegesToCheck.some(item => userPrivileges.includes(item));}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 = falsenew Vue({router,i18n,render: h => h(App)}).$mount('#app')
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。