diff --git a/pages/map/index.wxml b/pages/map/index.wxml
index fd164c5..74f589d 100644
--- a/pages/map/index.wxml
+++ b/pages/map/index.wxml
@@ -64,12 +64,12 @@
-
+
{{item.title}}
@@ -84,7 +84,7 @@
-
+
{{item.title}}
{{item.subtitle}}
@@ -97,7 +97,7 @@
{{item.view_number}}
-
+
查看更多
diff --git a/pages/user/order/list.js b/pages/user/order/list.js
index be603e6..6216d61 100644
--- a/pages/user/order/list.js
+++ b/pages/user/order/list.js
@@ -11,7 +11,9 @@ Page({
list:[],
keywords:"",
orderState:app.globalData.orderState,
- type:""
+ type:"",
+ lon:"",
+ lat:""
},
/**
@@ -21,7 +23,17 @@ Page({
this.setData({
type:options.type
})
- this.getList()
+ wx.getLocation({
+ type: 'gcj02',
+ success: (r)=>{
+ this.setData({
+ lon:r.longitude,
+ lat:r.latitude
+ })
+ this.getList();
+ }
+ })
+
},
changeKeyword:function(e){
this.setData({
@@ -68,17 +80,36 @@ Page({
limit:10,
keywords:this.data.keywords
}).then(res=>{
- res.data.list.map(item=>{
+ let ajaxes = [],indexes=[]
+ res.data.list.map((item,index)=>{
let orderNum = 0;
item.order_product_list.map(order=>{
orderNum = orderNum + order.product_num;
})
+ if(item.order_product_list.length==1 && item.order_product_list[0].scene_id && item.state!='UNPAID' && item.state!='CLOSED' && item.state.indexOf("REFUND")==-1){
+ let ajax = commonApi.user_post("order/tripplan",{
+ point_type: "gd",
+ child_order_id:item.order_product_list[0].child_order_id,
+ lat:this.data.lat,
+ lon:this.data.lon
+ })
+ ajaxes.push(ajax);
+ indexes.push(index);
+ }
item.orderNum = orderNum;
})
- this.setData({
- total:res.data.total,
- list:list.concat(res.data.list)
+ Promise.all(ajaxes).then((r)=>{
+ r.map((item,index)=>{
+ if(item && item.data && item.data.url){
+ res.data.list[indexes[index]].guihuaUrl = item.data.url
+ }
+ this.setData({
+ total:res.data.total,
+ list:list.concat(res.data.list)
+ })
+ })
})
+
})
},
gotoDetail:function(e){
diff --git a/pages/user/order/list.wxml b/pages/user/order/list.wxml
index d862331..3469928 100644
--- a/pages/user/order/list.wxml
+++ b/pages/user/order/list.wxml
@@ -39,6 +39,7 @@
+ 行程规划
再次购买
立即评价
取消预订