zhanghongrui hace 2 años
padre
commit
c90114a211

+ 1 - 0
base/httputil.js

@@ -1,6 +1,7 @@
 // let BASE_Server = "http://127.0.0.1:8329"
     // let BASE_Server = "https://192.168.1.109:8080"
 let BASE_Server = "https://sookajs.top:18080"
+// let BASE_Server = "http://192.168.2.9:18080"
 
 
 

+ 158 - 163
pages/search/search.js

@@ -7,8 +7,8 @@ Page({
   data: {
     host: app.globalData.host,
     enterpriseList: [],
-    enterpriseCode: '',
-    keyword: '',
+    enterpriseCode:'',
+    keyword:'',
     /**
      * 控制上拉到底部时是否出现 "数据加载中..."
      */
@@ -17,78 +17,73 @@ Page({
      * 数据是否正在加载中,避免数据多次加载
      */
     loadingData: false,
-
+ 
     isRefresh: true,
     total: 0,
     pageNum: 1 // 页码
   },
-  onLoad() {},
+  onLoad() {
+  },
 
-  //加载数据
-  loadData: function () {
+   //加载数据
+   loadData: function () {
     var obj = new Object()
     obj.pageNum = this.data.pageNum
     obj.pageSize = 10
-    obj.reasonable = false
+    obj.reasonable= false
     // obj.businessName = e.detail.value
-    obj.searchValue = this.data.keyword,
-      this.list(obj)
+    obj.searchValue=this.data.keyword,
+    this.list(obj)
 
 
   },
-  onShow() {
-    this.loadData();
+  onShow(){
+   this.loadData();
   },
-
+ 
   // 企业详细页
   bindViewDetails(e) {
     let busEnterpriseId = e.currentTarget.dataset.enterpriseid
     wx.navigateTo({
-      url: '../details/details?busEnterpriseId=' + busEnterpriseId
+      url: '../details/details?busEnterpriseId='+busEnterpriseId
     })
   },
 
   searchEnterprise(e) {
     var obj = new Object()
-    this.data.keyword = e.detail.value,
-      obj.searchValue = e.detail.value,
-      this.list(obj)
+    this.data.keyword=e.detail.value,
+    obj.searchValue=e.detail.value,
+    this.list(obj)
   },
 
-  bindViewSearchCode() {
-    let that = this
+  bindViewSearchCode(){
+    let that=this
     wx.scanCode({
-      onlyFromCamera: true,
+      onlyFromCamera: true,
       success: (res) => {
         that.setData({
-          //['details.code']:res.result,
-          enterpriseCode: res.result
-        })
-        // var obj = new Object()
-        // obj.searchValue = that.data.enterpriseCode
-        // that.list(obj)
-
-        // 显示顶部刷新图标
-        wx.showNavigationBarLoading();
-        var that = this;
-        var loadingData = this.data.loadingData
-        if (loadingData) {
-          return;
-        }
-        that.setData({
-          pageNum: 1,
-          isRefresh: true
-        })
-        
-        //this.loadData()
-
-        var obj = new Object()
-        obj.pageNum = this.data.pageNum
-        obj.pageSize = 10
-        obj.reasonable = false
-        // obj.businessName = e.detail.value
-        obj.searchValue = that.data.enterpriseCode,
-          that.list(obj)
+        //['details.code']:res.result,
+        enterpriseCode:res.result
+      })
+      // var obj = new Object()
+      // obj.searchValue = that.data.enterpriseCode
+
+      wx.showNavigationBarLoading();
+      
+      var loadingData = this.data.loadingData
+      if (loadingData) {
+        return;
+      }
+      that.setData({
+        pageNum: 1,
+        isRefresh: true
+      })
+      var obj = new Object()
+    obj.pageNum = this.data.pageNum
+    obj.pageSize = 10
+    obj.reasonable= false
+    obj.searchValue = that.data.enterpriseCode
+      that.list(obj)
       },
       fail: (res) => {
         // wx.showToast({
@@ -103,124 +98,124 @@ Page({
   },
 
   getQiyeEnterpriseListSuccess(res) {
-
-    if (res.code == 200) {
+    
+    if(res.code==200){
       // 显示加载图标
       wx.showLoading({
-        title: '玩命加载中',
-      })
-
-      var that = this
-
-      if (res.data.rows.length == 0) {
-        wx.showToast({
-          title: '暂无更多数据',
-          icon: "none"
-        })
-        that.setData({
-          hidden: true,
-          loadingData: false
-        });
-
-      }
-      if (this.data.isRefresh) {
-        this.setData({
-          enterpriseList: res.data.rows,
-          total: res.data.total
-        })
-
-
-
-        // 隐藏导航栏加载框
-        setTimeout(function () {
-          that.setData({
-            loadingData: false
-          });
-          wx.hideNavigationBarLoading();
-          // 停止下拉动作
-          wx.stopPullDownRefresh();
-          wx.hideLoading()
-
-        }, 1000)
-
-      } else {
-        this.setData({
-          enterpriseList: this.data.enterpriseList.concat(res.data.rows)
-        })
-        // 隐藏加载框
-
-        setTimeout(function () {
-          that.setData({
-            hidden: true,
-            loadingData: false
-          });
-
-          wx.hideLoading();
-        }, 1000)
-
-      }
-    } else {
-
-    }
-  },
-  onPullDownRefresh: function () {
-    // 显示顶部刷新图标
-    wx.showNavigationBarLoading();
-    var that = this;
-    var loadingData = this.data.loadingData
-    if (loadingData) {
-      return;
-    }
-    that.setData({
-      pageNum: 1,
-      isRefresh: true
-    })
-    this.loadData()
-  },
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-    let that = this
-    var loadingData = that.data.loadingData
-
-    var hidden = that.data.hidden
-    // 页数+1
-    that.setData({
-      pageNum: that.data.pageNum + 1,
-      isRefresh: false
-    })
-    if (hidden) {
-      that.setData({
-        hidden: false
-      });
-      console.info(that.data.hidden);
-    }
-
-    if (loadingData) {
-      return;
-    }
-    that.setData({
-      loadingData: true
-    });
-
-
-    //console.log("@@@@"+Math.ceil(this.data.total/10))
+       title: '玩命加载中',
+     })
+   
+     var that = this
+ 
+     if(res.data.rows.length==0){
+       wx.showToast({
+         title: '暂无更多数据',
+         icon:"none"
+       })
+       that.setData({
+         hidden: true,
+         loadingData: false
+       });
+     
+     }
+     if (this.data.isRefresh) {
+       this.setData({
+         enterpriseList: res.data.rows,
+         total: res.data.total
+       })
+ 
+ 
+ 
+       // 隐藏导航栏加载框
+       setTimeout(function () {
+         that.setData({
+           loadingData: false
+         });
+         wx.hideNavigationBarLoading();
+         // 停止下拉动作
+         wx.stopPullDownRefresh();
+         wx.hideLoading()
+ 
+       }, 1000)
+ 
+     } else {
+       this.setData({
+         enterpriseList: this.data.enterpriseList.concat(res.data.rows)
+       })
+       // 隐藏加载框
+ 
+       setTimeout(function () {
+         that.setData({
+           hidden: true,
+           loadingData: false
+         });
+ 
+         wx.hideLoading();
+       }, 1000)
+ 
+     }
+   }else{
+  
+   }
+   },
+   onPullDownRefresh: function () {
+     // 显示顶部刷新图标
+     wx.showNavigationBarLoading();
+     var that = this;
+     var loadingData = this.data.loadingData
+     if (loadingData) {
+       return;
+     }
+     that.setData({
+       pageNum: 1,
+       isRefresh: true
+     })
+     this.loadData()
+   },
+   /**
+    * 页面上拉触底事件的处理函数
+    */
+   onReachBottom: function () {
+     let that = this
+     var loadingData = that.data.loadingData
+    
+     var hidden = that.data.hidden
+     // 页数+1
+     that.setData({
+       pageNum: that.data.pageNum + 1,
+       isRefresh: false
+     })
+     if (hidden) {
+       that.setData({
+         hidden: false
+       });
+       console.info(that.data.hidden);
+     }
+ 
+     if (loadingData) {
+       return;
+     }
+     that.setData({
+       loadingData: true
+     });
+ 
+     
+     //console.log("@@@@"+Math.ceil(this.data.total/10))
     // if(Math.ceil(that.data.total/10)>=that.data.pageNum){
-    that.loadData();
-
-    // }else{
-
-    //   setTimeout(function () {
-    //     that.setData({
-    //       hidden: true,
-    //     });
-
-    //   }, 2000)
-    // }
-
-
-  },
-
+       that.loadData();
+   
+     // }else{
+      
+     //   setTimeout(function () {
+     //     that.setData({
+     //       hidden: true,
+     //     });
+ 
+     //   }, 2000)
+     // }
+ 
+    
+   },
+ 
 
 })

+ 3 - 0
pages/search/search.wxml

@@ -19,6 +19,9 @@
       <i class="iconfont icon-xiangyou list_right"></i>
     </view>
 
+    <view class='data-loading' hidden='{{hidden}}'>
+    数据加载中...
+  </view>
   </view>
 
 

+ 9 - 1
pages/search/search.wxss

@@ -1 +1,9 @@
-/* pages/search/search.wxss */
+/* pages/search/search.wxss */
+
+.data-loading {
+  height: 100rpx;
+  line-height: 100rpx;
+  background-color: #fff;
+  text-align: center;
+  font-size: 14px;
+}

+ 5 - 3
pages/xunjian/xunjian.wxss

@@ -1,12 +1,14 @@
 /* pages/xunjian/xunjian.wxss */
 
 .xj_nav{
-  height: 90rpx;
-  line-height: 90rpx;
+  /* height: 90rpx; */
+  line-height: 40rpx;
   display: flex;
   flex-wrap: wrap;
   background: rgb(255, 249, 248);
   padding-left: 30rpx;
+  padding-top: 20rpx;
+  padding-bottom: 20rpx;
 }
 .xj_nav .nav_text1{
   font-size: 38rpx;
@@ -263,7 +265,7 @@ line-height: 28rpx;
 }
 .section2 input{
 color: #f94b0e;
-width: 80rpx;
+width: 60rpx;
 height: 50rpx;
   line-height: 50rpx;
 }

+ 1 - 1
pages/xunjiancz/xunjiancz.wxml

@@ -41,7 +41,7 @@
       </view>
       <!-- 内容布局 -->
       <swiper class='swiperTtemBox' bindchange='pagechange' current='{{currentIndex}}'>
-        <swiper-item class='swiperTtemBox' data-swiper="0">
+        <swiper-item class='swiperTtemBox' data-swiper="0" style="height: 80%;">
           <view class="tab_vi">
             <text wx:for="{{items_first}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="change_color_1" data-busitemsid='{{item.busItemsId}}' class="{{myclick==item.busItemsId?selt:noselt}}">{{index+1}}.{{item.busItemsName}}</text>
           </view>

+ 9 - 4
pages/xunjiancz/xunjiancz.wxss

@@ -1,11 +1,13 @@
 /* pages/xunjiancz/xunjiancz.wxss */
 .xj_nav{
-  height: 90rpx;
-  line-height: 90rpx;
+  /* height: 90rpx; */
+  line-height: 40rpx;
   display: flex;
   flex-wrap: wrap;
   background: rgb(255, 249, 248);
   padding-left: 30rpx;
+  padding-top: 20rpx;
+  padding-bottom: 20rpx;
 }
 .xj_nav .nav_text1{
   font-size: 40rpx;
@@ -17,7 +19,7 @@
   color: #999;
 }
 .xj_nav .nav_text2{
-  font-size: 30rpx;
+  font-size: 28rpx;
   color:#999 ;
 }
 .hui{
@@ -87,7 +89,7 @@
 /* 底部导航 */
 .nav_bottom{
   position: fixed;
-  bottom: 0rpx;
+  bottom: 5vh;
   width: 100%;
   height: 65vh;
   transition: all  .25s  ease-in;
@@ -208,4 +210,7 @@
 .hide{
   bottom:-57vh;
   transition: all  .25s  ease-in;
+}
+.pop_height{
+  height: 90%;
 }