zhanghongrui vor 2 Jahren
Ursprung
Commit
d2e37072a5

+ 2 - 2
base/httputil.js

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

+ 6 - 6
pages/index/index.js

@@ -58,12 +58,12 @@ Page({
   },
 
   onShow() {
-    if (app.globalToken == null) {
-      wx.showToast({
-        title: '尚未登录,登录后即可使用',
-        icon: 'none'
-      })
-    }
+    // if (app.globalToken == null) {
+    //   wx.showToast({
+    //     title: '尚未登录,登录后即可使用',
+    //     icon: 'none'
+    //   })
+    // }
 
     this.initIndexPage();
   },

+ 2 - 2
pages/me/me.wxml

@@ -1,6 +1,6 @@
 <view class="container_c">
-<view class="top_con">
-  <image src="{{userInfo.avatarUrl}}" class="wd_img"bindtap="isLogin"></image>
+<view class="top_con"bindtap="isLogin">
+  <image src="{{userInfo.avatarUrl}}" class="wd_img"></image>
    <!-- <image src="{{userInfo.avatarUrl}}" class="wd_img" wx:if="{{isBindSuccess}}" bindtap="isLogin" ></image> -->
   <view class="top_txt">
     <!-- <div type="userNickName" lang="zh_CN" class="wd_txt">

+ 3 - 2
pages/qianming/qianming.wxss

@@ -71,9 +71,10 @@
 }
 
 .clean {
-  background-color: #07c160;
+  background-color: #ff3d33;
 }
 
 .submit {
-  background-color: #ff3d33;
+  background-color: #07c160;
+ 
 }

+ 84 - 67
pages/warehouselist/warehouselist.js

@@ -15,20 +15,37 @@ Page({
     enterpriseList: [],
     isRefresh: true,
     total: 0,
-    pageNum: 1 // 页码
+    pageNum: 1, // 页码
+    longitude: '',
+    latitude: ''
+
   },
   onLoad: function () {
     // wx.showLoading({
     //   title: '加载中'
     // })
-    this.loadData()
+   let that=this
+    wx.getLocation({
+      type: 'wgs84',
+      success: function (res) {
+        that.setData({
+          longitude: res.longitude,
+          latitude: res.latitude
+        })
+        that.loadData()
+      }
+    })
+   
   },
   //加载数据
   loadData: function () {
     let obj = new Object()
     obj.pageNum = this.data.pageNum
     obj.pageSize = 10
-    obj.reasonable= false
+    obj.reasonable = false
+    obj.longitude=this.data.longitude
+    obj.latitude=this.data.latitude
+    console.log("###",this.data.longitude)
     http.send_get("/system/AppWarehouseController/getWarehouseList", obj, this.getQiyeEnterpriseListSuccess)
 
 
@@ -36,61 +53,61 @@ Page({
 
   getQiyeEnterpriseListSuccess(res) {
 
-console.log("@@@@",res)
-if(res.code==200){
-     // 显示加载图标
-     wx.showLoading({
-      title: '玩命加载中',
-    })
-  
-    var that = this
-
-    if(res.data.rows.length==0){
-      wx.showToast({
-        title: '暂无更多数据',
-        icon:"none"
-      })
-      wx.hideLoading()
-    }
-    if (this.data.isRefresh) {
-      this.setData({
-        enterpriseList: res.data.rows,
-        total: res.data.total
+    console.log("@@@@", res)
+    if (res.code == 200) {
+      // 显示加载图标
+      wx.showLoading({
+        title: '玩命加载中',
       })
 
+      var that = this
 
-
-      // 隐藏导航栏加载框
-      setTimeout(function () {
-        that.setData({
-          loadingData: false
-        });
-        wx.hideNavigationBarLoading();
-        // 停止下拉动作
-        wx.stopPullDownRefresh();
+      if (res.data.rows.length == 0) {
+        wx.showToast({
+          title: '暂无更多数据',
+          icon: "none"
+        })
         wx.hideLoading()
-
-      }, 1000)
-
+      }
+      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 {
-      this.setData({
-        enterpriseList: this.data.enterpriseList.concat(res.data.rows)
-      })
-      // 隐藏加载框
-
-      setTimeout(function () {
-        that.setData({
-          hidden: true,
-          loadingData: false
-        });
-
-        wx.hideLoading();
-      }, 1000)
-
+      console.log("@@!", "请求失败")
     }
-  }else{
-    console.log("@@!","请求失败")
-  }
   },
   onPullDownRefresh: function () {
     // 显示顶部刷新图标
@@ -112,7 +129,7 @@ if(res.code==200){
   onReachBottom: function () {
     let that = this
     var loadingData = that.data.loadingData
-   
+
     var hidden = that.data.hidden
     // 页数+1
     that.setData({
@@ -133,13 +150,13 @@ if(res.code==200){
       loadingData: true
     });
 
-    
+
     //console.log("@@@@"+Math.ceil(this.data.total/10))
-   // if(Math.ceil(that.data.total/10)>=that.data.pageNum){
-      that.loadData();
-  
+    // if(Math.ceil(that.data.total/10)>=that.data.pageNum){
+    that.loadData();
+
     // }else{
-     
+
     //   setTimeout(function () {
     //     that.setData({
     //       hidden: true,
@@ -148,25 +165,25 @@ if(res.code==200){
     //   }, 2000)
     // }
 
-   
+
   },
 
 
   bindViewDetails(e) {
     let teamlist_details = e.currentTarget.dataset.index
-   
- 
 
- 
+
+
+
     wx.navigateTo({
-      url: '../warehouselist/details/warehouse_details?details='+JSON.stringify(teamlist_details)
+      url: '../warehouselist/details/warehouse_details?details=' + JSON.stringify(teamlist_details)
     })
   },
-   // 搜索结果跳页
-   bindViewSearchEnd() {
+  // 搜索结果跳页
+  bindViewSearchEnd() {
     wx.navigateTo({
-      url:'../warehouselist/serch/warehouse_serch'
-   
+      url: '../warehouselist/serch/warehouse_serch'
+
     })
   },
 })

+ 3 - 3
pages/xunchajilu/xunchajilu.js

@@ -26,12 +26,12 @@ Page({
   getXunchaList(){
     let obj = new Object();
     obj.busEnterpriseId = this.data.busEnterpriseId 
-    http.post("/system/AppXunchaController/getXunchaList",obj,this.getXunchaListSuccess)
+    http.send_post("/system/AppXunchaController/getXunchaList",obj,this.getXunchaListSuccess)
   },
   getXunchaListSuccess(res){
-    console.log(res.rows)
+    console.log("!!!",res.data.rows)
     this.setData({
-      xunchaList :  res.rows
+      xunchaList :  res.data.rows
     })
   },
 

+ 1 - 1
pages/zhenggaijindu/zhenggaijindu.wxml

@@ -22,7 +22,7 @@
       <view class="ttbtn">
         <picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
         <view class="picker">
-          期:<text>{{array[index]}}</text> 天
+          期:<text>{{array[index]}}</text> 天
         </view>
   </picker>
       </view>