12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- import Vue from 'vue'
- import Vuex from 'vuex'
- import user from './model/user'
- Vue.use(Vuex)
- const store = new Vuex.Store({
- namespaced: true,
- state: {
- baseURL: 'https://www.shangshiyiqu.com', //地址配置
- // baseURL: 'http://test.shangshigo.com', //测试地址配置
- urlFile: '/index', //项目部署所在文件夹
- userInfo: {}, //登录信息
- loginInterceptor: false, //是否打开强制登录
- isbuy: false, //是否进入购买时间
- isbuy1: false, //是否进入购买时间
- // #ifdef H5 || MP-WEIXIN
- weichatInfo: {}, //保存微信注册信息
- weichatObj: '', //微信对象
- // #endif
- latitude: '',
- longitude: ''
- },
- mutations: {
- setLat(state, provider) {
- state.latitude = provider
- },
- setLon(state, provider) {
- state.longitude = provider
- },
- setChoose(state, provider) {
- state.chooseProvince = provider.chooseProvince
- state.chooseCity = provider.chooseCity
- state.chooseDistrict = provider.chooseDistrict
- console.log(state.chooseProvince, state.chooseCity, state.chooseDistrict, 'dddddddddddddddddddd')
- },
- setDistrict(state, provider) {
- state.chooseDistrict = provider
- },
- //保存微信信息
- setWeiChatInfo(state, provider) {
- state.weichatInfo = provider;
- },
- //保存微信对象
- setWeiChatObj(state, provider) {
- state.weichatObj = provider;
- },
- //改变进入购买时间的状态
- setBuy(state, provider) {
- state.isbuy = provider;
- },
- setBuy1(state, provider) {
- state.isbuy1 = provider;
- },
- },
- modules: {
- user
- },
- actions: {}
- })
- export default store
|