jinx 3 月之前
父节点
当前提交
ec41f798ea
共有 3 个文件被更改,包括 61 次插入30 次删除
  1. 49 17
      src/views/answer/constant.js
  2. 4 2
      src/views/answer/index.vue
  3. 8 11
      src/views/map/index.vue

文件差异内容过多而无法显示
+ 49 - 17
src/views/answer/constant.js


+ 4 - 2
src/views/answer/index.vue

@@ -36,7 +36,7 @@
         <span>{{ custom[answerIndex].content.time }} {{ custom[answerIndex].content.author }} </span>
         <p class="review-content" v-html="custom[answerIndex].content.text"></p>
         <p class="desc-title">诗词译文</p>
-        <p class="desc" v-html="custom[answerIndex].content.translation"></p>
+        <p class="desc" v-html="custom[answerIndex].content.explain"></p>
         <p class="desc-title">诗词赏析</p>
         <p class="desc" v-html="custom[answerIndex].content.appreciate"></p>
       </div>
@@ -57,6 +57,7 @@
 <script setup>
 import { reactive, ref, toRefs, onBeforeMount, onMounted, watch } from "vue";
 import { custom } from "./constant";
+console.error(custom);
 const answerIndex = ref(0);
 const optionIndex = ref(-1);
 const isCheck = ref(false);
@@ -177,10 +178,11 @@ const reStartOrContinue = (type = 1) => {
     z-index: 10;
     background: url("@/assets/images/reviewBg.png") no-repeat;
     background-size: 100% 100%;
-    padding: 1.12rem 1.1467rem 0;
+    padding: 1.12rem 0 0 1.1467rem;
     .text-box {
       width: 100%;
       height: 80%;
+      padding-right: 1.1467rem;
       overflow-y: auto;
       .review-title {
         font-weight: normal;

+ 8 - 11
src/views/map/index.vue

@@ -154,7 +154,7 @@ const chooseItem = (i, index) => {
   // marker.clearEvents("mousedown");
   // marker.off("mousedown", hanlderMakerEvent);
   tabType.value = i.type;
-
+  switchView()
   if (markers.length) {
     markers.forEach((item) => {
       map.remove(item);
@@ -183,7 +183,7 @@ const setMarker = () => {
     var customIcon = new AMap.Icon({
       // size: new AMap.Size(50, 50),
       image: "//vdata.amap.com/icons/b18/1/2.png",
-      imageSize: new AMap.Size(50, 50),
+      imageSize: new AMap.Size(50 * 0.5, 50 * 0.5),
     });
     let pos = data[i].location.split(",");
     let extData = data[i];
@@ -191,7 +191,7 @@ const setMarker = () => {
       // position: new AMap.LngLat(106.837106, 29.712762),
 
       position: new AMap.LngLat(pos[0], pos[1]),
-      offset: new AMap.Pixel(-10, -10),
+      // offset: new AMap.Pixel(-10, -10),
       icon: customIcon, //添加 icon 图标 URL
       title: data[i].name,
       zooms: [9, 20], // 设置可见级别,[最小级别,最大级别]
@@ -281,7 +281,7 @@ const initMap = async () => {
     // layers: [layer, imageLayer],
     layers: [layer],
   });
-  map.add(tilerLayer);
+  // map.add(tilerLayer);
   var circle = new AMap.Rectangle({
     bounds: new AMap.Bounds(
       [106.837106, 29.712762], // 左下  手绘图左下相对于地图的经纬度
@@ -443,11 +443,7 @@ const openApp = () => {
   wx.miniProgram.navigateTo({ url: path });
 };
 const switchView = (type) => {
-  if (type == 1) {
-    map.setCenter([106.837106, 29.712762], true);
-  } else {
-    map.setCenter([114.2983, 30.5466], true);
-  }
+  map.setCenter([113.236426, 29.138033], true);
 };
 
 // 绘制当前区域 name: 南京市
@@ -576,7 +572,7 @@ onMounted(() => {
         display: flex;
         align-items: center;
         justify-content: space-between;
-        padding-right: .8rem;
+        padding-right: 0.8rem;
         > div {
           display: flex;
           align-items: center;
@@ -615,7 +611,7 @@ onMounted(() => {
       background: url("@/assets/images/chatBg.png") no-repeat;
       background-size: 100% 100%;
       margin-bottom: 0.5333rem;
-      padding: 0.3rem 0.8rem 1.3333rem;
+      padding: 0.3rem 0.2rem 1.3333rem 0.8rem;
       position: relative;
 
       .ipt-box {
@@ -659,6 +655,7 @@ onMounted(() => {
         font-weight: 400;
         font-size: 0.3333rem;
         line-height: 0.4667rem;
+        padding-right: 0.6rem;
         overflow-y: auto;
         > div {
           overflow: hidden;