Yansen преди 2 години
родител
ревизия
00db5c6381
променени са 4 файла, в които са добавени 34 реда и са изтрити 1 реда
  1. 2
    0
      index.html
  2. 31
    0
      src/pages/pg4/index.vue
  3. 1
    0
      src/router.js
  4. 0
    1
      src/utils/resources.js

+ 2
- 0
index.html Целия файл

@@ -9,6 +9,8 @@
9 9
     <script src="./turn.min.js"></script>
10 10
     <script src="./config.js"></script>
11 11
     <script src="./slidePage/slidePage.min.js"></script>
12
+    <script src="https://api.map.baidu.com/api?v=3.0&ak=IDixtryGuZAFPZLh4r8XCAM054r8LCRs"></script>
13
+
12 14
     <link rel="stylesheet" href="./slidePage/slidePage.min.css">
13 15
 
14 16
     <link rel="stylesheet" href="./fonts/SourceHanSansCN-Medium/SourceHanSansCN-Medium.css">

+ 31
- 0
src/pages/pg4/index.vue Целия файл

@@ -0,0 +1,31 @@
1
+<template>
2
+  <div class="page" ref="el"></div>
3
+</template>
4
+
5
+<script setup>
6
+  import { onMounted, ref } from 'vue';
7
+  // import AMapLoader from '@amap/amap-jsapi-loader';
8
+
9
+  const el = ref();
10
+
11
+  onMounted(() => {
12
+    const map = new BMap.Map(el.value);
13
+    const point = new BMap.Point(116.404, 39.915); // 天安门
14
+    map.centerAndZoom(point, 3);
15
+    // window._AMapSecurityConfig = {
16
+    //   securityJsCode:'f33684b9573195f9f91a4c8bc779d7e2',
17
+    // }
18
+    // AMapLoader.load({
19
+    //   key: "378f2af0c01b00ec919ace1699f2466f",              // 申请好的Web端开发者Key,首次调用 load 时必填
20
+    //   version: "2.0",   // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
21
+    //   plugins: [],           // 需要使用的的插件列表,如比例尺'AMap.Scale'等
22
+    // }).then((AMap)=>{
23
+    //   const map = new AMap.Map(el.value, {
24
+    //     mapStyle: 'amap://styles/bff59c60c62af794ee93f1befde78625',
25
+    //     zoom: 3,
26
+    //   });
27
+    // }).catch(e => {
28
+    //   console.error(e);
29
+    // })
30
+  });
31
+</script>

+ 1
- 0
src/router.js Целия файл

@@ -6,6 +6,7 @@ const routes = [
6 6
   { path: '/', component: () => import('@/pages/index.vue') },
7 7
   { path: '/bk1', component: () => import('@/pages/bk1/index.vue') },
8 8
   { path: '/pg2-2', component: () => import('@/pages/pg2-2/index.vue') },
9
+  { path: '/pg4', component: () => import('@/pages/pg4/index.vue') },
9 10
 ]
10 11
 
11 12
 const router = createRouter({

+ 0
- 1
src/utils/resources.js Целия файл

@@ -30,7 +30,6 @@ export const resources = [
30 30
   { image: './images/pg2/flower/1-4.png', },
31 31
   { image: './images/pg2/flower/右-小.png', },
32 32
   { image: './images/pg2/flower/左-小.png', },
33
-  { image: './images/bk1/flower/左-小.png', },
34 33
   { image: './images/bk1/flip.png', },
35 34
   { image: './images/bk1/flower.png', },
36 35
   { image: './images/bk1/goback.png', },