From 16c42a0462fdad5b51d9aa2515c73cab4e4013c8 Mon Sep 17 00:00:00 2001 From: jiazhipeng Date: Fri, 5 Sep 2025 15:50:16 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.vue | 6 +++--- pages/map/map.vue | 22 ++++++++++++++++++---- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index 033d0a9..11ac477 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -311,8 +311,8 @@ 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 + // this.isShow = res.data.subtitle == 1 ? true : false + this.isShow = res.data.address == 1 ? true : false }) }, onReady() { @@ -533,7 +533,7 @@ getHotList() { if(this.typeIndex == 1) { this.Post({ - date: this.getNowTime(new Date()), + end_time: this.getNowTime(new Date()), offset: this.hotList.length, limit:this.limit, type_id: 7, diff --git a/pages/map/map.vue b/pages/map/map.vue index 5c09847..00fafee 100644 --- a/pages/map/map.vue +++ b/pages/map/map.vue @@ -8,15 +8,29 @@ export default { data() { return { - src: '' + src: '', + isShow: true, } }, onShow() { - this.checkIsLoginJdsz().then(res => { - if(res) { - this.src = 'https://chang-map.js-dyyj.com?token=' + res + // 后台文章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)