|
@@ -1418,20 +1418,37 @@
|
|
|
return
|
|
|
}
|
|
|
canpay = false;
|
|
|
- var param = {};
|
|
|
- param.data_spec = pageDataMap.typeMap['个人支付'].type == 2 ? "senior" : "standard";
|
|
|
- param.id ={{.T._id}}
|
|
|
+ var data_spec = pageDataMap.typeMap['个人支付'].type == 2 ? "senior" : "standard";
|
|
|
+ var _id = {{.T._id}}
|
|
|
+ var param = {
|
|
|
+ product: '历史数据',
|
|
|
+ productId: 1021,
|
|
|
+ data: {
|
|
|
+ id: _id,
|
|
|
+ data_spec: data_spec,
|
|
|
+ discountId: '',
|
|
|
+ order_phone: $(".phone_input").val().replace(/\s*/g, ""),
|
|
|
+ order_email: $(".email_input").val().replace(/\s*/g, "")
|
|
|
+ }
|
|
|
+ };
|
|
|
// 优惠券
|
|
|
var couponParam = getCouponParams.getValue()
|
|
|
if (couponParam) {
|
|
|
- param.lotteryId = couponParam.lotteryId
|
|
|
- param.userLotteryId = couponParam.userLotteryId
|
|
|
+ param.data.lotteryId = couponParam.lotteryId
|
|
|
+ param.data.userLotteryId = couponParam.userLotteryId
|
|
|
}
|
|
|
-
|
|
|
- $.post("/jypay/dataExport/createOrder", param, function (data) {
|
|
|
- var source = getParam("source");
|
|
|
- if (data.status === "y") {
|
|
|
- if (source != null) {
|
|
|
+ console.log(param)
|
|
|
+
|
|
|
+ $.ajax({
|
|
|
+ url: "/jypay/common/createorder",
|
|
|
+ dataType: "json",
|
|
|
+ contentType: "application/json;charset=utf-8",
|
|
|
+ data: JSON.stringify(param),
|
|
|
+ type: 'POST',
|
|
|
+ success: function (res) {
|
|
|
+ if (res.data && res.data.needPay) {
|
|
|
+ var source = getParam("source");
|
|
|
+ if (source != null) {
|
|
|
$.ajax({
|
|
|
type: 'GET',
|
|
|
url: '/front/order/source',
|
|
@@ -1439,30 +1456,31 @@
|
|
|
source: source,
|
|
|
type: "dataexport",
|
|
|
terminal: "pc",
|
|
|
- ordercode: data.code
|
|
|
+ ordercode: res.data.order_code
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- sessionStorage.setItem("order_spec" +{{.T._id}}, pageDataMap.typeMap['个人支付'].type);
|
|
|
- sessionStorage.setItem("order_email" +{{.T._id}}, $(".email_input").val().replace(/\s*/g, ""));
|
|
|
- sessionStorage.setItem("order_phone" +{{.T._id}}, $(".phone_input").val().replace(/\s*/g, ""));
|
|
|
+ sessionStorage.setItem("order_spec" + _id, pageDataMap.typeMap['个人支付'].type);
|
|
|
+ sessionStorage.setItem("order_email" + _id, $(".email_input").val().replace(/\s*/g, ""));
|
|
|
+ sessionStorage.setItem("order_phone" + _id, $(".phone_input").val().replace(/\s*/g, ""));
|
|
|
|
|
|
- history.replaceState({}, '', '/front/dataExport/toOrderDetail/' + data.code);
|
|
|
- window.location.href = "/front/dataexport/orderPay/" + data.code;
|
|
|
+ history.replaceState({}, '', '/front/dataExport/toOrderDetail/' + res.data.order_code);
|
|
|
+ window.location.href = "/front/dataexport/orderPay/" + res.data.order_code;
|
|
|
} else {
|
|
|
- canpay = true;
|
|
|
- $.confirm({
|
|
|
- title: '提示',
|
|
|
- content: '生成订单出错,请稍后尝试!',
|
|
|
- buttons: {
|
|
|
- ok: {
|
|
|
- text: '确认',
|
|
|
- btnClass: 'btn-primary-0',
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
+ canpay = true;
|
|
|
+ $.confirm({
|
|
|
+ title: '提示',
|
|
|
+ content: res.error_msg || '生成订单出错,请稍后尝试!',
|
|
|
+ buttons: {
|
|
|
+ ok: {
|
|
|
+ text: '确认',
|
|
|
+ btnClass: 'btn-primary-0',
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
- }, "json");
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
//数据浏览
|