|
@@ -5,15 +5,15 @@ import method from '@/common/methodTool'
|
|
|
Vue.use(Vuex);
|
|
|
const store = new Vuex.Store({
|
|
|
state: {
|
|
|
- hideBuyState:false, //是否隐藏购买流程和订单列表
|
|
|
+ hideBuyState: false, //是否隐藏购买流程和订单列表
|
|
|
login: true,
|
|
|
token: '',
|
|
|
avatarUrl: '',
|
|
|
userName: '',
|
|
|
- playNextId:'', //正在播放的节id
|
|
|
+ playNextId: '', //正在播放的节id
|
|
|
userInfo: null,
|
|
|
dictObj: null,
|
|
|
- chapterOpen:true,
|
|
|
+ chapterOpen: true,
|
|
|
allowLoading: true,
|
|
|
goodsAuditionConfigIdList: [], //当前访问页面的试听节ID
|
|
|
shoppingCartList: [], //购物车支付商品
|
|
@@ -23,10 +23,11 @@ const store = new Vuex.Store({
|
|
|
copyData: null, //存放审核资料数据
|
|
|
playChannelId: 0, //正在播放的直播频道号
|
|
|
playVID: 0, //正在播放的保利威视频ID
|
|
|
- liveLast:null,
|
|
|
+ liveLast: null,
|
|
|
tabNums: 0, // '我的'右上角的数字
|
|
|
- sysTime:0, //系统时间
|
|
|
+ sysTime: 0, //系统时间
|
|
|
scene: 0, //进入小程序的场景值
|
|
|
+ sac: ''
|
|
|
},
|
|
|
getters: {
|
|
|
sysTime: state => {
|
|
@@ -91,9 +92,10 @@ const store = new Vuex.Store({
|
|
|
playChannelId: state => state.playChannelId,
|
|
|
playVID: state => state.playVID,
|
|
|
liveLast: state => state.liveLast,
|
|
|
+ sac: state => state.sac
|
|
|
},
|
|
|
mutations: {
|
|
|
- commonSystemTime(state,time) {
|
|
|
+ commonSystemTime(state, time) {
|
|
|
state.sysTime = time;
|
|
|
},
|
|
|
tabNum(state, nums) {
|
|
@@ -109,17 +111,17 @@ const store = new Vuex.Store({
|
|
|
// })
|
|
|
// }
|
|
|
},
|
|
|
- updateLiveLast(state,liveLast) {
|
|
|
+ updateLiveLast(state, liveLast) {
|
|
|
state.liveLast = liveLast
|
|
|
},
|
|
|
- updateAllowLoading(state,isShowloading) {
|
|
|
+ updateAllowLoading(state, isShowloading) {
|
|
|
state.allowLoading = isShowloading
|
|
|
},
|
|
|
- updatePlayNextId(state,str) {
|
|
|
- console.log(str,'str')
|
|
|
+ updatePlayNextId(state, str) {
|
|
|
+ console.log(str, 'str')
|
|
|
state.playNextId = str
|
|
|
},
|
|
|
- updateChapterOpen(state,boolean) {
|
|
|
+ updateChapterOpen(state, boolean) {
|
|
|
state.chapterOpen = boolean
|
|
|
},
|
|
|
updataCopyData(state, objs) {
|
|
@@ -151,7 +153,10 @@ const store = new Vuex.Store({
|
|
|
},
|
|
|
setScene(state, scene) {
|
|
|
state.scene = scene
|
|
|
- }
|
|
|
+ },
|
|
|
+ setSac(state, sac) {
|
|
|
+ state.sac = sac
|
|
|
+ },
|
|
|
},
|
|
|
actions: {
|
|
|
/**
|
|
@@ -162,7 +167,7 @@ const store = new Vuex.Store({
|
|
|
}) {
|
|
|
return new Promise(resolve => {
|
|
|
api.commonSystemTime().then(res => {
|
|
|
- if(res.data.code == 200) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
commit('commonSystemTime', res.data.data)
|
|
|
resolve()
|
|
|
}
|
|
@@ -190,7 +195,7 @@ const store = new Vuex.Store({
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- async appCommonConfig(context,data) {
|
|
|
+ async appCommonConfig(context, data) {
|
|
|
const resdata = await api.appCommonConfig(data)
|
|
|
if (resdata.data.code == 200) {
|
|
|
context.state.hideBuyState = resdata.data.data.hide;
|