12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- import Vue from 'vue'
- import Vuex from 'vuex'
- import user from './model/user'
- import md5 from './model/md5'
- Vue.use(Vuex)
- const store = new Vuex.Store({
- namespaced: true,
- state: {
- // #ifdef H5
- baseURL: 'https://v5dgkivu.qiniu1314.com', //正式地址配置
- // baseURL: 'https://cbbshop.qiniu1314.com', //根目录下
- // baseURL:window.location.protocol + "//" + window.location.host,//请求地址配置
- // #endif
- // #ifndef H5
- baseURL: 'https://v5dgkivu.qiniu1314.com', //正式地址配置
- // #endif
- urlFile: '/index/', //项目部署所在文件夹,修改后需同步修改manifest.json文件中的配置
- userInfo: {}, //登录信息
- loginInterceptor: false, //是否打开强制登录
- isbuy: false, //是否进入购买时间
- isbuy1: false, //是否进入购买时间
- // #ifdef H5 || MP-WEIXIN
- weichatInfo: {}, //保存微信注册信息
- weichatObj: '', //微信对象
- // #endif
- latitude: '',
- longitude: '',
- // #ifdef APP-PLUS
- isShowIllegality:false,//不显示ios审核不允许的功能
- appversion:"1.0.0",
- // #endif
- // #ifndef APP-PLUS
- isShowIllegality:true,//允许显示隐藏信息
- // #endif
- },
- mutations: {
- // #ifdef APP-PLUS
- setappversion(state, provider){
- state.appversion = provider
- },
- // #endif
- 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;
- },
- // 修改显示隐藏ios审核不允许显示的功能
- changeState(state, provider){
- console.log(provider,'provider');
- state.isShowIllegality = provider;
- }
- },
- modules: {
- user,
- md5
- },
- actions: {}
- })
- export default store
|