/
home
/
henzagold
/
site
/
store
/
File Upload :
llllll
Current File: /home/henzagold/site/store/index.js
import axios from "~/plugins/axios" export const state = () => ({ header: {}, headerIndex: {}, banner: {}, banner_ids: {}, filters: {}, cats: [], mobileHideCats: [], noneTags: [], header_texts: [], licensees: {}, new_product:null, send_product:null, windowWidth: undefined, // seo seo: { home: {}, category: {} } }); export const mutations = { initConst(state, items) { state.header = items["header"] state.headerIndex = items["headerIndex"] state.banner = items["banner"] state.banner_ids = items["banner_ids"] state.filters = items["filters"] state.cats = items["cats"] state.mobileHideCats = items["mobileHideCats"] state.topProductsId = items["topProductsId"] state.noneTags = items["noneTags"] state.header_texts = items["header_texts"] state.licensees = items["licenseesData"] state.send_product=items["send_product"] state.new_product=items["new_product"] state.seo = items["seo"] }, setWidth(state, data) { state.windowWidth = data }, } export const actions = { async nuxtServerInit({commit}, {req}) { let res = await axios.get('/get-config'); //console.log('salammm', res) if (res) { this.dispatch('config/init', res); this.dispatch('config/initPrice', res.price) commit("initConst", res.site) } // let price = await axios.get('/price'); // let data = await axios.get('/const/site'); } };
Copyright ©2k19 -
Hexid
|
Tex7ure