init
This commit is contained in:
60
src/main.js
Normal file
60
src/main.js
Normal file
@@ -0,0 +1,60 @@
|
||||
import 'babel-polyfill'
|
||||
import Vue from 'vue'
|
||||
import App from './App'
|
||||
import _ from 'lodash'
|
||||
import router from './router'
|
||||
import fastClick from 'fastclick'
|
||||
import infiniteScroll from 'vue-infinite-scroll'
|
||||
import VueQrcodeReader from 'vue-qrcode-reader'
|
||||
import store from './vuex/store'
|
||||
import '@config/rem.js'
|
||||
import Print from 'vue-print-nb'
|
||||
import {post} from '@config/http.js'
|
||||
import { Dialog, toast } from '@config/mUtils.js'
|
||||
import filter from '@config/filter.js'
|
||||
import { baseUrl } from '@config/env.js'
|
||||
// import Vconsole from 'vconsole'
|
||||
import { Select, Option, RadioGroup, Radio } from 'element-ui'
|
||||
import JSEncrypt from 'jsencrypt'
|
||||
|
||||
Vue.prototype._ = _
|
||||
Vue.use(VueQrcodeReader)
|
||||
fastClick.attach(document.body)
|
||||
Vue.use(infiniteScroll)
|
||||
Vue.use(Print)
|
||||
Vue.prototype.Dialog = Dialog
|
||||
Vue.prototype.toast = toast
|
||||
Vue.prototype.$post = post
|
||||
Vue.prototype.baseUrl = baseUrl
|
||||
Vue.use(Print)
|
||||
for (let k in filter) {
|
||||
Vue.filter(k, filter[k])
|
||||
}
|
||||
Vue.use(Select)
|
||||
Vue.use(Option)
|
||||
Vue.use(RadioGroup)
|
||||
Vue.use(Radio)
|
||||
// let VConsole = new Vconsole()
|
||||
// Vue.use(VConsole)
|
||||
Vue.config.productionTip = false
|
||||
|
||||
const publicKey = 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANL378k3RiZHWx5AfJqdH9xRNBmD9wGD\n' +
|
||||
'2iRe41HdTNF8RUhNnHit5NpMNtGL0NPTSSpPjjI1kJfVorRvaQerUgkCAwEAAQ=='
|
||||
|
||||
// 加密
|
||||
export function encrypt (txt) {
|
||||
const encryptor = new JSEncrypt()
|
||||
encryptor.setPublicKey(publicKey) // 设置公钥
|
||||
return encryptor.encrypt(txt) // 对需要加密的数据进行加密
|
||||
}
|
||||
|
||||
/* eslint-disable no-new */
|
||||
new Vue({
|
||||
el: '#app',
|
||||
router,
|
||||
store,
|
||||
components: { App },
|
||||
template: '<App/>',
|
||||
mounted () {
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user