| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- /**
- * 店铺状态信息
- */
- export const state = () => ({
- store: {
- fetching: false,
- data: {}
- },
- commodity: {
- fetching: false,
- data: {}
- },
- component: {
- fetching: false,
- data: {}
- },
- storeCommodity: {
- fetching: false,
- data: {}
- },
- saveHistory: {
- fetching: false,
- data: {}
- },
- focus: {
- fetching: false,
- data: {}
- },
- focusList: {
- fetching: false,
- data: {}
- },
- focusPage: {
- fetching: false,
- data: {}
- },
- collectCount: {
- fetching: false,
- data: {}
- }
- })
- export const mutations = {
- REQUEST_STORE_INFO (state) {
- state.store.fetching = true
- },
- GET_STORE_INFO_FAILURE (state) {
- state.store.fetching = false
- },
- GET_STORE_INFO_SUCCESS (state, result = {}) {
- state.store.fetching = false
- state.store.data = result
- },
- REQUEST_COMMODITY (state) {
- state.commodity.fetching = true
- },
- GET_COMMODITY_FAILURE (state) {
- state.commodity.fetching = false
- },
- GET_COMMODITY_SUCCESS (state, result = {}) {
- state.commodity.fetching = false
- state.commodity.data = result
- },
- REQUEST_COMPONENT (state) {
- state.component.fetching = true
- },
- GET_COMPONENT_FAILURE (state) {
- state.component.fetching = false
- },
- GET_COMPONENT_SUCCESS (state, result = {}) {
- state.component.fetching = false
- state.component.data = result
- },
- REQUEST_STORE_COMMODITY (state) {
- state.storeCommodity.fetching = true
- },
- GET_STORE_COMMODITY_FAILURE (state) {
- state.storeCommodity.fetching = false
- },
- GET_STORE_COMMODITY_SUCCESS (state, result = {}) {
- state.storeCommodity.fetching = false
- state.storeCommodity.data = result
- },
- REQUEST_SAVEHISOTRY (state) {
- state.saveHistory.fetching = true
- },
- GET_SAVEHISOTRY_FAILURE (state) {
- state.saveHistory.fetching = false
- },
- GET_SAVEHISOTRY_SUCCESS (state, result) {
- state.saveHistory.fetching = false
- state.saveHistory.data = result
- },
- REQUEST_FOCUS (state) {
- state.focus.fetching = true
- },
- GET_FOCUS_FAILURE (state) {
- state.focus.fetching = false
- },
- GET_FOCUS_SUCCESS (state, result) {
- state.focus.fetching = false
- state.focus.data = result
- },
- REQUEST_FOCUSLIST (state) {
- state.focusList.fetching = true
- },
- GET_FOCUSLIST_FAILURE (state) {
- state.focusList.fetching = false
- },
- GET_FOCUSLIST_SUCCESS (state, result) {
- state.focusList.fetching = false
- state.focusList.data = result
- },
- REQUEST_FOCUSPAGE (state) {
- state.focusPage.fetching = true
- },
- GET_FOCUSPAGE_SUCCESS (state, result) {
- state.focusPage.fetching = false
- state.focusPage.data = result
- },
- GET_FOCUSPAGE_FAILURE (state) {
- state.focusPage.fetching = false
- },
- REQUEST_COLLECT (state) {
- state.collectCount.fetching = true
- },
- REQUEST_COLLECT_SUCCESS (state, result) {
- state.collectCount.fetching = false
- state.collectCount.data = result
- },
- REQUEST_COLLECT_FAILURE (state) {
- state.fetching = false
- }
- }
|