Files
aio-hl-new/src/main.js
2023-06-30 17:28:11 +08:00

49 lines
1.4 KiB
JavaScript

// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './vuex/store'
import '@style/reset.css'
import '@style/layout.styl'
import fastClick from 'fastclick'
import infiniteScroll from 'vue-infinite-scroll'
import { DatePicker, Select, Option } from 'element-ui'
import '@config/rem.js'
import {post} from '@config/http.js'
import { Dialog, toast } from '@config/utils.js'
import filter from '@config/filter.js'
import JSEncrypt from 'jsencrypt'
fastClick.attach(document.body)
Vue.use(infiniteScroll)
Vue.use(DatePicker)
Vue.use(Select)
Vue.use(Option)
Vue.prototype.$post = post
Vue.prototype.Dialog = Dialog
Vue.prototype.toast = toast
Vue.config.productionTip = false
for (let k in filter) {
Vue.filter(k, filter[k])
}
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/>'
})