Jing-Jiu 4 years ago
parent
commit
fb819fbe5c
5 changed files with 55 additions and 47 deletions
  1. 1 1
      App.vue
  2. 18 30
      pages/enterprise/index.vue
  3. 8 6
      pages/supply/index.vue
  4. 27 9
      pages/supply/putSupply.vue
  5. 1 1
      pages/supply/supply_detail.vue

+ 1 - 1
App.vue

@@ -18,7 +18,7 @@ export default {
 	session_key: '',
 	contact_name:'',
 	company_name:'',
-	company_logo:''
+	company_logo:'',
   },
   onLaunch: function () {
     console.log("App Launch");

+ 18 - 30
pages/enterprise/index.vue

@@ -2,7 +2,7 @@
   <view class="content" v-if="isShow">
     <!-- 搜索框 -->
     <view class="input-box">
-      <image src="/static/policy/u377.png" alt="" />
+      <image src="/static/policy/u377.png" alt="" mode="aspectFit"/>
       <input
         type="text"
         placeholder="请输入关键词搜索"
@@ -13,10 +13,10 @@
     <view class="companys">
       <view>推荐企业</view>
       <view
-        class="company"
         v-for="(company, index) in companyList"
         :key="index"
         @tap="toDetail(company.id)"
+        class="company"
       >
         <view class="title">
           <view class="logo">
@@ -41,7 +41,7 @@
           <view class="line"></view>
           <view class="view">
             <view class="info_t">注册资本</view>
-            {{ company.capital }}
+            {{ company.capital }}万元
           </view>
           <view class="line"></view>
           <view class="view">
@@ -99,8 +99,7 @@ export default {
         "&sign=" +
         md5Sign;
       let postData = {
-        page: 1,
-        page_size: 15,
+        s_show: "1",
       };
       uni.request({
         url: url,
@@ -112,15 +111,10 @@ export default {
         success: (res) => {
           if (res.data.code === 200) {
             let list = res.data.data.list;
+            console.log(res.data.data.list);
             list.forEach((e, i) => {
-              let {
-                pic_url,
-                name,
-                representative,
-                capital,
-                found_date,
-                id,
-              } = e;
+              let { pic_url, name, representative, capital, found_date, id } =
+                e;
               list[i] = {
                 pic_url,
                 name,
@@ -169,14 +163,8 @@ export default {
             let list = res.data.data.list;
             console.log(list);
             list.forEach((e, i) => {
-              let {
-                pic_url,
-                name,
-                representative,
-                capital,
-                found_date,
-                id,
-              } = e;
+              let { pic_url, name, representative, capital, found_date, id } =
+                e;
               list[i] = {
                 pic_url,
                 name,
@@ -210,10 +198,10 @@ export default {
     align-items: center;
     position: relative;
     image {
-        position: absolute;
-        left: 72rpx;
-		width: 30rpx;
-		height: 30rpx;
+      position: absolute;
+      left: 72rpx;
+      width: 30rpx;
+      height: 30rpx;
     }
     input {
       background-color: #ffffff;
@@ -251,7 +239,7 @@ export default {
         }
       }
       .line {
-        width: 3rpx;
+        width: 2rpx;
         height: 70rpx;
         background: rgb(175, 186, 197);
       }
@@ -266,12 +254,12 @@ export default {
         margin-top: 2%;
         .view {
           margin-top: 2%;
-          .name {
-            color: #02a7f0;
-          }
+          font-size: 30rpx;
+          // .name {
+          //   color: #02a7f0;
+          // }
           .info_t {
             margin-bottom: 10rpx;
-            font-size: 25rpx;
           }
         }
       }

+ 8 - 6
pages/supply/index.vue

@@ -160,26 +160,28 @@ export default {
   .picker {
     position: fixed;
     top: 3%;
-    left: 5%;
+    left: 10%;
+    color: #007aff;
     .picker_title {
-      width: 100rpx;
+      width: 120rpx;
       display: flex;
       align-items: center;
       justify-content: space-between;
       .triangle-down {
         width: 0;
         height: 0;
-        border-top: 15rpx solid rgb(173, 173, 173);
-        border-left: 15rpx solid transparent;
-        border-right: 15rpx solid transparent;
+        border-top: 20rpx solid rgb(173, 173, 173);
+        border-left: 20rpx solid transparent;
+        border-right: 20rpx solid transparent;
       }
       .pickername {
+        font-size: 35rpx;
         font-weight: 100;
       }
     }
   }
   .supplyList {
-    margin-top: 12%;
+    margin-top: 15%;
     .supplyCard {
       display: flex;
       width: 92%;

+ 27 - 9
pages/supply/putSupply.vue

@@ -88,13 +88,13 @@ export default {
       array: [{ name: "供需" }, { name: "需求" }],
       index: 0,
       supplyInfo: {
-        title: "",
-        msg: "",
+        title: uni.getStorageSync('supply_title') || '',
+        msg: uni.getStorageSync('supply_msg') || '',
       },
       company: {
-        name: "",
-        code: "",
-        tel: "",
+        name: uni.getStorageSync('supply_name') || '',
+        code: uni.getStorageSync('supply_code') || '',
+        tel: uni.getStorageSync('supply_tel') || '',
       },
       uploadList: [],
       imgIdList: [],
@@ -102,6 +102,20 @@ export default {
   },
   methods: {
     submit() {
+      if (
+        this.company.name === "" ||
+        this.company.code === "" ||
+        this.company.tel === ""
+      ) {
+        uni.showToast(
+          {
+            title: "企业信息不完善",
+            icon:'error'
+          }
+        );
+        return
+      }
+
       let md5Sign = md5(
         "method=" +
           "need" +
@@ -141,7 +155,11 @@ export default {
               icon: "none",
               duration: 2500,
             });
-            getApp().globalData.user_phone = this.company.tel;
+            uni.setStorageSync('supply_name',this.company.name);
+            uni.setStorageSync('supply_code',this.company.code);
+            uni.setStorageSync('supply_tel',this.company.tel);
+            uni.setStorageSync('supply_title',this.supplyInfo.title);
+            uni.setStorageSync('supply_msg',this.supplyInfo.msg);
             setTimeout(() => {
               uni.navigateBack({});
             }, 2500);
@@ -313,7 +331,7 @@ export default {
     .area {
       height: 200rpx;
       padding: 20rpx;
-    box-sizing: border-box;
+      box-sizing: border-box;
     }
     .picker {
       width: 80%;
@@ -362,10 +380,10 @@ export default {
   .submit {
     color: white;
     font-weight: normal;
-    width: 75%;
+    width: 70%;
     border-radius: 20rpx;
     background-color: #02a7f0;
-    margin: 2% auto;
+    margin: 90rpx auto;
   }
 }
 </style>

+ 1 - 1
pages/supply/supply_detail.vue

@@ -16,7 +16,7 @@
         <span class="label">图片:</span>
         <view class="flex">
           <view v-if="imageList.length == 0">-</view>
-          <image :src="item.url" v-for="item in imageList" :key="item.id" />
+          <image :src="item.url" v-for="item in imageList" :key="item.id" mode="aspectFit"/>
         </view>
       </view>
       <view class="view">