2 Commits cfdbbfefe0 ... 44101cb88c

Autor SHA1 Mensaje Fecha
  Jing-Jiu 44101cb88c Merge branch 'master' of http://121.40.40.223:3000/zizhong.wang/konggang-city-miniprogram hace 4 años
  Jing-Jiu 9ebd209912 123 hace 4 años
Se han modificado 4 ficheros con 414 adiciones y 99 borrados
  1. 143 0
      1.json
  2. 1 1
      pages/appeal/appealCard.vue
  3. 138 80
      pages/enterprise/enterprise_detail.vue
  4. 132 18
      pages/enterprise/index.vue

+ 143 - 0
1.json

@@ -0,0 +1,143 @@
+[{
+    "id": "自增的ID字段"
+}, {
+    "code": "社会统一信用代码"
+}, {
+    "name": "企业名称"
+}, {
+    "representative": "法定代表人"
+}, {
+    "rigister_status": "登记状态: 1.存续;2.在业;3.吊销;4.注销;5.迁出;6.迁入;7.停业;8.清算"
+}, {
+    "found_date": "成立日期"
+}, {
+    "capital": "注册资本"
+}, {
+    "capital_real": "实缴资本"
+}, {
+    "approved_date": "核准日期"
+}, {
+    "type": "企业类型 1:有限责任公司;2:股份有限公司"
+}, {
+    "start_date": "营业开始日期"
+}, {
+    "end_date": "营业结束日期"
+}, {
+    "tax_type": "纳税人资质"
+}, {
+    "industry_id": "行业ID"
+}, {
+    "industry_name": "所属行业"
+}, {
+    "area": "所属地区"
+}, {
+    "rigister_office": "登记机关"
+}, {
+    "employee_scope": "人员规模"
+}, {
+    "insure_count": "参保人数"
+}, {
+    "name_used": "曾用名"
+}, {
+    "name_english": "英文名"
+}, {
+    "export_code": "进出口企业代码"
+}, {
+    "rigiser_address": "注册地址"
+}, {
+    "work_address": "经营地址"
+}, {
+    "tax_last_year": "纳税额"
+}, {
+    "military_project": "军工证书 1.有;0.无"
+}, {
+    "industrial_investment": "工业技改投资 1是;0否"
+}, {
+    "patent": "资质证书或专利"
+}, {
+    "develop_center": "是否有研发中心 1有;0无"
+}, {
+    "high_tech": "高企认证:1 已认证;0未认证"
+}, {
+    "tech": "科技型中小企业 1.是;0.否"
+}, {
+    "park_id": "园区ID"
+}, {
+    "park_name": "所属园区"
+}, {
+    "phone": "企业电话"
+}, {
+    "web_url": "网址"
+}, {
+    "photo_attach_id": "企业Logo"
+}, {
+    "pic_url": "企业Logo地址"
+}, {
+    "project_name": "项目名称"
+}, {
+    "project_by": "建设主体"
+}, {
+    "project_status": "建设性质 1.新建;2.续建"
+}, {
+    "project_investment_count": "项目总投资(万元)"
+}, {
+    "project_area": "项目用地面积(亩)"
+}, {
+    "project_investment_strength": "投资强度(万\/亩)"
+}, {
+    "project_investment_sign_date": "投资合同签订时间"
+}, {
+    "project_investment_year": "年度投资计划"
+}, {
+    "project_earth_sign_date": "签订土地出让合同时间"
+}, {
+    "project_earth_start_date": "土地出让合同约定开工时间"
+}, {
+    "project_process": "手续办理情况 1.项目备案 2.建设用地规划许可证 3. 国有建设用地使用权首次登记 4.规划设计方案审批 5.建设工程规划许可证 6.施工 7.监理招标 8.建筑工程施工许可证"
+}, {
+    "project_buid_end_date": "计划建设结束时间"
+}, {
+    "project_process_show": "形象进度"
+}, {
+    "project_start_date": "项目开工时间"
+}, {
+    "project_contact": "项目联系人"
+}, {
+    "tax_real": "实缴税收(万元)"
+}, {
+    "erea_real": "用地面积或租用厂房(㎡)"
+}, {
+    "industry_money": "工业增加值(工业产值)(万元)"
+}, {
+    "power_used": "总用能"
+}, {
+    "carbon_emission": "排放"
+}, {
+    "everage_employee_count": "年平均职工人数"
+}, {
+    "rd_expenditure": "R&D经费支出"
+}, {
+    "income": "营业收入(主营业务收入)(万元)"
+}, {
+    "electric_used": "总用电量"
+}, {
+    "develop_persition": "区域规上企业发展水平"
+}, {
+    "main_scope": "主营业务"
+}, {
+    "employee_count": "员工人数"
+}, {
+    "value_last_year": "全年产值(万元)"
+}, {
+    "increase_ratio": "同比增长"
+}, {
+    "contact": "联系人联系电话"
+}, {
+    "pub": "是否公开 0 不公开;1 公开"
+}, {
+    "show": "是否首页显示 0 不显示;1 显示"
+}, {
+    "admin_id": "管理员ID"
+}, {
+    "addtime": "添加时间"
+}]

