Commit 7cb846ea by MichaelJier

feature<traffic_driving>

1. 判断ua中是否包含webview关键词区分内嵌页环境
parent 7be060cf
......@@ -18,7 +18,7 @@
</div>
</template>
<script>
import { getWatchLoginInfo, getDrainage } from '@/plugins/API/apiAll';
import { getWatchLoginInfo } from '@/plugins/API/apiAll';
import { mapGetters, mapMutations, mapActions } from 'vuex';
import encrypt from '@/components/encrypt/index';
import white from '@/components/white/index';
......@@ -57,9 +57,15 @@ export default {
isPeep() {
const peep = this.channelConfig.peep || {};
return !!peep.isEnable;
},
isWebview() {
return navigator.userAgent.toLowerCase().includes('webview')
}
},
async mounted() {
if (this.isWebview) {
this.set_drainage_state(0)
}
this.$Bus.$on('bus-showLogin', this._toggleLogin);
this.get_userInfo({ refererId: this.$route.query.refererId });
this.set_nowDate();
......@@ -71,7 +77,8 @@ export default {
PostInfo: 'PostInfo'
}),
...mapMutations({
set_userInfo: 'set_userInfo'
set_userInfo: 'set_userInfo',
set_drainage_state: 'set_drainage_state'
}),
async get_userInfo(obj) {
const res = await getWatchLoginInfo({
......
......@@ -8,6 +8,9 @@ const mutations = {
set_drainage(state, info) {
state.drainage = 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