首页数据布置到全局 瀑布流加载更多

This commit is contained in:
2023-07-13 15:07:31 +08:00
parent c8f24835d3
commit f5e9e2ec62
7 changed files with 189 additions and 92 deletions

View File

@@ -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')