YM
2024-05-11 227029c7dff6ebc0acd6b3ba07b234a22ec06521
src/pages/index/index.vue
@@ -16,7 +16,7 @@
                  <view class="flex searchCss" :style="{'backgroundColor': isExpanded==true?'#fff':''}"
                     style="border-radius: .5rem; height: 75%; width: 2.33rem;margin-right: .30rem;justify-content: flex-end;">
                     <!-- overflow: hidden;  -->
                     <input :style="{'display': isExpanded == true ? 'block' : 'none'}" type="text"
                     <input :style="{'display': isExpanded == true ? 'block' : 'none'}" @confirm="toggleSearch" type="text"
                        style="margin-left: .05rem;color: #2C2C2C; flex: 1; background-color: #fff; font-size: .13rem;"
                        class="search-input" v-model="searchInput" placeholder="请输入搜索内容" />
                     <view class="search-logo" @click="toggleSearch"
@@ -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,9 +152,8 @@
         // 搜索
         onSearch(val) {
            uni.navigateTo({
               url: '/pages/knowledgeBase/knowledgeBase?name=' + val
               url: '/pages/knowledgeBase/knowledgeBase?name=' + val.text
            })
            console.log('vv', val);
         },
         // 搜索
         // 切换搜索框的展开和收起状态
@@ -164,7 +163,10 @@
            this.isExpanded = !this.isExpanded;
            this.$nextTick(() => {
               if (this.searchInput.trim() !== '') {
                  console.log('搜索', this.searchInput);
                  uni.navigateTo({
                     url: '/pages/knowledgeBase/knowledgeBase?name=' + this.searchInput
                  })
                  // console.log('搜索', this.searchInput);
               } else {
                  console.log('不搜索');
               }
@@ -180,17 +182,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/zhongyi/zhongyi?id=' + item.id
                  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({
@@ -481,7 +486,7 @@
      }
   }
   @media screen and (min-width:1366px) and (max-width:1920px) {
   @media screen and (min-width:1366px) {
      .Ttop {
         margin-bottom: .6rem !important;
      }
@@ -525,9 +530,7 @@
         width: 2rem !important;
      }
      .hua {
         height: 4rem !important;
      }
   }
@@ -689,6 +692,7 @@
         background: #EBF4FF;
         font-weight: 600;
         margin: 0 .21rem;
         cursor: pointer;
      }
   }