Sfoglia il codice sorgente

1.搜索调整,2商品详情调整,3物流调整

junyuanz 3 anni fa
parent
commit
418917663e

+ 41 - 1
packageUser/pages/user/logistics/logistics.js

@@ -23,7 +23,7 @@ Page({
       that.setData({
         order: data
       })
-      if(data.sign && data.express_order_no && data.express_code) that.getLogistics();
+      if(data.sign && data.express_order_no && data.express_code) that.getLogistics2();
       
     }
     _request.$get(url, params, success)
@@ -53,6 +53,46 @@ Page({
     }
     _request.$post(url, params, success)
   },
+  getLogistics2(){
+	var that = this;
+	wx.showNavigationBarLoading()
+  	var token = wx.getStorageSync('lbt_token_key');
+  	// console.log('nowtoken',token);
+  	wx.request({
+  	  url: 'https://jingcai.hiwavo.com/three/order/express?tf_code='+that.data.order.express_order_no/* 773175419643033 */,
+  	  method: 'GET',
+  	  header: {
+  	    "content-type": "application/json",
+  	    "terminal": 'mini-program',
+  		"Authorization":"Bearer " + token
+  	  },
+  	  success: function (res) {
+		  console.log('res',res);
+  	    if(res.data.s == 0){
+  	    	var data = res.data.d;
+  	      // data['list'] = data.reverse();
+		  console.log('data',data);
+  	      that.setData({
+  	        logistics: data
+  	      })
+  	    }else{
+  	    	wx.showToast({
+			  title: res.data.m+',请稍后再试',
+			  icon: 'none',
+			  duration: 2000
+			})
+		}
+  	  },
+  	  fail: function (res) {
+  	  	console.log('errres',res);
+  	  },
+  	  complete: function (res) {
+  	    wx.hideNavigationBarLoading()
+  	  }
+  	})
+  },
+  
+  
   copeOrder: function () {
     var that = this
     var id = this.data.order.express_order_no

+ 9 - 1
packageUser/pages/user/logistics/logistics.wxml

@@ -25,9 +25,17 @@
 	<hr class="hrline" />
 	<view class="logistics-list">
 		<ul>
-			<li wx:for="{{logistics.list}}" wx:id="id">
+			<!-- <li wx:for="{{logistics.list}}" wx:id="id">
 				<p>{{item.remark}}</p>
 				<small>{{item.datetime}}</small>
+			</li> -->
+			
+			<li wx:for="{{logistics}}" wx:id="id">
+				<p>{{item.status}}</p>
+				<small>{{item.time}}</small>
+			</li>
+			<li wx:if="{{logistics.length == 0}}">
+				暂无物流信息
 			</li>
 		</ul>
 	</view>

+ 11 - 11
pages/projects/project-detail/project-detail.wxss

@@ -33,7 +33,6 @@
   color: #4c4c4c;
   margin-top: 10rpx;
   margin-bottom: 10rpx;
-  padding-right:70px;
 }
 .detail-normal {
   display: inline-block;
@@ -557,16 +556,17 @@
 
 
 .sharebtn{
-position: absolute;
-margin-top: -32px;
-right: 0;
-font-size: 14px;
-background: rgba(0,0,0,0.05);
-padding-left: 10px;
-border-radius: 45px 0 0 45px;
-height: 30px;
-line-height: 30px;
-color: #666;
+    position: relative;
+    font-size: 14px;
+    background: rgba(0,0,0,0.05);
+    padding-left: 10px;
+    border-radius: 45px 0 0 45px;
+    height: 30px;
+    line-height: 30px;
+    color: #666;
+    width: 220rpx;
+    float: right;
+    margin-bottom: -50rpx;
 }
 .sharebtn image{
 width: 20px;

+ 1 - 1
pages/projects/project-search/project-search.wxml

@@ -1,7 +1,7 @@
 <view class="bg">
 	<view class="searchbox">
 		<view class="searchtxt">
-			<input type="text" value="{{searchword}}" bindinput="bindword"/>
+			<input type="text" value="{{searchword}}" bindinput="bindword" bindconfirm="tosearch" confirm-type="search"/>
 			<button bindtap="tosearch">搜索</button>
 		</view>
 	</view>

+ 1 - 1
pages/search/search.wxml

@@ -1,7 +1,7 @@
 <view class="bg">
 	<view class="searchbox">
 		<view class="searchtxt">
-			<input type="text" placeholder="{{wordlist[0].title}}" value="{{searchword}}" auto-focus bindinput="bindword"/>
+			<input type="text" placeholder="{{wordlist[0].title}}" value="{{searchword}}" auto-focus bindinput="bindword" bindconfirm="tosearch" confirm-type="search"/>
 			<button bindtap="tosearch">搜索</button>
 		</view>
 	</view>

+ 2 - 2
utils/request.js

@@ -1,7 +1,7 @@
 // 新正式(未审批)
-// const apiHost = 'https://fohowapi.hiwavo.com/' 
+const apiHost = 'https://fohowapi.hiwavo.com/' 
 // 测试
-const apiHost = 'https://tfohowapi.hiwavo.com/'
+// const apiHost = 'https://tfohowapi.hiwavo.com/'
 
 
 function $get (url, params, success, fail) {