Jing-Jiu 4 년 전
부모
커밋
40055e60a6
3개의 변경된 파일71개의 추가작업 그리고 23개의 파일을 삭제
  1. 50 23
      components/foot-tabs/footTabs.vue
  2. 21 0
      static/iconfont.css
  3. BIN
      static/iconfont.ttf

+ 50 - 23
components/foot-tabs/footTabs.vue

@@ -1,22 +1,24 @@
 <template>
-  <div class="hover_content">
-    <div class="hover_menu flex">
-      <div
+  <view class="hover_content">
+    <view class="hover_menu flex">
+      <view
         class="menu_icon"
         v-for="(menu, i) in menus"
         :key="i"
         @tap="click(i, menu.pagePath)"
       >
-        <uni-transition mode-class="fade" show="true" v-if="selectedIndex == i">
-          <img :src="menu.selectedIconPath" />
-        </uni-transition>
-        <uni-transition mode-class="fade" show="true" v-else>
-          <img :src="menu.iconPath" />
-        </uni-transition>
-      </div>
-    </div>
-  </div>
+        <view
+          class="iconBox" 
+          :class="{ hover: selectedIndex == i }"
+        >
+          <span class="iconfont" :class="menu.icon"></span>
+        </view>
+      </view>
+    </view>
+  </view>
 </template>
+<style scoped src="../../static/iconfont.css">
+</style>
 <style lang="scss" scoped>
 .hover_content {
   z-index: 999;
@@ -32,13 +34,32 @@
   .hover_menu {
     display: flex;
     justify-content: space-around;
-	margin-top: 10rpx;
+    align-items: center;
+    margin-top: 10rpx;
     .menu_icon {
-      transition: all 0.5s;
-      img {
+      .iconBox {
         width: 60rpx;
         height: 60rpx;
-        border-radius: 100rpx;
+        border-radius: 50%;
+        &.hover {
+          background: rgb(14, 92, 246);
+        }
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        .iconfont {
+          &.hoverd {
+            width: 60rpx;
+            height: 60rpx;
+            border-radius: 50%;
+            color: rgb(187, 187, 187);
+          }
+          color: #fff;
+          font-size: 40rpx;
+          font-family: "iconfont" !important;
+          -webkit-font-smoothing: antialiased;
+          -moz-osx-font-smoothing: grayscale;
+        }
       }
     }
   }
@@ -53,14 +74,12 @@ export default {
       menus: [
         {
           pagePath: "pages/index/index",
-          iconPath: "/static/tabbar/home-select.png",
-          selectedIconPath: "/static/tabbar/home-selected.png",
+          icon: "icon-zhuye",
           text: "首页",
         },
         {
           pagePath: "pages/selfCenter/index",
-          iconPath: "/static/tabbar/user-select.png",
-          selectedIconPath: "/static/tabbar/user-selected.png",
+          icon: "icon-geren",
           text: "我的",
         },
       ],
@@ -79,9 +98,9 @@ export default {
         // uni.redirectTo({
         // 	 url: "/" + src,
         // });
-		uni.navigateTo({
-			url: "/" + src,
-		});
+        uni.navigateTo({
+          url: "/" + src,
+        });
       }
     },
     check(url) {
@@ -98,12 +117,20 @@ export default {
         "pages/park/index",
         "pages/park/map_search",
         "pages/activity/index",
+        "pages/activity/activity_deatil",
         "pages/supply/index",
         "pages/supply/putSupply",
         "pages/supply/mySupply",
         "pages/supply/supply_detail",
         "pages/enterprise/index",
+        "pages/enterprise/enterprise_detail",
+        "pages/enterprise/product_detail",
         "pages/service/index",
+        "pages/auth/index",
+        "pages/notice/index",
+        "pages/notice/notice_deatil",
+        "pages/attract/index",
+        "pages/attract/attract_deatil",
       ];
       for (let i = 0; i < arr.length; i++) {
         let e = arr[i];

+ 21 - 0
static/iconfont.css

@@ -0,0 +1,21 @@
+@font-face {
+  font-family: "iconfont"; /* Project id  */
+  src: url('iconfont.ttf?t=1632809870268') format('truetype');
+}
+
+.iconfont {
+  font-family: "iconfont" !important;
+  font-size: 16px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+.icon-geren:before {
+  content: "\e607";
+}
+
+.icon-zhuye:before {
+  content: "\e617";
+}
+

BIN
static/iconfont.ttf