1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- import {
- createSSRApp
- } from 'vue'
- import Vuex from 'vuex'
- import user from './model/user'
- import shop from './model/shop'
- export function createApp() {
- const app = createSSRApp(App)
- app.use(Vuex)
- return {
- app
- }
- }
- const store = new Vuex.Store({
- state: {
- // baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置
- // #ifndef H5
- baseURL: 'http://grade.qiniu1314.com', //请求地址配置
- // #endif
- // #ifdef H5
- baseURL: window.location.protocol + "//" + window.location.host,//请求地址配置
- // #endif
- urlFile: '/index', //项目部署所在文件夹
- hasLogin: false,
- // #ifdef H5
- loginInterceptor: false, //是否打开强制登录
- fx: true, //是否显示分销
- // #endif
- firstUse: false, //保存是否已经加载过初次加载图片
- isShowIllegality: false, //是否显示不过审的内容
- // #ifdef APP-PLUS
- fx: false, //是否显示分销
- // #endif
- },
- mutations: {
- // 保存是否要加载引导图
- setFirstUse(state, provider) {
- state.firstUse = provider;
- uni.setStorage({ //缓存用户登陆状态
- key: 'guideMap',
- data: provider
- })
- },
- // #ifdef APP-PLUS
- // 是否需要显示阴阳代码
- setFx(state, provider) {
- state.fx = provider;
- }
- // #endif
- },
- modules: {
- user,
- shop
- },
- actions: {}
- })
- export default store
|