You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<template>
|
|
|
|
<view class="content">
|
|
|
|
<web-view :src="src"></web-view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
src: '',
|
|
|
|
isShow: true,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onShow() {
|
|
|
|
// 后台文章id 4,副标题(subtitle)和地址(address)切换
|
|
|
|
this.Post({
|
|
|
|
id: 4
|
|
|
|
},'/api/article/getArticleById').then(res => {
|
|
|
|
// this.isShow = res.data.subtitle == 1 ? true : false
|
|
|
|
this.isShow = res.data.address == 1 ? true : false
|
|
|
|
if (this.isShow) {
|
|
|
|
this.checkIsLoginJdsz().then(res => {
|
|
|
|
if(res) {
|
|
|
|
this.src = 'https://chang-map.js-dyyj.com?token=' + res
|
|
|
|
}
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
this.src = "https://chang-map.js-dyyj.com"
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
// 必须登录
|
|
|
|
// let userInfo = (uni.getStorageSync('userInfo') && JSON.parse(uni.getStorageSync('userInfo'))) || this.$store.state.user.userInfo || {}
|
|
|
|
// console.log(userInfo)
|
|
|
|
// if(userInfo.token) {
|
|
|
|
// this.src = 'https://chang-map.js-dyyj.com?token=' + userInfo.token
|
|
|
|
// console.log(this.src)
|
|
|
|
// }else {
|
|
|
|
// uni.navigateTo({
|
|
|
|
// url: '/pages/login/login'
|
|
|
|
// })
|
|
|
|
// }
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.content {
|
|
|
|
width: 100vw;
|
|
|
|
height: 100vh;
|
|
|
|
padding-bottom: env(safe-area-inset-bottom)
|
|
|
|
}
|
|
|
|
</style>
|