Commit c83d1539 by dazhou

拼团成功页显示的课程价格改为拼团价

parent 7a38e5a3
(this["webpackJsonpmr-julyedu"]=this["webpackJsonpmr-julyedu"]||[]).push([[45],{1142:function(e,a,t){"use strict";t.r(a);t(135);var n,c=t(71),s=t.n(c),r=(t(83),t(29)),i=t.n(r),o=(t(134),t(34)),l=t.n(o),d=(t(203),t(85)),m=t.n(d),u=(t(36),t(10)),p=t.n(u),E=t(3),f=t(5),_=t(6),h=t(7),v=t(0),N=t.n(v),g=(t(730),t(25)),b=t(1),w=t(20),y=t(15),C=Object(w.b)((function(e){return{user:e.user}}))(n=function(e){Object(_.a)(t,e);var a=Object(h.a)(t);function t(e){var n;return Object(E.a)(this,t),(n=a.call(this,e)).invitedFriends=function(){var e=n.state,a=e.pdd_price,t=e.number,c=e.data;if(b.b.isWeixin){var s=n.state.share;n.setState({share:!s}),Object(b.m)({title:"\u3010\u4ec5\u5269".concat(t,"\u4e2a\u540d\u989d\u3011\u6211").concat(a,"\u5143\u62fc\u4e86\u300a").concat(c.course_title,"\u300b"),desc:c.course_title,link:window.location.href+"&is_originator=1",imgUrl:c.image_name})}else p.a.info("\u8bf7\u5728\u5fae\u4fe1\u4e2d\u4f7f\u7528\u5206\u4eab\u529f\u80fd\uff01",2)},n.toCourseDetail=function(e){return n.props.history.push("/detail?id=".concat(e),{href:"/classify"}),!1},n.handleToGroup=function(){var e=n.state,a=e.isBuy,t=void 0!==a&&a,c=e.data,s=void 0===c?{}:c,r=n.props,i=r.user,o=r.history,l=r.location;if(i.hasError)if(b.b.isWeixin){var d=window.location.href;if(d.includes("code=")&&d.includes("state=STATE")){var m=d.lastIndexOf("code=");d=d.substr(0,m-1)}window.location.assign("https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=".concat(encodeURIComponent(d),"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"))}else o.push("/passport",{from:l});else t?n.setState({modal:!0}):o.push("/order?id=".concat(s.course_id),{group:1,pdd_order_id:n.state.pddOrderId})},n.state={data:{},share:!1,pdd_price:0,groupon_member:[],person_num:0,is_success:!1,number:0,isBuy:!1,modal:!1,pddOrderId:""},n}return Object(f.a)(t,[{key:"componentDidMount",value:function(){var e=this;b.f.get("".concat(API["base-api"],"/pdd/info/").concat(Object(b.c)("id"))).then((function(a){if(0===a.data.errno){if(e.setState({data:a.data.data.course_info,pdd_price:a.data.data.pdd_price,groupon_member:a.data.data.groupon_member,is_success:a.data.data.is_success,person_num:a.data.data.person_num,course_list:a.data.data.course_list,number:a.data.data.number,pddOrderId:a.data.data.pdd_order_id,countdown:"",isBuy:a.data.data.is_buy}),0===a.data.data.is_success){var t=1e3*a.data.data.end_time,n=0,c=0,s=0,r=0;setInterval((function(){t-=1e3,a.data.data.end_time>86400?(n="".concat(parseInt(t/864e5)).padStart(2,0),c="".concat(parseInt((t-36e5*n*24)/36e5)).padStart(2,0),s="".concat(parseInt((t-36e5*n*24-36e5*c)/6e4)).padStart(2,0),e.setState({countdown:"".concat(n,"\u5929").concat(c,"\u65f6").concat(s,"\u5206")})):(c="".concat(parseInt(t/36e5)).padStart(2,0),s="".concat(parseInt((t-36e5*c)/6e4)).padStart(2,0),r="".concat(parseInt((t-36e5*c-6e4*s)/1e3)).padStart(2,0),e.setState({countdown:"".concat(c,":").concat(s,":").concat(r)}))}),1e3)}}else p.a.info(a.data.msg,2)}))}},{key:"render",value:function(){var e=this,a=this.state,t=a.data,n=t.course_id,c=t.course_title,s=t.simpledescription,r=t.price0,i=t.price1,o=a.is_success,d=a.course_list,u=N.a.createElement("div",{className:"info"},N.a.createElement("p",{className:"title",onClick:function(){return e.toCourseDetail(n)}},c),N.a.createElement("p",{className:"contact text-overflow-2"},s),N.a.createElement("div",{className:"des"},N.a.createElement("p",{className:"course-price"},N.a.createElement("span",{className:"new"},"\xa5",i),N.a.createElement("span",{className:"old"},"\xa5",r))));return N.a.createElement("div",{className:"to-group-box"},N.a.createElement(g.e,{title:"\u62fc\u56e2",cart:!1,toHref:"/"}),N.a.createElement(m.a,{transparent:!0,visible:this.state.modal,title:"\u63d0\u793a",footer:[{text:"\u786e\u5b9a",onPress:function(){e.setState({modal:!1}),e.props.history.push("/")}}]},N.a.createElement("p",null,"\u60a8\u5df2\u7ecf\u8d2d\u4e70\u8fc7\u8be5\u8bfe\u7a0b\uff5e")),!o&&N.a.createElement(g.j,{img:this.state.data.image_name,id:this.state.data.course_id,info:u,toDetail:this.toCourseDetail}),N.a.createElement(I,{data:this.state,invitedFriends:this.invitedFriends,handleToGroup:this.handleToGroup,userInfo:this.props.user}),N.a.createElement(l.a,null),N.a.createElement("div",{className:"group-course"},N.a.createElement("div",{className:"top-title"},N.a.createElement("span",null,"\u672c\u5468\u7279\u60e0")),d&&d.length>0&&d[0].course&&d[0].course.length>0&&d[0].course.slice(0,4).map((function(a){var t=N.a.createElement("div",{className:"info"},N.a.createElement("p",{className:"title",onClick:function(){return e.toCourseDetail(a.course_id)}},a.course_title),N.a.createElement("p",{className:"contact text-overflow-2"},a.simpledescription),N.a.createElement("div",{className:"des"},N.a.createElement("p",{className:"course-price"},N.a.createElement("span",{className:"new"},"\xa5",a.price1),N.a.createElement("span",{className:"old"},"\xa5",a.price0))));return N.a.createElement(g.j,{img:a.image_name,key:a.course_id,id:a.course_id,info:t,toDetail:e.toCourseDetail})}))))}}]),t}(v.Component))||n;function I(e){for(var a,t,n,c,r=e.data,o=r.pdd_price,l=r.data,d=r.groupon_member,m=r.is_success,u=r.person_num,p=r.share,E=r.number,f=r.countdown,_=e.userInfo,h=[],v=E;0!=v;)h.push(v),v--;if(c=N.a.createElement("div",{className:"group-user-list"},N.a.createElement(i.a,{justify:"center",className:"imgList"},d.map((function(e){return N.a.createElement("div",{className:"imgContainer",key:Math.random()},N.a.createElement("img",{className:"imgname",src:e.avatar,alt:""}),1===e.user_type?N.a.createElement("div",{className:"leaderFlag"},N.a.createElement("span",null,"\u56e2\u957f")):null)})),h.map((function(e){return N.a.createElement("div",{className:"imgContainer",key:Math.random()},N.a.createElement("div",{className:"imgname"},N.a.createElement("i",{className:"iconfont iconwode-xianxing no-body"})))})))),d&&d.length>0){var g=!1;!_.hasError&&d.forEach((function(e){e.uid==_.data.uid&&(g=!0)})),g?(a=N.a.createElement("p",{className:"tip"},"\u62fc\u56e2\u7701\uffe5".concat((l.price1-o).toFixed(2),"\u5143")),t=N.a.createElement("span",{className:"group-btn",onClick:e.invitedFriends},"\u9080\u8bf7\u597d\u53cb\u53c2\u56e2 ",f," \u540e\u7ed3\u675f"),n=N.a.createElement("p",{className:"dec"},"\u5206\u4eab\u52303\u4e2a\u7fa4\u540e\uff0c\u6210\u56e2\u7387\u9ad8\u8fbe98%")):1==Object(b.c)("is_originator")?(a=N.a.createElement("p",{className:"tip"},"\u62fc\u56e2\u7701\uffe5".concat((l.price1-o).toFixed(2),"\u5143")),t=N.a.createElement("a",{href:"javascript:;",className:"group-btn",onClick:e.handleToGroup},"\u4e00\u952e\u53c2\u56e2")):(a=N.a.createElement("p",{className:"tip"},"\u62fc\u56e2\u7701\uffe5".concat((l.price1-o).toFixed(2),"\u5143")),t=N.a.createElement("span",{className:"group-btn",onClick:e.invitedFriends},"\u9080\u8bf7\u597d\u53cb\u53c2\u56e2 ",f," \u540e\u7ed3\u675f"),n=N.a.createElement("p",{className:"dec"},"\u5206\u4eab\u52303\u4e2a\u7fa4\u540e\uff0c\u6210\u56e2\u7387\u9ad8\u8fbe98%"))}return 1===m&&(a=N.a.createElement("p",{className:"success"},"\u62fc\u56e2\u6210\u529f"),t=N.a.createElement(y.b,{to:"/detail?id=".concat(l.course_id),className:"tostudy"},"\u53bb\u5b66\u4e60")),N.a.createElement("div",{className:"gorup-content"},p?N.a.createElement("div",{className:"groupSuccessMbc",onClick:e.invitedFriends},N.a.createElement("div",{className:"tipContent"},"\u8fd8\u5dee".concat(E,"\u4eba\uff0c\u5206\u4eab\u52303\u4e2a\u7fa4\uff0c\u6210\u56e2\u7387\u9ad8\u8fbe98%")),N.a.createElement("div",{className:"tipArrow"},N.a.createElement("i",{className:"iconfont iconyindao"}))):null,a,N.a.createElement(s.a,null,c),N.a.createElement(s.a,null,t),n,!m&&N.a.createElement("div",{className:"group-dec"},N.a.createElement("span",null,N.a.createElement("i",{className:"iconfont iconiconfront-1"}),"\xb7\u597d\u53cb\u53c2\u56e2 \xb7\u4eba\u6ee1\u6210\u4ea4 \xb7\u4eba\u4e0d\u6ee1\u9000\u6b3e"),N.a.createElement("span",{className:"allNum"},"\u7d2f\u8ba1".concat(u,"\u4eba\u6210\u56e2"))))}a.default=C},730:function(e,a,t){}}]);
(this["webpackJsonpmr-julyedu"]=this["webpackJsonpmr-julyedu"]||[]).push([[45],{1142:function(e,a,t){"use strict";t.r(a);t(135);var n,c=t(71),s=t.n(c),r=(t(83),t(29)),i=t.n(r),o=(t(134),t(34)),l=t.n(o),d=(t(203),t(85)),m=t.n(d),u=(t(36),t(10)),p=t.n(u),E=t(3),f=t(5),_=t(6),h=t(7),v=t(0),N=t.n(v),g=(t(730),t(25)),b=t(1),w=t(20),y=t(15),C=Object(w.b)((function(e){return{user:e.user}}))(n=function(e){Object(_.a)(t,e);var a=Object(h.a)(t);function t(e){var n;return Object(E.a)(this,t),(n=a.call(this,e)).invitedFriends=function(){var e=n.state,a=e.pdd_price,t=e.number,c=e.data;if(b.b.isWeixin){var s=n.state.share;n.setState({share:!s}),Object(b.m)({title:"\u3010\u4ec5\u5269".concat(t,"\u4e2a\u540d\u989d\u3011\u6211").concat(a,"\u5143\u62fc\u4e86\u300a").concat(c.course_title,"\u300b"),desc:c.course_title,link:window.location.href+"&is_originator=1",imgUrl:c.image_name})}else p.a.info("\u8bf7\u5728\u5fae\u4fe1\u4e2d\u4f7f\u7528\u5206\u4eab\u529f\u80fd\uff01",2)},n.toCourseDetail=function(e){return n.props.history.push("/detail?id=".concat(e),{href:"/classify"}),!1},n.handleToGroup=function(){var e=n.state,a=e.isBuy,t=void 0!==a&&a,c=e.data,s=void 0===c?{}:c,r=n.props,i=r.user,o=r.history,l=r.location;if(i.hasError)if(b.b.isWeixin){var d=window.location.href;if(d.includes("code=")&&d.includes("state=STATE")){var m=d.lastIndexOf("code=");d=d.substr(0,m-1)}window.location.assign("https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=".concat(encodeURIComponent(d),"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"))}else o.push("/passport",{from:l});else t?n.setState({modal:!0}):o.push("/order?id=".concat(s.course_id),{group:1,pdd_order_id:n.state.pddOrderId})},n.state={data:{},share:!1,pdd_price:0,groupon_member:[],person_num:0,is_success:!1,number:0,isBuy:!1,modal:!1,pddOrderId:""},n}return Object(f.a)(t,[{key:"componentDidMount",value:function(){var e=this;b.f.get("".concat(API["base-api"],"/pdd/info/").concat(Object(b.c)("id"))).then((function(a){if(0===a.data.errno){if(e.setState({data:a.data.data.course_info,pdd_price:a.data.data.pdd_price,groupon_member:a.data.data.groupon_member,is_success:a.data.data.is_success,person_num:a.data.data.person_num,course_list:a.data.data.course_list,number:a.data.data.number,pddOrderId:a.data.data.pdd_order_id,countdown:"",isBuy:a.data.data.is_buy}),0===a.data.data.is_success){var t=1e3*a.data.data.end_time,n=0,c=0,s=0,r=0;setInterval((function(){t-=1e3,a.data.data.end_time>86400?(n="".concat(parseInt(t/864e5)).padStart(2,0),c="".concat(parseInt((t-36e5*n*24)/36e5)).padStart(2,0),s="".concat(parseInt((t-36e5*n*24-36e5*c)/6e4)).padStart(2,0),e.setState({countdown:"".concat(n,"\u5929").concat(c,"\u65f6").concat(s,"\u5206")})):(c="".concat(parseInt(t/36e5)).padStart(2,0),s="".concat(parseInt((t-36e5*c)/6e4)).padStart(2,0),r="".concat(parseInt((t-36e5*c-6e4*s)/1e3)).padStart(2,0),e.setState({countdown:"".concat(c,":").concat(s,":").concat(r)}))}),1e3)}}else p.a.info(a.data.msg,2)}))}},{key:"render",value:function(){var e=this,a=this.state,t=a.data,n=t.course_id,c=t.course_title,s=t.simpledescription,r=t.price0,i=t.price1,o=a.is_success,d=a.course_list,u=N.a.createElement("div",{className:"info"},N.a.createElement("p",{className:"title",onClick:function(){return e.toCourseDetail(n)}},c),N.a.createElement("p",{className:"contact text-overflow-2"},s),N.a.createElement("div",{className:"des"},N.a.createElement("p",{className:"course-price"},N.a.createElement("span",{className:"new"},"\xa5",i),N.a.createElement("span",{className:"old"},"\xa5",r))));return N.a.createElement("div",{className:"to-group-box"},N.a.createElement(g.e,{title:"\u62fc\u56e2",cart:!1,toHref:"/"}),N.a.createElement(m.a,{transparent:!0,visible:this.state.modal,title:"\u63d0\u793a",footer:[{text:"\u786e\u5b9a",onPress:function(){e.setState({modal:!1}),e.props.history.push("/")}}]},N.a.createElement("p",null,"\u60a8\u5df2\u7ecf\u8d2d\u4e70\u8fc7\u8be5\u8bfe\u7a0b\uff5e")),!o&&N.a.createElement(g.j,{img:this.state.data.image_name,id:this.state.data.course_id,info:u,toDetail:this.toCourseDetail}),N.a.createElement(I,{data:this.state,invitedFriends:this.invitedFriends,handleToGroup:this.handleToGroup,userInfo:this.props.user}),N.a.createElement(l.a,null),N.a.createElement("div",{className:"group-course"},N.a.createElement("div",{className:"top-title"},N.a.createElement("span",null,"\u672c\u5468\u7279\u60e0")),d&&d.length>0&&d[0].course&&d[0].course.length>0&&d[0].course.slice(0,4).map((function(a){var t=N.a.createElement("div",{className:"info"},N.a.createElement("p",{className:"title",onClick:function(){return e.toCourseDetail(a.course_id)}},a.course_title),N.a.createElement("p",{className:"contact text-overflow-2"},a.simpledescription),N.a.createElement("div",{className:"des"},N.a.createElement("p",{className:"course-price"},N.a.createElement("span",{className:"new"},"\xa5",a.pdd_price),N.a.createElement("span",{className:"old"},"\xa5",a.price0))));return N.a.createElement(g.j,{img:a.image_name,key:a.course_id,id:a.course_id,info:t,toDetail:e.toCourseDetail})}))))}}]),t}(v.Component))||n;function I(e){for(var a,t,n,c,r=e.data,o=r.pdd_price,l=r.data,d=r.groupon_member,m=r.is_success,u=r.person_num,p=r.share,E=r.number,f=r.countdown,_=e.userInfo,h=[],v=E;0!=v;)h.push(v),v--;if(c=N.a.createElement("div",{className:"group-user-list"},N.a.createElement(i.a,{justify:"center",className:"imgList"},d.map((function(e){return N.a.createElement("div",{className:"imgContainer",key:Math.random()},N.a.createElement("img",{className:"imgname",src:e.avatar,alt:""}),1===e.user_type?N.a.createElement("div",{className:"leaderFlag"},N.a.createElement("span",null,"\u56e2\u957f")):null)})),h.map((function(e){return N.a.createElement("div",{className:"imgContainer",key:Math.random()},N.a.createElement("div",{className:"imgname"},N.a.createElement("i",{className:"iconfont iconwode-xianxing no-body"})))})))),d&&d.length>0){var g=!1;!_.hasError&&d.forEach((function(e){e.uid==_.data.uid&&(g=!0)})),g?(a=N.a.createElement("p",{className:"tip"},"\u62fc\u56e2\u7701\uffe5".concat((l.price1-o).toFixed(2),"\u5143")),t=N.a.createElement("span",{className:"group-btn",onClick:e.invitedFriends},"\u9080\u8bf7\u597d\u53cb\u53c2\u56e2 ",f," \u540e\u7ed3\u675f"),n=N.a.createElement("p",{className:"dec"},"\u5206\u4eab\u52303\u4e2a\u7fa4\u540e\uff0c\u6210\u56e2\u7387\u9ad8\u8fbe98%")):1==Object(b.c)("is_originator")?(a=N.a.createElement("p",{className:"tip"},"\u62fc\u56e2\u7701\uffe5".concat((l.price1-o).toFixed(2),"\u5143")),t=N.a.createElement("a",{href:"javascript:;",className:"group-btn",onClick:e.handleToGroup},"\u4e00\u952e\u53c2\u56e2")):(a=N.a.createElement("p",{className:"tip"},"\u62fc\u56e2\u7701\uffe5".concat((l.price1-o).toFixed(2),"\u5143")),t=N.a.createElement("span",{className:"group-btn",onClick:e.invitedFriends},"\u9080\u8bf7\u597d\u53cb\u53c2\u56e2 ",f," \u540e\u7ed3\u675f"),n=N.a.createElement("p",{className:"dec"},"\u5206\u4eab\u52303\u4e2a\u7fa4\u540e\uff0c\u6210\u56e2\u7387\u9ad8\u8fbe98%"))}return 1===m&&(a=N.a.createElement("p",{className:"success"},"\u62fc\u56e2\u6210\u529f"),t=N.a.createElement(y.b,{to:"/detail?id=".concat(l.course_id),className:"tostudy"},"\u53bb\u5b66\u4e60")),N.a.createElement("div",{className:"gorup-content"},p?N.a.createElement("div",{className:"groupSuccessMbc",onClick:e.invitedFriends},N.a.createElement("div",{className:"tipContent"},"\u8fd8\u5dee".concat(E,"\u4eba\uff0c\u5206\u4eab\u52303\u4e2a\u7fa4\uff0c\u6210\u56e2\u7387\u9ad8\u8fbe98%")),N.a.createElement("div",{className:"tipArrow"},N.a.createElement("i",{className:"iconfont iconyindao"}))):null,a,N.a.createElement(s.a,null,c),N.a.createElement(s.a,null,t),n,!m&&N.a.createElement("div",{className:"group-dec"},N.a.createElement("span",null,N.a.createElement("i",{className:"iconfont iconiconfront-1"}),"\xb7\u597d\u53cb\u53c2\u56e2 \xb7\u4eba\u6ee1\u6210\u4ea4 \xb7\u4eba\u4e0d\u6ee1\u9000\u6b3e"),N.a.createElement("span",{className:"allNum"},"\u7d2f\u8ba1".concat(u,"\u4eba\u6210\u56e2"))))}a.default=C},730:function(e,a,t){}}]);
//# sourceMappingURL=togroup.666cdc19.chunk.js.map
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment