Commit 02d5d3ff by MichaelJier

feature<timer>

 1. 增加预发服、正式服ws地址
parents 531890a0 7cb846ea
......@@ -62,9 +62,15 @@ export default {
},
token() {
return this.$cookie.get(this.tokenKey) ? this.$cookie.get(this.tokenKey).token || 0 : 0
},
isWebview() {
return navigator.userAgent.toLowerCase().includes('webview')
}
},
async mounted() {
if (this.isWebview) {
this.set_drainage_state(0)
}
this.$Bus.$on('bus-showLogin', this._toggleLogin);
await this.get_userInfo({ refererId: this.$route.query.refererId });
this.set_nowDate();
......@@ -112,7 +118,8 @@ export default {
}),
...mapMutations({
set_userInfo: 'set_userInfo',
set_uuid: 'set_uuid'
set_uuid: 'set_uuid',
set_drainage_state: 'set_drainage_state'
}),
async get_userInfo(obj) {
const res = await getWatchLoginInfo({
......
......@@ -2,4 +2,14 @@
// ? process.env.DEF_DOMAIM + (window.location.protocol.split(':')[0] === 'https' ? process.env.HTTPS_PORT : process.env.HTTP_PORT)
// : `http:${process.env.DEF_DOMAIM + process.env.HTTP_PORT}`;
// export const watchTime = `wss://${DEF_DOMAIM}/v1/stats/channel/watchTime`
export const watchTime = `wss://bapidev.guangdianyun.tv/v1/stats/channel/watchTime`
\ No newline at end of file
let watchTime = ''
if (!process.env.X_CA_STAGE) {
watchTime = `wss://bapiprod.guangdianyun.tv/v1/stats/channel/watchTime`
} else if (process.env.X_CA_STAGE === 'PRE') {
watchTime = `wss://bapipre.guangdianyun.tv/v1/stats/channel/watchTime`
} else if (process.env.X_CA_STAGE === 'TEST') {
watchTime = `wss://bapidev.guangdianyun.tv/v1/stats/channel/watchTime`
}
export {watchTime}
\ No newline at end of file
......@@ -11,6 +11,9 @@ const mutations = {
set_uuid(state, info) {
state.uuid = info;
},
set_drainage_state(state, info) {
state.drainage['drainage_status'] = info;
},
set_welcomeInfo(state, info) {
state.welcomeInfo = info;
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment