import authorize from '@/common/authorize.js'
import { formatDate } from '@/common/utilsTools.js'

const state = {
    isIphoneX: false,
    isIphone: false,
    isActivity: false,
    windowHeight: 0,
}
const mutations = { 
    setActivity(state, variable) {
        state.isActivity = variable
    },
    setChangeVar(state, variable) {
        //获取设备信息是否为IphoneX
        state.isIphoneX = variable
    },
    setIsIphone(state, variable) {
        //获取设备信息是否为IphoneX
        state.isIphone = variable
    },
    setLoginOrderId(state, variable) {
        //获取设备信息是否为IphoneX
        state.isLoginOrderId = variable
        console.log(state.isLoginOrderId)
    },
    setWindowHeight(state, height) {
        state.windowHeight = height
        console.log(state.windowHeight)
    }
}
const actions = {
    setVariableFun: function(context, vData) {
        context.commit('setChangeVar', vData)
    },
    setIsIphoneFun: function(context, vData) {
        context.commit('setIsIphone', vData)
    },
    setActivityFn: function(context, vData) {
        context.commit('setActivity', vData)
    },
}
export default {
    namespaced: true,
    state,
    mutations,
    actions
}
