|
@@ -22,6 +22,9 @@ Page({
|
|
|
customerServiceFlag: false,
|
|
|
cancleBtnFlag: false,
|
|
|
servicetel: getApp().globalData.helpPhoneNum,
|
|
|
+ orderid: null,
|
|
|
+ userId: null,
|
|
|
+ order: null,
|
|
|
},
|
|
|
switchBar(e){
|
|
|
let searchIndex = e.currentTarget.dataset.idx;
|
|
@@ -101,14 +104,14 @@ Page({
|
|
|
url: getApp().globalData.postHeadAgreement +'/restapi/wechat/queryOccupyFeeOrder',
|
|
|
data: {
|
|
|
userId: wx.getStorageSync('userInfo').userId,
|
|
|
- searchIndex: that.data.searchIndex<0?null:that.data.searchIndex,
|
|
|
+ searchIndex: that.data.searchIndex<0?-1:that.data.searchIndex,
|
|
|
pagenum: this.data.pagenum++,
|
|
|
pagesize: 10,
|
|
|
},
|
|
|
method: 'POST',
|
|
|
success(res) {
|
|
|
console.log("占位费",res);
|
|
|
- if (res.data.result.rows) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
let {
|
|
|
rows: occupyFeeOrderList
|
|
|
} = res.data.result;
|
|
@@ -120,6 +123,8 @@ Page({
|
|
|
total: res.data.result.total,
|
|
|
dataLoading: false
|
|
|
});
|
|
|
+ }else{
|
|
|
+ wx.hideLoading()
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -204,11 +209,147 @@ Page({
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
- customerServiceBtn(){
|
|
|
+ customerServiceBtn(e){
|
|
|
+ console.log("拿纸",e.currentTarget.dataset.idx);
|
|
|
+ let parkId = e.currentTarget.dataset.idx;
|
|
|
wx.makePhoneCall({
|
|
|
phoneNumber: this.data.servicetel
|
|
|
})
|
|
|
},
|
|
|
+ payOrder(e) {
|
|
|
+ // log.info('[订单支付]', '[用户触发支付订单]');
|
|
|
+ // wx.showLoading({
|
|
|
+ // title: '支付中...',
|
|
|
+ // mask: true
|
|
|
+ // });
|
|
|
+ let parkId = e.currentTarget.dataset.idx;
|
|
|
+ let that = this;
|
|
|
+ let userId = wx.getStorageSync('userInfo').userId
|
|
|
+ wx.request({
|
|
|
+ url: getApp().globalData.postHeadAgreement +'/restapi/wechat/queryOccupyFeeOrder',
|
|
|
+ data: {
|
|
|
+ userId: userId,
|
|
|
+ orderId:parkId,
|
|
|
+ searchIndex: null,
|
|
|
+ pagenum: that.data.pagenum++,
|
|
|
+ pagesize: 10,
|
|
|
+ },
|
|
|
+ method: 'POST',
|
|
|
+ success(res) {
|
|
|
+ console.log("更具订单号插叙",res);
|
|
|
+ // this.setData({
|
|
|
+ // order:res.data
|
|
|
+ // })
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // let {
|
|
|
+ // order,
|
|
|
+ // } = this.data;
|
|
|
+ // log.info('[订单支付]', '[用户触发支付订单]', '[wx.login请求]');
|
|
|
+ // wx.login({
|
|
|
+ // success(res) {
|
|
|
+ // console.log(res);
|
|
|
+ // log.info('[订单支付]', '[用户触发支付订单]', '[wx.login响应]',res);
|
|
|
+ // if (res.code) {
|
|
|
+ // // 发起网络请求
|
|
|
+ // log.info('[订单支付]', '[服务端订单支付]', '[请求]', {
|
|
|
+ // outTradeNo: order.orderid, //订单号
|
|
|
+ // totalFee: order.chargallmoney, //钱
|
|
|
+ // code: res.code,
|
|
|
+ // user_id: userId
|
|
|
+ // });
|
|
|
+ // wx.request({
|
|
|
+ // url: getApp().globalData.postHeadAgreement +'/restapi/wechatpay/chargpayfor',
|
|
|
+ // data: {
|
|
|
+ // outTradeNo: order.orderid, //订单号
|
|
|
+ // totalFee: order.chargallmoney, //钱
|
|
|
+ // code: res.code,
|
|
|
+ // user_id: userId
|
|
|
+ // },
|
|
|
+ // method: 'POST',
|
|
|
+ // header: {
|
|
|
+ // 'content-type': 'application/x-www-form-urlencoded;charset=utf-8',
|
|
|
+ // },
|
|
|
+ // success(res1) {
|
|
|
+ // let {
|
|
|
+ // data
|
|
|
+ // } = res1;
|
|
|
+ // log.info('[订单支付]', '[服务端订单支付]', '[响应]', data);
|
|
|
+ // console.log(res1);
|
|
|
+ // if (data && data.code == 200) {
|
|
|
+ // if (data.result) {
|
|
|
+ // //wx.showModal({
|
|
|
+ // // showCancel: false,
|
|
|
+ // // content: '请微信支付'
|
|
|
+ // // });
|
|
|
+ // log.info('[订单支付]', '[余额不足微信支付]','[请求]',{
|
|
|
+ // timeStamp: data.result.timeStamp,
|
|
|
+ // nonceStr: data.result.nonceStr,
|
|
|
+ // package: data.result.package,
|
|
|
+ // signType: data.result.signType,
|
|
|
+ // paySign: data.result.paySign});
|
|
|
+ // wx.requestPayment({
|
|
|
+ // timeStamp: data.result.timeStamp,
|
|
|
+ // nonceStr: data.result.nonceStr,
|
|
|
+ // package: data.result.package,
|
|
|
+ // signType: data.result.signType,
|
|
|
+ // paySign: data.result.paySign,
|
|
|
+ // success(res2) {
|
|
|
+ // log.info('[订单支付]', '[余额不足微信支付成功]', '[响应]', res2);
|
|
|
+ // log.info('[订单支付]', '[微信支付成功回调服务端]', '[请求]', {
|
|
|
+ // //chargPileId,
|
|
|
+ // //userId,
|
|
|
+ // orderid: order.orderid
|
|
|
+ // });
|
|
|
+ // wx.hideLoading();
|
|
|
+ // wx.showModal({
|
|
|
+ // showCancel: false,
|
|
|
+ // content: '支付订单成功',
|
|
|
+ // confirmColor:'#00AADD',
|
|
|
+ // });
|
|
|
+
|
|
|
+ // that.setData({
|
|
|
+ // orderFlag:true
|
|
|
+ // });
|
|
|
+ // },
|
|
|
+ // fail(res3) {
|
|
|
+ // wx.hideLoading();
|
|
|
+ // log.info('[订单支付]', '[余额不足微信支付]', '[fail]', res3);
|
|
|
+ // console.log(res3);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // } else {
|
|
|
+ // wx.hideLoading();
|
|
|
+ // that.setData({
|
|
|
+ // orderFlag: true
|
|
|
+ // });
|
|
|
+ // wx.showModal({
|
|
|
+ // showCancel: false,
|
|
|
+ // content: data.msg,
|
|
|
+ // confirmColor:'#00AADD',
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // log.info('[订单支付]', '[服务端订单支付]', '[余额支付成功]', data);
|
|
|
+ // } else {
|
|
|
+ // wx.hideLoading();
|
|
|
+ // wx.showModal({
|
|
|
+ // showCancel: false,
|
|
|
+ // content: data.msg,
|
|
|
+ // confirmColor:'#00AADD',
|
|
|
+ // });
|
|
|
+ // log.info('[订单支付]', '[服务端订单支付]', '[失败data null||data.code<>200]', data);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // } else {
|
|
|
+ // wx.hideLoading();
|
|
|
+ // console.log('登录失败!' + res.errMsg);
|
|
|
+ // log.info('[订单支付]', '[用户触发支付订单]', '[wx.login响应失败code null]', res);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+
|
|
|
+ },
|
|
|
cancleBtn(e){
|
|
|
let that = this
|
|
|
let reservId = e.currentTarget.dataset.idx;
|