fanzhen 1003
This commit is contained in:
8
src/App.vue
Normal file
8
src/App.vue
Normal file
@@ -0,0 +1,8 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<router-view/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
||||
BIN
src/assets/logo.png
Normal file
BIN
src/assets/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.7 KiB |
31
src/main.js
Normal file
31
src/main.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import store from './store'
|
||||
import axios from 'axios'
|
||||
// axios请求配置
|
||||
var root = process.env.VUE_APP_BASE_API
|
||||
// console.log(root)
|
||||
|
||||
// 请求拦截器
|
||||
axios.interceptors.request.use(config => {
|
||||
// --请求之前重新拼装url--
|
||||
config.url = root + config.url
|
||||
// --默认请求参数--
|
||||
// config.data = {
|
||||
// ...config.data,
|
||||
// openid
|
||||
// };
|
||||
// config.headers = {
|
||||
// 'Authorization': 'hjiujkolololjhgg12569jhjhF'
|
||||
// }
|
||||
return config
|
||||
})
|
||||
Vue.config.productionTip = false
|
||||
|
||||
Vue.prototype.$axios = axios
|
||||
new Vue({
|
||||
router,
|
||||
store,
|
||||
render: h => h(App)
|
||||
}).$mount('#app')
|
||||
17
src/router.js
Normal file
17
src/router.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import Vue from 'vue'
|
||||
import Router from 'vue-router'
|
||||
import Index from '@/views/index/Index.vue'
|
||||
|
||||
Vue.use(Router)
|
||||
|
||||
export default new Router({
|
||||
mode: 'history',
|
||||
base: process.env.BASE_URL,
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
name: 'index',
|
||||
component: Index
|
||||
}
|
||||
]
|
||||
})
|
||||
16
src/store.js
Normal file
16
src/store.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
|
||||
Vue.use(Vuex)
|
||||
|
||||
export default new Vuex.Store({
|
||||
state: {
|
||||
|
||||
},
|
||||
mutations: {
|
||||
|
||||
},
|
||||
actions: {
|
||||
|
||||
}
|
||||
})
|
||||
16
src/views/index/Index.vue
Normal file
16
src/views/index/Index.vue
Normal file
@@ -0,0 +1,16 @@
|
||||
<template>
|
||||
<div>这是首页</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
Reference in New Issue
Block a user