Commit faa58e84 by xuzhenghua

app

parents 32fc01e7 0f10e25a
...@@ -38,8 +38,8 @@ ...@@ -38,8 +38,8 @@
"Orderinfo.js": "/mrstatic/js/Orderinfo.57e0641d.chunk.js", "Orderinfo.js": "/mrstatic/js/Orderinfo.57e0641d.chunk.js",
"Orderinfo.js.map": "/mrstatic/js/Orderinfo.57e0641d.chunk.js.map", "Orderinfo.js.map": "/mrstatic/js/Orderinfo.57e0641d.chunk.js.map",
"PayOrder.css": "/mrstatic/css/PayOrder.7eb7d317.chunk.css", "PayOrder.css": "/mrstatic/css/PayOrder.7eb7d317.chunk.css",
"PayOrder.js": "/mrstatic/js/PayOrder.da800e1a.chunk.js", "PayOrder.js": "/mrstatic/js/PayOrder.21e0b5d0.chunk.js",
"PayOrder.js.map": "/mrstatic/js/PayOrder.da800e1a.chunk.js.map", "PayOrder.js.map": "/mrstatic/js/PayOrder.21e0b5d0.chunk.js.map",
"Preferential.css": "/mrstatic/css/Preferential.0c91fa43.chunk.css", "Preferential.css": "/mrstatic/css/Preferential.0c91fa43.chunk.css",
"Preferential.js": "/mrstatic/js/Preferential.a868f51f.chunk.js", "Preferential.js": "/mrstatic/js/Preferential.a868f51f.chunk.js",
"Preferential.js.map": "/mrstatic/js/Preferential.a868f51f.chunk.js.map", "Preferential.js.map": "/mrstatic/js/Preferential.a868f51f.chunk.js.map",
...@@ -56,8 +56,8 @@ ...@@ -56,8 +56,8 @@
"aist-share.js": "/mrstatic/js/aist-share.3a04b022.chunk.js", "aist-share.js": "/mrstatic/js/aist-share.3a04b022.chunk.js",
"aist-share.js.map": "/mrstatic/js/aist-share.3a04b022.chunk.js.map", "aist-share.js.map": "/mrstatic/js/aist-share.3a04b022.chunk.js.map",
"blessing-preheat.css": "/mrstatic/css/blessing-preheat.3ea8b615.chunk.css", "blessing-preheat.css": "/mrstatic/css/blessing-preheat.3ea8b615.chunk.css",
"blessing-preheat.js": "/mrstatic/js/blessing-preheat.7c7b79ec.chunk.js", "blessing-preheat.js": "/mrstatic/js/blessing-preheat.67d508c4.chunk.js",
"blessing-preheat.js.map": "/mrstatic/js/blessing-preheat.7c7b79ec.chunk.js.map", "blessing-preheat.js.map": "/mrstatic/js/blessing-preheat.67d508c4.chunk.js.map",
"blessing-rank.css": "/mrstatic/css/blessing-rank.edf00bf8.chunk.css", "blessing-rank.css": "/mrstatic/css/blessing-rank.edf00bf8.chunk.css",
"blessing-rank.js": "/mrstatic/js/blessing-rank.9beb2e6a.chunk.js", "blessing-rank.js": "/mrstatic/js/blessing-rank.9beb2e6a.chunk.js",
"blessing-rank.js.map": "/mrstatic/js/blessing-rank.9beb2e6a.chunk.js.map", "blessing-rank.js.map": "/mrstatic/js/blessing-rank.9beb2e6a.chunk.js.map",
...@@ -85,8 +85,8 @@ ...@@ -85,8 +85,8 @@
"purchased.css": "/mrstatic/css/purchased.bb758677.chunk.css", "purchased.css": "/mrstatic/css/purchased.bb758677.chunk.css",
"purchased.js": "/mrstatic/js/purchased.a38723f4.chunk.js", "purchased.js": "/mrstatic/js/purchased.a38723f4.chunk.js",
"purchased.js.map": "/mrstatic/js/purchased.a38723f4.chunk.js.map", "purchased.js.map": "/mrstatic/js/purchased.a38723f4.chunk.js.map",
"runtime~main.js": "/mrstatic/js/runtime~main.b262433f.js", "runtime~main.js": "/mrstatic/js/runtime~main.fca95e3f.js",
"runtime~main.js.map": "/mrstatic/js/runtime~main.b262433f.js.map", "runtime~main.js.map": "/mrstatic/js/runtime~main.fca95e3f.js.map",
"search.css": "/mrstatic/css/search.5716d9b3.chunk.css", "search.css": "/mrstatic/css/search.5716d9b3.chunk.css",
"search.js": "/mrstatic/js/search.589ab26a.chunk.js", "search.js": "/mrstatic/js/search.589ab26a.chunk.js",
"search.js.map": "/mrstatic/js/search.589ab26a.chunk.js.map", "search.js.map": "/mrstatic/js/search.589ab26a.chunk.js.map",
...@@ -166,6 +166,6 @@ ...@@ -166,6 +166,6 @@
"mrstatic/media/iconfont.css": "/mrstatic/media/iconfont.e0655d4d.woff", "mrstatic/media/iconfont.css": "/mrstatic/media/iconfont.e0655d4d.woff",
"mrstatic/media/kanjia_cg_icon.png": "/mrstatic/media/kanjia_cg_icon.81a489ac.png", "mrstatic/media/kanjia_cg_icon.png": "/mrstatic/media/kanjia_cg_icon.81a489ac.png",
"mrstatic/media/video.scss": "/mrstatic/media/progress-share-bg.80011994.png", "mrstatic/media/video.scss": "/mrstatic/media/progress-share-bg.80011994.png",
"precache-manifest.e12c4aa7f7a32ed7a01bb6564544cbe9.js": "/precache-manifest.e12c4aa7f7a32ed7a01bb6564544cbe9.js", "precache-manifest.31c8f36b2ba83b92f8723a3a7a0e70cf.js": "/precache-manifest.31c8f36b2ba83b92f8723a3a7a0e70cf.js",
"service-worker.js": "/service-worker.js" "service-worker.js": "/service-worker.js"
} }
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{1213:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return P});t(155);var n=t(74),i=t.n(n),c=(t(90),t(26)),o=t.n(c),r=(t(154),t(35)),s=t.n(r),l=(t(41),t(12)),d=t.n(l),p=t(4),u=t(7),m=t(5),y=t(8),f=t(89),g=t(9),h=(t(639),t(640)),b=t.n(h),v=(t(118),t(47)),w=t.n(v),E=t(0),S=t.n(E),x=t(3),_=t(27),k=t(15),j=(t(916),w.a.Item.Brief,b.a.RadioItem),I=[];I=x.b.isWeixin?[{value:1,label:"\u5fae\u4fe1\u652f\u4ed8",icon:"iconweixinzhifu"}]:[{value:1,label:"\u5fae\u4fe1\u652f\u4ed8",icon:"iconweixinzhifu"},{value:0,label:"\u652f\u4ed8\u5b9d",icon:"iconalipay"}];var P=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.c)("status"),a=Object(x.c)("type"),n=Object(x.c)("oid"),i=t.props.history;if(e||a)if(0===parseInt(e,10))if(2===parseInt(a,10))i.push("/togroup?id=".concat(n));else if(4===parseInt(a,10)){c&&window.localStorage.setItem("payCourse",c);var c=window.localStorage.getItem("payCourse");c&&i.push("/detail?id=".concat(c),{oid:n})}else i.push("/purchased");else 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){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.f)()?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.d.get("".concat(API["base-api"],"/pay/wxpay/wap_charge/oid/").concat(e)).then(function(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(f.a)(t),a=Object(x.c)("code");if(a){if(void 0===Object(x.c)("oid"))return;x.d.get("".concat(API["base-api"],"/pay/wxpay/pub_charge/oid/").concat(Object(x.c)("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.d.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(x.c)("oid"))).then(function(a){401===a.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,x.d.get("".concat(API["base-api"],"/m/app_order/detail/").concat(Object(x.c)("oid"))).then(function(a){2===Number(a.data.data.course_type)?e.props.history.replace("/togroup?id=".concat(Object(x.c)("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(f.a)(t);e.intervalPayStatus=setInterval(function(){x.d.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(x.c)("oid"))).then(function(a){401===a.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,x.d.get("".concat(API["base-api"],"/m/app_order/detail/").concat(Object(x.c)("oid"))).then(function(a){2===Number(a.data.data.course_type)?e.props.history.replace("/togroup?id=".concat(Object(x.c)("oid"))):e.props.history.replace("/purchased")}))})},1e3)},t.onBridgeReady1=function(e){var a=Object(f.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.d.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);x.d.get("/pay/alipay/wap_charge/oid/".concat(e,"/plat/{plat} /hb_num/").concat(n)).then(function(e){0===e.data.errno?window.location=e.data.data.url:d.a.info(e.data.msg,2)})},t.state={pay_amount:0,payType:1,stageNumber:0,checkPeriod:!1,singleMoney:0,periodNumber:0,orderId:Object(x.c)("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();var a={};a=this.props.location.state&&this.props.location.state.group?{order_id:this.state.orderId,type:2}:{order_id:this.state.orderId},x.d.post("".concat(API["base-api"],"/m/order/detail"),a).then(function(a){if(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)}),e.setState({pay_amount:i,categoryList:n,fenqiList:c})}else d.a.info(a.data.msg,2)}),(1===Object(x.c)("is_class")||Object(x.c)("weixinpay"))&&this.payCallback(),Object(x.f)()&&(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,l=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(s.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(s.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(k.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(_.j,{handleClick:e.print,key:t,img:a.image_name,id:a.course_id,info:n})}),S.a.createElement(s.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(s.a,{size:"md"}),S.a.createElement(w.a,{renderHeader:function(){return"\u652f\u4ed8\u65b9\u5f0f"},className:"pay-type-list"},I.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(l,"\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)},916:function(e,a,t){}}]); (window.webpackJsonp=window.webpackJsonp||[]).push([[14],{1213:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return P});t(155);var n=t(74),i=t.n(n),c=(t(90),t(26)),o=t.n(c),r=(t(154),t(35)),s=t.n(r),l=(t(41),t(12)),d=t.n(l),p=t(4),u=t(7),m=t(5),y=t(8),f=t(89),g=t(9),h=(t(639),t(640)),b=t.n(h),v=(t(118),t(47)),w=t.n(v),E=t(0),S=t.n(E),x=t(3),_=t(27),k=t(15),j=(t(916),w.a.Item.Brief,b.a.RadioItem),I=[];I=x.b.isWeixin?[{value:1,label:"\u5fae\u4fe1\u652f\u4ed8",icon:"iconweixinzhifu"}]:[{value:1,label:"\u5fae\u4fe1\u652f\u4ed8",icon:"iconweixinzhifu"},{value:0,label:"\u652f\u4ed8\u5b9d",icon:"iconalipay"}];var P=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.c)("status"),a=Object(x.c)("type"),n=Object(x.c)("oid"),i=t.props.history;if(e||a)if(0===parseInt(e,10))if(2===parseInt(a,10))i.push("/togroup?id=".concat(n));else if(4===parseInt(a,10)){c&&window.localStorage.setItem("payCourse",c);var c=window.localStorage.getItem("payCourse");c&&i.push("/detail?id=".concat(c),{oid:n})}else i.push("/purchased");else 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){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.f)()?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.d.get("".concat(API["base-api"],"/pay/wxpay/wap_charge/oid/").concat(e)).then(function(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(f.a)(t),a=Object(x.c)("code");if(a){if(void 0===Object(x.c)("oid"))return;x.d.get("".concat(API["base-api"],"/pay/wxpay/pub_charge/oid/").concat(Object(x.c)("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.d.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(x.c)("oid"))).then(function(a){401===a.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,x.d.get("".concat(API["base-api"],"/m/app_order/detail/").concat(Object(x.c)("oid"))).then(function(a){2===Number(a.data.data.course_type)?e.props.history.replace("/togroup?id=".concat(Object(x.c)("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(f.a)(t);e.intervalPayStatus=setInterval(function(){x.d.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(x.c)("oid"))).then(function(a){401===a.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,x.d.get("".concat(API["base-api"],"/m/app_order/detail/").concat(Object(x.c)("oid"))).then(function(a){2===Number(a.data.data.course_type)?e.props.history.replace("/togroup?id=".concat(Object(x.c)("oid"))):e.props.history.replace("/purchased")}))})},1e3)},t.onBridgeReady1=function(e){var a=Object(f.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.d.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);x.d.get("/pay/alipay/wap_charge/oid/".concat(e,"/plat/{plat} /hb_num/").concat(n)).then(function(e){0===e.data.errno?window.location=e.data.data.url:d.a.info(e.data.msg,2)})},t.state={pay_amount:0,payType:1,stageNumber:0,checkPeriod:!1,singleMoney:0,periodNumber:0,orderId:Object(x.c)("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();var a={};a=this.props.location.state&&this.props.location.state.group?{order_id:this.state.orderId,type:2}:{order_id:this.state.orderId},x.d.post("".concat(API["base-api"],"/m/order/detail"),a).then(function(a){if(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)}),e.setState({pay_amount:i,categoryList:n,fenqiList:c})}else d.a.info(a.data.msg,2)}),(1===Object(x.c)("is_class")||Object(x.c)("weixinpay"))&&this.payCallback(),Object(x.f)()&&(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,l=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(s.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(s.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(k.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(_.j,{handleClick:e.print,key:t,img:a.image_name,id:a.course_id,info:n})}),S.a.createElement(s.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(s.a,{size:"md"}),S.a.createElement(w.a,{renderHeader:function(){return"\u652f\u4ed8\u65b9\u5f0f"},className:"pay-type-list"},I.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(l,"\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)},916:function(e,a,t){}}]);
//# sourceMappingURL=PayOrder.da800e1a.chunk.js.map //# sourceMappingURL=PayOrder.21e0b5d0.chunk.js.map
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -100,8 +100,8 @@ self.__precacheManifest = [ ...@@ -100,8 +100,8 @@ self.__precacheManifest = [
"url": "/mrstatic/media/iconfont.7aa984ce.eot" "url": "/mrstatic/media/iconfont.7aa984ce.eot"
}, },
{ {
"revision": "ad77c0ffe9f4fe01787f", "revision": "17e2d9973e72bb3206ae",
"url": "/mrstatic/js/PayOrder.da800e1a.chunk.js" "url": "/mrstatic/js/PayOrder.21e0b5d0.chunk.js"
}, },
{ {
"revision": "e0655d4da66dce391e6b5227b400e037", "revision": "e0655d4da66dce391e6b5227b400e037",
...@@ -148,8 +148,8 @@ self.__precacheManifest = [ ...@@ -148,8 +148,8 @@ self.__precacheManifest = [
"url": "/mrstatic/js/38.6484232f.chunk.js" "url": "/mrstatic/js/38.6484232f.chunk.js"
}, },
{ {
"revision": "ecaaaeb6203b603b4d03", "revision": "55aee8460843efa59700",
"url": "/mrstatic/js/blessing-preheat.7c7b79ec.chunk.js" "url": "/mrstatic/js/blessing-preheat.67d508c4.chunk.js"
}, },
{ {
"revision": "ce643559cbe26713d628", "revision": "ce643559cbe26713d628",
...@@ -208,8 +208,8 @@ self.__precacheManifest = [ ...@@ -208,8 +208,8 @@ self.__precacheManifest = [
"url": "/mrstatic/js/myorders.5cdbf8f6.chunk.js" "url": "/mrstatic/js/myorders.5cdbf8f6.chunk.js"
}, },
{ {
"revision": "b83ecb0e6f73aeb6a3e5", "revision": "bbe2c2b6e757623fc7ea",
"url": "/mrstatic/js/runtime~main.b262433f.js" "url": "/mrstatic/js/runtime~main.fca95e3f.js"
}, },
{ {
"revision": "480dec355e65b21ce336", "revision": "480dec355e65b21ce336",
...@@ -288,7 +288,7 @@ self.__precacheManifest = [ ...@@ -288,7 +288,7 @@ self.__precacheManifest = [
"url": "/mrstatic/css/38.bff100af.chunk.css" "url": "/mrstatic/css/38.bff100af.chunk.css"
}, },
{ {
"revision": "ecaaaeb6203b603b4d03", "revision": "55aee8460843efa59700",
"url": "/mrstatic/css/blessing-preheat.3ea8b615.chunk.css" "url": "/mrstatic/css/blessing-preheat.3ea8b615.chunk.css"
}, },
{ {
...@@ -328,7 +328,7 @@ self.__precacheManifest = [ ...@@ -328,7 +328,7 @@ self.__precacheManifest = [
"url": "/mrstatic/css/Preferential.0c91fa43.chunk.css" "url": "/mrstatic/css/Preferential.0c91fa43.chunk.css"
}, },
{ {
"revision": "ad77c0ffe9f4fe01787f", "revision": "17e2d9973e72bb3206ae",
"url": "/mrstatic/css/PayOrder.7eb7d317.chunk.css" "url": "/mrstatic/css/PayOrder.7eb7d317.chunk.css"
}, },
{ {
...@@ -372,7 +372,7 @@ self.__precacheManifest = [ ...@@ -372,7 +372,7 @@ self.__precacheManifest = [
"url": "/mrstatic/css/2.bf839917.chunk.css" "url": "/mrstatic/css/2.bf839917.chunk.css"
}, },
{ {
"revision": "7d84d307ad21f40c05c977dca4a7ec3b", "revision": "0b6022c61b68b66e0df9ed70d2d09e32",
"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.e12c4aa7f7a32ed7a01bb6564544cbe9.js" "/precache-manifest.31c8f36b2ba83b92f8723a3a7a0e70cf.js"
); );
workbox.clientsClaim(); workbox.clientsClaim();
......
...@@ -206,6 +206,8 @@ class BlessingPreheat extends Component { ...@@ -206,6 +206,8 @@ class BlessingPreheat extends Component {
fetchUserBlessing() { fetchUserBlessing() {
// 判断登录未登录 根据this.state.isLogin // 判断登录未登录 根据this.state.isLogin
Toast.info('fetchUserBlessing', 2)
const {userInfo} = this.state; const {userInfo} = this.state;
http.get(`${API.home}/sys/user/blessing`).then(res => { http.get(`${API.home}/sys/user/blessing`).then(res => {
const {code, data} = res.data const {code, data} = res.data
......
...@@ -23,6 +23,19 @@ export default class RankList extends Component { ...@@ -23,6 +23,19 @@ export default class RankList extends Component {
}); });
} }
formart = (time) => {
let date = time * 1000,
hours = 0,
minutes = 0,
seconds = 0;
hours = `${parseInt(date / (60 * 60 * 1000))}`.padStart(2, 0);
minutes = `${parseInt((date - hours * 3600000) / 60000)}`.padStart(2, 0);
seconds = `${parseInt(
(date - hours * 3600000 - minutes * 60000) / 1000
)}`.padStart(2, 0);
return `${minutes}'${seconds}"`;
}
render() { render() {
let {rankList} = this.state; let {rankList} = this.state;
return ( return (
...@@ -55,7 +68,7 @@ export default class RankList extends Component { ...@@ -55,7 +68,7 @@ export default class RankList extends Component {
<img className="user__avatar" src={item.avatar} /> <img className="user__avatar" src={item.avatar} />
<span className="user__name">{item.user_name}</span> <span className="user__name">{item.user_name}</span>
</div> </div>
<div className='table__body table_head__time'>{item.cost_time}</div> <div className='table__body table_head__time'>{this.formart(item.cost_time)}</div>
<div className='table__body table_head__score'>{item.score}</div> <div className='table__body table_head__score'>{item.score}</div>
<div className='table__body table_head__prize'>{item.prize}</div> <div className='table__body table_head__prize'>{item.prize}</div>
</div> </div>
......
...@@ -112,6 +112,15 @@ export default class PayOrder extends Component { ...@@ -112,6 +112,15 @@ export default class PayOrder extends Component {
// 微信内部-支付 // 微信内部-支付
if (is_weixin()) { if (is_weixin()) {
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"; 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";
// if(window.location.href.indexOf('aa=bb') === -1){
// localStorage.setItem('a', '第一次');
// 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";
// }
// if(window.location.href.indexOf('aa=bb') > 0) {
// localStorage.setItem('a', '多次');
// let newHref = window.location.href.slice(0, window.location.href.indexOf('aa=bb')-1);
// window.location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=" + encodeURIComponent(newHref + "&aa=bb").toLowerCase() + "&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
// }
} else { } else {
// 微信外部-支付 // 微信外部-支付
http.get(`${API['base-api']}/pay/wxpay/wap_charge/oid/${orderId}`).then((res) => { http.get(`${API['base-api']}/pay/wxpay/wap_charge/oid/${orderId}`).then((res) => {
......
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