import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) let moduleTrue = {}; // 为了兼容如果用户,不按规范创建,或者不使用vuex时就可略过导入用户的模块。 try { const modulesList = require.context('@/store', true, /\.js$/); if (typeof modulesList === 'function' && typeof modulesList !== 'undefined') { // 加载modules目录下所有文件(分模块) const modules = modulesList.keys().reduce((modules, modulePath) => { const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1') const value = modulesList(modulePath) modules[moduleName] = { namespaced: true, ...value.default } return modules }, {}); moduleTrue = modules; } } catch (e) { //TODO handle the exception // console.warn('tmui提醒:用户未使用vuex') console.error('如果未使用vuex,不用理会,如果使用了vuex报错请检错误信息:',e); } let pdefault_cookies_color = uni.getStorageSync('setTmVuetifyColor') let pdefault_cookies_black = uni.getStorageSync('setTmVuetifyBlack') const store = new Vuex.Store({ modules: { ...moduleTrue }, state: { tmVuetify: { color: typeof pdefault_cookies_color === 'string' ? pdefault_cookies_color : '', black: typeof pdefault_cookies_black === 'boolean' ? pdefault_cookies_black : false, tmVueTifly_pages: '', tmVueTifly_pagesIndex: '', //这里是微信小程序和微信H5的配置资料。 wxshareConfig_miniMp: { title: '', // 分享标题 desc: '', // 描述 imageUrl: '', // 分享图片 path: '', // 分享路径 copyLink: '', // 复制链接 query: {}, // 分享参数 } }, }, getters: { // $tm:state=>{ // return $tm; // } }, mutations: { setTmVuetifyColor(state, color) { Vue.set(state.tmVuetify, 'color', color) }, setPageNow(state, url) { Vue.set(state.tmVuetify, 'tmVueTifly_pages', url); }, setPageNowIndex(state, index) { Vue.set(state.tmVuetify, 'tmVueTifly_pagesIndex', index); }, setTmVuetifyBlack(state, black) { Vue.set(state.tmVuetify, 'black', black) if (black === true) { uni.setTabBarStyle({ backgroundColor: "#212121" }) } else { uni.setTabBarStyle({ backgroundColor: "#FFFFFF" }) } }, setWxShare(state, cfg) { let pcf = cfg||{}; if(typeof pcf !=='object' || Array.isArray(cfg)) pcf = {}; Vue.set(state.tmVuetify, 'wxshareConfig_miniMp', { ...state.tmVuetify.wxshareConfig_miniMp,...pcf}); } } }) export default store;
session(release): write data/sessions/d/0/d0e70a8dfea1407d: no space left on device
/root/go/pkg/mod/github.com/go-macaron/session@v0.0.0-20190805070824-1a3cdc6f5659/session.go:199 (0x8bc0f8) /root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/context.go:81 (0x83623b) /root/go/pkg/mod/github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80b5f4) /root/go/pkg/mod/github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80b51c) /root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/context.go:125 (0x8363b2) /root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/context.go:115 (0x8473a6) /root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/recovery.go:161 (0x84739d) /root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/logger.go:40 (0x839a24) /root/go/pkg/mod/github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80b5f4) /root/go/pkg/mod/github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80b51c) /root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/context.go:125 (0x8363b2) /root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/router.go:187 (0x8412dd) /root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/router.go:304 (0x8423ec) /root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/macaron.go:218 (0x83adde) /usr/local/btgo/src/net/http/server.go:2936 (0x7b23b5) serverHandler.ServeHTTP: handler.ServeHTTP(rw, req) /usr/local/btgo/src/net/http/server.go:1995 (0x7add91) (*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req) /usr/local/btgo/src/runtime/asm_amd64.s:1598 (0x47e160) goexit: BYTE $0x90 // NOP