|
@@ -209,7 +209,6 @@
|
|
|
orderCode: checkout.orderInfo.ordercode,
|
|
|
payway: checkout.mode,
|
|
|
},
|
|
|
- contentType: 'application/x-www-form-urlencoded',
|
|
|
success: function (res) {
|
|
|
checkout.loading.hide(function () {
|
|
|
checkout.loading = null
|
|
@@ -280,6 +279,10 @@
|
|
|
window.location.replace("/front/wxMyOrder/integraldetail/" + orderCode)
|
|
|
break
|
|
|
}
|
|
|
+ case 'dataPack': {
|
|
|
+ window.location.replace("/weixin/common/dataPack/orderDetail?order_code=" + orderCode)
|
|
|
+ break
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
EasyAlert.show("系统异常,请稍微再试", "", 3000);
|
|
@@ -306,50 +309,22 @@
|
|
|
iconHide: true,
|
|
|
duration: 1500,
|
|
|
callback: function () {
|
|
|
- // 支付成功 判断有没有引流语id,有 需要埋点
|
|
|
- if (checkout.getUrlParam('mid')) {
|
|
|
- try {
|
|
|
- $.ajax({
|
|
|
- type: "POST",
|
|
|
- url: "/publicapply/drainage/bmt/" + checkout.getUrlParam('mid'),
|
|
|
- data: {
|
|
|
- p: 'Paid'
|
|
|
- },
|
|
|
- success: function(r) {
|
|
|
- console.log(r)
|
|
|
- }
|
|
|
- })
|
|
|
- } catch (error) {
|
|
|
- console.log(error)
|
|
|
- }
|
|
|
- }
|
|
|
- // 采购单位画像引流过来的埋点
|
|
|
- if (checkout.getUrlParam('bid')) {
|
|
|
- try {
|
|
|
- var params = {
|
|
|
- mold: 'isPaid'
|
|
|
- }
|
|
|
- $.ajax({
|
|
|
- type: 'POST',
|
|
|
- url: '/publicapply/drainage/buyerunit',
|
|
|
- contentType: "application/json",
|
|
|
- data: JSON.stringify(params),
|
|
|
- success: function (res) {
|
|
|
- console.log(res)
|
|
|
- },
|
|
|
- error: function (error) {
|
|
|
- console.log(error)
|
|
|
- }
|
|
|
- })
|
|
|
- } catch (error) {
|
|
|
- console.log(error)
|
|
|
- }
|
|
|
- }
|
|
|
+ // 支付成功 判断有没有引流语id,有 需要埋点
|
|
|
+ var productType = checkout.orderInfo.productType
|
|
|
+ checkout.buryingPoint()
|
|
|
+
|
|
|
var bigmemberBid=checkout.getUrlParam("b");
|
|
|
var href ="/weixin/{{.T.doType}}/paySuccess?orderCode=" + res.orderCode + "&email=" + res.email + "&payTime=" + res.payTime + "&price=" + res.price + "&t={{.T.t}}"
|
|
|
+
|
|
|
if(bigmemberBid==="1"){
|
|
|
href="/weixin/aiForecastPack/paySuccess?orderCode=" + res.orderCode + "&email=" + res.email + "&payTime=" + res.payTime + "&price=" + res.price + "&t={{.T.t}}"
|
|
|
}
|
|
|
+
|
|
|
+ // 数据流量包定制
|
|
|
+ if (productType === 'dataPack') {
|
|
|
+ href = href + '&header=充值数据流量包&filter=' + res.filter
|
|
|
+ }
|
|
|
+
|
|
|
var docsId=checkout.getUrlParam("docId")
|
|
|
if (docsId!=null){
|
|
|
href +="&docsId="+docsId
|
|
@@ -446,9 +421,42 @@
|
|
|
if (r != null)
|
|
|
return unescape(r[2]);
|
|
|
return null;
|
|
|
+ },
|
|
|
+ // 埋点
|
|
|
+ buryingPoint: function () {
|
|
|
+ if (checkout.getUrlParam('mid')) {
|
|
|
+ try {
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ url: "/publicapply/drainage/bmt/" + checkout.getUrlParam('mid'),
|
|
|
+ data: {
|
|
|
+ p: 'Paid'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 采购单位画像引流过来的埋点
|
|
|
+ if (checkout.getUrlParam('bid')) {
|
|
|
+ try {
|
|
|
+ var params = {
|
|
|
+ mold: 'isPaid'
|
|
|
+ }
|
|
|
+ $.ajax({
|
|
|
+ type: 'POST',
|
|
|
+ url: '/publicapply/drainage/buyerunit',
|
|
|
+ contentType: "application/json",
|
|
|
+ data: JSON.stringify(params)
|
|
|
+ })
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error)
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
checkout.init()
|
|
|
+ window.checkout = checkout
|
|
|
})
|
|
|
</script>
|
|
|
{{include "/common/baiducc.html"}}
|