Commit 3252adbe authored by ZJG's avatar ZJG

1

parent 252656b4
...@@ -142,15 +142,11 @@ ...@@ -142,15 +142,11 @@
); );
}, },
unique(arr){//数组去重 unique(arr){//数组去重
var res = []; const res = new Map();
var obj = {}; return arr.filter(
for(var i=0; i<arr.length; i++){ (list) => !res.has(list.ti) && res.set(list.ti, 1)
if( !obj[arr[i]] ){ );
obj[arr[i]] = 1;
res.push(arr[i]);
}
}
return res;
}, },
onPageScroll(e) { onPageScroll(e) {
this.scrollTop = e.scrollTop; this.scrollTop = e.scrollTop;
......
...@@ -372,14 +372,15 @@ ...@@ -372,14 +372,15 @@
}) })
return return
} }
uni.showLoading({
title: '下单中...'
})
let that= this let that= this
uni.requestSubscribeMessage({ uni.requestSubscribeMessage({
tmplIds: that.details.template_message_list, tmplIds: that.details.template_message_list,
complete(_res) { complete(_res) {
console.log(_res) console.log(_res)
uni.showLoading({
title: '下单中...'
})
that.request2({ that.request2({
url: '/api/AppletCar/SetAppletCarOrderInfo', url: '/api/AppletCar/SetAppletCarOrderInfo',
data: that.addMsg data: that.addMsg
...@@ -442,7 +443,8 @@ ...@@ -442,7 +443,8 @@
fail: function(err) { fail: function(err) {
console.log('fail:', err); console.log('fail:', err);
uni.showToast({ uni.showToast({
title: "支付失败" title: "支付失败",
icon:'none'
}) })
setTimeout(()=>{ setTimeout(()=>{
uni.redirectTo({ uni.redirectTo({
......
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
出发时间:{{x.Date}} {{x.DepartureTime}} 出发时间:{{x.Date}} {{x.DepartureTime}}
</view> </view>
<view class="car-w"> <view class="car-w">
数:{{x.PeopleNumber+x.ChildNumber}}人 单价:¥{{x.Unit_Price.toFixed(2)}} 总数:{{x.PeopleNumber+x.ChildNumber}}人 单价:¥{{x.Unit_Price.toFixed(2)}}
</view> </view>
<view class="order_xu"></view> <view class="order_xu"></view>
</view> </view>
...@@ -376,22 +376,9 @@ ...@@ -376,22 +376,9 @@
}) })
return return
} }
uni.requestSubscribeMessage({
tmplIds: [],
complete(res) {
that.request2({
url: '/api/AppletOrder/CancelAppletMyOrder',
data: that.Cancelmsg
},
(res) => {
that.showModal = false;
if(that.msg.OrderStatus==0){//判断在全部列表的时候 改变他的状态 if(that.msg.OrderStatus==0){//判断在全部列表的时候 改变他的状态
if(that.Cancelmsg.Type==1){ if(that.Cancelmsg.Type==1){
uni.showToast({
title: res.message,
icon: 'none'
})
that.g[index].OrderStatus = 4; that.g[index].OrderStatus = 4;
that.g[index].IsApplyForCancel = 1; that.g[index].IsApplyForCancel = 1;
}else{ }else{
...@@ -424,11 +411,59 @@ ...@@ -424,11 +411,59 @@
this.change(5) this.change(5)
} }
} }
// uni.requestSubscribeMessage({
// tmplIds: [],
// complete(res) {
// that.request2({
// url: '/api/AppletOrder/CancelAppletMyOrder',
// data: that.Cancelmsg
// },
// (res) => {
// that.showModal = false;
} // if(that.msg.OrderStatus==0){//判断在全部列表的时候 改变他的状态
); // if(that.Cancelmsg.Type==1){
} // uni.showToast({
}) // title: res.message,
// icon: 'none'
// })
// that.g[index].OrderStatus = 4;
// that.g[index].IsApplyForCancel = 1;
// }else{
// uni.showToast({
// title: "取消成功,请等待审核",
// position: "bottom",
// icon: "none",
// duration: 2000,
// });
// that.g[index].OrderStatus = 5;
// that.g[index].IsApplyForCancel = 1;
// }
// }else{//在待付款的页面时候的操作处理
// if (that.Cancelmsg.Type == 1) {
// uni.showToast({
// title: res.message,
// icon: 'none'
// })
// that.g.splice(that.index, 1);
// } else {
// uni.showToast({
// title: "取消成功,请等待审核",
// position: "bottom",
// icon: "none",
// duration: 2000,
// });
// // that.msg.pageIndex = 1;
// // that.g = [];
// // that.init();
// this.change(5)
// }
// }
// }
// );
// }
// })
}, },
getquxiao(item){//判断是否显示取消 getquxiao(item){//判断是否显示取消
let show = true let show = true
...@@ -505,16 +540,19 @@ ...@@ -505,16 +540,19 @@
title: "支付成功" title: "支付成功"
}) })
if(that.msg.OrderStatus==0){ if(that.msg.OrderStatus==0){
that.g[that.payindex].OrderStatus = 2 that.g[that.payindex].OrderStatus = 2;
that.g[that.payindex].OrderStatusName = '待确认';
}else{ }else{
this.change(2) that.change(2)
} }
}, },
fail: function(err) { fail: function(err) {
console.log('fail:', err); console.log('fail:', err);
uni.showToast({ uni.showToast({
title: "支付失败" title: "支付失败",
icon:'none'
}) })
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment