Commit 4a4a776a by xiawei

Merge branch 'test' into dev

parents 3eb70299 8a040180
...@@ -22,7 +22,6 @@ export default { ...@@ -22,7 +22,6 @@ export default {
name: 'pc-header-box', name: 'pc-header-box',
computed: { computed: {
...mapGetters({ ...mapGetters({
corpId: 'corpId',
channelInfo: 'channelInfo', channelInfo: 'channelInfo',
userInfo: 'userInfo', userInfo: 'userInfo',
jumpUrls: 'jumpUrls' jumpUrls: 'jumpUrls'
...@@ -32,7 +31,7 @@ export default { ...@@ -32,7 +31,7 @@ export default {
_goMyCenter() { _goMyCenter() {
if (!this.userInfo.id) { if (!this.userInfo.id) {
this.$Bus.$emit('bus-showLogin', true); this.$Bus.$emit('bus-showLogin', true);
} else if (this.corpId === 1421) { } else if (Number(this.$route.query.corpId) === 1421) {
return false; return false;
} else { } else {
window.location.href = this.jumpUrls.center; window.location.href = this.jumpUrls.center;
......
...@@ -65,7 +65,6 @@ export default { ...@@ -65,7 +65,6 @@ export default {
computed: { computed: {
...mapGetters({ ...mapGetters({
type: 'type', type: 'type',
corpId: 'corpId',
channelInfo: 'channelInfo', channelInfo: 'channelInfo',
userInfo: 'userInfo', userInfo: 'userInfo',
jumpUrls: 'jumpUrls' jumpUrls: 'jumpUrls'
...@@ -86,7 +85,7 @@ export default { ...@@ -86,7 +85,7 @@ export default {
_goMyCenter() { _goMyCenter() {
if (!this.userInfo.id) { if (!this.userInfo.id) {
this.$Bus.$emit('bus-showLogin', true); this.$Bus.$emit('bus-showLogin', true);
} else if (this.corpId === 1421) { } else if (Number(this.$route.query.corpId) === 1421) {
return false; return false;
} else { } else {
window.location.href = this.jumpUrls.center; window.location.href = this.jumpUrls.center;
......
...@@ -43,13 +43,13 @@ export default { ...@@ -43,13 +43,13 @@ export default {
name: 'send-more', name: 'send-more',
data() { data() {
return { return {
swiper: null swiper: null,
corpId: this.$route.query.corpId
}; };
}, },
computed: { computed: {
...mapGetters({ ...mapGetters({
type: 'type', type: 'type',
corpId: 'corpId',
channelInfo: 'channelInfo', channelInfo: 'channelInfo',
channelConfig: 'channelConfig', channelConfig: 'channelConfig',
userInfo: 'userInfo', userInfo: 'userInfo',
......
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
const status401 = resolve => require(['./401'], resolve); import status401 from './401';
const status404 = resolve => require(['./404'], resolve); import status404 from './404';
const status408 = resolve => require(['./408'], resolve); import status408 from './408';
const statusLoading = resolve => require(['./loading'], resolve); import statusLoading from './loading';
export default { export default {
name: 'state-box', name: 'state-box',
components: { components: {
......
<template> <template>
<!--加密直播--> <div style="height: 100%">
<transition name="fade" v-if="encrypt"> <!--加密直播-->
<encrypt /> <transition name="fade" v-if="encrypt">
</transition> <encrypt />
<!-- 白名单观看 --> </transition>
<transition name="fade" v-else-if="white"> <!-- 白名单观看 -->
<white /> <transition name="fade" v-else-if="white">
</transition> <white />
<transition v-else> </transition>
<view-pc v-if="!isMobile" /> <template v-else>
<view-vertical v-else-if="channelInfo.screenDirection === 'vertical'" /> <view-pc v-if="!isMobile" />
<view-mobile v-else /> <view-vertical v-else-if="channelInfo.screenDirection === 'vertical'" />
</transition> <view-mobile v-else />
<!--欢迎页-->
<welcome v-if="isMobile && welcomeInfo.imgState == 1" />
</template>
</div>
</template> </template>
<script> <script>
import { getWatchLoginInfo } from '@/plugins/API/apiAll'; import { getWatchLoginInfo } from '@/plugins/API/apiAll';
import { mapGetters, mapMutations, mapActions } from 'vuex'; import { mapGetters, mapMutations, mapActions } from 'vuex';
const encrypt = resolve => require(['@/components/encrypt/index'], resolve); import encrypt from '@/components/encrypt/index';
const white = resolve => require(['@/components/white/index'], resolve); import white from '@/components/white/index';
const viewPc = resolve => require(['./pc'], resolve); import welcome from '@/components/welcome/index';
const viewMobile = resolve => require(['./mobile'], resolve); import viewPc from './pc';
const viewVertical = resolve => require(['./vertical'], resolve); import viewMobile from './mobile';
import viewVertical from './vertical';
export default { export default {
name: 'view-box', name: 'view-box',
components: { components: {
encrypt, encrypt,
white, white,
welcome,
viewPc, viewPc,
viewMobile, viewMobile,
viewVertical viewVertical
...@@ -43,6 +49,7 @@ export default { ...@@ -43,6 +49,7 @@ export default {
...mapGetters({ ...mapGetters({
encrypt: 'encrypt', encrypt: 'encrypt',
white: 'white', white: 'white',
welcomeInfo: 'welcomeInfo',
channelInfo: 'channelInfo', channelInfo: 'channelInfo',
channelConfig: 'channelConfig', channelConfig: 'channelConfig',
jumpUrls: 'jumpUrls' jumpUrls: 'jumpUrls'
...@@ -95,5 +102,3 @@ export default { ...@@ -95,5 +102,3 @@ export default {
} }
}; };
</script> </script>
<style lang="less" scoped></style>
...@@ -32,8 +32,6 @@ ...@@ -32,8 +32,6 @@
</transition> </transition>
<extend-ad></extend-ad> <extend-ad></extend-ad>
</div> </div>
<!--欢迎页-->
<welcome-box v-if="welcomeInfo.imgState == 1"></welcome-box>
</div> </div>
</template> </template>
<script> <script>
...@@ -42,7 +40,6 @@ import SKIN from '@/components/modules/skin'; ...@@ -42,7 +40,6 @@ import SKIN from '@/components/modules/skin';
const advertTop = resolve => require(['@/components/modules/advertBox/top'], resolve); const advertTop = resolve => require(['@/components/modules/advertBox/top'], resolve);
const advertMiddle = resolve => require(['@/components/modules/advertBox/middle'], resolve); const advertMiddle = resolve => require(['@/components/modules/advertBox/middle'], resolve);
const advertText = resolve => require(['@/components/modules/advertBox/text'], resolve); const advertText = resolve => require(['@/components/modules/advertBox/text'], resolve);
const welcomeBox = resolve => require(['@/components/modules/welcomeBox'], resolve);
const shareBox = resolve => require(['@/components/modules/shareBox'], resolve); const shareBox = resolve => require(['@/components/modules/shareBox'], resolve);
const authBox = resolve => require(['@/components/auth'], resolve); const authBox = resolve => require(['@/components/auth'], resolve);
const cameraBox = resolve => require(['@/components/modules/cameraBox'], resolve); const cameraBox = resolve => require(['@/components/modules/cameraBox'], resolve);
...@@ -69,7 +66,6 @@ export default { ...@@ -69,7 +66,6 @@ export default {
menuTab, menuTab,
menuList, menuList,
cameraBox, cameraBox,
welcomeBox,
shareBox, shareBox,
redBox, redBox,
authBox, authBox,
...@@ -84,7 +80,6 @@ export default { ...@@ -84,7 +80,6 @@ export default {
}, },
computed: { computed: {
...mapGetters({ ...mapGetters({
welcomeInfo: 'welcomeInfo',
channelInfo: 'channelInfo', channelInfo: 'channelInfo',
advertTop: 'advertTop', advertTop: 'advertTop',
advertMiddle: 'advertMiddle', advertMiddle: 'advertMiddle',
......
...@@ -22,21 +22,17 @@ const actions = { ...@@ -22,21 +22,17 @@ const actions = {
return false; return false;
} }
commit('set_channelInfo', res.data); commit('set_channelInfo', res.data);
if (res.data.screenDirection === 'vertical') { const advertText = {
await Promise.all([dispatch('get_menuList'), dispatch('get_channelConfig')]); status: 1,
} else { words: res.data.advertWords,
const advertText = { link: res.data.advertWordsLink
status: 1, };
words: res.data.advertWords, commit('set_advertText', advertText);
link: res.data.advertWordsLink await Promise.all([
}; dispatch('get_welcomeInfo'),
commit('set_advertText', advertText); dispatch('get_menuList'),
await Promise.all([ dispatch('get_channelConfig')
dispatch('get_welcomeInfo'), ]);
dispatch('get_menuList'),
dispatch('get_channelConfig')
]);
}
} else if (res.code === 200 && res.errorCode === 3) { } else if (res.code === 200 && res.errorCode === 3) {
commit('set_status', 408); commit('set_status', 408);
} else { } else {
......
...@@ -11,9 +11,6 @@ const getters = { ...@@ -11,9 +11,6 @@ const getters = {
type(state) { type(state) {
return state.type; return state.type;
}, },
corpId(state) {
return state.corpId;
},
welcomeInfo(state) { welcomeInfo(state) {
return state.welcomeInfo; return state.welcomeInfo;
}, },
......
...@@ -5,9 +5,6 @@ const mutations = { ...@@ -5,9 +5,6 @@ const mutations = {
set_status(state, status) { set_status(state, status) {
state.status = status; state.status = status;
}, },
set_corpId(state, id) {
state.corpId = id;
},
set_welcomeInfo(state, info) { set_welcomeInfo(state, info) {
state.welcomeInfo = info; state.welcomeInfo = info;
}, },
......
...@@ -2,7 +2,6 @@ const state = () => ({ ...@@ -2,7 +2,6 @@ const state = () => ({
nowDate: Date.now(), nowDate: Date.now(),
status: 200, // 200 404 408 status: 200, // 200 404 408
type: 'live', type: 'live',
corpId: 0,
welcomeInfo: {}, welcomeInfo: {},
channelInfo: {}, channelInfo: {},
channelConfig: {}, channelConfig: {},
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<state v-else /> <state v-else />
</template> </template>
<script> <script>
import { mapGetters, mapMutations } from 'vuex'; import { mapGetters } from 'vuex';
import REPORT from '@/plugins/report'; import REPORT from '@/plugins/report';
import DMS from '@/plugins/Mixin/dms'; import DMS from '@/plugins/Mixin/dms';
import questionnaire from '@/components/questionnaire/index.js'; import questionnaire from '@/components/questionnaire/index.js';
...@@ -63,12 +63,6 @@ export default { ...@@ -63,12 +63,6 @@ export default {
async mounted() { async mounted() {
const mobile = Number(this.$route.query.mobile); const mobile = Number(this.$route.query.mobile);
this.isMobile = mobile || UserAgent.isMobile(); this.isMobile = mobile || UserAgent.isMobile();
this.set_corpId(Number(this.$route.query.corpId));
},
methods: {
...mapMutations({
set_corpId: 'set_corpId'
})
} }
}; };
</script> </script>
......
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