+ 1 - 1
pages/appeal/appealCard.vue

@@ -17,7 +17,7 @@
         <img
           src="/static/appeal/waited.svg"
           class="state"
-          v-if="otherAppeal.process === 2"
+          v-if="otherAppeal.process === '2'"
         />
         <img src="/static/appeal/waiting.svg" class="state" v-else />
         <span class="content_body">{{ otherAppeal.content }}</span>

+ 138 - 80
pages/enterprise/enterprise_detail.vue

@@ -1,11 +1,11 @@
 <template>
-  <div class="content" :class="{ 'margin-bottom-80': isMar }">
+  <div class="content" :class="{ 'margin-bottom-80': isMar }" v-if="isShow">
     <div class="title">
       <div class="logo">
-        <img :src="company.logo" alt="" />
+        <img :src="'https://kiq.xazhima.com' + info.pic_url" alt="" />
       </div>
       <div class="name">
-        {{ company.name }}
+        {{ info.name }}
       </div>
     </div>
     <view class="enterprise-item-box">
@@ -28,7 +28,8 @@
             <p
               v-for="(value, idx) in item.value"
               :key="idx"
-              class="term-value-item" :class="{'blue':item.name == '电话'}"
+              class="term-value-item"
+              :class="{ blue: item.name == '电话' }"
             >
               {{ value }}
             </p>
@@ -40,27 +41,21 @@
       <div class="products">
         <div class="product" @click="toDetail(1)">
           <div class="img">
-            <img src="/static/enterprise/product.jpg">
-          </div>
-          <div class="name">
-            硬件销售
+            <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">
-            硬件销售
+            <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">
-            硬件销售
+            <img src="/static/enterprise/product.jpg" />
           </div>
+          <div class="name">硬件销售</div>
         </div>
       </div>
     </div>
@@ -76,72 +71,22 @@
 </template>
 
 <script>
+import md5 from "@/common/md5.js";
 export default {
   data() {
     return {
-      model: {
-        title: "",
-        item: [
-          {
-            name: "法定代表人",
-            value: ["马须伦"],
-          },
-          {
-            name: "成立日期",
-            value: ["2017-11-14"],
-          },
-          {
-            name: "注册资本",
-            value: ["1,776,759.3万"],
-          },
-          {
-            name: "统一社会信用代码",
-            value: ["914403000758402311"],
-          },
-          {
-            name: "所属行业",
-            value: ["航空运输业"],
-          },
-          {
-            name: "所属园区",
-            value: ["华潮科技产业园"],
-          },
-          {
-            name: "经营范围",
-            value: ["华潮科技产业园"],
-          },
-          {
-            name: "经营范围",
-            value: [
-              "一、提供国内、地区和国际定期及不定期航空客、货、邮、行李运输服务;二、提供通用航空服务;三、提供航空器维修服务;四、经营国内外航空公司的代理业务;五、提供航空配餐服务(仅限分支机构经营);六、进行其他航空业务及相关业务,包括为该等业务进行广告宣传;",
-            ],
-          },
-          {
-            name: "地址",
-            value: ["咸阳市渭城区北杜镇(近208省道)"],
-          },
-          {
-            name: "网址",
-            value: ["http://www.sundowa.com"],
-          },
-          {
-            name: "电话",
-            value: ["029-85951688"],
-          },
-        ],
-      },
       id: "",
       scrollTop: 0,
       titleList: ["基本信息", "产品信息"],
       active: 0,
-      company: {
-        logo: "/static/enterprise/logo.png",
-        name: "康拓科技有限责任公司",
-      },
+      info: {},
+      model:{},
+      isShow: false,
     };
   },
   onLoad(option) {
     let id = option.id;
+    this.getCompanyInfo(id);
   },
   methods: {
     collectionPage() {
@@ -157,14 +102,127 @@ export default {
         },
       });
     },
