Browse Source

地图

master
chenkainan 2 months ago
parent
commit
a647f37517
  1. 4
      pages.json
  2. 4
      pages/index/index.vue
  3. 24
      pages/map/map.vue

4
pages.json

@ -16,7 +16,7 @@
{
"path" : "pages/map/map",
"style" : {
"navigationBarTitleText" : "智游常熟"
"navigationBarTitleText" : "文体旅地图"
}
},
{
@ -293,7 +293,7 @@
"pagePath" : "pages/map/map",
"iconPath" : "/static/images/map.png",
"selectedIconPath" : "/static/images/selectMap.png",
"text" : "地图"
"text" : "文体旅地图"
},
{
"pagePath" : "pages/user/user",

4
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() {

24
pages/map/map.vue

@ -12,18 +12,22 @@
}
},
onShow() {
this.checkIsLoginJdsz().then(res => {
if(res) {
this.src = 'https://chang-map.js-dyyj.com?token=' + res
}
})
//
let userInfo = (uni.getStorageSync('userInfo') && JSON.parse(uni.getStorageSync('userInfo'))) || this.$store.state.user.userInfo || {}
console.log(userInfo)
if(userInfo.token) {
this.src = 'http://localhost:8080/?token=' + userInfo.token
// 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'
})
}
// console.log(this.src)
// }else {
// uni.navigateTo({
// url: '/pages/login/login'
// })
// }
},
methods: {

Loading…
Cancel
Save