Pārlūkot izejas kodu

Merge branch 'master' of http://121.40.40.223:3000/zizhong.wang/konggang-city-miniprogram

306132416@qq.com 4 gadi atpakaļ
vecāks
revīzija
142d928682

+ 1 - 0
App.vue

@@ -7,6 +7,7 @@ export default {
     globalTimestamp: Date.now().toString(),
     secret: "AirQK_weichat_app_zhima",
     selectedIndex:0,
+	isSider:false,
 	user_id: '',
 	open_id:'',
 	user_status:'',

+ 73 - 26
components/foot-tabs/footTabs.vue

@@ -1,22 +1,22 @@
 <template>
-  <div class="hover_content">
-    <div class="hover_menu flex">
-      <div
+  <view class="hover_content">
+    <view class="hover_menu flex">
+      <div class="sider" :class="isSider ? 'hoverd' : 'hover'"></div>
+      <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">
+          <span class="iconfont" :class="[menu.icon, selectedIndex == i? '' : 'hover']"></span>
+        </view>
+      </view>
+    </view>
+  </view>
 </template>
+<style scoped src="../../static/iconfont.css">
+</style>
 <style lang="scss" scoped>
 .hover_content {
   z-index: 999;
@@ -32,13 +32,44 @@
   .hover_menu {
     display: flex;
     justify-content: space-around;
-	margin-top: 10rpx;
+    align-items: center;
+    margin-top: 10rpx;
+    .sider {
+      position: absolute;
+      width: 60rpx;
+      height: 60rpx;
+      border-radius: 50%;
+      left: 14%;
+      transition: all 0.3s;
+      background: rgb(14, 92, 246);
+      &.hover {
+        left: 14%;
+        background: rgb(14, 92, 246);
+      }
+      &.hoverd {
+        left: 61%;
+      }
+    }
     .menu_icon {
-      transition: all 0.5s;
-      img {
+      position: relative;
+      .iconBox {
         width: 60rpx;
         height: 60rpx;
-        border-radius: 100rpx;
+        border-radius: 50%;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        .iconfont {
+          z-index: 999;
+          color: #fff;
+          font-size: 30rpx;
+          font-family: "iconfont" !important;
+          -webkit-font-smoothing: antialiased;
+          -moz-osx-font-smoothing: grayscale;
+          &.hover{
+            color: rgb(187, 187, 187);
+          }
+        }
       }
     }
   }
@@ -50,17 +81,16 @@ export default {
     return {
       selectedIndex: getApp().globalData.selectedIndex,
       showselected: false,
+      isSider: getApp().globalData.isSider,
       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: "我的",
         },
       ],
@@ -68,6 +98,13 @@ export default {
   },
   methods: {
     click(index, src) {
+      if (index == 0) {
+        this.isSider = false;
+        getApp().globalData.isSider = false
+      } else {
+        this.isSider = true;
+        getApp().globalData.isSider = true
+      }
       var pages = getCurrentPages(); //获取加载的页面
       var currentPage = pages[pages.length - 1]; //获取当前页面的对象
       var url = currentPage.route; //当前页面url
@@ -76,12 +113,14 @@ export default {
       let res_src = this.check(src);
       // console.log(res_url,res_src);
       if (!(res_url && res_src) && !(res_url == false && res_src == false)) {
-        // uni.redirectTo({
-        // 	 url: "/" + src,
-        // });
-		uni.navigateTo({
-			url: "/" + src,
-		});
+        // if (index == 0) {
+        //   getApp().globalData.isSider = false;
+        // } else {
+        //   getApp().globalData.isSider = true;
+        // }
+        uni.navigateTo({
+          url: "/" + src,
+        });
       }
     },
     check(url) {
@@ -98,12 +137,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];

+ 8 - 0
pages.json

@@ -141,6 +141,14 @@
 			}
 		},
 		{
+			"path": "pages/enterprise/product_detail",
+			"style": {
+				"navigationBarTitleText": "企业详情",
+				"navigationBarBackgroundColor": "#02A7F0",
+				"navigationBarTextStyle":"white"
+			}
+		},
+		{
 			"path": "pages/service/index",
 			"style": {
 				"navigationBarTitleText": "找服务"

+ 64 - 3
pages/enterprise/enterprise_detail.vue

@@ -14,12 +14,12 @@
         :key="idx"
         :class="{ active: active === idx }"
         class="enterprise-item-name"
-        @click="active = idx"
+        @click="change(idx)"
       >
         {{ item }}
       </view>
     </view>
-    <div class="baseInfo">
+    <div class="baseInfo" v-if="active === 0">
       <div class="card-title">{{ model.title }}</div>
       <div class="item-list">
         <div v-for="(item, idx) in model.item" :key="idx" class="term">
@@ -36,6 +36,34 @@
         </div>
       </div>
     </div>
+    <div v-else-if="active === 1" class="proInfo">
+      <div class="products">
+        <div class="product" @click="toDetail(1)">
+          <div class="img">
+            <img src="/static/enterprise/product.jpg">
+          </div>
+          <div class="name">
+            硬件销售
+          </div>
+        </div>
+        <div class="product">
+          <div class="img">
+            <img src="/static/enterprise/product.jpg">
+          </div>
+          <div class="name">
+            硬件销售
+          </div>
+        </div>
+        <div class="product">
+          <div class="img">
+            <img src="/static/enterprise/product.jpg">
+          </div>
+          <div class="name">
+            硬件销售
+          </div>
+        </div>
+      </div>
+    </div>
     <div style="width: 100%">
       <footer-share
         style="width: 100%"
@@ -104,7 +132,7 @@ export default {
       },
       id: "",
       scrollTop: 0,
-      titleList: ["我的供需", "我的需求"],
+      titleList: ["基本信息", "产品信息"],
       active: 0,
       company: {
         logo: "/static/enterprise/logo.png",
@@ -129,6 +157,14 @@ export default {
         },
       });
     },
+    change(idx){
+      this.active = idx
+    },
+    toDetail(index) {
+      uni.navigateTo({
+        url: "/pages/enterprise/product_detail?id=" + index,
+      });
+    },
   },
 };
 </script>
@@ -185,6 +221,31 @@ export default {
       }
     }
   }
+  .proInfo{
+    font-size: 25rpx;
+    .products{
+      width: 100%;
+      display: flex;
+      padding: 4%;
+      flex-wrap: wrap;
+      .product{
+        margin: 2%;
+        padding: 2%;
+        border-radius: 30rpx;
+        box-shadow: rgba(0, 0, 0, 0.35) 0rpx 5rpx 15rpx;
+        width: 40%;
+        height: 30%;
+        display: flex;
+        flex-flow: column;
+        justify-content: space-between;
+        align-items: center;
+        img{
+          width: 250rpx;
+          height: 200rpx;
+        }
+      }
+    }
+  }
   .enterprise-item-box {
     display: flex;
     justify-content: space-evenly;

+ 26 - 26
pages/enterprise/index.vue

@@ -4,41 +4,41 @@
       <image src="/static/policy/u377.png" alt="" />
       <input type="text" placeholder="请输入关键词搜索" />
     </view>
-    <div class="companys">
-      <div
+    <view class="companys">
+      <view
         class="company"
         v-for="(company, index) in companyList"
         :key="index"
         @tap="toDetail(index)"
       >
-        <div class="title">
-          <div class="logo">
+        <view class="title">
+          <view class="logo">
             <img :src="company.logo" alt="" />
-          </div>
-          <div class="name">
+          </view>
+          <view class="name">
             {{ company.name }}
-          </div>
-        </div>
-        <div class="info">
-          <div class="div">
-            <div class="info_t">法定代表人</div>
-            <div class="name">
+          </view>
+        </view>
+        <view class="info">
+          <view class="view">
+            <view class="info_t">法定代表人</view>
+            <view class="name">
               {{ company.info.person }}
-            </div>
-          </div>
-          <div class="line"></div>
-          <div class="div">
-            <div class="info_t">注册资本</div>
+            </view>
+          </view>
+          <view class="line"></view>
+          <view class="view">
+            <view class="info_t">注册资本</view>
             {{ company.info.money }}
-          </div>
-          <div class="line"></div>
-          <div class="div">
-            <div class="info_t">成立日期</div>
+          </view>
+          <view class="line"></view>
+          <view class="view">
+            <view class="info_t">成立日期</view>
             {{ company.info.time }}
-          </div>
-        </div>
-      </div>
-    </div>
+          </view>
+        </view>
+      </view>
+    </view>
   </view>
 </template>
 
@@ -129,7 +129,7 @@ export default {
         align-items: center;
         padding: 0 2%;
         margin-top: 2%;
-        .div {
+        .view {
           margin-top: 2%;
           .name {
             color: #02a7f0;

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 54 - 0
pages/enterprise/product_detail.vue


BIN
static/enterprise/product.jpg


+ 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