Commit 9f9e8c8b by wangshuo

dabao

parent 73c79e8a
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
"Orderinfo.js": "/static/js/Orderinfo.51c41ecf.chunk.js", "Orderinfo.js": "/static/js/Orderinfo.51c41ecf.chunk.js",
"Orderinfo.js.map": "/static/js/Orderinfo.51c41ecf.chunk.js.map", "Orderinfo.js.map": "/static/js/Orderinfo.51c41ecf.chunk.js.map",
"PayOrder.css": "/static/css/PayOrder.c6bfd7c7.chunk.css", "PayOrder.css": "/static/css/PayOrder.c6bfd7c7.chunk.css",
"PayOrder.js": "/static/js/PayOrder.70388260.chunk.js", "PayOrder.js": "/static/js/PayOrder.d2e70b7c.chunk.js",
"PayOrder.js.map": "/static/js/PayOrder.70388260.chunk.js.map", "PayOrder.js.map": "/static/js/PayOrder.d2e70b7c.chunk.js.map",
"Preferential.css": "/static/css/Preferential.aced1689.chunk.css", "Preferential.css": "/static/css/Preferential.aced1689.chunk.css",
"Preferential.js": "/static/js/Preferential.b24ff476.chunk.js", "Preferential.js": "/static/js/Preferential.b24ff476.chunk.js",
"Preferential.js.map": "/static/js/Preferential.b24ff476.chunk.js.map", "Preferential.js.map": "/static/js/Preferential.b24ff476.chunk.js.map",
...@@ -51,8 +51,8 @@ ...@@ -51,8 +51,8 @@
"purchased.css": "/static/css/purchased.048d84f3.chunk.css", "purchased.css": "/static/css/purchased.048d84f3.chunk.css",
"purchased.js": "/static/js/purchased.61f91062.chunk.js", "purchased.js": "/static/js/purchased.61f91062.chunk.js",
"purchased.js.map": "/static/js/purchased.61f91062.chunk.js.map", "purchased.js.map": "/static/js/purchased.61f91062.chunk.js.map",
"runtime~main.js": "/static/js/runtime~main.0033259e.js", "runtime~main.js": "/static/js/runtime~main.fdda3d0e.js",
"runtime~main.js.map": "/static/js/runtime~main.0033259e.js.map", "runtime~main.js.map": "/static/js/runtime~main.fdda3d0e.js.map",
"search.css": "/static/css/search.5e0245a0.chunk.css", "search.css": "/static/css/search.5e0245a0.chunk.css",
"search.js": "/static/js/search.fc659642.chunk.js", "search.js": "/static/js/search.fc659642.chunk.js",
"search.js.map": "/static/js/search.fc659642.chunk.js.map", "search.js.map": "/static/js/search.fc659642.chunk.js.map",
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
"static/js/31.57a6441b.chunk.js": "/static/js/31.57a6441b.chunk.js", "static/js/31.57a6441b.chunk.js": "/static/js/31.57a6441b.chunk.js",
"static/js/31.57a6441b.chunk.js.map": "/static/js/31.57a6441b.chunk.js.map", "static/js/31.57a6441b.chunk.js.map": "/static/js/31.57a6441b.chunk.js.map",
"index.html": "/index.html", "index.html": "/index.html",
"precache-manifest.9a1e54c2d6b9d6d3d336b01d3ceb6758.js": "/precache-manifest.9a1e54c2d6b9d6d3d336b01d3ceb6758.js", "precache-manifest.63bbbaf70b60051837db0fbdfb96a1d6.js": "/precache-manifest.63bbbaf70b60051837db0fbdfb96a1d6.js",
"service-worker.js": "/service-worker.js", "service-worker.js": "/service-worker.js",
"static/css/24.62b6292a.chunk.css.map": "/static/css/24.62b6292a.chunk.css.map", "static/css/24.62b6292a.chunk.css.map": "/static/css/24.62b6292a.chunk.css.map",
"static/css/26.b8256974.chunk.css.map": "/static/css/26.b8256974.chunk.css.map", "static/css/26.b8256974.chunk.css.map": "/static/css/26.b8256974.chunk.css.map",
......
...@@ -56,12 +56,12 @@ self.__precacheManifest = [ ...@@ -56,12 +56,12 @@ self.__precacheManifest = [
"url": "/static/js/Orderinfo.51c41ecf.chunk.js" "url": "/static/js/Orderinfo.51c41ecf.chunk.js"
}, },
{ {
"revision": "aad22810b72c73e79df7", "revision": "3a976286bdb69c6da2b0",
"url": "/static/css/PayOrder.c6bfd7c7.chunk.css" "url": "/static/css/PayOrder.c6bfd7c7.chunk.css"
}, },
{ {
"revision": "aad22810b72c73e79df7", "revision": "3a976286bdb69c6da2b0",
"url": "/static/js/PayOrder.70388260.chunk.js" "url": "/static/js/PayOrder.d2e70b7c.chunk.js"
}, },
{ {
"revision": "02a2a0080c442943b015", "revision": "02a2a0080c442943b015",
...@@ -136,8 +136,8 @@ self.__precacheManifest = [ ...@@ -136,8 +136,8 @@ self.__precacheManifest = [
"url": "/static/js/BargainMiddlePage.e5d8e818.chunk.js" "url": "/static/js/BargainMiddlePage.e5d8e818.chunk.js"
}, },
{ {
"revision": "1c026a56bf81143ac1f2", "revision": "ec07a9851b19bb07858d",
"url": "/static/js/runtime~main.0033259e.js" "url": "/static/js/runtime~main.fdda3d0e.js"
}, },
{ {
"revision": "096d4d51c5f72b6fabf5", "revision": "096d4d51c5f72b6fabf5",
...@@ -212,16 +212,16 @@ self.__precacheManifest = [ ...@@ -212,16 +212,16 @@ self.__precacheManifest = [
"url": "/static/js/28.52f97b1b.chunk.js" "url": "/static/js/28.52f97b1b.chunk.js"
}, },
{ {
"revision": "10b7bd5b99a2a0a2f1a30d7ed72ec1a0", "revision": "55ad4bbcfbe7879698a2538de5145a09",
"url": "/static/media/iconfont.10b7bd5b.eot" "url": "/static/media/iconfont.55ad4bbc.ttf"
}, },
{ {
"revision": "18385adaa1255dc63068", "revision": "18385adaa1255dc63068",
"url": "/static/js/29.7fc87b4e.chunk.js" "url": "/static/js/29.7fc87b4e.chunk.js"
}, },
{ {
"revision": "55ad4bbcfbe7879698a2538de5145a09", "revision": "10b7bd5b99a2a0a2f1a30d7ed72ec1a0",
"url": "/static/media/iconfont.55ad4bbc.ttf" "url": "/static/media/iconfont.10b7bd5b.eot"
}, },
{ {
"revision": "558463e34c1bc2fef646", "revision": "558463e34c1bc2fef646",
...@@ -260,7 +260,7 @@ self.__precacheManifest = [ ...@@ -260,7 +260,7 @@ self.__precacheManifest = [
"url": "/static/css/24.62b6292a.chunk.css" "url": "/static/css/24.62b6292a.chunk.css"
}, },
{ {
"revision": "a067f5757b35a79ed5668fdcebe0f179", "revision": "4d6e1cab3b5b21757fda8e0df62a7554",
"url": "/index.html" "url": "/index.html"
} }
]; ];
\ No newline at end of file
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js"); importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js");
importScripts( importScripts(
"/precache-manifest.9a1e54c2d6b9d6d3d336b01d3ceb6758.js" "/precache-manifest.63bbbaf70b60051837db0fbdfb96a1d6.js"
); );
workbox.clientsClaim(); workbox.clientsClaim();
......
(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{1162:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return O});t(155);var n=t(75),i=t.n(n),c=(t(89),t(25)),o=t.n(c),r=(t(154),t(35)),l=t.n(r),s=(t(43),t(14)),d=t.n(s),p=t(7),u=t(8),m=t(10),y=t(9),g=t(11),b=t(157),f=(t(890),t(892)),h=t.n(f),v=(t(115),t(46)),w=t.n(v),E=t(0),S=t.n(E),x=t(4),P=t(30),_=t(19),j=(t(894),w.a.Item.Brief,h.a.RadioItem),k=[];k=x.a.isWeixin?[{value:1,label:"\u5fae\u4fe1\u652f\u4ed8",icon:"iconweixinzhifu"}]:[{value:0,label:"\u652f\u4ed8\u5b9d",icon:"iconzhifubaox-"},{value:1,label:"\u5fae\u4fe1\u652f\u4ed8",icon:"iconweixinzhifu"}];var O=function(e){function a(e){var t;return Object(p.a)(this,a),(t=Object(m.a)(this,Object(y.a)(a).call(this,e))).redirectAfterPay=function(){var e=Object(x.b)("status"),a=Object(x.b)("type"),n=Object(x.b)("oid"),i=t.props.history;(e||a)&&(0===parseInt(e,10)?2===parseInt(a,10)?i.push("/togroup?id=".concat(n)):i.push("/purchased"):d.a.info("\u652f\u4ed8\u5f02\u5e38",2))},t.onChange=function(e){t.setState({payType:e,checkPeriod:!1}),2===e&&t.setState({huabei:!0})},t.checkStaging=function(e){console.log(e),t.setState({huabei:!1,stageNumber:e.value,singleMoney:e.everyTotal,periodNumber:e.stage,checkPeriod:!0})},t.print=function(){for(var e=arguments.length,a=new Array(e),t=0;t<e;t++)a[t]=arguments[t];console.log(a)},t.pay=function(){var e=t.state,a=e.payType,n=e.orderId;0===a?t.alipayPay(n):1===a&&t.weixinPay(n)},t.weixinPay=function(e){Object(x.e)()?window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="+encodeURIComponent(window.location.href+"&aa=bb").toLowerCase()+"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect":x.c.get("".concat(API["base-api"],"/pay/wxpay/wap_charge/oid/").concat(e)).then(function(e){console.log(e),0===e.data.errno?window.location.href=e.data.data.url+"&redirect_url="+encodeURIComponent(window.location.href+"&weixinpay=1").toLowerCase():d.a.info(e.data.msg+"weixinPay",2)})},t.isweixinPay=function(){var e=Object(b.a)(Object(b.a)(t)),a=Object(x.b)("code");if(a){if(void 0===Object(x.b)("oid"))return;x.c.get("".concat(API["base-api"],"/pay/wxpay/pub_charge/oid/").concat(Object(x.b)("oid"),"/code/").concat(a)).then(function(a){if(0===a.data.errno){var t=function(){WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:n.appId,timeStamp:n.timeStamp,nonceStr:n.nonceStr,package:n.package,signType:n.signType,paySign:n.paySign},function(a){"get_brand_wcpay_request:ok"==a.err_msg?(d.a.info("\u652f\u4ed8\u6210\u529f",2),e.intervalPayStatus=setInterval(function(){x.c.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(x.b)("oid"))).then(function(a){401===a.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,x.c.get("".concat(API["base-api"],"/m/app_order/detail/").concat(Object(x.b)("oid"))).then(function(a){2===Number(a.data.data.course_type)?e.props.history.replace("/togroup?id=".concat(Object(x.b)("oid"))):e.props.history.replace("/purchased")}))})},1e3)):alert("\u652f\u4ed8\u5931\u8d25")})},n=a.data.data;"undefined"==typeof WeixinJSBridge?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",t,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",t),document.attachEvent("onWeixinJSBridgeReady",t)):t()}else d.a.info(a.data.msg+"isweixinPay",2)})}},t.payCallback=function(){var e=Object(b.a)(Object(b.a)(t));e.intervalPayStatus=setInterval(function(){var a=this;x.c.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(x.b)("oid"))).then(function(t){401===t.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,x.c.get("".concat(API.home,"/m/app_order/detail/").concat(Object(x.b)("oid"))).then(function(e){"2"===e.data.data.course_type?a.props.history.replace("/togroup?id=".concat(Object(x.b)("oid"))):a.props.history.replace("/purchased")}))})},1e3)},t.onBridgeReady1=function(e){d.a.info(e.appId,2),console.log("181 line data: ".concat(JSON.stringify(e)));var a=Object(b.a)(Object(b.a)(t));e=e||a.BridgeData,console.log("184 line data: ".concat(JSON.stringify(e))),d.a.info(e.appId,100),WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:"wx23dac6775ac82877",timeStamp:e.timeStamp,nonceStr:e.nonceStr,package:e.package,signType:e.signType,paySign:e.paySign},function(e){"get_brand_wcpay_request:ok"==e.err_msg?(d.a.info("\u652f\u4ed8\u6210\u529f",2),a.payCallback()):alert("\u652f\u4ed8\u5931\u8d25")})},t.alipayPay=function(e){x.c.get("".concat(API["base-api"],"/pay/alipay/wap_charge_new/oid/").concat(e)).then(function(e){0===e.data.errno?(t.payCallback(),window.location=e.data.data.url):d.a.info(e.data.msg+"alipayPay",2)})},t.huabeiPay=function(e){var a=t.state,n=(a.singleMoney,a.periodNumber);console.log("\u82b1\u5457\u5206\u671f\u652f\u4ed8"),x.c.get("/pay/alipay/wap_charge/oid/".concat(e,"/plat/{plat} /hb_num/").concat(n)).then(function(e){console.log(e),0===e.data.errno?window.location=e.data.data.url:d.a.info(e.data.msg+"huabeiPay",2)})},t.state={pay_amount:0,payType:0,stageNumber:0,checkPeriod:!1,singleMoney:0,periodNumber:0,orderId:Object(x.b)("oid"),huabei:!1,fenqiList:[{value:"zhifubao",qishu:"3",lilv:"2.30%",everyMoney:300,feiyong:2.3},{value:"weixin",qishu:"6",lilv:"4.50%",everyMoney:150,feiyong:4.5},{value:"huabei",qishu:"9",lilv:"7.50%",everyMoney:100,feiyong:7.5}],categoryList:[]},t}return Object(g.a)(a,e),Object(u.a)(a,[{key:"componentDidMount",value:function(){var e=this;this.redirectAfterPay(),x.c.post("".concat(API["base-api"],"/m/order/detail"),{order_id:this.state.orderId}).then(function(a){if(console.log(a),200===a.data.errno){var t=a.data.data,n=t.course,i=t.pay_amount,c=[];[1,2,3].map(function(e){var a={};a.value=e,1===e?(a.stage=3,a.moneyRate="2.30%",a.rate=.023,a.periodic=(i/3).toFixed(2)):2===e?(a.stage=6,a.moneyRate="4.50%",a.rate=.045,a.periodic=(i/6).toFixed(2)):(a.stage=12,a.moneyRate="7.50%",a.rate=.075,a.periodic=(i/9).toFixed(2)),a.serviceFee=(i*a.rate/a.stage).toFixed(2),a.everyTotal=(parseFloat(a.periodic)+parseFloat(a.serviceFee)).toFixed(2),c.push(a)}),console.log(c),e.setState({pay_amount:i,categoryList:n,fenqiList:c})}else d.a.info(a.data.msg+"componentDidMount",2)}),(1===Object(x.b)("is_class")||Object(x.b)("weixinpay"))&&this.payCallback(),Object(x.e)()&&(this.setState({payType:1}),this.isweixinPay())}},{key:"render",value:function(){var e=this,a=this.state,t=a.orderId,n=a.pay_amount,c=a.payType,r=a.checkPeriod,s=a.singleMoney,d=a.periodNumber,p=a.huabei,u=a.fenqiList,m=a.categoryList,y=a.stageNumber;return S.a.createElement("div",{className:"pay-order"},S.a.createElement(P.e,{title:"\u786e\u8ba4\u652f\u4ed8",arrow:!0}),S.a.createElement(l.a,{size:"sm"}),S.a.createElement("div",{className:"order-number"},S.a.createElement(i.a,null,S.a.createElement(o.a,{justify:"between",align:"center",style:{height:"44px"}},S.a.createElement("span",null,"\u8ba2\u5355\u53f7"),S.a.createElement("span",{className:"number"},t)))),S.a.createElement(l.a,{size:"md"}),m.map(function(a,t){var n=S.a.createElement("div",{className:"order-info"},S.a.createElement("p",{className:"order-title text-overflow-one"},S.a.createElement(_.b,{to:"/detail?id=".concat(a.course_id)},a.course_title)),S.a.createElement("p",{className:"order-content text-overflow-2"},a.simpledescription),S.a.createElement("p",{className:"order-des"},S.a.createElement("span",{className:"order-newprice"},"\xa5",a.price1),S.a.createElement("span",{className:"order-price"},"\xa5",a.price0)));return S.a.createElement(P.i,{handleClick:e.print,key:t,img:a.image_name,id:a.course_id,info:n})}),S.a.createElement(l.a,{size:"md"}),S.a.createElement("div",{className:"order-number"},S.a.createElement(i.a,null,S.a.createElement(o.a,{justify:"between",align:"center",style:{height:"44px"}},S.a.createElement("span",null,"\u652f\u4ed8\u91d1\u989d"),S.a.createElement("span",{className:"money"},"\uffe5".concat(n))))),S.a.createElement(l.a,{size:"md"}),S.a.createElement(w.a,{renderHeader:function(){return"\u652f\u4ed8\u65b9\u5f0f"},className:"pay-type-list"},k.map(function(a){return S.a.createElement(j,{thumb:S.a.createElement("i",{className:"iconfont ".concat(a.icon," ").concat(c===a.value?"checked":"")}),key:a.value,checked:c===a.value,onChange:function(){return e.onChange(a.value)}},2===a.value?S.a.createElement(o.a,{direction:"column",align:"start",style:{width:"100%",marginTop:"6px"}},S.a.createElement(o.a,{direction:"row",justify:"between",style:{width:"100%",paddingRight:"30px"}},S.a.createElement("span",{style:{color:"#555555",fontSize:"14px"}},a.label),r?S.a.createElement("span",{style:{color:"#333333",fontSize:"12px"}},"".concat(s,"\u5143 \xd7 ").concat(d,"\u671f")):null),S.a.createElement(o.a,{justify:"start"},S.a.createElement("span",{style:{color:"#999999",fontSize:"12px"}},"\u652f\u4ed8\u4e0a\u9650\u53d7\u9650\u4e8e\u60a8\u7684\u82b1\u5457\u989d\u5ea6"))):a.label)})),S.a.createElement("div",{className:"pay-tip"},"\u8bf7\u572815\u5206\u949f\u5185\u5b8c\u6210\u652f\u4ed8\uff0c\u5426\u5219\u5c4a\u65f6\u7cfb\u7edf\u5c06\u5173\u95ed\u8be5\u8ba2\u5355\u3002"),S.a.createElement("div",{className:"pay-button",onClick:this.pay},"\u786e\u8ba4\u652f\u4ed8"),p?S.a.createElement("div",{className:"check-staging"},S.a.createElement("div",{className:"container"},S.a.createElement("p",{className:"check-title"},"\u8bf7\u9009\u62e9\u5206\u671f"),u.map(function(a){return S.a.createElement(j,{key:a.value,checked:y===a.value,onChange:function(){return e.checkStaging(a)}},"".concat(a.everyTotal,"\u5143 \xd7 ").concat(a.stage,"\u671f"),S.a.createElement(w.a.Item.Brief,null,"\u624b\u7eed\u8d39".concat(a.serviceFee,"\u5143/\u671f\uff0c\u8d39\u7387").concat(a.moneyRate)))}))):null)}}]),a}(E.Component)},894:function(e,a,t){}}]);
//# sourceMappingURL=PayOrder.70388260.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{1162:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return O});t(155);var n=t(75),c=t.n(n),i=(t(89),t(25)),o=t.n(i),r=(t(154),t(35)),l=t.n(r),s=(t(43),t(14)),d=t.n(s),p=t(7),u=t(8),m=t(10),y=t(9),b=t(11),g=t(157),h=(t(890),t(892)),f=t.n(h),v=(t(115),t(46)),w=t.n(v),E=t(0),S=t.n(E),x=t(4),_=t(30),j=t(19),k=(t(894),w.a.Item.Brief,f.a.RadioItem),P=[];P=x.a.isWeixin?[{value:1,label:"\u5fae\u4fe1\u652f\u4ed8",icon:"iconweixinzhifu"}]:[{value:0,label:"\u652f\u4ed8\u5b9d",icon:"iconzhifubaox-"},{value:1,label:"\u5fae\u4fe1\u652f\u4ed8",icon:"iconweixinzhifu"}];var O=function(e){function a(e){var t;return Object(p.a)(this,a),(t=Object(m.a)(this,Object(y.a)(a).call(this,e))).redirectAfterPay=function(){var e=Object(x.b)("status"),a=Object(x.b)("type"),n=Object(x.b)("oid"),c=t.props.history;(e||a)&&(0===parseInt(e,10)?2===parseInt(a,10)?c.push("/togroup?id=".concat(n)):c.push("/purchased"):d.a.info("\u652f\u4ed8\u5f02\u5e38",2))},t.onChange=function(e){t.setState({payType:e,checkPeriod:!1}),2===e&&t.setState({huabei:!0})},t.checkStaging=function(e){console.log(e),t.setState({huabei:!1,stageNumber:e.value,singleMoney:e.everyTotal,periodNumber:e.stage,checkPeriod:!0})},t.print=function(){for(var e=arguments.length,a=new Array(e),t=0;t<e;t++)a[t]=arguments[t];console.log(a)},t.pay=function(){var e=t.state,a=e.payType,n=e.orderId;0===a?t.alipayPay(n):1===a&&t.weixinPay(n)},t.weixinPay=function(e){Object(x.e)()?window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="+encodeURIComponent(window.location.href+"&aa=bb").toLowerCase()+"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect":x.c.get("".concat(API["base-api"],"/pay/wxpay/wap_charge/oid/").concat(e)).then(function(e){console.log(e),0===e.data.errno?window.location.href=e.data.data.url+"&redirect_url="+encodeURIComponent(window.location.href+"&weixinpay=1").toLowerCase():d.a.info(e.data.msg,2)})},t.isweixinPay=function(){var e=Object(g.a)(Object(g.a)(t)),a=Object(x.b)("code");if(a){if(void 0===Object(x.b)("oid"))return;x.c.get("".concat(API["base-api"],"/pay/wxpay/pub_charge/oid/").concat(Object(x.b)("oid"),"/code/").concat(a)).then(function(a){if(0===a.data.errno){var t=function(){WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:n.appId,timeStamp:n.timeStamp,nonceStr:n.nonceStr,package:n.package,signType:n.signType,paySign:n.paySign},function(a){"get_brand_wcpay_request:ok"==a.err_msg?(d.a.info("\u652f\u4ed8\u6210\u529f",2),e.intervalPayStatus=setInterval(function(){x.c.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(x.b)("oid"))).then(function(a){401===a.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,x.c.get("".concat(API["base-api"],"/m/app_order/detail/").concat(Object(x.b)("oid"))).then(function(a){2===Number(a.data.data.course_type)?e.props.history.replace("/togroup?id=".concat(Object(x.b)("oid"))):e.props.history.replace("/purchased")}))})},1e3)):alert("\u652f\u4ed8\u5931\u8d25")})},n=a.data.data;"undefined"==typeof WeixinJSBridge?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",t,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",t),document.attachEvent("onWeixinJSBridgeReady",t)):t()}else d.a.info(a.data.msg,2)})}},t.payCallback=function(){var e=Object(g.a)(Object(g.a)(t));e.intervalPayStatus=setInterval(function(){x.c.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(x.b)("oid"))).then(function(a){401===a.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,x.c.get("".concat(API["base-api"],"/m/app_order/detail/").concat(Object(x.b)("oid"))).then(function(a){2===Number(a.data.data.course_type)?e.props.history.replace("/togroup?id=".concat(Object(x.b)("oid"))):e.props.history.replace("/purchased")}))})},1e3)},t.onBridgeReady1=function(e){var a=Object(g.a)(Object(g.a)(t));e=e||a.BridgeData,WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:"wx23dac6775ac82877",timeStamp:e.timeStamp,nonceStr:e.nonceStr,package:e.package,signType:e.signType,paySign:e.paySign},function(e){"get_brand_wcpay_request:ok"==e.err_msg?(d.a.info("\u652f\u4ed8\u6210\u529f",2),a.payCallback()):alert("\u652f\u4ed8\u5931\u8d25")})},t.alipayPay=function(e){x.c.get("".concat(API["base-api"],"/pay/alipay/wap_charge_new/oid/").concat(e)).then(function(e){0===e.data.errno?(t.payCallback(),window.location=e.data.data.url):d.a.info(e.data.msg,2)})},t.huabeiPay=function(e){var a=t.state,n=(a.singleMoney,a.periodNumber);console.log("\u82b1\u5457\u5206\u671f\u652f\u4ed8"),x.c.get("/pay/alipay/wap_charge/oid/".concat(e,"/plat/{plat} /hb_num/").concat(n)).then(function(e){console.log(e),0===e.data.errno?window.location=e.data.data.url:d.a.info(e.data.msg,2)})},t.state={pay_amount:0,payType:0,stageNumber:0,checkPeriod:!1,singleMoney:0,periodNumber:0,orderId:Object(x.b)("oid"),huabei:!1,fenqiList:[{value:"zhifubao",qishu:"3",lilv:"2.30%",everyMoney:300,feiyong:2.3},{value:"weixin",qishu:"6",lilv:"4.50%",everyMoney:150,feiyong:4.5},{value:"huabei",qishu:"9",lilv:"7.50%",everyMoney:100,feiyong:7.5}],categoryList:[]},t}return Object(b.a)(a,e),Object(u.a)(a,[{key:"componentDidMount",value:function(){var e=this;this.redirectAfterPay(),x.c.post("".concat(API["base-api"],"/m/order/detail"),{order_id:this.state.orderId}).then(function(a){if(console.log(a),200===a.data.errno){var t=a.data.data,n=t.course,c=t.pay_amount,i=[];[1,2,3].map(function(e){var a={};a.value=e,1===e?(a.stage=3,a.moneyRate="2.30%",a.rate=.023,a.periodic=(c/3).toFixed(2)):2===e?(a.stage=6,a.moneyRate="4.50%",a.rate=.045,a.periodic=(c/6).toFixed(2)):(a.stage=12,a.moneyRate="7.50%",a.rate=.075,a.periodic=(c/9).toFixed(2)),a.serviceFee=(c*a.rate/a.stage).toFixed(2),a.everyTotal=(parseFloat(a.periodic)+parseFloat(a.serviceFee)).toFixed(2),i.push(a)}),console.log(i),e.setState({pay_amount:c,categoryList:n,fenqiList:i})}else d.a.info(a.data.msg,2)}),(1===Object(x.b)("is_class")||Object(x.b)("weixinpay"))&&this.payCallback(),Object(x.e)()&&(this.setState({payType:1}),this.isweixinPay())}},{key:"render",value:function(){var e=this,a=this.state,t=a.orderId,n=a.pay_amount,i=a.payType,r=a.checkPeriod,s=a.singleMoney,d=a.periodNumber,p=a.huabei,u=a.fenqiList,m=a.categoryList,y=a.stageNumber;return S.a.createElement("div",{className:"pay-order"},S.a.createElement(_.e,{title:"\u786e\u8ba4\u652f\u4ed8",arrow:!0}),S.a.createElement(l.a,{size:"sm"}),S.a.createElement("div",{className:"order-number"},S.a.createElement(c.a,null,S.a.createElement(o.a,{justify:"between",align:"center",style:{height:"44px"}},S.a.createElement("span",null,"\u8ba2\u5355\u53f7"),S.a.createElement("span",{className:"number"},t)))),S.a.createElement(l.a,{size:"md"}),m.map(function(a,t){var n=S.a.createElement("div",{className:"order-info"},S.a.createElement("p",{className:"order-title text-overflow-one"},S.a.createElement(j.b,{to:"/detail?id=".concat(a.course_id)},a.course_title)),S.a.createElement("p",{className:"order-content text-overflow-2"},a.simpledescription),S.a.createElement("p",{className:"order-des"},S.a.createElement("span",{className:"order-newprice"},"\xa5",a.price1),S.a.createElement("span",{className:"order-price"},"\xa5",a.price0)));return S.a.createElement(_.i,{handleClick:e.print,key:t,img:a.image_name,id:a.course_id,info:n})}),S.a.createElement(l.a,{size:"md"}),S.a.createElement("div",{className:"order-number"},S.a.createElement(c.a,null,S.a.createElement(o.a,{justify:"between",align:"center",style:{height:"44px"}},S.a.createElement("span",null,"\u652f\u4ed8\u91d1\u989d"),S.a.createElement("span",{className:"money"},"\uffe5".concat(n))))),S.a.createElement(l.a,{size:"md"}),S.a.createElement(w.a,{renderHeader:function(){return"\u652f\u4ed8\u65b9\u5f0f"},className:"pay-type-list"},P.map(function(a){return S.a.createElement(k,{thumb:S.a.createElement("i",{className:"iconfont ".concat(a.icon," ").concat(i===a.value?"checked":"")}),key:a.value,checked:i===a.value,onChange:function(){return e.onChange(a.value)}},2===a.value?S.a.createElement(o.a,{direction:"column",align:"start",style:{width:"100%",marginTop:"6px"}},S.a.createElement(o.a,{direction:"row",justify:"between",style:{width:"100%",paddingRight:"30px"}},S.a.createElement("span",{style:{color:"#555555",fontSize:"14px"}},a.label),r?S.a.createElement("span",{style:{color:"#333333",fontSize:"12px"}},"".concat(s,"\u5143 \xd7 ").concat(d,"\u671f")):null),S.a.createElement(o.a,{justify:"start"},S.a.createElement("span",{style:{color:"#999999",fontSize:"12px"}},"\u652f\u4ed8\u4e0a\u9650\u53d7\u9650\u4e8e\u60a8\u7684\u82b1\u5457\u989d\u5ea6"))):a.label)})),S.a.createElement("div",{className:"pay-tip"},"\u8bf7\u572815\u5206\u949f\u5185\u5b8c\u6210\u652f\u4ed8\uff0c\u5426\u5219\u5c4a\u65f6\u7cfb\u7edf\u5c06\u5173\u95ed\u8be5\u8ba2\u5355\u3002"),S.a.createElement("div",{className:"pay-button",onClick:this.pay},"\u786e\u8ba4\u652f\u4ed8"),p?S.a.createElement("div",{className:"check-staging"},S.a.createElement("div",{className:"container"},S.a.createElement("p",{className:"check-title"},"\u8bf7\u9009\u62e9\u5206\u671f"),u.map(function(a){return S.a.createElement(k,{key:a.value,checked:y===a.value,onChange:function(){return e.checkStaging(a)}},"".concat(a.everyTotal,"\u5143 \xd7 ").concat(a.stage,"\u671f"),S.a.createElement(w.a.Item.Brief,null,"\u624b\u7eed\u8d39".concat(a.serviceFee,"\u5143/\u671f\uff0c\u8d39\u7387").concat(a.moneyRate)))}))):null)}}]),a}(E.Component)},894:function(e,a,t){}}]);
//# sourceMappingURL=PayOrder.d2e70b7c.chunk.js.map
\ No newline at end of file
!function(e){function r(r){for(var n,a,i=r[0],f=r[1],u=r[2],s=0,l=[];s<i.length;s++)a=i[s],o[a]&&l.push(o[a][0]),o[a]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(d&&d(r);l.length;)l.shift()();return c.push.apply(c,u||[]),t()}function t(){for(var e,r=0;r<c.length;r++){for(var t=c[r],n=!0,a=1;a<t.length;a++){var f=t[a];0!==o[f]&&(n=!1)}n&&(c.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},a={18:0},o={18:0},c=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.e=function(e){var r=[];a[e]?r.push(a[e]):0!==a[e]&&{0:1,1:1,2:1,3:1,4:1,6:1,8:1,9:1,10:1,11:1,12:1,13:1,14:1,16:1,17:1,19:1,20:1,21:1,22:1,23:1,26:1,28:1,29:1,30:1,31:1}[e]&&r.push(a[e]=new Promise(function(r,t){for(var n="static/css/"+({0:"BargainMiddlePage",1:"Classify",2:"CourseList",3:"DrawDocument",4:"Examination",5:"MyEdit",6:"Order",7:"Orderinfo",8:"PayOrder",9:"Preferential",10:"SearchResult",11:"ShopCart",12:"aist-share",13:"coupons",14:"detail",16:"myorders",17:"purchased",19:"search",20:"shareposter",21:"study",22:"togroup",23:"video"}[e]||e)+"."+{0:"1330aa25",1:"7fbe91f5",2:"2444c6c2",3:"58508f31",4:"02475a25",5:"31d6cfe0",6:"27452a78",7:"31d6cfe0",8:"c6bfd7c7",9:"aced1689",10:"82efa3c3",11:"0eb49f0c",12:"01bc9663",13:"c48c0144",14:"441b561b",16:"9a1ad590",17:"048d84f3",19:"5e0245a0",20:"728e4385",21:"89ec4e53",22:"acc61e40",23:"b26a0a19",25:"31d6cfe0",26:"b8256974",27:"31d6cfe0",28:"415f421f",29:"fd1b61f1",30:"44620a41",31:"ffbe0560"}[e]+".chunk.css",o=i.p+n,c=document.getElementsByTagName("link"),f=0;f<c.length;f++){var u=(d=c[f]).getAttribute("data-href")||d.getAttribute("href");if("stylesheet"===d.rel&&(u===n||u===o))return r()}var s=document.getElementsByTagName("style");for(f=0;f<s.length;f++){var d;if((u=(d=s[f]).getAttribute("data-href"))===n||u===o)return r()}var l=document.createElement("link");l.rel="stylesheet",l.type="text/css",l.onload=r,l.onerror=function(r){var n=r&&r.target&&r.target.src||o,c=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");c.request=n,delete a[e],l.parentNode.removeChild(l),t(c)},l.href=o,document.getElementsByTagName("head")[0].appendChild(l)}).then(function(){a[e]=0}));var t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise(function(r,n){t=o[e]=[r,n]});r.push(t[2]=n);var c,f=document.createElement("script");f.charset="utf-8",f.timeout=120,i.nc&&f.setAttribute("nonce",i.nc),f.src=function(e){return i.p+"static/js/"+({0:"BargainMiddlePage",1:"Classify",2:"CourseList",3:"DrawDocument",4:"Examination",5:"MyEdit",6:"Order",7:"Orderinfo",8:"PayOrder",9:"Preferential",10:"SearchResult",11:"ShopCart",12:"aist-share",13:"coupons",14:"detail",16:"myorders",17:"purchased",19:"search",20:"shareposter",21:"study",22:"togroup",23:"video"}[e]||e)+"."+{0:"e5d8e818",1:"e916e3c7",2:"ce7d7850",3:"947fa78f",4:"7713915d",5:"98497c0f",6:"b90f236a",7:"51c41ecf",8:"70388260",9:"b24ff476",10:"c9135653",11:"211075c9",12:"6cbe2a17",13:"6d3debdb",14:"68944339",16:"48cf3d2a",17:"61f91062",19:"fc659642",20:"c15f3373",21:"324a234f",22:"3bff14dc",23:"1ddc0437",25:"403aae65",26:"219a86a3",27:"33496196",28:"52f97b1b",29:"7fc87b4e",30:"4e4a3ca9",31:"57a6441b"}[e]+".chunk.js"}(e),c=function(r){f.onerror=f.onload=null,clearTimeout(u);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src,c=new Error("Loading chunk "+e+" failed.\n("+n+": "+a+")");c.type=n,c.request=a,t[1](c)}o[e]=void 0}};var u=setTimeout(function(){c({type:"timeout",target:f})},12e4);f.onerror=f.onload=c,document.head.appendChild(f)}return Promise.all(r)},i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,function(r){return e[r]}.bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="/",i.oe=function(e){throw console.error(e),e};var f=window.webpackJsonp=window.webpackJsonp||[],u=f.push.bind(f);f.push=r,f=f.slice();for(var s=0;s<f.length;s++)r(f[s]);var d=u;t()}([]); !function(e){function r(r){for(var n,a,i=r[0],f=r[1],u=r[2],d=0,l=[];d<i.length;d++)a=i[d],o[a]&&l.push(o[a][0]),o[a]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(s&&s(r);l.length;)l.shift()();return c.push.apply(c,u||[]),t()}function t(){for(var e,r=0;r<c.length;r++){for(var t=c[r],n=!0,a=1;a<t.length;a++){var f=t[a];0!==o[f]&&(n=!1)}n&&(c.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},a={18:0},o={18:0},c=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.e=function(e){var r=[];a[e]?r.push(a[e]):0!==a[e]&&{0:1,1:1,2:1,3:1,4:1,6:1,8:1,9:1,10:1,11:1,12:1,13:1,14:1,16:1,17:1,19:1,20:1,21:1,22:1,23:1,26:1,28:1,29:1,30:1,31:1}[e]&&r.push(a[e]=new Promise(function(r,t){for(var n="static/css/"+({0:"BargainMiddlePage",1:"Classify",2:"CourseList",3:"DrawDocument",4:"Examination",5:"MyEdit",6:"Order",7:"Orderinfo",8:"PayOrder",9:"Preferential",10:"SearchResult",11:"ShopCart",12:"aist-share",13:"coupons",14:"detail",16:"myorders",17:"purchased",19:"search",20:"shareposter",21:"study",22:"togroup",23:"video"}[e]||e)+"."+{0:"1330aa25",1:"7fbe91f5",2:"2444c6c2",3:"58508f31",4:"02475a25",5:"31d6cfe0",6:"27452a78",7:"31d6cfe0",8:"c6bfd7c7",9:"aced1689",10:"82efa3c3",11:"0eb49f0c",12:"01bc9663",13:"c48c0144",14:"441b561b",16:"9a1ad590",17:"048d84f3",19:"5e0245a0",20:"728e4385",21:"89ec4e53",22:"acc61e40",23:"b26a0a19",25:"31d6cfe0",26:"b8256974",27:"31d6cfe0",28:"415f421f",29:"fd1b61f1",30:"44620a41",31:"ffbe0560"}[e]+".chunk.css",o=i.p+n,c=document.getElementsByTagName("link"),f=0;f<c.length;f++){var u=(s=c[f]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(u===n||u===o))return r()}var d=document.getElementsByTagName("style");for(f=0;f<d.length;f++){var s;if((u=(s=d[f]).getAttribute("data-href"))===n||u===o)return r()}var l=document.createElement("link");l.rel="stylesheet",l.type="text/css",l.onload=r,l.onerror=function(r){var n=r&&r.target&&r.target.src||o,c=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");c.request=n,delete a[e],l.parentNode.removeChild(l),t(c)},l.href=o,document.getElementsByTagName("head")[0].appendChild(l)}).then(function(){a[e]=0}));var t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise(function(r,n){t=o[e]=[r,n]});r.push(t[2]=n);var c,f=document.createElement("script");f.charset="utf-8",f.timeout=120,i.nc&&f.setAttribute("nonce",i.nc),f.src=function(e){return i.p+"static/js/"+({0:"BargainMiddlePage",1:"Classify",2:"CourseList",3:"DrawDocument",4:"Examination",5:"MyEdit",6:"Order",7:"Orderinfo",8:"PayOrder",9:"Preferential",10:"SearchResult",11:"ShopCart",12:"aist-share",13:"coupons",14:"detail",16:"myorders",17:"purchased",19:"search",20:"shareposter",21:"study",22:"togroup",23:"video"}[e]||e)+"."+{0:"e5d8e818",1:"e916e3c7",2:"ce7d7850",3:"947fa78f",4:"7713915d",5:"98497c0f",6:"b90f236a",7:"51c41ecf",8:"d2e70b7c",9:"b24ff476",10:"c9135653",11:"211075c9",12:"6cbe2a17",13:"6d3debdb",14:"68944339",16:"48cf3d2a",17:"61f91062",19:"fc659642",20:"c15f3373",21:"324a234f",22:"3bff14dc",23:"1ddc0437",25:"403aae65",26:"219a86a3",27:"33496196",28:"52f97b1b",29:"7fc87b4e",30:"4e4a3ca9",31:"57a6441b"}[e]+".chunk.js"}(e),c=function(r){f.onerror=f.onload=null,clearTimeout(u);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src,c=new Error("Loading chunk "+e+" failed.\n("+n+": "+a+")");c.type=n,c.request=a,t[1](c)}o[e]=void 0}};var u=setTimeout(function(){c({type:"timeout",target:f})},12e4);f.onerror=f.onload=c,document.head.appendChild(f)}return Promise.all(r)},i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,function(r){return e[r]}.bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="/",i.oe=function(e){throw console.error(e),e};var f=window.webpackJsonp=window.webpackJsonp||[],u=f.push.bind(f);f.push=r,f=f.slice();for(var d=0;d<f.length;d++)r(f[d]);var s=u;t()}([]);
//# sourceMappingURL=runtime~main.0033259e.js.map //# sourceMappingURL=runtime~main.fdda3d0e.js.map
\ No newline at end of file \ No newline at end of file
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