Commit 771ef6cc by zhanghaozhe

题库适配

parent ecbc5871
......@@ -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.cbfe994a.js",
"runtime~main.js.map": "/mrstatic/js/runtime~main.cbfe994a.js.map",
"runtime~main.js": "/mrstatic/js/runtime~main.dbb9520b.js",
"runtime~main.js.map": "/mrstatic/js/runtime~main.dbb9520b.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.4ee776df.chunk.js": "/mrstatic/js/66.4ee776df.chunk.js",
"mrstatic/js/66.4ee776df.chunk.js.map": "/mrstatic/js/66.4ee776df.chunk.js.map",
"mrstatic/js/66.a423930d.chunk.js": "/mrstatic/js/66.a423930d.chunk.js",
"mrstatic/js/66.a423930d.chunk.js.map": "/mrstatic/js/66.a423930d.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.d7d24c444748fcee0f81b4b89a41b22b.js": "/precache-manifest.d7d24c444748fcee0f81b4b89a41b22b.js",
"precache-manifest.4ffebd8938d3072566eeaf7c4692d904.js": "/precache-manifest.4ffebd8938d3072566eeaf7c4692d904.js",
"service-worker.js": "/service-worker.js"
}
\ 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","down","Component"],"mappings":"yOAQMA,6MAEJC,MAAQ,CACNC,cAAc,EACdC,eAAe,EACfC,SAAU,KACVC,QAAS,MAiBXC,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,KAC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EAAAV,EAAAW,cAAA,OAAKC,UAAW,SAAhB,gBACAF,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,IAAMd,UAAW,OAAhD,sBAG3BH,KAAaA,EAAQoB,MAAQnB,EAAAV,EAAAW,cAACgB,EAAA,EAAD,CAAMC,GAAE,aAAA/C,OAAe4B,EAAQoB,MAAQjB,UAAW,OAAlD,0BAU9B,YA/GIkB,aAqHR3D","file":"mrstatic/js/66.4ee776df.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: true,\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 });\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 ${isShowAnswer ? 'slideInDown' : ''}`}>\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}`} className={'nav'}>上一题</Link>\n }\n {\n between && !!between.down && <Link to={`/problems/${between.down}`} 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),o=a(3),s=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(o.a)(this,t);for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return(a=Object(r.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(s)))).state={isShowAnswer:!1,isShowCaptcha:!0,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,o=t.msg,s=t.data;200===n?a.setState({problem:s}):1===n?a.setState({isShowCaptcha:!0}):c.a.info(o)})},a}return Object(i.a)(t,e),Object(s.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:{}}),this.getProblem())}},{key:"render",value:function(){var e=this,t=this.state,a=t.isShowAnswer,n=t.problem,c=n.quesInfo,o=n.between,s=t.isShowCaptcha;return c||s?p.a.createElement("article",{id:"problems"},s?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 ".concat(a?"slideInDown":"")},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"},o&&!!o.up&&p.a.createElement(d.b,{to:"/problems/".concat(o.up),className:"nav"},"\u4e0a\u4e00\u9898"),o&&!!o.down&&p.a.createElement(d.b,{to:"/problems/".concat(o.down),className:"nav"},"\u4e0b\u4e00\u9898"))))):null}}]),t}(m.Component);t.default=b}}]);
//# sourceMappingURL=66.4ee776df.chunk.js.map
\ 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),o=a(3),s=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(o.a)(this,t);for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return(a=Object(r.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(s)))).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,o=t.msg,s=t.data;200===n?a.setState({problem:s}):1===n?a.setState({isShowCaptcha:!0}):c.a.info(o)})},a}return Object(i.a)(t,e),Object(s.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:{}}),this.getProblem())}},{key:"render",value:function(){var e=this,t=this.state,a=t.isShowAnswer,n=t.problem,c=n.quesInfo,o=n.between,s=t.isShowCaptcha;return c||s?p.a.createElement("article",{id:"problems"},s?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 ".concat(a?"slideInDown":"")},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"},o&&!!o.up&&p.a.createElement(d.b,{to:"/problems/".concat(o.up),className:"nav"},"\u4e0a\u4e00\u9898"),o&&!!o.down&&p.a.createElement(d.b,{to:"/problems/".concat(o.down),className:"nav"},"\u4e0b\u4e00\u9898"))))):null}}]),t}(m.Component);t.default=b}}]);
//# sourceMappingURL=66.a423930d.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","down","Component"],"mappings":"yOAQMA,6MAEJC,MAAQ,CACNC,cAAc,EACdC,eAAe,EACfC,SAAU,KACVC,QAAS,MAiBXC,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,SAAS,CACZZ,QAASE,IAGO,IAATQ,EACTC,EAAKC,SAAS,CACZd,eAAe,IAGjByB,EAAAC,EAAMC,KAAKH,yFAjDjBI,KAAKb,wDAGYc,EAAWC,GACxBD,EAAUT,MAAMC,OAAOC,KAAOM,KAAKT,MAAMC,MAAMC,OAAOC,KACxDM,KAAKd,SAAS,CACZZ,QAAS,KAEX0B,KAAKb,+CA+CA,IAAAgB,EAAAH,KAAAI,EAC6DJ,KAAK9B,MAAlEC,EADAiC,EACAjC,aADAkC,EAAAD,EACc9B,QAAUgC,EADxBD,EACwBC,SAAUC,EADlCF,EACkCE,QAAUnC,EAD5CgC,EAC4ChC,cACnD,OACEkC,GAAYlC,EAAgBoC,EAAAV,EAAAW,cAAA,WAASf,G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AAe4B,EAAQoB,MAAQjB,UAAW,OAAlD,0BAU9B,YA/GIkB,aAqHR3D","file":"mrstatic/js/66.a423930d.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 });\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 ${isShowAnswer ? 'slideInDown' : ''}`}>\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}`} className={'nav'}>上一题</Link>\n }\n {\n between && !!between.down && <Link to={`/problems/${between.down}`} 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
......@@ -304,8 +304,8 @@ self.__precacheManifest = [
"url": "/mrstatic/js/python-class.8ae0b70f.chunk.js"
},
{
"revision": "0deecb00b6c9a613c349",
"url": "/mrstatic/js/runtime~main.cbfe994a.js"
"revision": "3f33d18c2fd3bef07df5",
"url": "/mrstatic/js/runtime~main.dbb9520b.js"
},
{
"revision": "7ed9fd7309e8be7f2456",
......@@ -496,12 +496,12 @@ self.__precacheManifest = [
"url": "/mrstatic/js/65.3ae85f36.chunk.js"
},
{
"revision": "160e81429525764c4a84",
"revision": "ca13e45be6c9b204552d",
"url": "/mrstatic/css/66.55f3c6e6.chunk.css"
},
{
"revision": "160e81429525764c4a84",
"url": "/mrstatic/js/66.4ee776df.chunk.js"
"revision": "ca13e45be6c9b204552d",
"url": "/mrstatic/js/66.a423930d.chunk.js"
},
{
"revision": "3d26ca2df713e19a677f",
......@@ -512,14 +512,14 @@ self.__precacheManifest = [
"url": "/mrstatic/js/67.64451c80.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": "99b2454970e48c8bb00578cdca15b3d2",
"url": "/mrstatic/media/iconfont.99b24549.ttf"
},
......@@ -532,14 +532,14 @@ self.__precacheManifest = [
"url": "/mrstatic/media/kanjia_cg_icon.81a489ac.png"
},
{
"revision": "d76ebce726bdf3459fa14e96d84c5b9a",
"url": "/mrstatic/media/formal-banner.d76ebce7.png"
},
{
"revision": "9ab091267ae7c83bd30d0f5ad018a8c9",
"url": "/mrstatic/media/dalibao_bj.9ab09126.png"
},
{
"revision": "d76ebce726bdf3459fa14e96d84c5b9a",
"url": "/mrstatic/media/formal-banner.d76ebce7.png"
},
{
"revision": "80011994e30adf599e5f47fcc81bc06d",
"url": "/mrstatic/media/progress-share-bg.80011994.png"
},
......@@ -548,6 +548,10 @@ self.__precacheManifest = [
"url": "/mrstatic/media/redb_money_bj@2x.c79abf5c.png"
},
{
"revision": "79139f6aad350256e151f9f73c226348",
"url": "/mrstatic/media/hb_bj.79139f6a.png"
},
{
"revision": "8edaf2ff2566ed17e2dd22cf4f8ad7ae",
"url": "/mrstatic/media/redb_chai_bj@2x.8edaf2ff.png"
},
......@@ -556,11 +560,7 @@ self.__precacheManifest = [
"url": "/mrstatic/media/redb_sp_bj@2x.6902434f.png"
},
{
"revision": "79139f6aad350256e151f9f73c226348",
"url": "/mrstatic/media/hb_bj.79139f6a.png"
},
{
"revision": "58f0ca2c190375d4609040e3750572f9",
"revision": "501a15ca9aca90288e264ea1620b7e12",
"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.d7d24c444748fcee0f81b4b89a41b22b.js"
"/precache-manifest.4ffebd8938d3072566eeaf7c4692d904.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