Commit f387fba5 by zhanghaozhe

智能选课

parent 3028447c
......@@ -86,11 +86,11 @@
"detail.js": "/mrstatic/js/detail.6e432d51.chunk.js",
"detail.js.map": "/mrstatic/js/detail.6e432d51.chunk.js.map",
"intelligent-recommend.css": "/mrstatic/css/intelligent-recommend.409e397e.chunk.css",
"intelligent-recommend.js": "/mrstatic/js/intelligent-recommend.af0f12dc.chunk.js",
"intelligent-recommend.js.map": "/mrstatic/js/intelligent-recommend.af0f12dc.chunk.js.map",
"intelligent-recommend.js": "/mrstatic/js/intelligent-recommend.113a5ed9.chunk.js",
"intelligent-recommend.js.map": "/mrstatic/js/intelligent-recommend.113a5ed9.chunk.js.map",
"main.css": "/mrstatic/css/main.e2e38627.chunk.css",
"main.js": "/mrstatic/js/main.02f3d942.chunk.js",
"main.js.map": "/mrstatic/js/main.02f3d942.chunk.js.map",
"main.js": "/mrstatic/js/main.88842820.chunk.js",
"main.js.map": "/mrstatic/js/main.88842820.chunk.js.map",
"ml.css": "/mrstatic/css/ml.4913a774.chunk.css",
"ml.js": "/mrstatic/js/ml.a5b3d2b9.chunk.js",
"ml.js.map": "/mrstatic/js/ml.a5b3d2b9.chunk.js.map",
......@@ -115,8 +115,8 @@
"python-class.css": "/mrstatic/css/python-class.087d6571.chunk.css",
"python-class.js": "/mrstatic/js/python-class.e0fcffc3.chunk.js",
"python-class.js.map": "/mrstatic/js/python-class.e0fcffc3.chunk.js.map",
"runtime~main.js": "/mrstatic/js/runtime~main.61107584.js",
"runtime~main.js.map": "/mrstatic/js/runtime~main.61107584.js.map",
"runtime~main.js": "/mrstatic/js/runtime~main.29f6dd2a.js",
"runtime~main.js.map": "/mrstatic/js/runtime~main.29f6dd2a.js.map",
"search.css": "/mrstatic/css/search.38c3e634.chunk.css",
"search.js": "/mrstatic/js/search.2a34cb01.chunk.js",
"search.js.map": "/mrstatic/js/search.2a34cb01.chunk.js.map",
......@@ -256,6 +256,6 @@
"mrstatic/media/iconfont.css": "/mrstatic/media/iconfont.f2f4294d.woff",
"mrstatic/media/kanjia_cg_icon.png": "/mrstatic/media/kanjia_cg_icon.81a489ac.png",
"mrstatic/media/video.scss": "/mrstatic/media/progress-share-bg.80011994.png",
"precache-manifest.7dd410fe8a0fc430975295f12c64da63.js": "/precache-manifest.7dd410fe8a0fc430975295f12c64da63.js",
"precache-manifest.7b8123b570e59d802083986148de4a37.js": "/precache-manifest.7b8123b570e59d802083986148de4a37.js",
"service-worker.js": "/service-worker.js"
}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[30],{1134:function(e,t,a){},1178:function(e,t,a){"use strict";a.r(t);a(37);var n=a(10),s=a.n(n),c=a(18),i=a(3),r=a(5),l=a(4),o=a(6),d=a(7),m=a(0),u=a.n(m),p=(a(1134),a(13)),E=a(2),g=a(20),h=a(60),v=a(38),y=a(165),_={SYSTEM_MESSAGE:1,USER_MESSAGE:2,OPTIONS:3},f=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,r=new Array(n),d=0;d<n;d++)r[d]=arguments[d];return(a=Object(l.a)(this,(e=Object(o.a)(t)).call.apply(e,[this].concat(r)))).state={showAnalyzing:!1,systemAvatar:"https://julyedu-img-public.oss-cn-beijing.aliyuncs.com/Public/Image/home/avatar_20191104.png",options:{data:[],messageId:0},next:{oid:0,rid:0}},a.handleSelect=function(e){a.props.addMessage({type:_.USER_MESSAGE,content:e.describe,id:e.id}),a.setState(function(t){return{options:{data:[],messageId:0},next:Object(c.a)({},t.next,{oid:e.id})}},function(){a.getMessage()})},a.getMessage=function(){var e=a.state.next,t=e.oid,n=e.rid;E.e.get("".concat(API.home,"/sys/icc/communicate/").concat(t,"/").concat(n)).then(function(e){var t=e.data,n=t.data,i=t.code,r=t.msg;if(200===i)if(1===n.answer_type)a.setState({showAnalyzing:!0},function(){setTimeout(function(){a.setState({showAnalyzing:!1}),a.props.addResult(Object(c.a)({},n))},500*Math.random()+1e3)});else{var l={type:_.SYSTEM_MESSAGE,content:n.contents.find(function(e){return e.is_question})},o=n.contents.filter(function(e){return!e.is_question});a.props.addMessage(l),a.setState({options:{messageId:l.content.id,data:o},next:{rid:n.rid}})}else s.a.fail(r)})},a.consult=function(e){e.preventDefault(),E.e.post("".concat(API.home,"/sys/icc/consult"),{rid:a.state.result.rid}).finally(function(){window.location.href=e.target.getAttribute("href")})},a.goBack=function(){var e=a.props.location.state;E.b.isWeixin&&Object(E.c)("code")&&Object(E.c)("state")&&window.history.go(-2),e.records&&e.records.length>1?window.history.go(-1):e.from&&e.from.pathname?location.replace("".concat(e.from.pathname).concat(e.from.search)):window.location.href=window.location.origin},a}return Object(d.a)(t,e),Object(r.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.user,a=e.intelligentRecommend,n=e.history,s=e.reselect;if(t.hasError)return n.push("/passport");Object(v.isEmpty)(a.result)&&(s(),this.getMessage())}},{key:"render",value:function(){var e=this,t=this.state,a=t.showAnalyzing,n=t.systemAvatar,s=t.options,c=this.props,i=c.user,r=c.intelligentRecommend,l=r.result,o=r.processing,d=c.reselect,m=l.contents;return u.a.createElement("div",{id:"intelligent-recommend"},u.a.createElement("div",{className:"head"},u.a.createElement("div",null,u.a.createElement("div",{className:"go-back"},u.a.createElement("i",{className:"iconfont iconiconfront-68",onClick:this.goBack})),u.a.createElement("div",{className:"title"},"\u4e03\u6708\u5728\u7ebf\u667a\u80fd\u9009\u8bfe")),u.a.createElement("button",{onClick:function(){e.setState({next:{oid:0,rid:0},options:{messageId:0,data:[]}},function(){d(),e.getMessage()})}},"\u91cd\u65b0\u9009\u8bfe")),u.a.createElement("div",{className:"dialog-box"},!!o.length&&o.map(function(t,a){switch(t.type){case _.SYSTEM_MESSAGE:return u.a.createElement(u.a.Fragment,{key:a},u.a.createElement(b,{text:t.content.describe,identity:"system",avatar:n}),s.messageId===t.content.id&&u.a.createElement(N,{options:s.data,handleSelect:e.handleSelect}));case _.USER_MESSAGE:return u.a.createElement(b,{text:t.content,identity:"user",avatar:i.data.avatar,key:a+2})}}),a&&u.a.createElement("div",{className:"analyzing"},"\u52aa\u529b\u5206\u6790\u4e2d...")),!Object(v.isEmpty)(m)&&u.a.createElement("div",{className:"result"},u.a.createElement("div",{className:"title"},"\u6839\u636e\u60a8\u76ee\u524d\u7684\u60c5\u51b5\uff0c\u63a8\u8350\u7ed3\u679c\u5982\u4e0b"),u.a.createElement("div",{className:"obtained"},u.a.createElement("div",{className:"subtitle",dangerouslySetInnerHTML:{__html:m.skill_title}}),u.a.createElement("div",{className:"skill",dangerouslySetInnerHTML:{__html:m.skill_desc}})),u.a.createElement("div",{className:"obtained"},u.a.createElement("div",{className:"subtitle",dangerouslySetInnerHTML:{__html:m.project_title}}),u.a.createElement("div",{className:"skill project",dangerouslySetInnerHTML:{__html:m.project_desc}})),u.a.createElement("div",{className:"salary-section"},u.a.createElement("div",{className:"subtitle",dangerouslySetInnerHTML:{__html:m.salary_title}}),u.a.createElement("div",{className:"salary",dangerouslySetInnerHTML:{__html:m.salary_desc}})),u.a.createElement("div",{className:"recommends"},u.a.createElement("div",null,"\u60f3\u83b7\u5f97\u4ee5\u4e0a\u6280\u80fd\uff0c\u5411\u60a8\u63a8\u8350\uff1a"),u.a.createElement("ul",{className:"courses"},!!m.courses.length&&m.courses.map(function(t){return u.a.createElement("li",{className:"course",key:t.course_id,onClick:function(a){"a"!==a.target.nodeName.toLowerCase()&&(t.course_id?e.props.history.push("/detail?id=".concat(t.course_id)):e.props.history.push("/play?id=".concat(t.v_course_id)))}},u.a.createElement("div",{className:"cover"},u.a.createElement("img",{src:t.img_url,alt:""})),u.a.createElement("div",{className:"info"},u.a.createElement("div",{className:"title"},t.recmd_title),u.a.createElement("div",{className:"des"},t.recmd_desc),u.a.createElement("div",{className:"bar"},1===t.c_type&&u.a.createElement(u.a.Fragment,{key:t.course_id},u.a.createElement("div",{className:"prices"},u.a.createElement("span",{className:"price"},"\uffe5",t.price_sale),u.a.createElement("span",{className:"old-price"},"\uffe5",t.price_original)),u.a.createElement(p.b,{className:"register",to:"/detail?id=".concat(t.course_id)},t.second_btn)),2===t.c_type&&u.a.createElement(u.a.Fragment,{key:t.course_id},u.a.createElement("a",{href:"http://q.url.cn/s/Vbkup6m?_type=wpa",className:"contact",onClick:e.consult.bind(e,t.rid)},t.consult),u.a.createElement(p.b,{className:"register",to:"/detail?id=".concat(t.course_id)},t.second_btn)),0===t.c_type&&u.a.createElement(p.b,{className:"study",to:"/play?id=".concat(t.v_course_id)},t.second_btn))))})))))}}]),t}(m.Component);function b(e){var t=e.text,a=e.avatar,n=e.identity;return u.a.createElement("div",{className:"message clearfix ".concat(n)},u.a.createElement("div",{className:"avatar"},u.a.createElement("img",{src:a,alt:""})),u.a.createElement("div",{className:"text"},t))}function N(e){var t=e.options,a=e.handleSelect;return u.a.createElement("ul",{className:"options"},!!t.length&&t.map(function(e){return u.a.createElement("li",{onClick:function(){return a(e)},key:e.id},e.describe)}))}t.default=Object(g.b)(function(e){return{user:e.user,intelligentRecommend:e.intelligentRecommend}},{addMessage:y.a,addResult:y.b,reselect:y.d})(Object(h.a)(f))}}]);
//# sourceMappingURL=intelligent-recommend.113a5ed9.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[30],{1134:function(e,t,a){},1178:function(e,t,a){"use strict";a.r(t);a(37);var n=a(10),s=a.n(n),c=a(18),i=a(3),r=a(5),l=a(4),o=a(6),d=a(7),m=a(0),u=a.n(m),p=(a(1134),a(13)),E=a(2),g=a(20),h=a(60),v=a(38),y=a(165),_={SYSTEM_MESSAGE:1,USER_MESSAGE:2,OPTIONS:3},f=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,r=new Array(n),d=0;d<n;d++)r[d]=arguments[d];return(a=Object(l.a)(this,(e=Object(o.a)(t)).call.apply(e,[this].concat(r)))).state={showAnalyzing:!1,systemAvatar:"https://julyedu-img-public.oss-cn-beijing.aliyuncs.com/Public/Image/home/avatar_20191104.png",options:{data:[],messageId:0},next:{oid:0,rid:0}},a.handleSelect=function(e){a.props.addMessage({type:_.USER_MESSAGE,content:e.describe,id:e.id}),a.setState(function(t){return{options:{data:[],messageId:0},next:Object(c.a)({},t.next,{oid:e.id})}},function(){a.getMessage()})},a.getMessage=function(){var e=a.state.next,t=e.oid,n=e.rid;E.e.get("".concat(API.home,"/sys/icc/communicate/").concat(t,"/").concat(n)).then(function(e){var t=e.data,n=t.data,i=t.code,r=t.msg;if(200===i)if(1===n.answer_type)a.setState({showAnalyzing:!0},function(){setTimeout(function(){a.setState({showAnalyzing:!1}),a.props.addResult(Object(c.a)({},n))},500*Math.random()+1e3)});else{var l={type:_.SYSTEM_MESSAGE,content:n.contents.find(function(e){return e.is_question})},o=n.contents.filter(function(e){return!e.is_question});a.props.addMessage(l),a.setState({options:{messageId:l.content.id,data:o},next:{rid:n.rid}})}else s.a.fail(r)})},a.consult=function(e){e.preventDefault(),E.e.post("".concat(API.home,"/sys/icc/consult"),{rid:a.state.result.rid}).finally(function(){window.location.href=e.target.getAttribute("href")})},a.goBack=function(){var e=a.props.location.state;E.b.isWeixin&&Object(E.c)("code")&&Object(E.c)("state")&&window.history.go(-2),e.records&&e.records.length>1?window.history.go(-1):e.from&&e.from.pathname?location.replace("".concat(e.from.pathname).concat(e.from.search)):window.location.href=window.location.origin},a}return Object(d.a)(t,e),Object(r.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.user,a=e.intelligentRecommend,n=e.history;if(t.hasError)return n.push("/passport");a.processing.length||this.getMessage()}},{key:"render",value:function(){var e=this,t=this.state,a=t.showAnalyzing,n=t.systemAvatar,s=t.options,c=this.props,i=c.user,r=c.intelligentRecommend,l=r.result,o=r.processing,d=c.reselect,m=l.contents;return u.a.createElement("div",{id:"intelligent-recommend"},u.a.createElement("div",{className:"head"},u.a.createElement("div",null,u.a.createElement("div",{className:"go-back"},u.a.createElement("i",{className:"iconfont iconiconfront-68",onClick:this.goBack})),u.a.createElement("div",{className:"title"},"\u4e03\u6708\u5728\u7ebf\u667a\u80fd\u9009\u8bfe")),u.a.createElement("button",{onClick:function(){e.setState({next:{oid:0,rid:0},options:{messageId:0,data:[]}},function(){d(),e.getMessage()})}},"\u91cd\u65b0\u9009\u8bfe")),u.a.createElement("div",{className:"dialog-box"},!!o.length&&o.map(function(t,a){switch(t.type){case _.SYSTEM_MESSAGE:return u.a.createElement(u.a.Fragment,{key:a},u.a.createElement(b,{text:t.content.describe,identity:"system",avatar:n}),s.messageId===t.content.id&&u.a.createElement(N,{options:s.data,handleSelect:e.handleSelect}));case _.USER_MESSAGE:return u.a.createElement(b,{text:t.content,identity:"user",avatar:i.data.avatar,key:a+2})}}),a&&u.a.createElement("div",{className:"analyzing"},"\u52aa\u529b\u5206\u6790\u4e2d...")),!Object(v.isEmpty)(m)&&u.a.createElement("div",{className:"result"},u.a.createElement("div",{className:"title"},"\u6839\u636e\u60a8\u76ee\u524d\u7684\u60c5\u51b5\uff0c\u63a8\u8350\u7ed3\u679c\u5982\u4e0b"),u.a.createElement("div",{className:"obtained"},u.a.createElement("div",{className:"subtitle",dangerouslySetInnerHTML:{__html:m.skill_title}}),u.a.createElement("div",{className:"skill",dangerouslySetInnerHTML:{__html:m.skill_desc}})),u.a.createElement("div",{className:"obtained"},u.a.createElement("div",{className:"subtitle",dangerouslySetInnerHTML:{__html:m.project_title}}),u.a.createElement("div",{className:"skill project",dangerouslySetInnerHTML:{__html:m.project_desc}})),u.a.createElement("div",{className:"salary-section"},u.a.createElement("div",{className:"subtitle",dangerouslySetInnerHTML:{__html:m.salary_title}}),u.a.createElement("div",{className:"salary",dangerouslySetInnerHTML:{__html:m.salary_desc}})),u.a.createElement("div",{className:"recommends"},u.a.createElement("div",null,"\u60f3\u83b7\u5f97\u4ee5\u4e0a\u6280\u80fd\uff0c\u5411\u60a8\u63a8\u8350\uff1a"),u.a.createElement("ul",{className:"courses"},!!m.courses.length&&m.courses.map(function(t){return u.a.createElement("li",{className:"course",key:t.course_id,onClick:function(a){"a"!==a.target.nodeName.toLowerCase()&&(t.course_id?e.props.history.push("/detail?id=".concat(t.course_id)):e.props.history.push("/play?id=".concat(t.v_course_id)))}},u.a.createElement("div",{className:"cover"},u.a.createElement("img",{src:t.img_url,alt:""})),u.a.createElement("div",{className:"info"},u.a.createElement("div",{className:"title"},t.recmd_title),u.a.createElement("div",{className:"des"},t.recmd_desc),u.a.createElement("div",{className:"bar"},1===t.c_type&&u.a.createElement(u.a.Fragment,{key:t.course_id},u.a.createElement("div",{className:"prices"},u.a.createElement("span",{className:"price"},"\uffe5",t.price_sale),u.a.createElement("span",{className:"old-price"},"\uffe5",t.price_original)),u.a.createElement(p.b,{className:"register",to:"/detail?id=".concat(t.course_id)},t.second_btn)),2===t.c_type&&u.a.createElement(u.a.Fragment,{key:t.course_id},u.a.createElement("a",{href:"http://q.url.cn/s/Vbkup6m?_type=wpa",className:"contact",onClick:e.consult.bind(e,t.rid)},t.consult),u.a.createElement(p.b,{className:"register",to:"/detail?id=".concat(t.course_id)},t.second_btn)),0===t.c_type&&u.a.createElement(p.b,{className:"study",to:"/play?id=".concat(t.v_course_id)},t.second_btn))))})))))}}]),t}(m.Component);function b(e){var t=e.text,a=e.avatar,n=e.identity;return u.a.createElement("div",{className:"message clearfix ".concat(n)},u.a.createElement("div",{className:"avatar"},u.a.createElement("img",{src:a,alt:""})),u.a.createElement("div",{className:"text"},t))}function N(e){var t=e.options,a=e.handleSelect;return u.a.createElement("ul",{className:"options"},!!t.length&&t.map(function(e){return u.a.createElement("li",{onClick:function(){return a(e)},key:e.id},e.describe)}))}t.default=Object(g.b)(function(e){return{user:e.user,intelligentRecommend:e.intelligentRecommend}},{addMessage:y.a,addResult:y.b,reselect:y.d})(Object(h.a)(f))}}]);
//# sourceMappingURL=intelligent-recommend.af0f12dc.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.
......@@ -224,20 +224,20 @@ self.__precacheManifest = [
"url": "/mrstatic/js/detail.6e432d51.chunk.js"
},
{
"revision": "ca61e2862ae522a06b0d",
"revision": "0d2b0a107721a5a4ee7d",
"url": "/mrstatic/css/intelligent-recommend.409e397e.chunk.css"
},
{
"revision": "ca61e2862ae522a06b0d",
"url": "/mrstatic/js/intelligent-recommend.af0f12dc.chunk.js"
"revision": "0d2b0a107721a5a4ee7d",
"url": "/mrstatic/js/intelligent-recommend.113a5ed9.chunk.js"
},
{
"revision": "57f2ab3782cbb20800a8",
"revision": "d916f5ec0f5795cce239",
"url": "/mrstatic/css/main.e2e38627.chunk.css"
},
{
"revision": "57f2ab3782cbb20800a8",
"url": "/mrstatic/js/main.02f3d942.chunk.js"
"revision": "d916f5ec0f5795cce239",
"url": "/mrstatic/js/main.88842820.chunk.js"
},
{
"revision": "f941bd87a7c1e8d263e6",
......@@ -304,8 +304,8 @@ self.__precacheManifest = [
"url": "/mrstatic/js/python-class.e0fcffc3.chunk.js"
},
{
"revision": "666f04d498b9ba28a563",
"url": "/mrstatic/js/runtime~main.61107584.js"
"revision": "70ad78bd140f37a5c054",
"url": "/mrstatic/js/runtime~main.29f6dd2a.js"
},
{
"revision": "b868e965e2ff331c04a3",
......@@ -504,14 +504,14 @@ self.__precacheManifest = [
"url": "/mrstatic/js/66.8204e998.chunk.js"
},
{
"revision": "f2f4294d9a677f58f6f7c1a0ac84c448",
"url": "/mrstatic/media/iconfont.f2f4294d.woff"
},
{
"revision": "64fd0b167457064e12ff8a6afcd31720",
"url": "/mrstatic/media/iconfont.64fd0b16.eot"
},
{
"revision": "f2f4294d9a677f58f6f7c1a0ac84c448",
"url": "/mrstatic/media/iconfont.f2f4294d.woff"
},
{
"revision": "5bf7701b4b6358bd06d9c45c26a7d18f",
"url": "/mrstatic/media/iconfont.5bf7701b.svg"
},
......@@ -536,23 +536,23 @@ self.__precacheManifest = [
"url": "/mrstatic/media/progress-share-bg.80011994.png"
},
{
"revision": "c79abf5cb7ae8a82009cf68fe44d1078",
"url": "/mrstatic/media/redb_money_bj@2x.c79abf5c.png"
},
{
"revision": "6902434f8f18a23319d57d0ac8aaea8c",
"url": "/mrstatic/media/redb_sp_bj@2x.6902434f.png"
},
{
"revision": "79139f6aad350256e151f9f73c226348",
"url": "/mrstatic/media/hb_bj.79139f6a.png"
},
{
"revision": "c79abf5cb7ae8a82009cf68fe44d1078",
"url": "/mrstatic/media/redb_money_bj@2x.c79abf5c.png"
},
{
"revision": "8edaf2ff2566ed17e2dd22cf4f8ad7ae",
"url": "/mrstatic/media/redb_chai_bj@2x.8edaf2ff.png"
},
{
"revision": "99c72ca666c001035a998cabe69878a0",
"revision": "6902434f8f18a23319d57d0ac8aaea8c",
"url": "/mrstatic/media/redb_sp_bj@2x.6902434f.png"
},
{
"revision": "5979297ccf2949652418622964b9858e",
"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.7dd410fe8a0fc430975295f12c64da63.js"
"/precache-manifest.7b8123b570e59d802083986148de4a37.js"
);
workbox.clientsClaim();
......
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