diff --git a/common/config.js b/common/config.js index 6236ba7..9a3ebf4 100644 --- a/common/config.js +++ b/common/config.js @@ -1,8 +1,8 @@ -const mode = 'devLocal'; //devLocal:本地测试、devOnline:线上测试、production:生产环境 +const mode = 'production'; //devLocal:本地测试、devOnline:线上测试、production:生产环境 let ROOTPATH = ''; //域名 switch (mode) { case 'devLocal': - ROOTPATH = "//vr.langye.net" + ROOTPATH = "//h5.ali251.langye.net" break; case 'devOnline': ROOTPATH = "//vr.langye.net" diff --git a/manifest.json b/manifest.json index 26dc3a9..e5b4fe4 100644 --- a/manifest.json +++ b/manifest.json @@ -1,5 +1,5 @@ { - "name" : "我是党史记录人-红色少年行 未成年人研学", + "name" : "我是党史记录人——红色少年行 未成年人研学", "appid" : "__UNI__2B9C5D3", "description" : "", "versionName" : "1.0.0", @@ -72,6 +72,9 @@ "h5" : { "router" : { "base" : "h5hssnx" + }, + "devServer" : { + "disableHostCheck":true } } } diff --git a/pages.json b/pages.json index 536a896..7bc6de6 100644 --- a/pages.json +++ b/pages.json @@ -45,7 +45,7 @@ }, "globalStyle": { "navigationBarTextStyle": "black", - "navigationBarTitleText": "\"我是党史记录人-红色少年行\"\n未成年人研学", + "navigationBarTitleText": "\"我是党史记录人——红色少年行\"\n未成年人研学", "navigationBarBackgroundColor": "#F8F8F8", "backgroundColor": "#F8F8F8" } diff --git a/pages/map/map.vue b/pages/map/map.vue index 49bd6e3..8f4daae 100644 --- a/pages/map/map.vue +++ b/pages/map/map.vue @@ -76,6 +76,7 @@ export default { data() { return { + isBkgLoad: false, done: 0, isShowProgress: true, area: { @@ -120,9 +121,14 @@ export default { }, load () { + this.isBkgLoad = true this.area.w = this.$refs['image'].getBoundingClientRect().width this.area.h = this.$refs['image'].getBoundingClientRect().height + this.scroll() + + }, + scroll () { this.$nextTick(() => { let element = document.getElementById("img-container"); // 获取需要滚动的元素 let scrollLeft = element.scrollWidth / 2 - element.offsetWidth / 2; // 计算横向滚动条滚动的位置 @@ -131,7 +137,6 @@ export default { element.scrollTop = scrollTop; // 设置纵向滚动条的位置 }) - }, async getPoints () { @@ -187,11 +192,18 @@ export default { } } }, - mounted() { + mounted () { }, - onLoad() { + onLoad () { this.getPoints() + + + }, + onShow () { + if (this.isBkgLoad) { + this.scroll(); + } } }