index.js 1007 B

123456789101112131415161718192021222324252627282930313233343536
  1. // store/index.js
  2. import Vue from 'vue';
  3. import Vuex from 'vuex';
  4. Vue.use(Vuex);
  5. // import { getConfigByKey } from '@/api/index.js'
  6. const store = new Vuex.Store({
  7. state: {
  8. coureLogin: uni.getStorageSync('coureLogin') || 0,
  9. wsDanmuUrl: 'wss://userapp.cqsft.vip', // 弹幕评论接口地址
  10. //红包领取规则:
  11. answerType: 1, //红包领取规则 0:完课且最后一分钟(第二次无需最后一分钟), 1:按完课百分比答题领红包
  12. isSpare:1, // 0,主要小程序,1:备选
  13. uploadFile: 'https://userapp.cqsft.vip',
  14. imgpath: 'https://beiliyo-2025.obs.cn-north-4.myhuaweicloud.com',//倍力优图片请求地址
  15. logoname:'倍力优',
  16. appid:'wx503cf8ab31f83dd4',
  17. },
  18. getters: {
  19. coureLogin: (state) => state.coureLogin,
  20. },
  21. mutations: {
  22. setCount(state, value) {
  23. state.count = value;
  24. },
  25. setCoureLogin(state, payload) {
  26. uni.setStorageSync('coureLogin', payload);
  27. state.coureLogin = payload;
  28. }
  29. },
  30. actions: {
  31. }
  32. });
  33. export default store