Commit 082d0292 by wangshuo

Merge branch 'master' of gitlab.julyedu.com:baiguangyao/mr-julyedu

parents aa5da51f cde01b4b
......@@ -2,10 +2,10 @@
"BargainMiddlePage.css": "/static/css/BargainMiddlePage.9e05243b.chunk.css",
"BargainMiddlePage.js": "/static/js/BargainMiddlePage.e9fa548d.chunk.js",
"BargainMiddlePage.js.map": "/static/js/BargainMiddlePage.e9fa548d.chunk.js.map",
"Classify.css": "/static/css/Classify.e3e9b348.chunk.css",
"Classify.css": "/static/css/Classify.9ab7b4fc.chunk.css",
"Classify.js": "/static/js/Classify.ba29a5fa.chunk.js",
"Classify.js.map": "/static/js/Classify.ba29a5fa.chunk.js.map",
"CourseList.css": "/static/css/CourseList.369bce9d.chunk.css",
"CourseList.css": "/static/css/CourseList.93786e44.chunk.css",
"CourseList.js": "/static/js/CourseList.9f29cd97.chunk.js",
"CourseList.js.map": "/static/js/CourseList.9f29cd97.chunk.js.map",
"DrawDocument.css": "/static/css/DrawDocument.2e7d81ca.chunk.css",
......@@ -22,8 +22,8 @@
"Orderinfo.js": "/static/js/Orderinfo.ec770473.chunk.js",
"Orderinfo.js.map": "/static/js/Orderinfo.ec770473.chunk.js.map",
"PayOrder.css": "/static/css/PayOrder.ef3c6288.chunk.css",
"PayOrder.js": "/static/js/PayOrder.cde513f6.chunk.js",
"PayOrder.js.map": "/static/js/PayOrder.cde513f6.chunk.js.map",
"PayOrder.js": "/static/js/PayOrder.6b086701.chunk.js",
"PayOrder.js.map": "/static/js/PayOrder.6b086701.chunk.js.map",
"Preferential.css": "/static/css/Preferential.7456653e.chunk.css",
"Preferential.js": "/static/js/Preferential.70bd3cf5.chunk.js",
"Preferential.js.map": "/static/js/Preferential.70bd3cf5.chunk.js.map",
......@@ -42,24 +42,24 @@
"detail.css": "/static/css/detail.1ccb2ab2.chunk.css",
"detail.js": "/static/js/detail.80854228.chunk.js",
"detail.js.map": "/static/js/detail.80854228.chunk.js.map",
"main.css": "/static/css/main.e27d9d2b.chunk.css",
"main.js": "/static/js/main.65a601d7.chunk.js",
"main.js.map": "/static/js/main.65a601d7.chunk.js.map",
"main.css": "/static/css/main.1fa4914d.chunk.css",
"main.js": "/static/js/main.647fca97.chunk.js",
"main.js.map": "/static/js/main.647fca97.chunk.js.map",
"myorders.css": "/static/css/myorders.5434bc7e.chunk.css",
"myorders.js": "/static/js/myorders.260fcdd9.chunk.js",
"myorders.js.map": "/static/js/myorders.260fcdd9.chunk.js.map",
"purchased.css": "/static/css/purchased.6f6ffdf9.chunk.css",
"purchased.js": "/static/js/purchased.fda2c384.chunk.js",
"purchased.js.map": "/static/js/purchased.fda2c384.chunk.js.map",
"runtime~main.js": "/static/js/runtime~main.9ac258ca.js",
"runtime~main.js.map": "/static/js/runtime~main.9ac258ca.js.map",
"runtime~main.js": "/static/js/runtime~main.b1241241.js",
"runtime~main.js.map": "/static/js/runtime~main.b1241241.js.map",
"search.css": "/static/css/search.01106b05.chunk.css",
"search.js": "/static/js/search.3932de6c.chunk.js",
"search.js.map": "/static/js/search.3932de6c.chunk.js.map",
"shareposter.css": "/static/css/shareposter.82081d02.chunk.css",
"shareposter.js": "/static/js/shareposter.b9e27762.chunk.js",
"shareposter.js.map": "/static/js/shareposter.b9e27762.chunk.js.map",
"study.css": "/static/css/study.65fae490.chunk.css",
"study.css": "/static/css/study.724f37b8.chunk.css",
"study.js": "/static/js/study.1920335a.chunk.js",
"study.js.map": "/static/js/study.1920335a.chunk.js.map",
"togroup.css": "/static/css/togroup.49988cae.chunk.css",
......@@ -91,7 +91,7 @@
"static/js/31.39103831.chunk.js": "/static/js/31.39103831.chunk.js",
"static/js/31.39103831.chunk.js.map": "/static/js/31.39103831.chunk.js.map",
"index.html": "/index.html",
"precache-manifest.4e7bd0687259be4eed6db29cac1e102b.js": "/precache-manifest.4e7bd0687259be4eed6db29cac1e102b.js",
"precache-manifest.7f43faf4182d34c1e988f00a372d233a.js": "/precache-manifest.7f43faf4182d34c1e988f00a372d233a.js",
"service-worker.js": "/service-worker.js",
"static/css/24.257b0329.chunk.css.map": "/static/css/24.257b0329.chunk.css.map",
"static/css/26.1b3a6258.chunk.css.map": "/static/css/26.1b3a6258.chunk.css.map",
......@@ -100,8 +100,8 @@
"static/css/30.ecbb6f9a.chunk.css.map": "/static/css/30.ecbb6f9a.chunk.css.map",
"static/css/31.bc06dce4.chunk.css.map": "/static/css/31.bc06dce4.chunk.css.map",
"static/css/BargainMiddlePage.9e05243b.chunk.css.map": "/static/css/BargainMiddlePage.9e05243b.chunk.css.map",
"static/css/Classify.e3e9b348.chunk.css.map": "/static/css/Classify.e3e9b348.chunk.css.map",
"static/css/CourseList.369bce9d.chunk.css.map": "/static/css/CourseList.369bce9d.chunk.css.map",
"static/css/Classify.9ab7b4fc.chunk.css.map": "/static/css/Classify.9ab7b4fc.chunk.css.map",
"static/css/CourseList.93786e44.chunk.css.map": "/static/css/CourseList.93786e44.chunk.css.map",
"static/css/DrawDocument.2e7d81ca.chunk.css.map": "/static/css/DrawDocument.2e7d81ca.chunk.css.map",
"static/css/Examination.f2cc3163.chunk.css.map": "/static/css/Examination.f2cc3163.chunk.css.map",
"static/css/Order.34d6f553.chunk.css.map": "/static/css/Order.34d6f553.chunk.css.map",
......@@ -112,12 +112,12 @@
"static/css/aist-share.bef8c404.chunk.css.map": "/static/css/aist-share.bef8c404.chunk.css.map",
"static/css/coupons.9ece7350.chunk.css.map": "/static/css/coupons.9ece7350.chunk.css.map",
"static/css/detail.1ccb2ab2.chunk.css.map": "/static/css/detail.1ccb2ab2.chunk.css.map",
"static/css/main.e27d9d2b.chunk.css.map": "/static/css/main.e27d9d2b.chunk.css.map",
"static/css/main.1fa4914d.chunk.css.map": "/static/css/main.1fa4914d.chunk.css.map",
"static/css/myorders.5434bc7e.chunk.css.map": "/static/css/myorders.5434bc7e.chunk.css.map",
"static/css/purchased.6f6ffdf9.chunk.css.map": "/static/css/purchased.6f6ffdf9.chunk.css.map",
"static/css/search.01106b05.chunk.css.map": "/static/css/search.01106b05.chunk.css.map",
"static/css/shareposter.82081d02.chunk.css.map": "/static/css/shareposter.82081d02.chunk.css.map",
"static/css/study.65fae490.chunk.css.map": "/static/css/study.65fae490.chunk.css.map",
"static/css/study.724f37b8.chunk.css.map": "/static/css/study.724f37b8.chunk.css.map",
"static/css/togroup.49988cae.chunk.css.map": "/static/css/togroup.49988cae.chunk.css.map",
"static/css/video.af7bcdf8.chunk.css.map": "/static/css/video.af7bcdf8.chunk.css.map",
"static/media/iconfont.css": "/static/media/iconfont.d9bc424b.woff",
......
......@@ -8,19 +8,19 @@ self.__precacheManifest = [
"url": "/static/css/BargainMiddlePage.9e05243b.chunk.css"
},
{
"revision": "534a90f50ba7f2813b54",
"url": "/static/css/Classify.e3e9b348.chunk.css"
"revision": "94fe100ab02fa50ff2df",
"url": "/static/css/Classify.9ab7b4fc.chunk.css"
},
{
"revision": "534a90f50ba7f2813b54",
"revision": "94fe100ab02fa50ff2df",
"url": "/static/js/Classify.ba29a5fa.chunk.js"
},
{
"revision": "9fb2473e10fa58274da8",
"url": "/static/css/CourseList.369bce9d.chunk.css"
"revision": "6b1c4d247f9c7ee649d9",
"url": "/static/css/CourseList.93786e44.chunk.css"
},
{
"revision": "9fb2473e10fa58274da8",
"revision": "6b1c4d247f9c7ee649d9",
"url": "/static/js/CourseList.9f29cd97.chunk.js"
},
{
......@@ -56,12 +56,12 @@ self.__precacheManifest = [
"url": "/static/js/Orderinfo.ec770473.chunk.js"
},
{
"revision": "439c14f2d1e5db8babae",
"revision": "f5a65cab6522fddea789",
"url": "/static/css/PayOrder.ef3c6288.chunk.css"
},
{
"revision": "439c14f2d1e5db8babae",
"url": "/static/js/PayOrder.cde513f6.chunk.js"
"revision": "f5a65cab6522fddea789",
"url": "/static/js/PayOrder.6b086701.chunk.js"
},
{
"revision": "68b779b486455527de81",
......@@ -112,12 +112,12 @@ self.__precacheManifest = [
"url": "/static/js/detail.80854228.chunk.js"
},
{
"revision": "85830089f80eb74e6a33",
"url": "/static/css/main.e27d9d2b.chunk.css"
"revision": "814be957d3ee1bcda62e",
"url": "/static/css/main.1fa4914d.chunk.css"
},
{
"revision": "85830089f80eb74e6a33",
"url": "/static/js/main.65a601d7.chunk.js"
"revision": "814be957d3ee1bcda62e",
"url": "/static/js/main.647fca97.chunk.js"
},
{
"revision": "26b53577bb0fb2636026",
......@@ -136,8 +136,8 @@ self.__precacheManifest = [
"url": "/static/js/BargainMiddlePage.e9fa548d.chunk.js"
},
{
"revision": "176a75c97fb0dc8fea19",
"url": "/static/js/runtime~main.9ac258ca.js"
"revision": "12d9047188c2eaa8311c",
"url": "/static/js/runtime~main.b1241241.js"
},
{
"revision": "224b9f508a3a5597468b",
......@@ -156,11 +156,11 @@ self.__precacheManifest = [
"url": "/static/js/shareposter.b9e27762.chunk.js"
},
{
"revision": "53b2916253ca1d5f0f19",
"url": "/static/css/study.65fae490.chunk.css"
"revision": "3fb0e9544ff5eaaba2d9",
"url": "/static/css/study.724f37b8.chunk.css"
},
{
"revision": "53b2916253ca1d5f0f19",
"revision": "3fb0e9544ff5eaaba2d9",
"url": "/static/js/study.1920335a.chunk.js"
},
{
......@@ -260,7 +260,7 @@ self.__precacheManifest = [
"url": "/static/css/24.257b0329.chunk.css"
},
{
"revision": "70943fa758fa3b27ebebba71d579486f",
"revision": "b93ee6187f34f707e8a9f42eb9eb140e",
"url": "/index.html"
}
];
\ No newline at end of file
......@@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js");
importScripts(
"/precache-manifest.4e7bd0687259be4eed6db29cac1e102b.js"
"/precache-manifest.7f43faf4182d34c1e988f00a372d233a.js"
);
workbox.clientsClaim();
......
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.
(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{1162:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return j});t(155);var n=t(75),i=t.n(n),o=(t(89),t(25)),c=t.n(o),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(11),y=t(9),g=t(10),h=(t(890),t(892)),f=t.n(h),b=(t(115),t(46)),v=t.n(b),w=t(0),E=t.n(w),x=t(4),k=t(30),N=t(19),_=(t(894),v.a.Item.Brief,f.a.RadioItem),S=[];S=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 j=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,2)})},t.isweixinPay=function(){var e=Object(x.b)("code");if(e){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(e)).then(function(e){if(0===e.data.errno){var a=e.data.data;t.onBridgeReady(a),"undefined"==typeof WeixinJSBridge?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",t.onBridgeReady,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",t.onBridgeReady),document.attachEvent("onWeixinJSBridgeReady",t.onBridgeReady)):t.onBridgeReady()}else d.a.info(e.data.msg,2)})}},t.payCallback=function(){},t.onBridgeReady=function(e){WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:e.appId,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?this.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?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(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,o=[];[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),o.push(a)}),console.log(o),e.setState({pay_amount:i,categoryList:n,fenqiList:o})}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,o=a.payType,r=a.checkPeriod,s=a.singleMoney,d=a.periodNumber,p=a.huabei,u=a.fenqiList,m=a.categoryList,y=a.stageNumber;return E.a.createElement("div",{className:"pay-order"},E.a.createElement(k.e,{title:"\u786e\u8ba4\u652f\u4ed8",arrow:!0}),E.a.createElement(l.a,{size:"sm"}),E.a.createElement("div",{className:"order-number"},E.a.createElement(i.a,null,E.a.createElement(c.a,{justify:"between",align:"center",style:{height:"44px"}},E.a.createElement("span",null,"\u8ba2\u5355\u53f7"),E.a.createElement("span",{className:"number"},t)))),E.a.createElement(l.a,{size:"md"}),m.map(function(a,t){var n=E.a.createElement("div",{className:"order-info"},E.a.createElement("p",{className:"order-title text-overflow-one"},E.a.createElement(N.b,{to:"/detail?id=".concat(a.course_id)},a.course_title)),E.a.createElement("p",{className:"order-content text-overflow-2"},a.simpledescription),E.a.createElement("p",{className:"order-des"},E.a.createElement("span",{className:"order-newprice"},"\xa5",a.price1),E.a.createElement("span",{className:"order-price"},"\xa5",a.price0)));return E.a.createElement(k.i,{handleClick:e.print,key:t,img:a.image_name,id:a.course_id,info:n})}),E.a.createElement(l.a,{size:"md"}),E.a.createElement("div",{className:"order-number"},E.a.createElement(i.a,null,E.a.createElement(c.a,{justify:"between",align:"center",style:{height:"44px"}},E.a.createElement("span",null,"\u652f\u4ed8\u91d1\u989d"),E.a.createElement("span",{className:"money"},"\uffe5".concat(n))))),E.a.createElement(l.a,{size:"md"}),E.a.createElement(v.a,{renderHeader:function(){return"\u652f\u4ed8\u65b9\u5f0f"},className:"pay-type-list"},S.map(function(a){return E.a.createElement(_,{thumb:E.a.createElement("i",{className:"iconfont ".concat(a.icon," ").concat(o===a.value?"checked":"")}),key:a.value,checked:o===a.value,onChange:function(){return e.onChange(a.value)}},2===a.value?E.a.createElement(c.a,{direction:"column",align:"start",style:{width:"100%",marginTop:"6px"}},E.a.createElement(c.a,{direction:"row",justify:"between",style:{width:"100%",paddingRight:"30px"}},E.a.createElement("span",{style:{color:"#555555",fontSize:"14px"}},a.label),r?E.a.createElement("span",{style:{color:"#333333",fontSize:"12px"}},"".concat(s,"\u5143 \xd7 ").concat(d,"\u671f")):null),E.a.createElement(c.a,{justify:"start"},E.a.createElement("span",{style:{color:"#999999",fontSize:"12px"}},"\u652f\u4ed8\u4e0a\u9650\u53d7\u9650\u4e8e\u60a8\u7684\u82b1\u5457\u989d\u5ea6"))):a.label)})),E.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"),E.a.createElement("div",{className:"pay-button",onClick:this.pay},"\u786e\u8ba4\u652f\u4ed8"),p?E.a.createElement("div",{className:"check-staging"},E.a.createElement("div",{className:"container"},E.a.createElement("p",{className:"check-title"},"\u8bf7\u9009\u62e9\u5206\u671f"),u.map(function(a){return E.a.createElement(_,{key:a.value,checked:y===a.value,onChange:function(){return e.checkStaging(a)}},"".concat(a.everyTotal,"\u5143 \xd7 ").concat(a.stage,"\u671f"),E.a.createElement(v.a.Item.Brief,null,"\u624b\u7eed\u8d39".concat(a.serviceFee,"\u5143/\u671f\uff0c\u8d39\u7387").concat(a.moneyRate)))}))):null)}}]),a}(w.Component)},894:function(e,a,t){}}]);
//# sourceMappingURL=PayOrder.6b086701.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 R});t(155);var n=t(75),i=t.n(n),o=(t(89),t(25)),c=t.n(o),r=(t(154),t(35)),l=t.n(r),s=(t(43),t(14)),d=t.n(s),u=t(7),p=t(8),m=t(11),y=t(9),g=t(10),h=(t(890),t(892)),f=t.n(h),b=(t(115),t(46)),v=t.n(b),w=t(0),E=t.n(w),x=t(4),k=t(30),N=t(19),_=(t(894),v.a.Item.Brief,f.a.RadioItem),S=[];S=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 R=function(e){function a(e){var t;return Object(u.a)(this,a),(t=Object(m.a)(this,Object(y.a)(a).call(this,e))).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(x.b)("code");if(e){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(e)).then(function(e){if(0===e.data.errno){var a=e.data.data;t.onBridgeReady(a),"undefined"==typeof WeixinJSBridge?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",t.onBridgeReady,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",t.onBridgeReady),document.attachEvent("onWeixinJSBridgeReady",t.onBridgeReady)):t.onBridgeReady()}else d.a.info(e.data.msg,2)})}},t.payCallback=function(){},t.onBridgeReady=function(e){WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:e.appId,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?this.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?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(g.a)(a,e),Object(p.a)(a,[{key:"componentDidMount",value:function(){var e=this;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,o=[];[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),o.push(a)}),console.log(o),e.setState({pay_amount:i,categoryList:n,fenqiList:o})}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,o=a.payType,r=a.checkPeriod,s=a.singleMoney,d=a.periodNumber,u=a.huabei,p=a.fenqiList,m=a.categoryList,y=a.stageNumber;return E.a.createElement("div",{className:"pay-order"},E.a.createElement(k.e,{title:"\u786e\u8ba4\u652f\u4ed8",arrow:!0}),E.a.createElement(l.a,{size:"sm"}),E.a.createElement("div",{className:"order-number"},E.a.createElement(i.a,null,E.a.createElement(c.a,{justify:"between",align:"center",style:{height:"44px"}},E.a.createElement("span",null,"\u8ba2\u5355\u53f7"),E.a.createElement("span",{className:"number"},t)))),E.a.createElement(l.a,{size:"md"}),m.map(function(a,t){var n=E.a.createElement("div",{className:"order-info"},E.a.createElement("p",{className:"order-title text-overflow-one"},E.a.createElement(N.b,{to:"/detail?id=".concat(a.course_id)},a.course_title)),E.a.createElement("p",{className:"order-content text-overflow-2"},a.simpledescription),E.a.createElement("p",{className:"order-des"},E.a.createElement("span",{className:"order-newprice"},"\xa5",a.price1),E.a.createElement("span",{className:"order-price"},"\xa5",a.price0)));return E.a.createElement(k.i,{handleClick:e.print,key:t,img:a.image_name,id:a.course_id,info:n})}),E.a.createElement(l.a,{size:"md"}),E.a.createElement("div",{className:"order-number"},E.a.createElement(i.a,null,E.a.createElement(c.a,{justify:"between",align:"center",style:{height:"44px"}},E.a.createElement("span",null,"\u652f\u4ed8\u91d1\u989d"),E.a.createElement("span",{className:"money"},"\uffe5".concat(n))))),E.a.createElement(l.a,{size:"md"}),E.a.createElement(v.a,{renderHeader:function(){return"\u652f\u4ed8\u65b9\u5f0f"},className:"pay-type-list"},S.map(function(a){return E.a.createElement(_,{thumb:E.a.createElement("i",{className:"iconfont ".concat(a.icon," ").concat(o===a.value?"checked":"")}),key:a.value,checked:o===a.value,onChange:function(){return e.onChange(a.value)}},2===a.value?E.a.createElement(c.a,{direction:"column",align:"start",style:{width:"100%",marginTop:"6px"}},E.a.createElement(c.a,{direction:"row",justify:"between",style:{width:"100%",paddingRight:"30px"}},E.a.createElement("span",{style:{color:"#555555",fontSize:"14px"}},a.label),r?E.a.createElement("span",{style:{color:"#333333",fontSize:"12px"}},"".concat(s,"\u5143 \xd7 ").concat(d,"\u671f")):null),E.a.createElement(c.a,{justify:"start"},E.a.createElement("span",{style:{color:"#999999",fontSize:"12px"}},"\u652f\u4ed8\u4e0a\u9650\u53d7\u9650\u4e8e\u60a8\u7684\u82b1\u5457\u989d\u5ea6"))):a.label)})),E.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"),E.a.createElement("div",{className:"pay-button",onClick:this.pay},"\u786e\u8ba4\u652f\u4ed8"),u?E.a.createElement("div",{className:"check-staging"},E.a.createElement("div",{className:"container"},E.a.createElement("p",{className:"check-title"},"\u8bf7\u9009\u62e9\u5206\u671f"),p.map(function(a){return E.a.createElement(_,{key:a.value,checked:y===a.value,onChange:function(){return e.checkStaging(a)}},"".concat(a.everyTotal,"\u5143 \xd7 ").concat(a.stage,"\u671f"),E.a.createElement(v.a.Item.Brief,null,"\u624b\u7eed\u8d39".concat(a.serviceFee,"\u5143/\u671f\uff0c\u8d39\u7387").concat(a.moneyRate)))}))):null)}}]),a}(w.Component)},894:function(e,a,t){}}]);
//# sourceMappingURL=PayOrder.cde513f6.chunk.js.map
\ 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.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){function r(r){for(var n,a,f=r[0],i=r[1],u=r[2],d=0,l=[];d<f.length;d++)a=f[d],o[a]&&l.push(o[a][0]),o[a]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[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 i=t[a];0!==o[i]&&(n=!1)}n&&(c.splice(r--,1),e=f(f.s=t[0]))}return e}var n={},a={18:0},o={18:0},c=[];function f(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,f),t.l=!0,t.exports}f.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:"9e05243b",1:"e3e9b348",2:"369bce9d",3:"2e7d81ca",4:"f2cc3163",5:"31d6cfe0",6:"34d6f553",7:"31d6cfe0",8:"ef3c6288",9:"7456653e",10:"0d7e3fa7",11:"742fe9ff",12:"bef8c404",13:"9ece7350",14:"1ccb2ab2",16:"5434bc7e",17:"6f6ffdf9",19:"01106b05",20:"82081d02",21:"65fae490",22:"49988cae",23:"af7bcdf8",25:"31d6cfe0",26:"1b3a6258",27:"31d6cfe0",28:"694b4628",29:"5ed15c7e",30:"ecbb6f9a",31:"bc06dce4"}[e]+".chunk.css",o=f.p+n,c=document.getElementsByTagName("link"),i=0;i<c.length;i++){var u=(s=c[i]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(u===n||u===o))return r()}var d=document.getElementsByTagName("style");for(i=0;i<d.length;i++){var s;if((u=(s=d[i]).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,i=document.createElement("script");i.charset="utf-8",i.timeout=120,f.nc&&i.setAttribute("nonce",f.nc),i.src=function(e){return f.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:"e9fa548d",1:"ba29a5fa",2:"9f29cd97",3:"39af102b",4:"fc6423bb",5:"d0b19073",6:"13dc8973",7:"ec770473",8:"cde513f6",9:"70bd3cf5",10:"fff53593",11:"b02ea981",12:"305be3b7",13:"847e634b",14:"80854228",16:"260fcdd9",17:"fda2c384",19:"3932de6c",20:"b9e27762",21:"1920335a",22:"68e5ec81",23:"b39bf88f",25:"dc48eee8",26:"3f952262",27:"451e15ff",28:"c45ad1a2",29:"e7db81e7",30:"ac1c9411",31:"39103831"}[e]+".chunk.js"}(e),c=function(r){i.onerror=i.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:i})},12e4);i.onerror=i.onload=c,document.head.appendChild(i)}return Promise.all(r)},f.m=e,f.c=n,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(e,r){if(1&r&&(e=f(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)f.d(t,n,function(r){return e[r]}.bind(null,n));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},f.p="/",f.oe=function(e){throw console.error(e),e};var i=window.webpackJsonp=window.webpackJsonp||[],u=i.push.bind(i);i.push=r,i=i.slice();for(var d=0;d<i.length;d++)r(i[d]);var s=u;t()}([]);
//# sourceMappingURL=runtime~main.9ac258ca.js.map
\ No newline at end of file
!function(e){function r(r){for(var n,a,f=r[0],i=r[1],u=r[2],d=0,l=[];d<f.length;d++)a=f[d],o[a]&&l.push(o[a][0]),o[a]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[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 i=t[a];0!==o[i]&&(n=!1)}n&&(c.splice(r--,1),e=f(f.s=t[0]))}return e}var n={},a={18:0},o={18:0},c=[];function f(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,f),t.l=!0,t.exports}f.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:"9e05243b",1:"9ab7b4fc",2:"93786e44",3:"2e7d81ca",4:"f2cc3163",5:"31d6cfe0",6:"34d6f553",7:"31d6cfe0",8:"ef3c6288",9:"7456653e",10:"0d7e3fa7",11:"742fe9ff",12:"bef8c404",13:"9ece7350",14:"1ccb2ab2",16:"5434bc7e",17:"6f6ffdf9",19:"01106b05",20:"82081d02",21:"724f37b8",22:"49988cae",23:"af7bcdf8",25:"31d6cfe0",26:"1b3a6258",27:"31d6cfe0",28:"694b4628",29:"5ed15c7e",30:"ecbb6f9a",31:"bc06dce4"}[e]+".chunk.css",o=f.p+n,c=document.getElementsByTagName("link"),i=0;i<c.length;i++){var u=(s=c[i]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(u===n||u===o))return r()}var d=document.getElementsByTagName("style");for(i=0;i<d.length;i++){var s;if((u=(s=d[i]).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,i=document.createElement("script");i.charset="utf-8",i.timeout=120,f.nc&&i.setAttribute("nonce",f.nc),i.src=function(e){return f.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:"e9fa548d",1:"ba29a5fa",2:"9f29cd97",3:"39af102b",4:"fc6423bb",5:"d0b19073",6:"13dc8973",7:"ec770473",8:"6b086701",9:"70bd3cf5",10:"fff53593",11:"b02ea981",12:"305be3b7",13:"847e634b",14:"80854228",16:"260fcdd9",17:"fda2c384",19:"3932de6c",20:"b9e27762",21:"1920335a",22:"68e5ec81",23:"b39bf88f",25:"dc48eee8",26:"3f952262",27:"451e15ff",28:"c45ad1a2",29:"e7db81e7",30:"ac1c9411",31:"39103831"}[e]+".chunk.js"}(e),c=function(r){i.onerror=i.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:i})},12e4);i.onerror=i.onload=c,document.head.appendChild(i)}return Promise.all(r)},f.m=e,f.c=n,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(e,r){if(1&r&&(e=f(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)f.d(t,n,function(r){return e[r]}.bind(null,n));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},f.p="/",f.oe=function(e){throw console.error(e),e};var i=window.webpackJsonp=window.webpackJsonp||[],u=i.push.bind(i);i.push=r,i=i.slice();for(var d=0;d<i.length;d++)r(i[d]);var s=u;t()}([]);
//# sourceMappingURL=runtime~main.b1241241.js.map
\ No newline at end of file
......@@ -35,8 +35,6 @@ class App extends Component {
})
//微信
let code = getParam('code')
......@@ -52,10 +50,10 @@ class App extends Component {
} else {
let user = this.transformWxUser(res)
let {role, uid, token} = data.data
let expires = {expires: addDays(new Date(), 90)}
cookie.set('role', role, expires)
cookie.set('uid', uid, expires)
cookie.set('token', token, expires)
let expires = addDays(new Date(), 90)
cookie.set('role', role, {expires, domain: '.julyedu.com', path: '/'})
cookie.set('uid', uid, {expires, domain: '.julyedu.com', path: '/'})
cookie.set('token', token, {expires, domain: '.julyedu.com', path: '/'})
this.props.setCurrentUser(user)
}
} else {
......
......@@ -241,7 +241,7 @@ function CourseList({modules, toDetail}) {
!isOdd && modules.list[0].course_img!== modules.list[0].course_img_small &&
<div className="category-vip" onClick={() => toDetail(modules.list[0].course_id)}>
{/* <Link to={`/detail?id=${modules.list[0].course_id}`}> */}
<img src={modules.list[0].course_img_small} alt=""/>
<img src={modules.list[0].course_img} alt=""/>
{/* </Link> */}
</div>
}
......
......@@ -397,6 +397,7 @@
height: 400px;
border-radius: 10px;
margin: 110px auto 0 auto;
position: relative;
padding-top: 20px;
.course-banner {
......@@ -453,6 +454,7 @@
.course-dec {
text-align: center;
padding: 0 10px;
margin-top: 10px;
.title {
......@@ -499,9 +501,9 @@
.course-subscribe {
text-align: center;
height: 47px;
button {
margin-top: 12px;
width: 60px;
height: 27px;
background-color: $bg_active;
......@@ -509,6 +511,10 @@
font-size: 14px;
color: $white;
border: none;
position: absolute;
left: 50%;
margin-left: -30px;
bottom: 10px;
}
span {
......@@ -566,7 +572,7 @@
background-color: $bg_18B4ED;
font-size: 16px;
color: $white;
width: 135px;
padding: 0 15px;
height: 30px;
border-radius: 15px;
border: none;
......@@ -641,6 +647,7 @@
padding-left: 15px;
border: 1px solid $border_ccc;
margin-top: 15px;
font-size: 12px;
}
input:focus {
......
......@@ -18,25 +18,25 @@ class LiveRoom extends Component {
// 课程直播信息
componentDidMount() {
this.getRoom()
// this.getRoom()
if (browser.isWeixin) {
this.isFollow()
}
}
// 课程直播信息
getRoom = () => {
http.get(`${API.home}/m/live/middle/${this.props.roomMess.room_id}`).then((res) => {
if (res.data.code === 200) {
this.setState({
roomMess: res.data.data
})
} else {
Toast.info(res.data.msg, 2)
}
})
}
// // 课程直播信息
// getRoom = () => {
// http.get(`${API.home}/m/live/middle/${this.props.roomMess.room_id}`).then((res) => {
// if (res.data.code === 200) {
// // this.setState({
// // roomMess: res.data.data
// // })
// } else {
// Toast.info(res.data.msg, 2)
// }
//
// })
// }
// 是否关注服务号
isFollow = () => {
......@@ -92,6 +92,8 @@ class LiveRoom extends Component {
this.setState({
toSubscribe: false
})
} else if (res.data.data.status === 5) {
window.location.href = 'https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzIyMzMzMTIwNA==&scene=126&bizpsid=0&subscene=0#wechat_redirect';
} else {
Toast.info(res.data.data.msg, 2)
}
......@@ -106,7 +108,7 @@ class LiveRoom extends Component {
}
// 点击预约
toSubscribe = () => {
toSubscribeFun = () => {
this.props.colseBox(false)
this.setState({
toSubscribe: true,
......@@ -130,7 +132,7 @@ class LiveRoom extends Component {
// 服务号预约
serverStep = () => {
if (this.state.isfollow === 0) {
if (this.state.isfollow == 2) {
window.location.href = 'https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzIyMzMzMTIwNA==&scene=126&bizpsid=0&subscene=0#wechat_redirect';
} else {
this.livePrepare(this.props.roomMess.room_id, 1, 1, '')
......@@ -153,13 +155,15 @@ class LiveRoom extends Component {
mobile: this.state.iphone,
room_id: this.props.roomMess.room_id
}
http.get(`${API.home}/m/live/wxReservedTel`, data).then((res) => {
http.post(`${API.home}/m/live/wxReservedTel`, data).then((res) => {
if (res.data.code === 200) {
this.setState({
toSubscribe: false
})
Toast.info(res.data.msg, 2)
} else {
} else if(res.data.code === 410){
Toast.info('请输入手机号', 2)
}else {
Toast.info(res.data.msg, 2)
}
})
......@@ -175,7 +179,7 @@ class LiveRoom extends Component {
render() {
const roomMess = this.state.roomMess
const roomMess = this.props.roomMess
return (
<div className='index-box'>
{/* 直播间预约 */}
......@@ -195,7 +199,7 @@ class LiveRoom extends Component {
<div className='course-dec'>
<h2 className='title'>{roomMess.live_title}</h2>
<p className='teacher'>讲师:{roomMess.live_teacher_name}</p>
<p className='time'>时间:{roomMess.start_date}</p>
<p className='time'>时间:{roomMess.live_start_time}</p>
</div>
<div className='course-info'>
<ul>
......@@ -207,11 +211,11 @@ class LiveRoom extends Component {
</div>
<div className='course-subscribe'>
{
roomMess.is_prepare === 0 && roomMess.course_id === 0 &&
<button onClick={this.toSubscribe}>预约</button>
!roomMess.is_prepare && roomMess.course_id !== 0 &&
<button onClick={this.toSubscribeFun}>预约</button>
}
{
roomMess.is_prepare === 1 &&
roomMess.is_prepare &&
<span>直播尚未开始,敬请期待...</span>
}
</div>
......@@ -233,12 +237,12 @@ class LiveRoom extends Component {
onClick={this.serverStep}>微信服务号通知
</button>
{
this.state.isfollow === 0 &&
this.state.isfollow === 2 &&
<span className='tips'>关注服务号即代表预约成功</span>
}
<button className={this.state.isfollow === 1 ? 'follow' : 'nofollow'}
onClick={this.iphoneStep}>手机短信通知
onClick={this.iphoneStep}>&nbsp;手机短信通知&nbsp;&nbsp;
</button>
</div>
</div>
......
.class-child {
position: relative;
.class-content {
padding: 0 12px;
......@@ -129,11 +130,11 @@
}
.mbc-box {
position: fixed;
position: absolute;
left: 0;
top: 88px;
right: 0;
bottom: 0;
bottom: -88px;
background-color: rgba(0, 0, 0, .6);
.tabcontent {
......@@ -183,6 +184,7 @@
border-radius: 15px;
margin-top: 15px;
margin-bottom: -5px;
font-size: 12px;
}
.active-label {
display: inline-block;
......@@ -194,6 +196,7 @@
border-radius: 15px;
margin-top: 15px;
margin-bottom: -5px;
font-size: 12px;
color: $white;
}
}
......
......@@ -66,6 +66,7 @@
margin-top: 15px;
margin-bottom: -5px;
margin-right: 12px;
font-size: 12px;
}
:nth-of-type(3n) {
......
......@@ -47,6 +47,28 @@ export default class PayOrder extends Component {
categoryList: [],
}
}
// 支付成功后,判断并重定向
redirectAfterPay = () => {
// status:0成功,1失败
const status = getParam('status');
const type = getParam('type');
const oid = getParam('oid');
const { history } = this.props;
if(status || type) {
if(parseInt(status, 10) === 0) {
// type订单类型 0普通订单 1团购 2小团 3砍价 4单集购买 5定金课定金 6定金课尾款
if(parseInt(type, 10) === 2) {
history.push(`/togroup?id=${oid}`);
}else {
history.push('/purchased');
}
}else {
Toast.info('支付异常', 2);
}
}
}
onChange = (value) => {
this.setState({
payType: value,
......@@ -198,6 +220,7 @@ export default class PayOrder extends Component {
}
componentDidMount() {
this.redirectAfterPay()
http.post(`${API['base-api']}/m/order/detail`, { order_id: this.state.orderId }).then((res) => {
console.log(res);
if (res.data.errno !== 200) {
......
......@@ -113,7 +113,6 @@
flex-direction: column;
align-items: center;
padding-top: 140px;
background: $bg_f5f5f5;
.iconfish {
width: 20px;
......
......@@ -36,6 +36,7 @@ html, body, #root {
flex: 1 1 auto;
overflow-y: auto;
box-sizing: border-box;
background: $bg_f5f5f5;
}
.active {
......
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