-    change(idx){
-      this.active = idx
+    change(idx) {
+      this.active = idx;
     },
     toDetail(index) {
       uni.navigateTo({
         url: "/pages/enterprise/product_detail?id=" + index,
       });
     },
+    getCompanyInfo(id) {
+      let md5Sign = md5(
+        "method=" +
+          "common" +
+          "&timestamp=" +
+          getApp().globalData.globalTimestamp +
+          "&secret=" +
+          getApp().globalData.secret
+      );
+      let url =
+        getApp().globalData.shareUrl +
+        "api/api.php" +
+        "?method=common&source=company&action=info_by_id&timestamp=" +
+        getApp().globalData.globalTimestamp +
+        "&sign=" +
+        md5Sign;
+      uni.request({
+        url: url,
+        method: "POST",
+        header: {
+          "content-type": "application/x-www-form-urlencoded",
+        },
+        data: { id },
+        success: (res) => {
+          if (res.data.code === 200) {
+            let {
+              name,
+              pic_url,
+              representative,
+              found_date,
+              capital,
+              code,
+              industry_name,
+              park_name,
+              work_address,
+              rigiser_address,
+              web_url,
+              contact,
+            } = res.data.data;
+            console.log(res.data.data);
+            this.info = {
+              name,
+              pic_url,
+              representative,
+              found_date,
+              capital,
+              code,
+              industry_name,
+              park_name,
+              work_address,
+              rigiser_address,
+              web_url,
+              contact,
+            };
+            this.model = {
+              title: this.info.name,
+              item: [
+                {
+                  name: "法定代表人",
+                  value: [this.info.representative],
+                },
+                {
+                  name: "成立日期",
+                  value: [this.info.found_date],
+                },
+                {
+                  name: "注册资本",
+                  value: [this.info.capital],
+                },
+                {
+                  name: "统一社会信用代码",
+                  value: [this.info.code],
+                },
+                {
+                  name: "所属行业",
+                  value: [this.info.industry_name],
+                },
+                {
+                  name: "所属园区",
+                  value: [this.info.park_name],
+                },
+                {
+                  name: "经营地址",
+                  value: [this.info.work_address],
+                },
+                {
+                  name: "经营范围",
+                  value: [
+                    "一、提供国内、地区和国际定期及不定期航空客、货、邮、行李运输服务;二、提供通用航空服务;三、提供航空器维修服务;四、经营国内外航空公司的代理业务;五、提供航空配餐服务(仅限分支机构经营);六、进行其他航空业务及相关业务,包括为该等业务进行广告宣传;",
+                  ],
+                },
+                {
+                  name: "地址",
+                  value: [this.info.rigiser_address],
+                },
+                {
+                  name: "网址",
+                  value: [this.info.web_url],
+                },
+                {
+                  name: "电话",
+                  value: [this.info.contact],
+                },
+              ],
+            };
+            this.isShow = true;
+          }
+        },
+        fail: () => {
+          console.log("连接失败");
+        },
+      });
+    },
   },
 };
 </script>
@@ -173,9 +231,9 @@ export default {
 .content {
   padding: 4%;
   font-size: 30rpx;
-  .blue{
-      color: #02a7f0;
-    }
+  .blue {
+    color: #02a7f0;
+  }
   .title {
     display: flex;
     align-items: center;
@@ -222,14 +280,14 @@ export default {
       }
     }
   }
-  .proInfo{
+  .proInfo {
     font-size: 25rpx;
-    .products{
+    .products {
       width: 100%;
       display: flex;
       padding: 4%;
       flex-wrap: wrap;
-      .product{
+      .product {
         margin: 2%;
         padding: 2%;
         border-radius: 30rpx;
@@ -240,7 +298,7 @@ export default {
         flex-flow: column;
         justify-content: space-between;
         align-items: center;
-        img{
+        img {
           width: 250rpx;
           height: 200rpx;
         }

+ 132 - 18
pages/enterprise/index.vue

@@ -1,19 +1,26 @@
 <template>
-  <view class="content">
+  <view class="content" v-if="isShow">
+    <!-- 搜索框 -->
     <view class="input-box">
       <image src="/static/policy/u377.png" alt="" />
-      <input type="text" placeholder="请输入关键词搜索" />
+      <input
+        type="text"
+        placeholder="请输入关键词搜索"
+        @confirm="searchCompany"
+        v-model="searchVal"
+      />
     </view>
     <view class="companys">
+      <view>推荐企业</view>
       <view
         class="company"
         v-for="(company, index) in companyList"
         :key="index"
-        @tap="toDetail(index)"
+        @tap="toDetail(company.id)"
       >
         <view class="title">
           <view class="logo">
-            <img :src="company.logo" alt="" />
+            <img :src="'https://kiq.xazhima.com' + company.pic_url" alt="" />
           </view>
           <view class="name">
             {{ company.name }}
@@ -23,18 +30,18 @@
           <view class="view">
             <view class="info_t">法定代表人</view>
             <view class="name">
-              {{ company.info.person }}
+              {{ company.representative }}
             </view>
           </view>
           <view class="line"></view>
           <view class="view">
             <view class="info_t">注册资本</view>
-            {{ company.info.money }}
+            {{ company.capital }}
           </view>
           <view class="line"></view>
           <view class="view">
             <view class="info_t">成立日期</view>
-            {{ company.info.time }}
+            {{ company.found_date }}
           </view>
         </view>
       </view>
@@ -43,27 +50,134 @@
 </template>
 
 <script>
+import md5 from "@/common/md5.js";
 export default {
   data() {
     return {
-      companyList: new Array(5).fill({
-        logo: "/static/enterprise/logo.png",
-        name: "康拓科技有限责任公司",
-        info: {
-          person: "马须伦",
-          money: "1,776,759.3万(元)",
-          time: "1995-03-25",
-        },
-      }),
+      companyList: [],
+      isShow: false,
+      searchVal: "",
+      // new Array(5).fill({
+      //   logo: "/static/enterprise/logo.png",
+      //   name: "康拓科技有限责任公司",
+      //   info: {
+      //     person: "马须伦",
+      //     money: "1,776,759.3万(元)",
+      //     time: "1995-03-25",
+      //   },
+      // })
     };
   },
-  onLoad() {},
+  onLoad() {
+    this.getCompany();
+  },
   methods: {
     toDetail(index) {
       uni.navigateTo({
         url: "/pages/enterprise/enterprise_detail?id=" + index,
       });
     },
+    getCompany() {
+      let md5Sign = md5(
+        "method=" +
+          "common" +
+          "&timestamp=" +
+          getApp().globalData.globalTimestamp +
+          "&secret=" +
+          getApp().globalData.secret
+      );
+      let url =
+        getApp().globalData.shareUrl +
+        "api/api.php" +
+        "?method=common&source=company&action=list&timestamp=" +
+        getApp().globalData.globalTimestamp +
+        "&sign=" +
+        md5Sign;
+      let postData = {
+        page: 1,
+        page_size: 15,
+      };
+      uni.request({
+        url: url,
+        method: "POST",
+        header: {
+          "content-type": "application/x-www-form-urlencoded",
+        },
+        data: postData,
+        success: (res) => {
+          if (res.data.code === 200) {
+            let list = res.data.data.list;
+            list.forEach((e, i) => {
+              let { pic_url, name, representative, capital, found_date, id } =
+                e;
+              list[i] = {
+                pic_url,
+                name,
+                representative,
+                capital,
+                found_date,
+                id,
+              };
+            });
+            this.companyList = list;
+            this.isShow = true;
+          }
+        },
+        fail: () => {
+          console.log("连接失败");
+        },
+      });
+    },
+    searchCompany() {
+      let md5Sign = md5(
+        "method=" +
+          "common" +
+          "&timestamp=" +
+          getApp().globalData.globalTimestamp +
+          "&secret=" +
+          getApp().globalData.secret
+      );
+      let url =
+        getApp().globalData.shareUrl +
+        "api/api.php" +
+        "?method=common&source=company&action=list&timestamp=" +
+        getApp().globalData.globalTimestamp +
+        "&sign=" +
+        md5Sign;
+      uni.request({
+        url: url,
+        method: "POST",
+        header: {
+          "content-type": "application/x-www-form-urlencoded",
+        },
+        data: {
+          ss_content_text: this.searchVal, //1.省 2.市 3.区 4.新城
+        },
+        success: (res) => {
+          console.log(res.data);
+          if (res.data.code === 200) {
+            let list = res.data.data.list;
+            console.log(list);
+            list.forEach((e, i) => {
+              let { pic_url, name, representative, capital, found_date, id } =
+                e;
+              list[i] = {
+                pic_url,
+                name,
+                representative,
+                capital,
+                found_date,
+                id,
+              };
+            });
+            this.companyList = list;
+          }
+        },
+        fail: () => {
+          console.log("连接失败");
+        },
+      });
+    },
   },
 };
 </script>
@@ -110,7 +224,7 @@ export default {
         .logo {
           image {
             width: 100rpx;
-            height: 70rpx;
+            height: 100rpx;
             margin-right: 30rpx;
           }
         }