Commit 99c15ce9 by zhanghaozhe

题库适配

parent 1ba8b9fe
......@@ -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.dbb9520b.js",
"runtime~main.js.map": "/mrstatic/js/runtime~main.dbb9520b.js.map",
"runtime~main.js": "/mrstatic/js/runtime~main.842ad3c0.js",
"runtime~main.js.map": "/mrstatic/js/runtime~main.842ad3c0.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.a423930d.chunk.js": "/mrstatic/js/66.a423930d.chunk.js",
"mrstatic/js/66.a423930d.chunk.js.map": "/mrstatic/js/66.a423930d.chunk.js.map",
"mrstatic/js/66.15d7489a.chunk.js": "/mrstatic/js/66.15d7489a.chunk.js",
"mrstatic/js/66.15d7489a.chunk.js.map": "/mrstatic/js/66.15d7489a.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.4ffebd8938d3072566eeaf7c4692d904.js": "/precache-manifest.4ffebd8938d3072566eeaf7c4692d904.js",
"precache-manifest.13d0324c074460394c58ee813b174acd.js": "/precache-manifest.13d0324c074460394c58ee813b174acd.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),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 ".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"},s&&!!s.up&&p.a.createElement(d.b,{to:"/problems/".concat(s.up),className:"nav"},"\u4e0a\u4e00\u9898"),s&&!!s.down&&p.a.createElement(d.b,{to:"/problems/".concat(s.down),className:"nav"},"\u4e0b\u4e00\u9898"))))):null}}]),t}(m.Component);t.default=b}}]);
//# sourceMappingURL=66.15d7489a.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,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,SAAS,CACZZ,QAASE,IAGO,IAATQ,EACTC,EAAKC,SAAS,CACZd,eAAe,IAGjByB,EAAAC,EAAMC,KAAKH,yFAlDjBI,KAAKb,wDAGYc,EAAWC,GACxBD,EAAUT,MAAMC,OAAOC,KAAOM,KAAKT,MAAMC,MAAMC,OAAOC,KACxDM,KAAKd,SAAS,CACZZ,QAAS,GACTH,cAAc,IAEhB6B,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,GAAI,YAEpCtB,EAoCGoC,EAAAV,EAAAW,cAAA,OAAKC,UAAU,qBACfF,EAAAV,EAAAW,cAAA,yGACAD,EA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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 ${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:!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,EAAgB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A,EAAD,CAAMC,GAAE,aAAA/C,OAAe4B,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": "3f33d18c2fd3bef07df5",
"url": "/mrstatic/js/runtime~main.dbb9520b.js"
"revision": "3851d186a3fb6f4149d5",
"url": "/mrstatic/js/runtime~main.842ad3c0.js"
},
{
"revision": "7ed9fd7309e8be7f2456",
......@@ -496,12 +496,12 @@ self.__precacheManifest = [
"url": "/mrstatic/js/65.3ae85f36.chunk.js"
},
{
"revision": "ca13e45be6c9b204552d",
"revision": "53b41fc16cef3db5efb5",
"url": "/mrstatic/css/66.55f3c6e6.chunk.css"
},
{
"revision": "ca13e45be6c9b204552d",
"url": "/mrstatic/js/66.a423930d.chunk.js"
"revision": "53b41fc16cef3db5efb5",
"url": "/mrstatic/js/66.15d7489a.chunk.js"
},
{
"revision": "3d26ca2df713e19a677f",
......@@ -532,14 +532,14 @@ self.__precacheManifest = [
"url": "/mrstatic/media/kanjia_cg_icon.81a489ac.png"
},
{
"revision": "9ab091267ae7c83bd30d0f5ad018a8c9",
"url": "/mrstatic/media/dalibao_bj.9ab09126.png"
},
{
"revision": "d76ebce726bdf3459fa14e96d84c5b9a",
"url": "/mrstatic/media/formal-banner.d76ebce7.png"
},
{
"revision": "9ab091267ae7c83bd30d0f5ad018a8c9",
"url": "/mrstatic/media/dalibao_bj.9ab09126.png"
},
{
"revision": "80011994e30adf599e5f47fcc81bc06d",
"url": "/mrstatic/media/progress-share-bg.80011994.png"
},
......@@ -548,19 +548,19 @@ self.__precacheManifest = [
"url": "/mrstatic/media/redb_money_bj@2x.c79abf5c.png"
},
{
"revision": "79139f6aad350256e151f9f73c226348",
"url": "/mrstatic/media/hb_bj.79139f6a.png"
"revision": "6902434f8f18a23319d57d0ac8aaea8c",
"url": "/mrstatic/media/redb_sp_bj@2x.6902434f.png"
},
{
"revision": "8edaf2ff2566ed17e2dd22cf4f8ad7ae",
"url": "/mrstatic/media/redb_chai_bj@2x.8edaf2ff.png"
},
{
"revision": "6902434f8f18a23319d57d0ac8aaea8c",
"url": "/mrstatic/media/redb_sp_bj@2x.6902434f.png"
"revision": "79139f6aad350256e151f9f73c226348",
"url": "/mrstatic/media/hb_bj.79139f6a.png"
},
{
"revision": "501a15ca9aca90288e264ea1620b7e12",
"revision": "f0236bafdbe20e9fdc06883dd79781ca",
"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.4ffebd8938d3072566eeaf7c4692d904.js"
"/precache-manifest.13d0324c074460394c58ee813b174acd.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