|
@@ -37,7 +37,7 @@
|
|
|
</window-size>
|
|
|
</template>
|
|
|
|
|
|
-<script>
|
|
|
+<script setup name="HospitalIntroduction">
|
|
|
import store from '../../store'
|
|
|
import blueprint from '../../assets/hospital-blueprint.jpg'
|
|
|
import hall from '../../assets/hall.jpg'
|
|
@@ -45,50 +45,39 @@ import nurseStation from '../../assets/nurse-station.jpg'
|
|
|
import childrenCenter from '../../assets/children-center.jpg'
|
|
|
import { onMounted, reactive, ref } from 'vue'
|
|
|
import { getJsApiSHA1 } from '../../api/wx-jsapi'
|
|
|
-export default {
|
|
|
- name: 'HospitalIntroduction',
|
|
|
- setup() {
|
|
|
- const images = [blueprint, hall, nurseStation, childrenCenter]
|
|
|
- const headDiv = ref(null)
|
|
|
- const mScroll = reactive({
|
|
|
- height: '',
|
|
|
- padding: '10px',
|
|
|
- overflowY: 'scroll',
|
|
|
- backgroundColor: 'lightskyblue',
|
|
|
- backgroundImage: 'linear-gradient(to bottom right, #d6dbe9, #c4ceeb)',
|
|
|
+const images = [blueprint, hall, nurseStation, childrenCenter]
|
|
|
+const headDiv = ref(null)
|
|
|
+const mScroll = reactive({
|
|
|
+ height: '',
|
|
|
+ padding: '10px',
|
|
|
+ overflowY: 'scroll',
|
|
|
+ backgroundColor: 'lightskyblue',
|
|
|
+ backgroundImage: 'linear-gradient(to bottom right, #d6dbe9, #c4ceeb)',
|
|
|
+})
|
|
|
+const showRoute = () => {
|
|
|
+ getJsApiSHA1(encodeURI(location.href)).then((res) => {
|
|
|
+ wx.config({
|
|
|
+ debug: false,
|
|
|
+ appId: res.appId,
|
|
|
+ timestamp: res.timestamp,
|
|
|
+ nonceStr: res.noncestr,
|
|
|
+ signature: res.signature,
|
|
|
+ jsApiList: ['openLocation'],
|
|
|
})
|
|
|
- const showRoute = () => {
|
|
|
- getJsApiSHA1(encodeURI(location.href)).then((res) => {
|
|
|
- wx.config({
|
|
|
- debug: false,
|
|
|
- appId: res.appId,
|
|
|
- timestamp: res.timestamp,
|
|
|
- nonceStr: res.noncestr,
|
|
|
- signature: res.signature,
|
|
|
- jsApiList: ['openLocation'],
|
|
|
- })
|
|
|
- wx.ready(() => {
|
|
|
- wx.openLocation({
|
|
|
- latitude: 28.304346,
|
|
|
- longitude: 112.961423,
|
|
|
- name: '长沙泰和医院', // 位置名
|
|
|
- address: '湖南省长沙市开福区芙蓉北路529号', // 地址详情说明
|
|
|
- scale: 15, // 地图缩放级别,整形值,范围从1~28。默认为最大
|
|
|
- // infoUrl: '', // 在查看位置界面底部显示的超链接,可点击跳转
|
|
|
- })
|
|
|
- })
|
|
|
+ wx.ready(() => {
|
|
|
+ wx.openLocation({
|
|
|
+ latitude: 28.304346,
|
|
|
+ longitude: 112.961423,
|
|
|
+ name: '长沙泰和医院', // 位置名
|
|
|
+ address: '湖南省长沙市开福区芙蓉北路529号', // 地址详情说明
|
|
|
+ scale: 15, // 地图缩放级别,整形值,范围从1~28。默认为最大
|
|
|
+ // infoUrl: '', // 在查看位置界面底部显示的超链接,可点击跳转
|
|
|
})
|
|
|
- }
|
|
|
-
|
|
|
- onMounted(() => {
|
|
|
- mScroll.height = store.state.windowSize.h - 250 - headDiv.value.offsetHeight + 'px'
|
|
|
})
|
|
|
- return {
|
|
|
- images,
|
|
|
- headDiv,
|
|
|
- mScroll,
|
|
|
- showRoute,
|
|
|
- }
|
|
|
- },
|
|
|
+ })
|
|
|
}
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ mScroll.height = store.state.windowSize.h - 250 - headDiv.value.offsetHeight + 'px'
|
|
|
+})
|
|
|
</script>
|