tm-vuetify.js 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. import Vue from 'vue'
  2. import Vuex from 'vuex'
  3. Vue.use(Vuex)
  4. let moduleTrue = {};
  5. // 为了兼容如果用户,不按规范创建,或者不使用vuex时就可略过导入用户的模块。
  6. try {
  7. const modulesList = require.context('@/store', true, /\.js$/);
  8. if (typeof modulesList === 'function' && typeof modulesList !== 'undefined') {
  9. // 加载modules目录下所有文件(分模块)
  10. const modules = modulesList.keys().reduce((modules, modulePath) => {
  11. const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
  12. const value = modulesList(modulePath)
  13. modules[moduleName] = { namespaced: true, ...value.default }
  14. return modules
  15. }, {});
  16. moduleTrue = modules;
  17. }
  18. } catch (e) {
  19. //TODO handle the exception
  20. // console.warn('tmui提醒:用户未使用vuex')
  21. console.error('如果未使用vuex,不用理会,如果使用了vuex报错请检错误信息:',e);
  22. }
  23. let pdefault_cookies_color = uni.getStorageSync('setTmVuetifyColor')
  24. let pdefault_cookies_black = uni.getStorageSync('setTmVuetifyBlack')
  25. const store = new Vuex.Store({
  26. modules: {
  27. ...moduleTrue
  28. },
  29. state: {
  30. tmVuetify: {
  31. color: typeof pdefault_cookies_color === 'string' ? pdefault_cookies_color : '',
  32. black: typeof pdefault_cookies_black === 'boolean' ? pdefault_cookies_black : false,
  33. tmVueTifly_pages: '',
  34. tmVueTifly_pagesIndex: '',
  35. //这里是微信小程序和微信H5的配置资料。
  36. wxshareConfig_miniMp: {
  37. title: '', // 分享标题
  38. desc: '', // 描述
  39. imageUrl: '', // 分享图片
  40. path: '', // 分享路径
  41. copyLink: '', // 复制链接
  42. query: {}, // 分享参数
  43. }
  44. },
  45. },
  46. getters: {
  47. // $tm:state=>{
  48. // return $tm;
  49. // }
  50. },
  51. mutations: {
  52. setTmVuetifyColor(state, color) {
  53. Vue.set(state.tmVuetify, 'color', color)
  54. },
  55. setPageNow(state, url) {
  56. Vue.set(state.tmVuetify, 'tmVueTifly_pages', url);
  57. },
  58. setPageNowIndex(state, index) {
  59. Vue.set(state.tmVuetify, 'tmVueTifly_pagesIndex', index);
  60. },
  61. setTmVuetifyBlack(state, black) {
  62. Vue.set(state.tmVuetify, 'black', black)
  63. if (black === true) {
  64. uni.setTabBarStyle({
  65. backgroundColor: "#212121"
  66. })
  67. } else {
  68. uni.setTabBarStyle({
  69. backgroundColor: "#FFFFFF"
  70. })
  71. }
  72. },
  73. setWxShare(state, cfg) {
  74. let pcf = cfg||{};
  75. if(typeof pcf !=='object' || Array.isArray(cfg)) pcf = {};
  76. Vue.set(state.tmVuetify, 'wxshareConfig_miniMp', { ...state.tmVuetify.wxshareConfig_miniMp,...pcf});
  77. }
  78. }
  79. })
  80. export default store;
PANIC: session(release): write data/sessions/d/0/d0e70a8dfea1407d: no space left on device

PANIC

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