Commit d75f5be3 by zhanghaozhe

题库适配

parent 330febd5
......@@ -89,8 +89,8 @@
"intelligent-recommend.js": "/mrstatic/js/intelligent-recommend.cc94d859.chunk.js",
"intelligent-recommend.js.map": "/mrstatic/js/intelligent-recommend.cc94d859.chunk.js.map",
"main.css": "/mrstatic/css/main.70b9092d.chunk.css",
"main.js": "/mrstatic/js/main.af3bc335.chunk.js",
"main.js.map": "/mrstatic/js/main.af3bc335.chunk.js.map",
"main.js": "/mrstatic/js/main.5f190cc2.chunk.js",
"main.js.map": "/mrstatic/js/main.5f190cc2.chunk.js.map",
"ml.css": "/mrstatic/css/ml.1bb9f764.chunk.css",
"ml.js": "/mrstatic/js/ml.99d218aa.chunk.js",
"ml.js.map": "/mrstatic/js/ml.99d218aa.chunk.js.map",
......@@ -115,8 +115,8 @@
"python-class.css": "/mrstatic/css/python-class.9cc168c1.chunk.css",
"python-class.js": "/mrstatic/js/python-class.8ae0b70f.chunk.js",
"python-class.js.map": "/mrstatic/js/python-class.8ae0b70f.chunk.js.map",
"runtime~main.js": "/mrstatic/js/runtime~main.be740f07.js",
"runtime~main.js.map": "/mrstatic/js/runtime~main.be740f07.js.map",
"runtime~main.js": "/mrstatic/js/runtime~main.4ddaae79.js",
"runtime~main.js.map": "/mrstatic/js/runtime~main.4ddaae79.js.map",
"search.css": "/mrstatic/css/search.cbabc366.chunk.css",
"search.js": "/mrstatic/js/search.87f66e8d.chunk.js",
"search.js.map": "/mrstatic/js/search.87f66e8d.chunk.js.map",
......@@ -190,8 +190,8 @@
"mrstatic/js/65.3ae85f36.chunk.js": "/mrstatic/js/65.3ae85f36.chunk.js",
"mrstatic/js/65.3ae85f36.chunk.js.map": "/mrstatic/js/65.3ae85f36.chunk.js.map",
"mrstatic/css/66.55f3c6e6.chunk.css": "/mrstatic/css/66.55f3c6e6.chunk.css",
"mrstatic/js/66.a15c8682.chunk.js": "/mrstatic/js/66.a15c8682.chunk.js",
"mrstatic/js/66.a15c8682.chunk.js.map": "/mrstatic/js/66.a15c8682.chunk.js.map",
"mrstatic/js/66.579ef2dc.chunk.js": "/mrstatic/js/66.579ef2dc.chunk.js",
"mrstatic/js/66.579ef2dc.chunk.js.map": "/mrstatic/js/66.579ef2dc.chunk.js.map",
"mrstatic/css/67.be1f9be9.chunk.css": "/mrstatic/css/67.be1f9be9.chunk.css",
"mrstatic/js/67.64451c80.chunk.js": "/mrstatic/js/67.64451c80.chunk.js",
"mrstatic/js/67.64451c80.chunk.js.map": "/mrstatic/js/67.64451c80.chunk.js.map",
......@@ -260,6 +260,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.3f97e3886f3b6343e54c89410e1d5679.js": "/precache-manifest.3f97e3886f3b6343e54c89410e1d5679.js",
"precache-manifest.f2e049902caf185845c09d6974ddfb67.js": "/precache-manifest.f2e049902caf185845c09d6974ddfb67.js",
"service-worker.js": "/service-worker.js"
}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[66],{1136:function(e,t,a){},1181:function(e,t,a){"use strict";a.r(t);a(40);var n=a(10),o=a.n(n),c=a(3),r=a(5),s=a(4),i=a(6),l=a(7),m=a(0),h=a.n(m),p=(a(1136),a(25)),u=a(2),d=a(13),w=function(e){function t(){var e,a;Object(c.a)(this,t);for(var n=arguments.length,r=new Array(n),l=0;l<n;l++)r[l]=arguments[l];return(a=Object(s.a)(this,(e=Object(i.a)(t)).call.apply(e,[this].concat(r)))).state={isShowAnswer:!1,isShowCaptcha:!1,instance:null,problem:{}},a.onVerify=function(e){u.e.post("".concat(API.home,"/m/safety"),e).then(function(e){200===e.data.code?(a.setState({isShowCaptcha:!1}),a.getProblem()):a.state.instance&&a.state.instance.reset()})},a.getInstance=function(e){a.setState({instance:e})},a.getProblem=function(){u.e.get("".concat(API.home,"/m/question/").concat(a.props.match.params.id)).then(function(e){var t=e.data,n=t.code,c=t.msg,r=t.data;200===n?a.setState({problem:r}):1===n?a.setState({isShowCaptcha:!0}):o.a.info(c)})},a.goBack=function(){if(document.referrer.includes(API.www))history.go(-1);else{var e=a.props.location,t=e.state;if(e.hash.includes("goback"))return window.history.go(-1);u.b.isWeixin&&Object(u.c)("code")&&Object(u.c)("state")&&window.history.go(-2),t.records&&t.records.length>1?window.history.go(-1):t.from&&t.from.pathname?location.replace("".concat(t.from.pathname).concat(t.from.search)):window.location.href=window.location.origin}},a}return Object(l.a)(t,e),Object(r.a)(t,[{key:"componentDidMount",value:function(){this.getProblem()}},{key:"componentDidUpdate",value:function(e,t){e.match.params.id!==this.props.match.params.id&&(this.setState({problem:{},isShowAnswer:!1}),this.getProblem())}},{key:"render",value:function(){var e=this,t=this.state,a=t.isShowAnswer,n=t.problem,o=n.quesInfo,c=n.between,r=t.isShowCaptcha;return o||r?h.a.createElement("article",{id:"problems"},r?h.a.createElement("div",{className:"captcha-container"},h.a.createElement("div",null,"\u4eb2\uff0c\u7cfb\u7edf\u6b63\u5fd9\uff0c\u6ed1\u52a8\u4e00\u4e0b\u9a6c\u4e0a\u56de\u6765"),h.a.createElement(p.b,{getInstance:this.getInstance,onVerify:this.onVerify})):h.a.createElement(h.a.Fragment,null,h.a.createElement(p.e,{title:o&&o.category,arrow:!0,cart:!1,goBack:this.goBack}),h.a.createElement("div",{className:"topic"},h.a.createElement("span",null,o&&o.order_id,"."),h.a.createElement("span",{dangerouslySetInnerHTML:{__html:o&&o.ques}})),!a&&h.a.createElement("div",{className:"btn",onClick:function(){e.setState({isShowAnswer:!0})}},h.a.createElement("button",null,"\u67e5\u770b\u89e3\u6790 ",h.a.createElement("i",{className:"iconfont iconiconfront-69"}))),a&&h.a.createElement("div",{className:"content"},h.a.createElement("div",{className:"title"},"\u89e3\u6790"),h.a.createElement("span",{dangerouslySetInnerHTML:{__html:o.analysis}})),h.a.createElement("footer",null,h.a.createElement("div",{className:"app"},"\u66f4\u591a\u9898\u76ee\u8bf7 ",h.a.createElement(p.a,{text:"\u524d\u5f80APP"})),h.a.createElement("div",{className:"op"},c&&!!c.up&&h.a.createElement(d.b,{to:"/problems/".concat(c.up),replace:!0,className:"nav"},"\u4e0a\u4e00\u9898"),c&&!!c.down&&h.a.createElement(d.b,{to:"/problems/".concat(c.down),replace:!0,className:"nav"},"\u4e0b\u4e00\u9898"))))):null}}]),t}(m.Component);t.default=w}}]);
//# sourceMappingURL=66.579ef2dc.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/problems/index.js"],"names":["Problems","state","isShowAnswer","isShowCaptcha","instance","problem","onVerify","data","http","post","concat","API","home","then","res","code","_this","setState","getProblem","reset","getInstance","get","props","match","params","id","_res$data","msg","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","goBack","document","referrer","includes","www","history","go","_this$props$location","location","hash","window","browser","isWeixin","getParam","records","length","from","pathname","replace","search","href","origin","this","prevProps","prevState","_this2","_this$state","_this$state$problem","quesInfo","between","react__WEBPACK_IMPORTED_MODULE_7___default","createElement","className","_common_index__WEBPACK_IMPORTED_MODULE_9__","Fragment","title","category","arrow","cart","order_id","dangerouslySetInnerHTML","__html","ques","onClick","analysis","text","up","react_router_dom__WEBPACK_IMPORTED_MODULE_11__","to","down","Component"],"mappings":"yOAQMA,6MAEJC,MAAQ,CACNC,cAAc,EACdC,eAAe,EACfC,SAAU,KACVC,QAAS,MAkBXC,SAAW,SAAAC,GACTC,IAAKC,KAAL,GAAAC,OAAaC,IAAIC,KAAjB,aAAkCL,GAC/BM,KAAK,SAAAC,GAES,MADEA,EAAIP,KAAZQ,MAELC,EAAKC,SAAS,CACZd,eAAe,IAEjBa,EAAKE,cAELF,EAAKf,MAAMG,UAAYY,EAAKf,MAAMG,SAASe,aAKnDC,YAAc,SAAChB,GACbY,EAAKC,SAAS,CACZb,gBAIJc,WAAa,WACXV,IAAKa,IAAL,GAAAX,OAAYC,IAAIC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AAD,CAAMC,GAAE,aAAArE,OAAekD,EAAQoB,MAAQ/B,SAAO,EAACc,UAAW,OAA1D,0BAUD,YAvIIkB,aA6IRjF","file":"mrstatic/js/66.579ef2dc.chunk.js","sourcesContent":["import React, { Component } from 'react';\nimport './index.scss'\nimport { HeaderBar, CallApp, CaptchaAli } from \"@common/index\"\nimport { browser, getParam, http } from \"@/utils\"\nimport { Toast } from \"antd-mobile\";\nimport { Link } from 'react-router-dom'\n\n\nclass Problems extends Component {\n\n state = {\n isShowAnswer: false,\n isShowCaptcha: false,\n instance: null,\n problem: {},\n }\n\n componentDidMount() {\n this.getProblem()\n }\n\n componentDidUpdate(prevProps, prevState) {\n if (prevProps.match.params.id !== this.props.match.params.id) {\n this.setState({\n problem: {},\n isShowAnswer: false,\n });\n this.getProblem()\n }\n }\n\n\n onVerify = data => {\n http.post(`${API.home}/m/safety`, data)\n .then(res => {\n const {code} = res.data\n if (code === 200) {\n this.setState({\n isShowCaptcha: false,\n })\n this.getProblem()\n } else {\n this.state.instance && this.state.instance.reset()\n }\n })\n }\n\n getInstance = (instance) => {\n this.setState({\n instance,\n });\n }\n\n getProblem = () => {\n http.get(`${API.home}/m/question/${this.props.match.params.id}`)\n .then(res => {\n const {code, msg, data} = res.data\n if (code === 200) {\n\n this.setState({\n problem: data,\n });\n\n } else if (code === 1) {\n this.setState({\n isShowCaptcha: true,\n });\n } else {\n Toast.info(msg)\n }\n })\n }\n\n goBack = () => {\n if (document.referrer.includes(API.www)) {\n history.go(-1)\n } else {\n const {state, hash} = this.props.location\n if (hash.includes('goback')) {\n return window.history.go(-1)\n }\n if (browser.isWeixin && getParam('code') && getParam('state')) {\n window.history.go(-2)\n }\n if (state.records && state.records.length > 1) {\n window.history.go(-1);\n } else if (state.from && state.from.pathname) {\n location.replace(`${state.from.pathname}${state.from.search}`)\n } else {\n window.location.href = window.location.origin\n }\n }\n }\n\n\n render() {\n const {isShowAnswer, problem: {quesInfo, between}, isShowCaptcha} = this.state\n return (\n quesInfo || isShowCaptcha ? <article id={'problems'}>\n {\n !isShowCaptcha ?\n <>\n <HeaderBar title={quesInfo && quesInfo.category} arrow={true} cart={false}\n goBack={this.goBack}></HeaderBar>\n <div className=\"topic\">\n <span>{quesInfo && quesInfo.order_id}.</span>\n <span dangerouslySetInnerHTML={{__html: quesInfo && quesInfo.ques}}></span>\n </div>\n {\n !isShowAnswer &&\n <div className=\"btn\" onClick={() => {\n this.setState({\n isShowAnswer: true,\n });\n }}>\n <button>查看解析 <i className={'iconfont iconiconfront-69'}></i></button>\n </div>\n }\n {\n isShowAnswer &&\n <div className={`content`}>\n <div className={'title'}>解析</div>\n <span dangerouslySetInnerHTML={{__html: quesInfo.analysis}}></span>\n </div>\n }\n <footer>\n <div className=\"app\">更多题目请 <CallApp text={'前往APP'}/></div>\n <div className=\"op\">\n {\n between && !!between.up && <Link to={`/problems/${between.up}`} replace className={'nav'}>上一题</Link>\n }\n {\n between && !!between.down &&\n <Link to={`/problems/${between.down}`} replace className={'nav'}>下一题</Link>\n }\n </div>\n </footer>\n </>\n : <div className=\"captcha-container\">\n <div>亲,系统正忙,滑动一下马上回来</div>\n <CaptchaAli getInstance={this.getInstance} onVerify={this.onVerify}/>\n </div>\n }\n </article> : null\n\n );\n }\n}\n\nexport default Problems;"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[66],{1136:function(e,t,a){},1181:function(e,t,a){"use strict";a.r(t);a(40);var n=a(10),c=a.n(n),s=a(3),o=a(5),r=a(4),l=a(6),i=a(7),m=a(0),p=a.n(m),u=(a(1136),a(25)),h=a(2),d=a(13),b=function(e){function t(){var e,a;Object(s.a)(this,t);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(a=Object(r.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(o)))).state={isShowAnswer:!1,isShowCaptcha:!1,instance:null,problem:{}},a.onVerify=function(e){h.e.post("".concat(API.home,"/m/safety"),e).then(function(e){200===e.data.code?(a.setState({isShowCaptcha:!1}),a.getProblem()):a.state.instance&&a.state.instance.reset()})},a.getInstance=function(e){a.setState({instance:e})},a.getProblem=function(){h.e.get("".concat(API.home,"/m/question/").concat(a.props.match.params.id)).then(function(e){var t=e.data,n=t.code,s=t.msg,o=t.data;200===n?a.setState({problem:o}):1===n?a.setState({isShowCaptcha:!0}):c.a.info(s)})},a}return Object(i.a)(t,e),Object(o.a)(t,[{key:"componentDidMount",value:function(){this.getProblem()}},{key:"componentDidUpdate",value:function(e,t){e.match.params.id!==this.props.match.params.id&&(this.setState({problem:{},isShowAnswer:!1}),this.getProblem())}},{key:"render",value:function(){var e=this,t=this.state,a=t.isShowAnswer,n=t.problem,c=n.quesInfo,s=n.between,o=t.isShowCaptcha;return c||o?p.a.createElement("article",{id:"problems"},o?p.a.createElement("div",{className:"captcha-container"},p.a.createElement("div",null,"\u4eb2\uff0c\u7cfb\u7edf\u6b63\u5fd9\uff0c\u6ed1\u52a8\u4e00\u4e0b\u9a6c\u4e0a\u56de\u6765"),p.a.createElement(u.b,{getInstance:this.getInstance,onVerify:this.onVerify})):p.a.createElement(p.a.Fragment,null,p.a.createElement(u.e,{title:c&&c.category,arrow:!0,cart:!1}),p.a.createElement("div",{className:"topic"},p.a.createElement("span",null,c&&c.order_id,"."),p.a.createElement("span",{dangerouslySetInnerHTML:{__html:c&&c.ques}})),!a&&p.a.createElement("div",{className:"btn",onClick:function(){e.setState({isShowAnswer:!0})}},p.a.createElement("button",null,"\u67e5\u770b\u89e3\u6790 ",p.a.createElement("i",{className:"iconfont iconiconfront-69"}))),a&&p.a.createElement("div",{className:"content"},p.a.createElement("div",{className:"title"},"\u89e3\u6790"),p.a.createElement("span",{dangerouslySetInnerHTML:{__html:c.analysis}})),p.a.createElement("footer",null,p.a.createElement("div",{className:"app"},"\u66f4\u591a\u9898\u76ee\u8bf7 ",p.a.createElement(u.a,{text:"\u524d\u5f80APP"})),p.a.createElement("div",{className:"op"},s&&!!s.up&&p.a.createElement(d.b,{to:"/problems/".concat(s.up),replace:!0,className:"nav"},"\u4e0a\u4e00\u9898"),s&&!!s.down&&p.a.createElement(d.b,{to:"/problems/".concat(s.down),replace:!0,className:"nav"},"\u4e0b\u4e00\u9898"))))):null}}]),t}(m.Component);t.default=b}}]);
//# sourceMappingURL=66.a15c8682.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/problems/index.js"],"names":["Problems","state","isShowAnswer","isShowCaptcha","instance","problem","onVerify","data","http","post","concat","API","home","then","res","code","_this","setState","getProblem","reset","getInstance","get","props","match","params","id","_res$data","msg","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","this","prevProps","prevState","_this2","_this$state","_this$state$problem","quesInfo","between","react__WEBPACK_IMPORTED_MODULE_7___default","createElement","className","_common_index__WEBPACK_IMPORTED_MODULE_9__","Fragment","title","category","arrow","cart","order_id","dangerouslySetInnerHTML","__html","ques","onClick","analysis","text","up","react_router_dom__WEBPACK_IMPORTED_MODULE_11__","to","replace","down","Component"],"mappings":"yOAQMA,6MAEJC,MAAQ,CACNC,cAAc,EACdC,eAAe,EACfC,SAAU,KACVC,QAAS,MAkBXC,SAAW,SAAAC,GACTC,IAAKC,KAAL,GAAAC,OAAaC,IAAIC,KAAjB,aAAkCL,GAC/BM,KAAK,SAAAC,GAES,MADEA,EAAIP,KAAZQ,MAELC,EAAKC,SAAS,CACZd,eAAe,IAEjBa,EAAKE,cAELF,EAAKf,MAAMG,UAAYY,EAAKf,MAAMG,SAASe,aAKnDC,YAAc,SAAChB,GACbY,EAAKC,SAAS,CACZb,gBAIJc,WAAa,WACXV,IAAKa,IAAL,GAAAX,OAAYC,IAAIC,KAAhB,gBAAAF,OAAmCM,EAAKM,MAAMC,MAAMC,OAAOC,KACxDZ,KAAK,SAAAC,GAAO,IAAAY,EACeZ,EAAIP,KAAvBQ,EADIW,EACJX,KAAMY,EADFD,EACEC,IAAKpB,EADPmB,EACOnB,KACL,MAATQ,EAEFC,EAAKC,SAA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F,EAAAV,EAAAW,cAAA,QAAMS,wBAAyB,CAACC,OAAQb,EAASgB,aAGrDd,EAAAV,EAAAW,cAAA,cACED,EAAAV,EAAAW,cAAA,OAAKC,UAAU,OAAf,kCAA2BF,EAAAV,EAAAW,cAACE,EAAA,EAAD,CAASY,KAAM,qBAC1Cf,EAAAV,EAAAW,cAAA,OAAKC,UAAU,MAEXH,KAAaA,EAAQiB,IAAMhB,EAAAV,EAAAW,cAACgB,EAAA,EAAD,CAAMC,GAAE,aAAA/C,OAAe4B,EAAQiB,IAAMG,SAAO,EAACjB,UAAW,OAAxD,sBAG3BH,KAAaA,EAAQqB,MAAQpB,EAAAV,EAAAW,cAACgB,EAAA,EAAD,CAAMC,GAAE,aAAA/C,OAAe4B,EAAQqB,MAAQD,SAAO,EAACjB,UAAW,OAA1D,0BAU9B,YAhHImB,aAsHR5D","file":"mrstatic/js/66.a15c8682.chunk.js","sourcesContent":["import React, { Component } from 'react';\nimport './index.scss'\nimport { HeaderBar, CallApp, CaptchaAli } from \"@common/index\"\nimport { http } from \"@/utils\"\nimport { Toast } from \"antd-mobile\";\nimport { Link } from 'react-router-dom'\n\n\nclass Problems extends Component {\n\n state = {\n isShowAnswer: false,\n isShowCaptcha: false,\n instance: null,\n problem: {},\n }\n\n componentDidMount() {\n this.getProblem()\n }\n\n componentDidUpdate(prevProps, prevState) {\n if (prevProps.match.params.id !== this.props.match.params.id) {\n this.setState({\n problem: {},\n isShowAnswer: false\n });\n this.getProblem()\n }\n }\n\n\n onVerify = data => {\n http.post(`${API.home}/m/safety`, data)\n .then(res => {\n const {code} = res.data\n if (code === 200) {\n this.setState({\n isShowCaptcha: false,\n })\n this.getProblem()\n } else {\n this.state.instance && this.state.instance.reset()\n }\n })\n }\n\n getInstance = (instance) => {\n this.setState({\n instance,\n });\n }\n\n getProblem = () => {\n http.get(`${API.home}/m/question/${this.props.match.params.id}`)\n .then(res => {\n const {code, msg, data} = res.data\n if (code === 200) {\n\n this.setState({\n problem: data,\n });\n\n } else if (code === 1) {\n this.setState({\n isShowCaptcha: true,\n });\n } else {\n Toast.info(msg)\n }\n })\n }\n\n\n render() {\n const {isShowAnswer, problem: {quesInfo, between}, isShowCaptcha} = this.state\n return (\n quesInfo || isShowCaptcha ? <article id={'problems'}>\n {\n !isShowCaptcha ?\n <>\n <HeaderBar title={quesInfo && quesInfo.category} arrow={true} cart={false}></HeaderBar>\n <div className=\"topic\">\n <span>{quesInfo && quesInfo.order_id}.</span>\n <span dangerouslySetInnerHTML={{__html: quesInfo && quesInfo.ques}}></span>\n </div>\n {\n !isShowAnswer &&\n <div className=\"btn\" onClick={() => {\n this.setState({\n isShowAnswer: true,\n });\n }}>\n <button>查看解析 <i className={'iconfont iconiconfront-69'}></i></button>\n </div>\n }\n {\n isShowAnswer &&\n <div className={`content`}>\n <div className={'title'}>解析</div>\n <span dangerouslySetInnerHTML={{__html: quesInfo.analysis}}></span>\n </div>\n }\n <footer>\n <div className=\"app\">更多题目请 <CallApp text={'前往APP'}/></div>\n <div className=\"op\">\n {\n between && !!between.up && <Link to={`/problems/${between.up}`} replace className={'nav'}>上一题</Link>\n }\n {\n between && !!between.down && <Link to={`/problems/${between.down}`} replace className={'nav'}>下一题</Link>\n }\n </div>\n </footer>\n </>\n : <div className=\"captcha-container\">\n <div>亲,系统正忙,滑动一下马上回来</div>\n <CaptchaAli getInstance={this.getInstance} onVerify={this.onVerify}/>\n </div>\n }\n </article> : null\n\n );\n }\n}\n\nexport default Problems;"],"sourceRoot":""}
\ 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.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -232,12 +232,12 @@ self.__precacheManifest = [
"url": "/mrstatic/js/intelligent-recommend.cc94d859.chunk.js"
},
{
"revision": "6ae0e0ef44099494ae0a",
"revision": "23547f850f326b0dfafe",
"url": "/mrstatic/css/main.70b9092d.chunk.css"
},
{
"revision": "6ae0e0ef44099494ae0a",
"url": "/mrstatic/js/main.af3bc335.chunk.js"
"revision": "23547f850f326b0dfafe",
"url": "/mrstatic/js/main.5f190cc2.chunk.js"
},
{
"revision": "fdd26849aaec81c5391e",
......@@ -304,8 +304,8 @@ self.__precacheManifest = [
"url": "/mrstatic/js/python-class.8ae0b70f.chunk.js"
},
{
"revision": "8db3d54eb19eaa220955",
"url": "/mrstatic/js/runtime~main.be740f07.js"
"revision": "100c3a23f3efdc5b61e5",
"url": "/mrstatic/js/runtime~main.4ddaae79.js"
},
{
"revision": "7ed9fd7309e8be7f2456",
......@@ -496,12 +496,12 @@ self.__precacheManifest = [
"url": "/mrstatic/js/65.3ae85f36.chunk.js"
},
{
"revision": "d144620e74c8ef0c935c",
"revision": "82dd24743ff62e209887",
"url": "/mrstatic/css/66.55f3c6e6.chunk.css"
},
{
"revision": "d144620e74c8ef0c935c",
"url": "/mrstatic/js/66.a15c8682.chunk.js"
"revision": "82dd24743ff62e209887",
"url": "/mrstatic/js/66.579ef2dc.chunk.js"
},
{
"revision": "3d26ca2df713e19a677f",
......@@ -516,14 +516,14 @@ self.__precacheManifest = [
"url": "/mrstatic/media/iconfont.64fd0b16.eot"
},
{
"revision": "f2f4294d9a677f58f6f7c1a0ac84c448",
"url": "/mrstatic/media/iconfont.f2f4294d.woff"
},
{
"revision": "99b2454970e48c8bb00578cdca15b3d2",
"url": "/mrstatic/media/iconfont.99b24549.ttf"
},
{
"revision": "f2f4294d9a677f58f6f7c1a0ac84c448",
"url": "/mrstatic/media/iconfont.f2f4294d.woff"
},
{
"revision": "5bf7701b4b6358bd06d9c45c26a7d18f",
"url": "/mrstatic/media/iconfont.5bf7701b.svg"
},
......@@ -544,14 +544,6 @@ self.__precacheManifest = [
"url": "/mrstatic/media/progress-share-bg.80011994.png"
},
{
"revision": "6902434f8f18a23319d57d0ac8aaea8c",
"url": "/mrstatic/media/redb_sp_bj@2x.6902434f.png"
},
{
"revision": "79139f6aad350256e151f9f73c226348",
"url": "/mrstatic/media/hb_bj.79139f6a.png"
},
{
"revision": "8edaf2ff2566ed17e2dd22cf4f8ad7ae",
"url": "/mrstatic/media/redb_chai_bj@2x.8edaf2ff.png"
},
......@@ -560,7 +552,15 @@ self.__precacheManifest = [
"url": "/mrstatic/media/redb_money_bj@2x.c79abf5c.png"
},
{
"revision": "f0ce163149f5b214e228a8d4f4aa28b1",
"revision": "79139f6aad350256e151f9f73c226348",
"url": "/mrstatic/media/hb_bj.79139f6a.png"
},
{
"revision": "6902434f8f18a23319d57d0ac8aaea8c",
"url": "/mrstatic/media/redb_sp_bj@2x.6902434f.png"
},
{
"revision": "2b81d557e021ee3cbecb7c0e3622c7a5",
"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.3f97e3886f3b6343e54c89410e1d5679.js"
"/precache-manifest.f2e049902caf185845c09d6974ddfb67.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