| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- // store/index.js
- import Vue from 'vue';
- import Vuex from 'vuex';
- Vue.use(Vuex);
- import {
- getConfigByKey
- } from '@/api/index.js'
- export default new Vuex.Store({
- state: {
- webviewUrl: '',
- wsDanmuUrl: 'wss://userapp.zkhj6.com', // 弹幕评论接口地址
- //红包领取规则:
- answerType: 1, //红包领取规则 0:完课且最后一分钟(第二次无需最后一分钟), 1:按完课百分比答题领红包
- isSpare:1, // 0,主要小程序,1:备选
- uploadFile: 'https://userapp.zkhj6.com',
- // imgpath: 'https://hylj-1323137866.cos.ap-chongqing.myqcloud.com',//云联融智图片请求地址
- // logoname:'云联融智优选',
- // appid:'wxd70f99287830cb51',
- // imgpath: 'https://zkzh-2025.oss-cn-beijing.aliyuncs.com',//中康未来智慧药房图片请求地址
- // //https://zkzh-2025.oss-cn-beijing.aliyuncs.com/shop 中康商城图片链接
- // logoname:'中康未来智慧',
- // appid:'wx57c60ac633b47bb0',//中康未来智慧炮灰
- imgpath: 'https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com',//医健宝图片请求地址
- logoname:'医建宝',
- appid:'wx2cb27a0b8d154dc9',
- // imgpath: 'https://cdhyt-1323137866.cos.ap-chongqing.myqcloud.com',//鹤颜堂图片请求地址
- // logoname:'鹤颜堂',
- // appid:'wx0447a16ef6199f03',
- // imgpath: 'https://sft-1361917636.cos.ap-chongqing.myqcloud.com',//四福堂图片请求地址
- // logoname:'四福堂',
- // appid:'wxb3841ced43815810',
- // imgpath: 'https://whhm-1361716159.cos.ap-chongqing.myqcloud.com',//惠名大药房图片请求地址
- // logoname:'惠名大药房',
- // appid:'wxc9553ad82d0d61b8'//h5,
- // imgpath: 'https://liangmiao.obs.cn-southwest-2.myhuaweicloud.com',//良苗图片请求地址
- // logoname:'良苗',
- // appid:'wx80dc06697b583cd9',
- // imgpath: 'https://beiliyo-2025.obs.cn-north-4.myhuaweicloud.com',//倍力优图片请求地址
- // logoname:'倍力优',
- // appid:'wx301ab2fad04c658a',
- // imgpath: 'https://bnkc-1323137866.cos.ap-chongqing.myqcloud.com',//百年康城图片请求地址
- // logoname:'百年康成',
- // appid:'wx36b87a0820734de8'//,
- // imgpath: 'https://drk-1363981074.cos.ap-chongqing.myqcloud.com',//德瑞康图片请求地址
- // logoname:'青岛市德瑞康',
- // appid:'wx29d26f63f836be7f',
- // imgpath: 'https://bjczwh.oss-cn-beijing.aliyuncs.com',//北京存在文化
- // logoname:'食养生活',
- // appid:'wx94951f52d3ac5e25',
- // imgpath: 'https://kuanyitang-1317640934.cos.ap-shanghai.myqcloud.com', //宽益堂
- // logoname: '宽益堂',
- // appid: 'wxd8d7a47f158f9e77',
- // imgpath: 'https://hcl-1b2b.obs.cn-south-1.myhuaweicloud.com',//恒春来
- // logoname:'恒春来',
- // appid:'', //空入尚服装铺
- // imgpath: 'https://obs.yixingjian.top',//宏医堂
- // logoname:'宏医堂工具',
- // appid:'wx61494812051353e1',
- // imgpath: 'https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com',//济南联志健康
- // logoname:'济南联志健康',
- // appid:'wx7475907b6c94cf35',
- // imgpath: 'https://hat-1323137866.cos.ap-chongqing.myqcloud.com',//恒安图
- // logoname:'恒安图',
- // appid:'wx5b0e5a71c77b08b1',
- // imgpath: 'https://ddgy-1323137866.cos.ap-chongqing.myqcloud.com',//叮当国医
- // logoname:'叮当国医',
- // appid:'wxd6187d7eb382af09',
- // imgpath: 'https://bjczwh.oss-cn-beijing.aliyuncs.com',//北京存在文化
- // logoname:'食养生活',
- // appid:'wxf1329423778b0cff',//家常食养记
- // imgpath: 'https://czt-1323137866.cos.ap-chongqing.myqcloud.com',//纯正堂商城图片请求地址
- // // https://czt-1323137866.cos.ap-chongqing.myqcloud.com/shop 纯正堂商城图片链接
- // logoname:'纯正堂',
- // appid:'wx6688e6b9b6fb8700',//纯正堂
- // imgpath: 'https://fs-1382281328.cos.ap-guangzhou.myqcloud.com',//顺亿京图片请求地址
- // logoname:'顺亿京',
- // appid:'wx2fee9f83e200140f',//顺亿京
- },
- mutations: {
- setCount(state, value) {
- state.count = value;
- },
- setUserInfo(state, info) {
- state.userInfo = info;
- },
- setWebviewUrl(state, value) {
- state.webviewUrl = value;
- },
- },
- actions: {
- fetchUser({commit}) {
- // const res = await uni.request({ url: '/api/user' });
- commit('setUserInfo', 'noe');
- },
- getWebviewUrl({commit}) {
- var that = this;
- var data = {
- key: 'course.config'
- }
- return new Promise((resolve, reject) => {
- getConfigByKey(data).then(res => {
- if (res.code == 200) {
- console.log("getConfigByKey====", JSON.parse(res.data))
- let data = JSON.parse(res.data)
- commit('setWebviewUrl', data.userCourseAuthDomain);
- resolve()
- }
- }).catch(error => {
- reject(error)
- });
- })
- }
- }
- });
|