Browse Source

地图

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

4
pages.json

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

4
pages/index/index.vue

@ -311,8 +311,8 @@
this.Post({ this.Post({
id: 4 id: 4
},'/api/article/getArticleById').then(res => { },'/api/article/getArticleById').then(res => {
// this.isShow = res.data.subtitle == 1 ? true : false this.isShow = res.data.subtitle == 1 ? true : false
this.isShow = res.data.address == 1 ? true : false // this.isShow = res.data.address == 1 ? true : false
}) })
}, },
onReady() { onReady() {

26
pages/map/map.vue

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

Loading…
Cancel
Save