222
YM
2024-05-17 0b4fa4b2cfd68528d15aa71557425a7a80e3fc41
src/pages/character/index.vue
@@ -9,6 +9,7 @@
        :from="From"
        placehold="请输入关键字"
        :keyword="searchKey"
        :advancedSearchBack="advancedSearchBack"
      />
    </view>
    <!-- 热门搜索 -->
@@ -27,10 +28,10 @@
    </view>
    <view class="" style="margin-left: 0.2rem">书中最常提到的100位人物</view>
    <!-- 关系表地图 -->
    <view
      id="relation"
      style="margin-top: 0.2rem; height: 70vh; width: 100%"
    ></view>
    <view id="relation" style="margin-top: 0.2rem; height: 70vh; width: 100%;position: relative;"
      ><div v-if="!loading && relationships.length == 0" style="position: absolute;top: 30%;left: 0;right: 0;text-align: center;font-size: 0.20rem;color: #666;">暂无相关数据</div></view
    >
    <!-- 朝代 -->
    <view
      class="flex flex-center"
@@ -86,6 +87,7 @@
export default {
  data() {
    return {
      loading: true,
      // echarts数据
      nodes: [],
      // echarts两者的关系
@@ -308,6 +310,7 @@
            this.relationships.push(obj);
          });
        }
        this.loading = false;
        this.relation();
      });
    },
@@ -388,7 +391,7 @@
          }
        };
      });
      var option;
      option = {
        title: {
@@ -468,8 +471,17 @@
    },
    // 高级搜索
    onSubmit(val) {
      getAdvanceSearch(val).then((res) => {
        console.log(res, "接口调用成功");
      getAdvanceSearch({
        ...val,
        page: 1,
        pageSize: 100
      }).then((res) => {
        console.log(res, "res");
      });
    },
    advancedSearchBack() {
      uni.navigateTo({
        url: "/pages/knowledgeBase/knowledgeBase"
      });
    },
    // 点击下面的朝代按钮