Commit 704b3461 by FE

merge 11-11

parents 6e055ead 7c092772
...@@ -38,8 +38,13 @@ ...@@ -38,8 +38,13 @@
"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",
<<<<<<< HEAD
"PayOrder.js": "/mrstatic/js/PayOrder.da800e1a.chunk.js", "PayOrder.js": "/mrstatic/js/PayOrder.da800e1a.chunk.js",
"PayOrder.js.map": "/mrstatic/js/PayOrder.da800e1a.chunk.js.map", "PayOrder.js.map": "/mrstatic/js/PayOrder.da800e1a.chunk.js.map",
=======
"PayOrder.js": "/mrstatic/js/PayOrder.21e0b5d0.chunk.js",
"PayOrder.js.map": "/mrstatic/js/PayOrder.21e0b5d0.chunk.js.map",
>>>>>>> 11-11
"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",
...@@ -55,9 +60,15 @@ ...@@ -55,9 +60,15 @@
"aist-share.css": "/mrstatic/css/aist-share.40873df0.chunk.css", "aist-share.css": "/mrstatic/css/aist-share.40873df0.chunk.css",
"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",
<<<<<<< HEAD
"blessing-preheat.css": "/mrstatic/css/blessing-preheat.d6b567fb.chunk.css", "blessing-preheat.css": "/mrstatic/css/blessing-preheat.d6b567fb.chunk.css",
"blessing-preheat.js": "/mrstatic/js/blessing-preheat.35e9a6bc.chunk.js", "blessing-preheat.js": "/mrstatic/js/blessing-preheat.35e9a6bc.chunk.js",
"blessing-preheat.js.map": "/mrstatic/js/blessing-preheat.35e9a6bc.chunk.js.map", "blessing-preheat.js.map": "/mrstatic/js/blessing-preheat.35e9a6bc.chunk.js.map",
=======
"blessing-preheat.css": "/mrstatic/css/blessing-preheat.3ea8b615.chunk.css",
"blessing-preheat.js": "/mrstatic/js/blessing-preheat.6dff43d3.chunk.js",
"blessing-preheat.js.map": "/mrstatic/js/blessing-preheat.6dff43d3.chunk.js.map",
>>>>>>> 11-11
"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",
...@@ -74,19 +85,32 @@ ...@@ -74,19 +85,32 @@
"detail.js": "/mrstatic/js/detail.34640f52.chunk.js", "detail.js": "/mrstatic/js/detail.34640f52.chunk.js",
"detail.js.map": "/mrstatic/js/detail.34640f52.chunk.js.map", "detail.js.map": "/mrstatic/js/detail.34640f52.chunk.js.map",
"main.css": "/mrstatic/css/main.f9f26bcf.chunk.css", "main.css": "/mrstatic/css/main.f9f26bcf.chunk.css",
<<<<<<< HEAD
"main.js": "/mrstatic/js/main.e50a2e09.chunk.js", "main.js": "/mrstatic/js/main.e50a2e09.chunk.js",
"main.js.map": "/mrstatic/js/main.e50a2e09.chunk.js.map", "main.js.map": "/mrstatic/js/main.e50a2e09.chunk.js.map",
"myorders.css": "/mrstatic/css/myorders.494a90ad.chunk.css", "myorders.css": "/mrstatic/css/myorders.494a90ad.chunk.css",
"myorders.js": "/mrstatic/js/myorders.5cdbf8f6.chunk.js", "myorders.js": "/mrstatic/js/myorders.5cdbf8f6.chunk.js",
"myorders.js.map": "/mrstatic/js/myorders.5cdbf8f6.chunk.js.map", "myorders.js.map": "/mrstatic/js/myorders.5cdbf8f6.chunk.js.map",
=======
"main.js": "/mrstatic/js/main.2b14c8b9.chunk.js",
"main.js.map": "/mrstatic/js/main.2b14c8b9.chunk.js.map",
"myorders.css": "/mrstatic/css/myorders.494a90ad.chunk.css",
"myorders.js": "/mrstatic/js/myorders.5b24e8bb.chunk.js",
"myorders.js.map": "/mrstatic/js/myorders.5b24e8bb.chunk.js.map",
>>>>>>> 11-11
"prize-winner-list.css": "/mrstatic/css/prize-winner-list.7ff5ff63.chunk.css", "prize-winner-list.css": "/mrstatic/css/prize-winner-list.7ff5ff63.chunk.css",
"prize-winner-list.js": "/mrstatic/js/prize-winner-list.44109093.chunk.js", "prize-winner-list.js": "/mrstatic/js/prize-winner-list.44109093.chunk.js",
"prize-winner-list.js.map": "/mrstatic/js/prize-winner-list.44109093.chunk.js.map", "prize-winner-list.js.map": "/mrstatic/js/prize-winner-list.44109093.chunk.js.map",
"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",
<<<<<<< HEAD
"runtime~main.js": "/mrstatic/js/runtime~main.ea29eed6.js", "runtime~main.js": "/mrstatic/js/runtime~main.ea29eed6.js",
"runtime~main.js.map": "/mrstatic/js/runtime~main.ea29eed6.js.map", "runtime~main.js.map": "/mrstatic/js/runtime~main.ea29eed6.js.map",
=======
"runtime~main.js": "/mrstatic/js/runtime~main.867a9d58.js",
"runtime~main.js.map": "/mrstatic/js/runtime~main.867a9d58.js.map",
>>>>>>> 11-11
"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",
...@@ -147,7 +171,11 @@ ...@@ -147,7 +171,11 @@
"mrstatic/css/ShareCourse.8046fb41.chunk.css.map": "/mrstatic/css/ShareCourse.8046fb41.chunk.css.map", "mrstatic/css/ShareCourse.8046fb41.chunk.css.map": "/mrstatic/css/ShareCourse.8046fb41.chunk.css.map",
"mrstatic/css/ShopCart.92ab48a3.chunk.css.map": "/mrstatic/css/ShopCart.92ab48a3.chunk.css.map", "mrstatic/css/ShopCart.92ab48a3.chunk.css.map": "/mrstatic/css/ShopCart.92ab48a3.chunk.css.map",
"mrstatic/css/aist-share.40873df0.chunk.css.map": "/mrstatic/css/aist-share.40873df0.chunk.css.map", "mrstatic/css/aist-share.40873df0.chunk.css.map": "/mrstatic/css/aist-share.40873df0.chunk.css.map",
<<<<<<< HEAD
"mrstatic/css/blessing-preheat.d6b567fb.chunk.css.map": "/mrstatic/css/blessing-preheat.d6b567fb.chunk.css.map", "mrstatic/css/blessing-preheat.d6b567fb.chunk.css.map": "/mrstatic/css/blessing-preheat.d6b567fb.chunk.css.map",
=======
"mrstatic/css/blessing-preheat.3ea8b615.chunk.css.map": "/mrstatic/css/blessing-preheat.3ea8b615.chunk.css.map",
>>>>>>> 11-11
"mrstatic/css/blessing-rank.edf00bf8.chunk.css.map": "/mrstatic/css/blessing-rank.edf00bf8.chunk.css.map", "mrstatic/css/blessing-rank.edf00bf8.chunk.css.map": "/mrstatic/css/blessing-rank.edf00bf8.chunk.css.map",
"mrstatic/css/coupons.466858c7.chunk.css.map": "/mrstatic/css/coupons.466858c7.chunk.css.map", "mrstatic/css/coupons.466858c7.chunk.css.map": "/mrstatic/css/coupons.466858c7.chunk.css.map",
"mrstatic/css/deposit-order.5ea077aa.chunk.css.map": "/mrstatic/css/deposit-order.5ea077aa.chunk.css.map", "mrstatic/css/deposit-order.5ea077aa.chunk.css.map": "/mrstatic/css/deposit-order.5ea077aa.chunk.css.map",
...@@ -166,6 +194,10 @@ ...@@ -166,6 +194,10 @@
"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",
<<<<<<< HEAD
"precache-manifest.1d57c91feb0ad006df0d50e74ade2aac.js": "/precache-manifest.1d57c91feb0ad006df0d50e74ade2aac.js", "precache-manifest.1d57c91feb0ad006df0d50e74ade2aac.js": "/precache-manifest.1d57c91feb0ad006df0d50e74ade2aac.js",
=======
"precache-manifest.adc2d73282fb1dc223c86cdc4ce50684.js": "/precache-manifest.adc2d73282fb1dc223c86cdc4ce50684.js",
>>>>>>> 11-11
"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){}}]);
//# sourceMappingURL=PayOrder.21e0b5d0.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 a,n,i=r[0],c=r[1],d=r[2],s=0,l=[];s<i.length;s++)n=i[s],o[n]&&l.push(o[n][0]),o[n]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(u&&u(r);l.length;)l.shift()();return f.push.apply(f,d||[]),t()}function t(){for(var e,r=0;r<f.length;r++){for(var t=f[r],a=!0,n=1;n<t.length;n++){var c=t[n];0!==o[c]&&(a=!1)}a&&(f.splice(r--,1),e=i(i.s=t[0]))}return e}var a={},n={30:0},o={30:0},f=[];function i(r){if(a[r])return a[r].exports;var t=a[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=[];n[e]?r.push(n[e]):0!==n[e]&&{2:1,3:1,4:1,5:1,6:1,7:1,8:1,9:1,10:1,12:1,14:1,15:1,16:1,17:1,18:1,19:1,20:1,21:1,22:1,23:1,24:1,25:1,27:1,28:1,29:1,31:1,32:1,33:1,34:1,35:1,37:1,38:1,39:1,40:1,41:1,42:1}[e]&&r.push(n[e]=new Promise(function(r,t){for(var a="mrstatic/css/"+({3:"Activity",4:"BargainMiddlePage",5:"Classify",6:"Country",7:"CourseList",8:"DrawDocument",9:"Examination",10:"Invite",11:"MyEdit",12:"Order",13:"Orderinfo",14:"PayOrder",15:"Preferential",16:"SearchResult",17:"ShareCourse",18:"ShopCart",19:"aist-share",20:"blessing-preheat",21:"blessing-rank",22:"coupons",23:"deposit-order",24:"deposit-pay-order",25:"detail",27:"myorders",28:"prize-winner-list",29:"purchased",31:"search",32:"shareposter",33:"study",34:"togroup",35:"video"}[e]||e)+"."+{0:"31d6cfe0",1:"31d6cfe0",2:"bf839917",3:"fa2c419d",4:"eb686c74",5:"fb4bedde",6:"2d34330b",7:"afc8902e",8:"aeb3f822",9:"7bb0622b",10:"fa2c419d",11:"31d6cfe0",12:"8c058a7a",13:"31d6cfe0",14:"7eb7d317",15:"0c91fa43",16:"cdf852c1",17:"8046fb41",18:"92ab48a3",19:"40873df0",20:"3ea8b615",21:"edf00bf8",22:"466858c7",23:"5ea077aa",24:"09ce6fd5",25:"c31f1b41",27:"494a90ad",28:"7ff5ff63",29:"bb758677",31:"5716d9b3",32:"76774ba4",33:"bf6b9b43",34:"f08bc5f3",35:"1c1131c9",37:"c76b300d",38:"bff100af",39:"820320a6",40:"35e22f8c",41:"76fe3935",42:"b02d1de6"}[e]+".chunk.css",o=i.p+a,f=document.getElementsByTagName("link"),c=0;c<f.length;c++){var d=(u=f[c]).getAttribute("data-href")||u.getAttribute("href");if("stylesheet"===u.rel&&(d===a||d===o))return r()}var s=document.getElementsByTagName("style");for(c=0;c<s.length;c++){var u;if((d=(u=s[c]).getAttribute("data-href"))===a||d===o)return r()}var l=document.createElement("link");l.rel="stylesheet",l.type="text/css",l.onload=r,l.onerror=function(r){var a=r&&r.target&&r.target.src||o,f=new Error("Loading CSS chunk "+e+" failed.\n("+a+")");f.request=a,delete n[e],l.parentNode.removeChild(l),t(f)},l.href=o,document.getElementsByTagName("head")[0].appendChild(l)}).then(function(){n[e]=0}));var t=o[e];if(0!==t)if(t)r.push(t[2]);else{var a=new Promise(function(r,a){t=o[e]=[r,a]});r.push(t[2]=a);var f,c=document.createElement("script");c.charset="utf-8",c.timeout=120,i.nc&&c.setAttribute("nonce",i.nc),c.src=function(e){return i.p+"mrstatic/js/"+({3:"Activity",4:"BargainMiddlePage",5:"Classify",6:"Country",7:"CourseList",8:"DrawDocument",9:"Examination",10:"Invite",11:"MyEdit",12:"Order",13:"Orderinfo",14:"PayOrder",15:"Preferential",16:"SearchResult",17:"ShareCourse",18:"ShopCart",19:"aist-share",20:"blessing-preheat",21:"blessing-rank",22:"coupons",23:"deposit-order",24:"deposit-pay-order",25:"detail",27:"myorders",28:"prize-winner-list",29:"purchased",31:"search",32:"shareposter",33:"study",34:"togroup",35:"video"}[e]||e)+"."+{0:"19bf510b",1:"1ae9bc37",2:"f02a0573",3:"73c8f0a9",4:"7dc150ca",5:"87e5a787",6:"b77d0054",7:"55b9cd02",8:"7376b4ea",9:"ef054c07",10:"1ca5eb03",11:"fea133fd",12:"40f1e2cd",13:"57e0641d",14:"21e0b5d0",15:"a868f51f",16:"c6a31aa7",17:"a1843d18",18:"5bce9778",19:"3a04b022",20:"6dff43d3",21:"9beb2e6a",22:"7e9d8a64",23:"3386f2f1",24:"77f90737",25:"34640f52",27:"5b24e8bb",28:"44109093",29:"a38723f4",31:"589ab26a",32:"bc3debb9",33:"7bbf8730",34:"59f6d7fd",35:"ee79f0c1",37:"60ac9e86",38:"6484232f",39:"abfd1e74",40:"f027a2bf",41:"0620caf1",42:"7d3b7120"}[e]+".chunk.js"}(e),f=function(r){c.onerror=c.onload=null,clearTimeout(d);var t=o[e];if(0!==t){if(t){var a=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src,f=new Error("Loading chunk "+e+" failed.\n("+a+": "+n+")");f.type=a,f.request=n,t[1](f)}o[e]=void 0}};var d=setTimeout(function(){f({type:"timeout",target:c})},12e4);c.onerror=c.onload=f,document.head.appendChild(c)}return Promise.all(r)},i.m=e,i.c=a,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 a in e)i.d(t,a,function(r){return e[r]}.bind(null,a));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 c=window.webpackJsonp=window.webpackJsonp||[],d=c.push.bind(c);c.push=r,c=c.slice();for(var s=0;s<c.length;s++)r(c[s]);var u=d;t()}([]);
//# sourceMappingURL=runtime~main.867a9d58.js.map
\ No newline at end of file
...@@ -14,7 +14,11 @@ ...@@ -14,7 +14,11 @@
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(
<<<<<<< HEAD
"/precache-manifest.1d57c91feb0ad006df0d50e74ade2aac.js" "/precache-manifest.1d57c91feb0ad006df0d50e74ade2aac.js"
=======
"/precache-manifest.adc2d73282fb1dc223c86cdc4ce50684.js"
>>>>>>> 11-11
); );
workbox.clientsClaim(); workbox.clientsClaim();
......
...@@ -14,9 +14,9 @@ class ClosablePopup extends Component { ...@@ -14,9 +14,9 @@ class ClosablePopup extends Component {
close ? close() : this.setState({visible: false}) close ? close() : this.setState({visible: false})
} }
componentDidUpdate(prevProps) { componentDidUpdate(prevProps, prevState) {
const {visible} = this.props const {visible} = this.props
if (prevProps.visible !== visible) { if (prevState.visible !== this.props.visible) {
this.setState({ this.setState({
visible visible
}) })
......
...@@ -61,13 +61,12 @@ class CollectBlessing extends Component { ...@@ -61,13 +61,12 @@ class CollectBlessing extends Component {
if(!uid) { if(!uid) {
SendMessageToApp("toLogin"); SendMessageToApp("toLogin");
}else { }else {
let data = { SendMessageToApp("QQshare", {
title: 'AI充电节,积福气享1折秒课,超10万元奖品来就送!!', title: 'AI充电节,积福气享1折秒课,超10万元奖品来就送!!',
desc: '把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线', desc: '把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线',
link: 'https://m.julyedu.com/blessingPreheat', link: 'https://m.julyedu.com/blessingPreheat',
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png', imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png',
}; });
SendMessageToApp("QQshare", data);
} }
}else { }else {
if(!uid) { if(!uid) {
...@@ -87,13 +86,12 @@ class CollectBlessing extends Component { ...@@ -87,13 +86,12 @@ class CollectBlessing extends Component {
if(!uid) { if(!uid) {
SendMessageToApp("toLogin"); SendMessageToApp("toLogin");
}else { }else {
let data = { SendMessageToApp("WXshare", {
title: 'AI充电节,积福气享1折秒课,超10万元奖品来就送!!', title: 'AI充电节,积福气享1折秒课,超10万元奖品来就送!!',
desc: '把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线', desc: '把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线',
link: 'https://m.julyedu.com/blessingPreheat', link: 'https://m.julyedu.com/blessingPreheat',
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png', imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png',
}; });
SendMessageToApp("WXshare", data);
} }
}else { }else {
if(!uid) { if(!uid) {
...@@ -113,13 +111,12 @@ class CollectBlessing extends Component { ...@@ -113,13 +111,12 @@ class CollectBlessing extends Component {
if(!uid) { if(!uid) {
SendMessageToApp("toLogin"); SendMessageToApp("toLogin");
}else { }else {
let data = { SendMessageToApp("WBshare", {
title: 'AI充电节,积福气享1折秒课,超10万元奖品来就送!!', title: 'AI充电节,积福气享1折秒课,超10万元奖品来就送!!',
desc: '把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线', desc: '把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线',
link: 'https://m.julyedu.com/blessingPreheat', link: 'https://m.julyedu.com/blessingPreheat',
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png', imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png',
}; });
SendMessageToApp("WXshare", data);
} }
}else { }else {
if(!uid) { if(!uid) {
...@@ -177,7 +174,8 @@ class CollectBlessing extends Component { ...@@ -177,7 +174,8 @@ class CollectBlessing extends Component {
render() { render() {
const { const {
isSign, isSign,
userInfo: { isLogin = false, blessingVal = 0, buyBlessing = 0, inviteBlessing = 0 }, userInfo: {blessingVal = 0, buyBlessing = 0, inviteBlessing = 0 },
isLogin,
handleToShowNotice, handleToShowNotice,
handleToShowList, handleToShowList,
handleToShowInvite, handleToShowInvite,
...@@ -233,16 +231,22 @@ class CollectBlessing extends Component { ...@@ -233,16 +231,22 @@ class CollectBlessing extends Component {
<i className="collect-blessing__num">{index+1}</i> <i className="collect-blessing__num">{index+1}</i>
<p className="collect-blessing__title">{item}</p> <p className="collect-blessing__title">{item}</p>
{ {
index === 0 && (isLogin && isSign) && index === 0 &&
<>
{
(isLogin && isSign)
? (
<a className="collect-blessing__content" data-status="done"> <a className="collect-blessing__content" data-status="done">
+5<br/>福气值 +5<br/>福气值
</a> </a>
} )
{ : (
index === 0 && (!isLogin || !isSign) &&
<span onClick={toLogin} className="collect-blessing__content"> <span onClick={toLogin} className="collect-blessing__content">
点击<br/>签到 点击<br/>签到
</span> </span>
)
}
</>
} }
{ {
index === 1 && index === 1 &&
...@@ -283,7 +287,9 @@ class CollectBlessing extends Component { ...@@ -283,7 +287,9 @@ class CollectBlessing extends Component {
index === 4 && index === 4 &&
<a className="collect-blessing__content" onClick={handleToShowInvite}> <a className="collect-blessing__content" onClick={handleToShowInvite}>
<span>邀请链接</span> <span>邀请链接</span>
<i>已加{inviteBlessing}</i> {
inviteBlessing > 0 && <i>已加{inviteBlessing}</i>
}
</a> </a>
} }
{ {
...@@ -292,7 +298,9 @@ class CollectBlessing extends Component { ...@@ -292,7 +298,9 @@ class CollectBlessing extends Component {
className="collect-blessing__content" className="collect-blessing__content"
onClick={toSection}> onClick={toSection}>
<span>去选课</span> <span>去选课</span>
<i>已加{buyBlessing}</i> {
buyBlessing > 0 && <i>已加{buyBlessing}</i>
}
</a> </a>
} }
</div> </div>
......
...@@ -3,11 +3,11 @@ import './index.scss'; ...@@ -3,11 +3,11 @@ import './index.scss';
class CourseItem extends Component { class CourseItem extends Component {
render() { render() {
const { image } = this.props; const { image,toCourse,id} = this.props;
return ( return (
<div className="course-container"> <div className="course-container">
<div className="course__cover"> <div className="course__cover">
<img src={image} alt="cover"/> <img src={image} alt="cover" onClick={() => toCourse(id)}/>
</div> </div>
{this.props.children} {this.props.children}
</div> </div>
......
...@@ -15,5 +15,6 @@ ...@@ -15,5 +15,6 @@
img { img {
display: block; display: block;
width: 100%; width: 100%;
height: 100%;
} }
} }
\ No newline at end of file
...@@ -298,7 +298,7 @@ class CourseList extends Component { ...@@ -298,7 +298,7 @@ class CourseList extends Component {
<div data-layout="row"> <div data-layout="row">
{ {
group.course.map(item => ( group.course.map(item => (
<CourseItem image={item.image_name} key={item.course_id}> <CourseItem image={item.image_name} key={item.course_id} id={item.course_id} toCourse={this.toCourse}>
<div className="coupon-course__footer"> <div className="coupon-course__footer">
<a onClick={() => this.toQQque()} className="course-button">立抢超低团购价</a> <a onClick={() => this.toQQque()} className="course-button">立抢超低团购价</a>
</div> </div>
...@@ -323,7 +323,7 @@ class CourseList extends Component { ...@@ -323,7 +323,7 @@ class CourseList extends Component {
<div data-layout="row"> <div data-layout="row">
{ {
training.course.map(item => ( training.course.map(item => (
<CourseItem image={item.image_name} key={item.course_id}> <CourseItem image={item.image_name} key={item.course_id} id={item.course_id} toCourse={this.toCourse}>
<div className="coupon-course__footer"> <div className="coupon-course__footer">
{ {
item.course_status === 1 && item.course_status === 1 &&
...@@ -391,7 +391,7 @@ class CourseList extends Component { ...@@ -391,7 +391,7 @@ class CourseList extends Component {
<div data-layout="row"> <div data-layout="row">
{ {
basic.course.map(item => ( basic.course.map(item => (
<CourseItem image={item.image_name} key={item.course_id}> <CourseItem image={item.image_name} key={item.course_id} id={item.course_id} toCourse={this.toCourse}>
{ {
item.type === 0 && item.type === 0 &&
<div className="coupon-course__footer"> <div className="coupon-course__footer">
...@@ -472,7 +472,7 @@ class CourseList extends Component { ...@@ -472,7 +472,7 @@ class CourseList extends Component {
<div data-layout="row"> <div data-layout="row">
{ {
advanced.course.map(item => ( advanced.course.map(item => (
<CourseItem image={item.image_name} key={item.course_id}> <CourseItem image={item.image_name} key={item.course_id} id={item.course_id} toCourse={this.toCourse}>
{ {
item.type === 0 && item.type === 0 &&
<div className="coupon-course__footer"> <div className="coupon-course__footer">
...@@ -552,7 +552,7 @@ class CourseList extends Component { ...@@ -552,7 +552,7 @@ class CourseList extends Component {
<div data-layout="row"> <div data-layout="row">
{ {
higher.course.map(item => ( higher.course.map(item => (
<CourseItem image={item.image_name} key={item.course_id}> <CourseItem image={item.image_name} key={item.course_id} id={item.course_id} toCourse={this.toCourse}>
{ {
item.type === 0 && item.type === 0 &&
<div className="coupon-course__footer"> <div className="coupon-course__footer">
...@@ -632,7 +632,7 @@ class CourseList extends Component { ...@@ -632,7 +632,7 @@ class CourseList extends Component {
<div data-layout="row"> <div data-layout="row">
{ {
expand.course.map(item => ( expand.course.map(item => (
<CourseItem image={item.image_name} key={item.course_id}> <CourseItem image={item.image_name} key={item.course_id} id={item.course_id} toCourse={this.toCourse}>
{ {
item.type === 0 && item.type === 0 &&
<div className="coupon-course__footer"> <div className="coupon-course__footer">
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
padding: 10px 0; padding: 10px 0;
.course-button { .course-button {
margin: 5px auto 0; //margin: 5px auto 0;
} }
} }
...@@ -42,7 +42,8 @@ ...@@ -42,7 +42,8 @@
text-align: center; text-align: center;
line-height: 1; line-height: 1;
background-image: url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/coupon-bg-0.png'); background-image: url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/coupon-bg-0.png');
background-repeat: no-repeat;
background-size: cover;
} }
.coupon-course__button--receive { .coupon-course__button--receive {
......
import React, { Component } from 'react' import React, {Component} from 'react'
import QRCode from 'qrcode' import QRCode from 'qrcode'
import { http, SendMessageToApp,wxShare,is_weixin,getParam} from '@/utils'; import {http, SendMessageToApp, wxShare, is_weixin, getParam} from '@/utils';
import { Link } from 'react-router-dom' import {Link} from 'react-router-dom'
import { throttle, findIndex, debounce } from 'lodash' import {throttle, findIndex, debounce} from 'lodash'
import RulePopup from './rulePopup/index' import RulePopup from './rulePopup/index'
import CoursePopup from './coursePopup/index' import CoursePopup from './coursePopup/index'
import RecordPopup from './recordPopup/index' import RecordPopup from './recordPopup/index'
...@@ -15,9 +15,9 @@ import ListHeader from './listHeader/index' ...@@ -15,9 +15,9 @@ import ListHeader from './listHeader/index'
import LevelTest from './levelTest/index' import LevelTest from './levelTest/index'
import RankList from './rankList/index' import RankList from './rankList/index'
import './index.scss' import './index.scss'
import { Popup } from '@/common' import {Popup} from '@/common'
import { CopyToClipboard } from 'react-copy-to-clipboard' import {CopyToClipboard} from 'react-copy-to-clipboard'
import { Toast } from "antd-mobile" import {Toast} from "antd-mobile"
import Live from './live' import Live from './live'
import Banner from './banner' import Banner from './banner'
import cookie from "js-cookie"; import cookie from "js-cookie";
...@@ -27,7 +27,6 @@ import {compose} from "redux"; ...@@ -27,7 +27,6 @@ import {compose} from "redux";
import {connect} from "react-redux"; import {connect} from "react-redux";
class BlessingPreheat extends Component { class BlessingPreheat extends Component {
constructor(props) { constructor(props) {
...@@ -76,6 +75,7 @@ class BlessingPreheat extends Component { ...@@ -76,6 +75,7 @@ class BlessingPreheat extends Component {
}, },
], ],
index: 0, index: 0,
userHasError: props.user.hasError
} }
} }
...@@ -83,7 +83,7 @@ class BlessingPreheat extends Component { ...@@ -83,7 +83,7 @@ class BlessingPreheat extends Component {
this.fetchUserBlessing(); this.fetchUserBlessing();
this.setInitialNavActiveStatus() this.setInitialNavActiveStatus()
window.addEventListener('scroll', throttle(this.calcNavActive, 100)); window.addEventListener('scroll', throttle(this.calcNavActive, 100));
if(is_weixin()) { if (is_weixin()) {
wxShare({ wxShare({
title: 'AI充电节,积福气享1折秒课,超10万元奖品来就送!!', title: 'AI充电节,积福气享1折秒课,超10万元奖品来就送!!',
desc: '把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线', desc: '把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线',
...@@ -96,8 +96,14 @@ class BlessingPreheat extends Component { ...@@ -96,8 +96,14 @@ class BlessingPreheat extends Component {
window['loginInfo'] = result => { window['loginInfo'] = result => {
this.loginInfo(result) this.loginInfo(result)
} }
window['getNewData'] = result => {
this.fetchUserBlessing();
}
} }
// 获取app登录数据 // 获取app登录数据
loginInfo = (result) => { loginInfo = (result) => {
this.setState({ this.setState({
...@@ -188,15 +194,9 @@ class BlessingPreheat extends Component { ...@@ -188,15 +194,9 @@ class BlessingPreheat extends Component {
} }
fetchUserBlessing() { fetchUserBlessing() {
// 判断登录未登录 根据this.state.userInfo.isLogin Toast.info('fetchUserBlessing', 2)
if(getParam('version')) {
// app 平台 const {userInfo} = this.state;
}else{
// H5
}
const { userInfo } = this.state;
const {user, history} = this.props;
const uid = user && user.data && user.data.uid;
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
if (code === 200) { if (code === 200) {
...@@ -204,10 +204,9 @@ class BlessingPreheat extends Component { ...@@ -204,10 +204,9 @@ class BlessingPreheat extends Component {
isSign: !!data.today_signed, isSign: !!data.today_signed,
isFormal: data.is_activity, isFormal: data.is_activity,
userInfo: Object.assign({}, userInfo, { userInfo: Object.assign({}, userInfo, {
isLogin: !!uid,
blessingVal: data.user_blessing_value, blessingVal: data.user_blessing_value,
buyBlessing: (data.types_total_blessing_value &&data.types_total_blessing_value.buy_course)? data.types_total_blessing_value.buy_course : 0, buyBlessing: (data.types_total_blessing_value && data.types_total_blessing_value.buy_course) ? data.types_total_blessing_value.buy_course : 0,
inviteBlessing: (data.types_total_blessing_value &&data.types_total_blessing_value.invite)? data.types_total_blessing_value.invite : 0, inviteBlessing: (data.types_total_blessing_value && data.types_total_blessing_value.invite) ? data.types_total_blessing_value.invite : 0,
}) })
}) })
if (data.is_login === 1) { if (data.is_login === 1) {
...@@ -241,9 +240,10 @@ class BlessingPreheat extends Component { ...@@ -241,9 +240,10 @@ class BlessingPreheat extends Component {
} }
handleToShow = (key, isLogin = false) => { handleToShow = (key, isLogin = false) => {
const {userInfo} = this.state
// 需要用户登录 并且用户未登录 // 需要用户登录 并且用户未登录
if (isLogin && !userInfo.isLogin) { const isLoginnew = !this.props.user.hasError
if (isLogin && isLoginnew) {
this.toLogin() this.toLogin()
} else { } else {
let obj = {} let obj = {}
...@@ -256,9 +256,9 @@ class BlessingPreheat extends Component { ...@@ -256,9 +256,9 @@ class BlessingPreheat extends Component {
// 邀请好友注册 // 邀请好友注册
handleToShowInvite = () => { handleToShowInvite = () => {
const { userInfo } = this.state; const isLogin = !this.props.user.hasError
if(userInfo.isLogin) { if (isLogin) {
if(!getParam('version')) { if (!getParam('version')) {
QRCode.toDataURL(`${API.m}/invite`, { QRCode.toDataURL(`${API.m}/invite`, {
width: 120, width: 120,
height: 120, height: 120,
...@@ -349,7 +349,7 @@ class BlessingPreheat extends Component { ...@@ -349,7 +349,7 @@ class BlessingPreheat extends Component {
} }
let el = document.querySelector(`#${navs[_index].id}`) let el = document.querySelector(`#${navs[_index].id}`)
let nav = document.querySelector('#main-nav') let nav = document.querySelector('#main-nav')
if(el) { if (el) {
let top = el.offsetTop let top = el.offsetTop
...@@ -393,6 +393,7 @@ class BlessingPreheat extends Component { ...@@ -393,6 +393,7 @@ class BlessingPreheat extends Component {
index index
} = this.state; } = this.state;
const {history} = this.props; const {history} = this.props;
const isLogin = !this.props.user.hasError
return ( return (
<div id={'blessing-preheat'}> <div id={'blessing-preheat'}>
<Banner <Banner
...@@ -408,6 +409,7 @@ class BlessingPreheat extends Component { ...@@ -408,6 +409,7 @@ class BlessingPreheat extends Component {
<CollectBlessing <CollectBlessing
isSign={isSign} isSign={isSign}
userInfo={userInfo} userInfo={userInfo}
isLogin={isLogin}
history={this.props.history} history={this.props.history}
toSection={(e) => this.toSection(this.fetchMoudleId('best-courses'), e)} toSection={(e) => this.toSection(this.fetchMoudleId('best-courses'), e)}
handleToShowList={() => this.handleToShow('isCourse')} handleToShowList={() => this.handleToShow('isCourse')}
...@@ -438,7 +440,7 @@ class BlessingPreheat extends Component { ...@@ -438,7 +440,7 @@ class BlessingPreheat extends Component {
<ListHeader id={'best-courses'} text="精品课程特惠专区" styles={{margin: '30px 0 15px'}}/> <ListHeader id={'best-courses'} text="精品课程特惠专区" styles={{margin: '30px 0 15px'}}/>
<CourseList <CourseList
isFormal={isFormal} isFormal={isFormal}
isLogin={userInfo.isLogin} isLogin={isLogin}
history={this.props.history} history={this.props.history}
toLogin={this.toLogin} toLogin={this.toLogin}
/> />
...@@ -449,7 +451,8 @@ class BlessingPreheat extends Component { ...@@ -449,7 +451,8 @@ class BlessingPreheat extends Component {
} }
{ {
isCourse && isCourse &&
<CoursePopup toLogin={this.toLogin} history={history} isLogin={userInfo.isLogin} handleToHide={() => this.handleToHide('isCourse')}/> <CoursePopup toLogin={this.toLogin} history={history} isLogin={isLogin}
handleToHide={() => this.handleToHide('isCourse')}/>
} }
{ {
showRecordList && showRecordList &&
...@@ -503,12 +506,12 @@ class BlessingPreheat extends Component { ...@@ -503,12 +506,12 @@ class BlessingPreheat extends Component {
</Popup> </Popup>
<ListHeader id={'ai-test'} text="全国AI工程师水平测试" styles={{margin: '30px 0 15px'}} /> <ListHeader id={'ai-test'} text="全国AI工程师水平测试" styles={{margin: '30px 0 15px'}}/>
<div className="test__record" onClick={() => this.handleToShow('showRecordList', true)}> <div className="test__record" onClick={() => this.handleToShow('showRecordList', true)}>
测试记录> 测试记录>
</div> </div>
<LevelTest history={history} isLogin={userInfo.isLogin} toLogin={this.toLogin}></LevelTest> <LevelTest history={history} isLogin={isLogin} toLogin={this.toLogin}></LevelTest>
<RankList></RankList> <RankList></RankList>
......
...@@ -115,6 +115,7 @@ class Live extends Component { ...@@ -115,6 +115,7 @@ class Live extends Component {
tabBarInactiveTextColor={'#FFF604'} tabBarInactiveTextColor={'#FFF604'}
tabBarUnderlineStyle={{display: 'none'}} tabBarUnderlineStyle={{display: 'none'}}
initialPage={today} initialPage={today}
swipeable={false}
> >
{ {
this.props.isFormal this.props.isFormal
......
...@@ -37,7 +37,7 @@ class LuckDraw extends Component { ...@@ -37,7 +37,7 @@ class LuckDraw extends Component {
const { tabs, prizes } = this.state; const { tabs, prizes } = this.state;
return ( return (
<div className="luck-draw__container"> <div className="luck-draw__container">
<Tabs <Tabs swipeable={false}
tabs={tabs} tabs={tabs}
tabBarBackgroundColor="transparent" tabBarBackgroundColor="transparent"
tabBarUnderlineStyle={{ tabBarUnderlineStyle={{
......
...@@ -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>
......
...@@ -3,7 +3,9 @@ import './coupon.scss' ...@@ -3,7 +3,9 @@ import './coupon.scss'
import classnames from 'classnames' import classnames from 'classnames'
import { http } from "@/utils" import { http } from "@/utils"
import showAlert from '@common/deposit/end-expansion-alert' import showAlert from '@common/deposit/end-expansion-alert'
import {Toast} from 'antd-mobile' import { Toast } from 'antd-mobile'
import { withRouter } from "react-router-dom"
class Coupon extends PureComponent { class Coupon extends PureComponent {
...@@ -12,9 +14,18 @@ class Coupon extends PureComponent { ...@@ -12,9 +14,18 @@ class Coupon extends PureComponent {
EXPAND = 4 //膨胀全 EXPAND = 4 //膨胀全
pick = () => { pick = (e) => {
let {useCoupon, invalid} = this.props let {useCoupon, invalid, start_amount, id, location, history, code} = this.props
const {state} = location
if(state && state.from && state.from === '/my'){
history.push(`/expand/index?deposit_code=${code}`)
return
}
if (start_amount) {
this.stopExpanding(id, e)
} else {
!invalid && useCoupon && useCoupon(this.props.id) !invalid && useCoupon && useCoupon(this.props.id)
}
} }
...@@ -38,8 +49,8 @@ class Coupon extends PureComponent { ...@@ -38,8 +49,8 @@ class Coupon extends PureComponent {
.then(res => { .then(res => {
const {data} = res const {data} = res
if (data.code == 200) { if (data.code == 200) {
this.props.endExpansion(id) this.props.endExpansion(id, data.data.coupon_id)
}else { } else {
Toast.info(data.msg) Toast.info(data.msg)
} }
}) })
...@@ -209,4 +220,4 @@ function BaseCoupon( ...@@ -209,4 +220,4 @@ function BaseCoupon(
) )
} }
export default Coupon export default withRouter(Coupon)
...@@ -6,7 +6,6 @@ import Coupon from '../Coupon' ...@@ -6,7 +6,6 @@ import Coupon from '../Coupon'
import { http, getParam } from '@/utils' import { http, getParam } from '@/utils'
import { WithFullSize } from '@/HOCs' import { WithFullSize } from '@/HOCs'
import { Toast } from 'antd-mobile' import { Toast } from 'antd-mobile'
import { isEmpty } from 'lodash'
import { connect } from 'react-redux' import { connect } from 'react-redux'
@connect() @connect()
...@@ -110,19 +109,13 @@ class UseCoupon extends PureComponent { ...@@ -110,19 +109,13 @@ class UseCoupon extends PureComponent {
getMyCoupons = () => { getMyCoupons = () => {
Promise.all([ Promise.all([
http.get(`${API.home}/m/coupon/all`), http.get(`${API.home}/m/coupon/expansion`),
http.get(`${API.home}/m/coupon/expansion`) http.get(`${API.home}/m/coupon/all`)
]).then((coupons) => { ]).then((coupons) => {
let myCoupons = [] let myCoupons = []
const [allCoupons, expansionCoupons] = coupons const [expansionCoupons, allCoupons] = coupons
const {data: all} = allCoupons const {data: all} = allCoupons
const {data: expansion} = expansionCoupons const {data: expansion} = expansionCoupons
if (all.code == 200) {
Array.isArray(all.data) && (myCoupons = myCoupons.concat(all.data))
} else {
Toast.info(all.msg)
}
if (expansion.code == 200) { if (expansion.code == 200) {
Array.isArray(expansion.data) Array.isArray(expansion.data)
&& (expansion.data = expansion.data.map(item => (item.ctype = 4, item))) && (expansion.data = expansion.data.map(item => (item.ctype = 4, item)))
...@@ -130,6 +123,11 @@ class UseCoupon extends PureComponent { ...@@ -130,6 +123,11 @@ class UseCoupon extends PureComponent {
} else { } else {
Toast.info(expansion.msg) Toast.info(expansion.msg)
} }
if (all.code == 200) {
Array.isArray(all.data) && (myCoupons = myCoupons.concat(all.data))
} else {
Toast.info(all.msg)
}
this.setState({ this.setState({
couponList: myCoupons couponList: myCoupons
...@@ -139,12 +137,21 @@ class UseCoupon extends PureComponent { ...@@ -139,12 +137,21 @@ class UseCoupon extends PureComponent {
getAllCoupons = () => { getAllCoupons = () => {
Promise.all([ Promise.all([
http.post(`${API.home}/m/coupon/select`, {course_id: this.state.courseId}), http.get(`${API.home}/m/coupon/expansion`),
http.get(`${API.home}/m/coupon/expansion`) http.post(`${API.home}/m/coupon/select`, {course_id: this.state.courseId})
]).then((coupons) => { ]).then((coupons) => {
const [selectCoupons, expansionCoupons] = coupons const [expansionCoupons, selectCoupons] = coupons
const {data: select} = selectCoupons const {data: select} = selectCoupons
const {data: expansion} = expansionCoupons const {data: expansion} = expansionCoupons
if (expansion.code == 200) {
Array.isArray(expansion.data)
&& (expansion.data = expansion.data.map(item => (item.ctype = 4, item)))
&& (this.setState({
valid_coupons: this.state.valid_coupons.concat(expansion.data)
}))
} else {
Toast.info(expansion.msg)
}
if (select.code === 200) { if (select.code === 200) {
const inuse_coupon = select.data['inuse_coupon'] const inuse_coupon = select.data['inuse_coupon']
this.setState({ this.setState({
...@@ -158,15 +165,6 @@ class UseCoupon extends PureComponent { ...@@ -158,15 +165,6 @@ class UseCoupon extends PureComponent {
} else { } else {
Toast.info(data.msg) Toast.info(data.msg)
} }
if (expansion.code == 200) {
Array.isArray(expansion.data)
&& (expansion.data = expansion.data.map(item => (item.ctype = 4, item)))
&& (this.setState({
valid_coupons: this.state.valid_coupons.concat(expansion.data)
}))
} else {
Toast.info(expansion.msg)
}
}) })
...@@ -278,11 +276,12 @@ class UseCoupon extends PureComponent { ...@@ -278,11 +276,12 @@ class UseCoupon extends PureComponent {
}) })
} }
endExpansion = id => { endExpansion = (id, validId) => {
this.setState({ this.setState({
couponList: this.state.couponList.map(item => { valid_coupons: this.state.valid_coupons.map(item => {
if (item.id === id) { if (item.id === id) {
delete item.start_amount delete item.start_amount
item.id = validId
} }
return item return item
}) })
......
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
font-size: 14px; font-size: 14px;
color: $color_666; color: $color_666;
margin-top: 10px; margin-top: 10px;
line-height: 16px;
} }
.des { .des {
......
...@@ -164,8 +164,7 @@ class ExpandShare extends Component { ...@@ -164,8 +164,7 @@ class ExpandShare extends Component {
step: 2, step: 2,
helpData: data helpData: data
}) })
this.getListorData()
console.log(data)
} else if (errno === 17018 || errno === 17020) { } else if (errno === 17018 || errno === 17020) {
this.setState({ this.setState({
isShow: true, isShow: true,
......
...@@ -569,6 +569,7 @@ ...@@ -569,6 +569,7 @@
color: #fff; color: #fff;
font-size: 15px; font-size: 15px;
margin-top: 20px; margin-top: 20px;
border: none;
} }
} }
...@@ -596,6 +597,7 @@ ...@@ -596,6 +597,7 @@
border-radius: 17px; border-radius: 17px;
color: #fff; color: #fff;
font-size: 15px; font-size: 15px;
border: none;
} }
} }
......
...@@ -193,7 +193,7 @@ function PayInfo(props) { ...@@ -193,7 +193,7 @@ function PayInfo(props) {
</p> </p>
<p> <p>
<span className='payable'>已优惠:</span> <span className='payable'>已优惠:</span>
<span className='price'>¥{props.item.deposit_cut}</span> <span className='price'>¥{props.item.discount}</span>
</p> </p>
</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