首页数据布置到全局 瀑布流加载更多
This commit is contained in:
10
src/main.js
10
src/main.js
@@ -6,12 +6,20 @@ import ElementPlus from 'element-plus'
|
||||
import 'element-plus/dist/index.css'
|
||||
import 'element-plus/lib/locale/lang/zh-cn'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
import api from "./utils/api";
|
||||
|
||||
//引入封装Axios请求
|
||||
import Axios from '@/utils/axios';
|
||||
|
||||
const app = createApp(App)
|
||||
|
||||
api.index().then(res => {
|
||||
if (res.code === 200) {
|
||||
store.state.seachTypeData = res.data.combination
|
||||
store.state.indexData = res.data
|
||||
store.state.ListSelectBtn = res.data.recommendedTab
|
||||
console.log(store.state.seachTypeData)
|
||||
}
|
||||
})
|
||||
app.use(store).use(router).use(Axios).use(ElementPlus, {
|
||||
locale: zhCn
|
||||
}).mount('#app')
|
||||
|
||||
Reference in New Issue
Block a user