parent
0593ad11f0
commit
1b9f915de5
|
|
@ -62,7 +62,7 @@
|
|||
<script>
|
||||
|
||||
import { userLstApi } from '@/api/system'
|
||||
import {getConfigApi} from "@/api/systemForm";
|
||||
|
||||
export default {
|
||||
name: 'UserList',
|
||||
filters: {
|
||||
|
|
@ -105,10 +105,9 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.getList(1)
|
||||
getConfigApi().then(res => {
|
||||
this.config = res.data || {};
|
||||
}).catch(res => {
|
||||
this.$message.error(res.message)
|
||||
// 获取配置信息
|
||||
this.$root.getConfig().then((res) => {
|
||||
this.config = res
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
28
src/main.js
28
src/main.js
|
|
@ -9,7 +9,7 @@ import Element from 'element-ui'
|
|||
import Moment from 'moment'
|
||||
import cascader from 'element-ui/lib/cascader'
|
||||
import './styles/element-variables.scss'
|
||||
import 'viewerjs/dist/viewer.css';
|
||||
import 'viewerjs/dist/viewer.css'
|
||||
|
||||
import '@/styles/index.scss' // global css
|
||||
import '@/styles/iconfont/iconfont.css'
|
||||
|
|
@ -21,7 +21,7 @@ import VueLazyload from 'vue-lazyload'
|
|||
import App from './App'
|
||||
import store from './store'
|
||||
import router from './router'
|
||||
import Viewer from 'v-viewer';
|
||||
import Viewer from 'v-viewer'
|
||||
import FormCreate from '@form-create/element-ui'
|
||||
import uploadPicture from './components/uploadPicture/uploadFrom'
|
||||
import VueUeditorWrap from 'vue-ueditor-wrap'
|
||||
|
|
@ -45,15 +45,16 @@ import { modalSureDelete } from '@/libs/public'
|
|||
import * as filters from './filters' // global filters modalTemplates
|
||||
import notice from '@/libs/notice' // global filters
|
||||
import { getToken } from './utils/auth'
|
||||
import { getConfigApi } from '@/api/systemForm'
|
||||
|
||||
Vue.use(uploadPicture)
|
||||
Vue.use(FormCreate)
|
||||
Vue.use(VueAwesomeSwiper)
|
||||
Vue.use(Viewer, {
|
||||
defaultOptions: {
|
||||
zIndex: 9999,
|
||||
},
|
||||
});
|
||||
zIndex: 9999
|
||||
}
|
||||
})
|
||||
Vue.use(VueLazyload, {
|
||||
preLoad: 1.3,
|
||||
error: require('./assets/images/no.png'),
|
||||
|
|
@ -115,11 +116,26 @@ Vue.config.productionTip = false
|
|||
export default new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
notice: _notice
|
||||
notice: _notice,
|
||||
config: {}
|
||||
},
|
||||
created() {},
|
||||
mounted() {},
|
||||
methods: {
|
||||
closeNotice() {
|
||||
this.notice && this.notice()
|
||||
},
|
||||
async getConfig() {
|
||||
let _this = this
|
||||
if (Object.values(_this.config).length <= 0) {
|
||||
await getConfigApi().then(res => {
|
||||
_this.config = res.data || {}
|
||||
}).catch(err => {
|
||||
console.log('配置信息获取失败' + err)
|
||||
})
|
||||
}
|
||||
|
||||
return _this.config
|
||||
}
|
||||
},
|
||||
router,
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue