Jing-Jiu 4 år sedan
förälder
incheckning
fd2790a7f2

+ 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;

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 54 - 0
pages/enterprise/product_detail.vue


BIN
static/enterprise/product.jpg