222
YM
2024-05-17 0b4fa4b2cfd68528d15aa71557425a7a80e3fc41
src/pages/index/index.vue
@@ -25,8 +25,8 @@
                  <el-dropdown trigger="click" @command="handleCommand" style="margin-right:  .3rem;">
                     <view @click="iconClick(2)" class="s2 ss1 "></view>
                     <el-dropdown-menu v-if="isCommand" slot="dropdown">
                        <el-dropdown-item command="1" icon="el-icon-plus">修改密码</el-dropdown-item>
                        <el-dropdown-item command="2" icon="el-icon-circle-plus">退出登录</el-dropdown-item>
                        <el-dropdown-item command="1" >修改密码</el-dropdown-item>
                        <el-dropdown-item command="2" >退出登录</el-dropdown-item>
                     </el-dropdown-menu>
                  </el-dropdown>
                  <view @click="iconClick(item+2)" v-for="item in 1" :key="item" :class="'s'+(item+2)"
@@ -115,19 +115,19 @@
            },
            // 书籍数据
            listData: [{
                  name: '历代医家传记库',
                  name: '中医人物数据库',
                  id: 1,
               }, {
                  name: '世医医家库',
                  name: '世医医家数据库',
                  id: 2,
               }, {
                  name: '医学学术流派',
                  name: '中医学术流派',
                  id: 3,
               }, {
                  name: '中国地域医谱',
                  name: '中医地域医谱',
                  id: 4,
               }, {
                  name: '中国医事制度',
                  name: '中医医事制度',
                  id: 5,
               },
@@ -152,27 +152,22 @@
         // 搜索
         onSearch(val) {
            uni.navigateTo({
               url: '/pages/knowledgeBase/knowledgeBase?name=' + val.text
               url: '/pages/knowledgeBase/knowledgeBase?keyword=' + val.text
            })
         },
         // 搜索
         // 切换搜索框的展开和收起状态
         toggleSearch() {
            console.log('sdf');
            // console.log('撒旦范德萨发生的',this.searchInput);
            this.isExpanded = !this.isExpanded;
            this.$nextTick(() => {
               if (this.searchInput.trim() !== '') {
                  uni.navigateTo({
                     url: '/pages/knowledgeBase/knowledgeBase?name=' + this.searchInput
                     url: '/pages/knowledgeBase/knowledgeBase?keyword=' + this.searchInput
                  })
                  // console.log('搜索', this.searchInput);
               } else {
                  console.log('不搜索');
               }
               this.searchInput = '';
               console.log(this.isExpanded);
            })
         },
         // 列表项跳转
@@ -182,20 +177,20 @@
            // uni.setStorageSync('globalData', { id: 123, name: 'example' });
            if (item.id == 1) {
               uni.navigateTo({
                  // url: '/pages/repository/repository?id=' + item.id
                  url: '/pages/characterRelation/characterRelation?id=' + item.id
                  // url: '/pages/character/detail?id=' + item.id
                  url: '/pages/character/index?id=' + item.id
               })
            } else if (item.id == 2) {
               console.log(item.name);
               // uni.navigateTo({
               //    url: '/pages/inherit/index?id=' + item.id
               // })
               uni.navigateTo({
                  url: '/pages/shiyiHome/shiyiHome'
                  url: '/pages/inherit/index?id=' + item.id
               })
               // uni.navigateTo({
               //    url: '/pages/shiyiHome/shiyiHome'
               // })
            } else if (item.id == 3) {
               uni.navigateTo({
                  url: '/pages/dataDisplay/dataDisplay?id=' + item.id
                  url: '/pages/academicGenres/index?id=' + item.id
               })
            } else if (item.id == 4) {
               uni.navigateTo({
@@ -486,7 +481,7 @@
      }
   }
   @media screen and (min-width:1366px) and (max-width:1920px) {
   @media screen and (min-width:1366px) {
      .Ttop {
         margin-bottom: .6rem !important;
      }
@@ -530,9 +525,7 @@
         width: 2rem !important;
      }
      .hua {
         height: 4rem !important;
      }
   }
@@ -694,6 +687,7 @@
         background: #EBF4FF;
         font-weight: 600;
         margin: 0 .21rem;
         cursor: pointer;
      }
   }