xxx
This commit is contained in:
@@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"files": {
|
||||||
|
"main.css": "/static/css/main.6dea0f05.chunk.css",
|
||||||
|
"main.js": "/static/js/main.2ddb9c7a.chunk.js",
|
||||||
|
"main.js.map": "/static/js/main.2ddb9c7a.chunk.js.map",
|
||||||
|
"runtime-main.js": "/static/js/runtime-main.5c31da0c.js",
|
||||||
|
"runtime-main.js.map": "/static/js/runtime-main.5c31da0c.js.map",
|
||||||
|
"static/js/2.1cfe0f99.chunk.js": "/static/js/2.1cfe0f99.chunk.js",
|
||||||
|
"static/js/2.1cfe0f99.chunk.js.map": "/static/js/2.1cfe0f99.chunk.js.map",
|
||||||
|
"static/css/3.868032c0.chunk.css": "/static/css/3.868032c0.chunk.css",
|
||||||
|
"static/js/3.db0e6efd.chunk.js": "/static/js/3.db0e6efd.chunk.js",
|
||||||
|
"static/js/3.db0e6efd.chunk.js.map": "/static/js/3.db0e6efd.chunk.js.map",
|
||||||
|
"static/js/4.2ced80f9.chunk.js": "/static/js/4.2ced80f9.chunk.js",
|
||||||
|
"static/js/4.2ced80f9.chunk.js.map": "/static/js/4.2ced80f9.chunk.js.map",
|
||||||
|
"static/js/5.e00c0244.chunk.js": "/static/js/5.e00c0244.chunk.js",
|
||||||
|
"static/js/5.e00c0244.chunk.js.map": "/static/js/5.e00c0244.chunk.js.map",
|
||||||
|
"static/js/6.708fac83.chunk.js": "/static/js/6.708fac83.chunk.js",
|
||||||
|
"static/js/6.708fac83.chunk.js.map": "/static/js/6.708fac83.chunk.js.map",
|
||||||
|
"static/js/7.24834100.chunk.js": "/static/js/7.24834100.chunk.js",
|
||||||
|
"static/js/7.24834100.chunk.js.map": "/static/js/7.24834100.chunk.js.map",
|
||||||
|
"static/js/8.689ed892.chunk.js": "/static/js/8.689ed892.chunk.js",
|
||||||
|
"static/js/8.689ed892.chunk.js.map": "/static/js/8.689ed892.chunk.js.map",
|
||||||
|
"static/js/9.13fb6ccd.chunk.js": "/static/js/9.13fb6ccd.chunk.js",
|
||||||
|
"static/js/9.13fb6ccd.chunk.js.map": "/static/js/9.13fb6ccd.chunk.js.map",
|
||||||
|
"index.html": "/index.html",
|
||||||
|
"static/css/3.868032c0.chunk.css.map": "/static/css/3.868032c0.chunk.css.map",
|
||||||
|
"static/css/main.6dea0f05.chunk.css.map": "/static/css/main.6dea0f05.chunk.css.map",
|
||||||
|
"static/js/2.1cfe0f99.chunk.js.LICENSE.txt": "/static/js/2.1cfe0f99.chunk.js.LICENSE.txt"
|
||||||
|
},
|
||||||
|
"entrypoints": [
|
||||||
|
"static/js/runtime-main.5c31da0c.js",
|
||||||
|
"static/js/2.1cfe0f99.chunk.js",
|
||||||
|
"static/css/main.6dea0f05.chunk.css",
|
||||||
|
"static/js/main.2ddb9c7a.chunk.js"
|
||||||
|
]
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>React App</title><link href="/static/css/main.6dea0f05.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,o,c=t[0],i=t[1],f=t[2],l=0,d=[];l<c.length;l++)o=c[l],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&d.push(a[o][0]),a[o]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(s&&s(t);d.length;)d.shift()();return u.push.apply(u,f||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,o=1;o<r.length;o++){var i=r[o];0!==a[i]&&(n=!1)}n&&(u.splice(t--,1),e=c(c.s=r[0]))}return e}var n={},o={1:0},a={1:0},u=[];function c(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,c),r.l=!0,r.exports}c.e=function(e){var t=[];o[e]?t.push(o[e]):0!==o[e]&&{3:1}[e]&&t.push(o[e]=new Promise((function(t,r){for(var n="static/css/"+({}[e]||e)+"."+{3:"868032c0",4:"31d6cfe0",5:"31d6cfe0",6:"31d6cfe0",7:"31d6cfe0",8:"31d6cfe0",9:"31d6cfe0"}[e]+".chunk.css",a=c.p+n,u=document.getElementsByTagName("link"),i=0;i<u.length;i++){var f=(s=u[i]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(f===n||f===a))return t()}var l=document.getElementsByTagName("style");for(i=0;i<l.length;i++){var s;if((f=(s=l[i]).getAttribute("data-href"))===n||f===a)return t()}var d=document.createElement("link");d.rel="stylesheet",d.type="text/css",d.onload=t,d.onerror=function(t){var n=t&&t.target&&t.target.src||a,u=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");u.code="CSS_CHUNK_LOAD_FAILED",u.request=n,delete o[e],d.parentNode.removeChild(d),r(u)},d.href=a,document.getElementsByTagName("head")[0].appendChild(d)})).then((function(){o[e]=0})));var r=a[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=a[e]=[t,n]}));t.push(r[2]=n);var u,i=document.createElement("script");i.charset="utf-8",i.timeout=120,c.nc&&i.setAttribute("nonce",c.nc),i.src=function(e){return c.p+"static/js/"+({}[e]||e)+"."+{3:"db0e6efd",4:"2ced80f9",5:"e00c0244",6:"708fac83",7:"24834100",8:"689ed892",9:"13fb6ccd"}[e]+".chunk.js"}(e);var f=new Error;u=function(t){i.onerror=i.onload=null,clearTimeout(l);var r=a[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;f.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",f.name="ChunkLoadError",f.type=n,f.request=o,r[1](f)}a[e]=void 0}};var l=setTimeout((function(){u({type:"timeout",target:i})}),12e4);i.onerror=i.onload=u,document.head.appendChild(i)}return Promise.all(t)},c.m=e,c.c=n,c.d=function(e,t,r){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(c.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)c.d(r,n,function(t){return e[t]}.bind(null,n));return r},c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="/",c.oe=function(e){throw console.error(e),e};var i=this.webpackJsonp1=this.webpackJsonp1||[],f=i.push.bind(i);i.push=t,i=i.slice();for(var l=0;l<i.length;l++)t(i[l]);var s=f;r()}([])</script><script src="/static/js/2.1cfe0f99.chunk.js"></script><script src="/static/js/main.2ddb9c7a.chunk.js"></script></body></html>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"short_name": "React App",
|
||||||
|
"name": "Create React App Sample",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "favicon.ico",
|
||||||
|
"sizes": "64x64 32x32 24x24 16x16",
|
||||||
|
"type": "image/x-icon"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "logo192.png",
|
||||||
|
"type": "image/png",
|
||||||
|
"sizes": "192x192"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "logo512.png",
|
||||||
|
"type": "image/png",
|
||||||
|
"sizes": "512x512"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"start_url": ".",
|
||||||
|
"display": "standalone",
|
||||||
|
"theme_color": "#000000",
|
||||||
|
"background_color": "#ffffff"
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# https://www.robotstxt.org/robotstxt.html
|
||||||
|
User-agent: *
|
||||||
|
Disallow:
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
.nav{width:100%;height:40px}.nav li{float:left;list-style:none;margin:0 10px;cursor:pointer}
|
||||||
|
/*# sourceMappingURL=3.868032c0.chunk.css.map */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"sources":["webpack://src/assets/style.css"],"names":[],"mappings":"AAAA,KACI,UAAW,CACX,WACJ,CACA,QACI,UAAW,CACX,eAAgB,CAChB,aAAc,CACd,cACJ","file":"3.868032c0.chunk.css","sourcesContent":[".nav{\n width: 100%;\n height: 40px;\n}\n.nav li{\n float: left;\n list-style: none;\n margin: 0 10px;\n cursor: pointer;\n}"]}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,"Courier New",monospace}
|
||||||
|
/*# sourceMappingURL=main.6dea0f05.chunk.css.map */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"sources":["webpack://src/index.css"],"names":[],"mappings":"AAAA,KACE,QAAS,CACT,mJAEY,CACZ,kCAAmC,CACnC,iCACF,CAEA,KACE,yEAEF","file":"main.6dea0f05.chunk.css","sourcesContent":["body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n"]}
|
||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,50 @@
|
|||||||
|
/*
|
||||||
|
object-assign
|
||||||
|
(c) Sindre Sorhus
|
||||||
|
@license MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @license React v0.20.2
|
||||||
|
* scheduler.production.min.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @license React v16.13.1
|
||||||
|
* react-is.production.min.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @license React v17.0.2
|
||||||
|
* react-dom.production.min.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @license React v17.0.2
|
||||||
|
* react-jsx-runtime.production.min.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @license React v17.0.2
|
||||||
|
* react.production.min.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,2 @@
|
|||||||
|
(this.webpackJsonp1=this.webpackJsonp1||[]).push([[3],{34:function(e,n,t){},41:function(e,n,t){"use strict";t.r(n);var c=t(13),i=t(14),s=t(16),o=t(15),j=t(0),b=t.n(j),r=t(1),h=(t(34),t(3)),a=function(e){Object(s.a)(t,e);var n=Object(o.a)(t);function t(){return Object(c.a)(this,t),n.apply(this,arguments)}return Object(i.a)(t,[{key:"go",value:function(e){this.props.history.replace(e)}},{key:"render",value:function(){return Object(h.jsxs)("ul",{className:"nav",children:[Object(h.jsx)("li",{onClick:this.go.bind(this,"/shop/index"),children:"\u9996\u9875"}),Object(h.jsx)("li",{onClick:this.go.bind(this,"/shop/good"),children:"\u5546\u54c1"}),Object(h.jsx)("li",{onClick:this.go.bind(this,"/shop/car"),children:"\u8d2d\u7269\u8f66"}),Object(h.jsx)("li",{onClick:this.go.bind(this,"/shop/me"),children:"\u4e2a\u4eba\u4e2d\u5fc3"})]})}}]),t}(b.a.Component),l=Object(r.g)(a),u=Object(j.lazy)((function(){return t.e(6).then(t.bind(null,37))})),p=Object(j.lazy)((function(){return t.e(5).then(t.bind(null,38))})),O=Object(j.lazy)((function(){return t.e(8).then(t.bind(null,39))})),d=Object(j.lazy)((function(){return t.e(4).then(t.bind(null,40))})),x=function(e){Object(s.a)(t,e);var n=Object(o.a)(t);function t(){return Object(c.a)(this,t),n.apply(this,arguments)}return Object(i.a)(t,[{key:"render",value:function(){return Object(h.jsxs)("div",{children:[Object(h.jsx)(l,{}),Object(h.jsx)("div",{children:Object(h.jsx)(r.d,{children:Object(h.jsxs)(j.Suspense,{fallback:Object(h.jsx)(b.a.Fragment,{}),children:[Object(h.jsx)(r.b,{path:"/shop/index",component:u}),Object(h.jsx)(r.b,{path:"/shop/good",component:p}),Object(h.jsx)(r.b,{path:"/shop/me",component:O}),Object(h.jsx)(r.b,{path:"/shop/car",component:d}),Object(h.jsx)(r.a,{to:"/shop/me"})]})})})]})}}]),t}(b.a.Component);n.default=x}}]);
|
||||||
|
//# sourceMappingURL=3.db0e6efd.chunk.js.map
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"sources":["pages/nav.js","pages/shop.js"],"names":["Nav","url","this","props","history","replace","className","onClick","go","bind","React","Component","withRouter","Index","lazy","Good","Me","Car","Shop","fallback","Fragment","path","component","to"],"mappings":"6LAGMA,E,wJACF,SAAGC,GACCC,KAAKC,MAAMC,QAAQC,QAAQJ,K,oBAE/B,WACI,OACI,qBAAIK,UAAU,MAAd,UACI,oBAAIC,QAASL,KAAKM,GAAGC,KAAKP,KAAK,eAA/B,0BACA,oBAAIK,QAASL,KAAKM,GAAGC,KAAKP,KAAK,cAA/B,0BACA,oBAAIK,QAASL,KAAKM,GAAGC,KAAKP,KAAK,aAA/B,gCACA,oBAAIK,QAASL,KAAKM,GAAGC,KAAKP,KAAK,YAA/B,6C,GAVEQ,IAAMC,WAeTC,cAAWZ,GCfpBa,EAAMC,gBAAK,kBAAI,gCACfC,EAAKD,gBAAK,kBAAI,gCACdE,EAAGF,gBAAK,kBAAI,gCACZG,EAAIH,gBAAK,kBAAI,gCAEbI,E,4JACF,WACI,OACI,gCACI,cAAC,EAAD,IACA,8BACI,cAAC,IAAD,UACI,eAAC,WAAD,CAAUC,SAAU,cAAC,IAAMC,SAAP,IAApB,UACI,cAAC,IAAD,CAAOC,KAAK,cAAcC,UAAWT,IACrC,cAAC,IAAD,CAAOQ,KAAK,aAAaC,UAAWP,IACpC,cAAC,IAAD,CAAOM,KAAK,WAAWC,UAAWN,IAClC,cAAC,IAAD,CAAOK,KAAK,YAAYC,UAAWL,IACnC,cAAC,IAAD,CAAUM,GAAG,2B,GAZtBb,IAAMC,WAoBVO","file":"static/js/3.db0e6efd.chunk.js","sourcesContent":["import React from 'react'\nimport { withRouter } from 'react-router-dom'\nimport '../assets/style.css'\nclass Nav extends React.Component{\n go(url){\n this.props.history.replace(url)\n }\n render(){\n return(\n <ul className=\"nav\">\n <li onClick={this.go.bind(this,'/shop/index')}>首页</li>\n <li onClick={this.go.bind(this,'/shop/good')}>商品</li>\n <li onClick={this.go.bind(this,'/shop/car')}>购物车</li>\n <li onClick={this.go.bind(this,'/shop/me')}>个人中心</li>\n </ul>\n )\n }\n}\nexport default withRouter(Nav)","import React,{lazy,Suspense}from 'react'\nimport Nav from './nav'\nimport {Switch,Route,Redirect} from 'react-router-dom'\nconst Index=lazy(()=>import('./index'))\nconst Good=lazy(()=>import('./good'))\nconst Me=lazy(()=>import('./me'))\nconst Car=lazy(()=>import('./car'))\n\nclass Shop extends React.Component{\n render(){\n return(\n <div>\n <Nav></Nav>\n <div>\n <Switch>\n <Suspense fallback={<React.Fragment></React.Fragment>}>\n <Route path=\"/shop/index\" component={Index}></Route>\n <Route path=\"/shop/good\" component={Good}></Route>\n <Route path=\"/shop/me\" component={Me}></Route>\n <Route path=\"/shop/car\" component={Car}></Route>\n <Redirect to=\"/shop/me\"></Redirect>\n </Suspense>\n </Switch>\n </div>\n </div>\n )\n }\n}\nexport default Shop\n"],"sourceRoot":""}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
(this.webpackJsonp1=this.webpackJsonp1||[]).push([[4],{40:function(t,e,n){"use strict";n.r(e);var c=n(13),r=n(14),i=n(16),a=n(15),s=n(0),u=n.n(s),h=n(3),b=function(t){Object(i.a)(n,t);var e=Object(a.a)(n);function n(){return Object(c.a)(this,n),e.apply(this,arguments)}return Object(r.a)(n,[{key:"render",value:function(){return Object(h.jsx)("div",{children:Object(h.jsx)("h1",{children:"this is car"})})}}]),n}(u.a.Component);e.default=b}}]);
|
||||||
|
//# sourceMappingURL=4.2ced80f9.chunk.js.map
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"sources":["pages/car.js"],"names":["Car","React","Component"],"mappings":"yJACMA,E,4JACF,WACI,OACI,8BACI,mD,GAJEC,IAAMC,WASTF","file":"static/js/4.2ced80f9.chunk.js","sourcesContent":["import React from 'react'\nclass Car extends React.Component{\n render(){\n return(\n <div>\n <h1>this is car</h1>\n </div>\n )\n }\n}\nexport default Car"],"sourceRoot":""}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
(this.webpackJsonp1=this.webpackJsonp1||[]).push([[5],{38:function(t,e,n){"use strict";n.r(e);var c=n(13),i=n(14),r=n(16),s=n(15),a=n(0),u=n.n(a),o=n(3),h=function(t){Object(r.a)(n,t);var e=Object(s.a)(n);function n(){return Object(c.a)(this,n),e.apply(this,arguments)}return Object(i.a)(n,[{key:"render",value:function(){return Object(o.jsx)("div",{children:Object(o.jsx)("h1",{children:"this is good"})})}}]),n}(u.a.Component);e.default=h}}]);
|
||||||
|
//# sourceMappingURL=5.e00c0244.chunk.js.map
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"sources":["pages/good.js"],"names":["Goods","React","Component"],"mappings":"yJACMA,E,4JACF,WACI,OACI,8BACI,oD,GAJIC,IAAMC,WASXF","file":"static/js/5.e00c0244.chunk.js","sourcesContent":["import React from 'react'\nclass Goods extends React.Component{\n render(){\n return(\n <div>\n <h1>this is good</h1>\n </div>\n )\n }\n}\nexport default Goods"],"sourceRoot":""}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
(this.webpackJsonp1=this.webpackJsonp1||[]).push([[6],{37:function(t,e,n){"use strict";n.r(e);var c=n(13),r=n(14),a=n(16),i=n(15),s=n(0),u=n.n(s),b=n(3),h=function(t){Object(a.a)(n,t);var e=Object(i.a)(n);function n(){return Object(c.a)(this,n),e.apply(this,arguments)}return Object(r.a)(n,[{key:"render",value:function(){return Object(b.jsx)("div",{children:Object(b.jsx)("h1",{children:"INDEX"})})}}]),n}(u.a.Component);e.default=h}}]);
|
||||||
|
//# sourceMappingURL=6.708fac83.chunk.js.map
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"sources":["pages/index.js"],"names":["Index","React","Component"],"mappings":"yJACMA,E,4JACF,WACI,OACI,8BACI,6C,GAJIC,IAAMC,WASXF","file":"static/js/6.708fac83.chunk.js","sourcesContent":["import React from 'react'\nclass Index extends React.Component{\n render(){\n return(\n <div>\n <h1>INDEX</h1>\n </div>\n )\n }\n}\nexport default Index"],"sourceRoot":""}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
(this.webpackJsonp1=this.webpackJsonp1||[]).push([[7],{35:function(t,e,s){"use strict";s.r(e);var a=s(13),n=s(14),c=s(16),i=s(15),r=s(0),l=s.n(r),o=s(3),h=function(t){Object(c.a)(s,t);var e=Object(i.a)(s);function s(){var t;return Object(a.a)(this,s),(t=e.call(this)).state={userName:"",password:""},t}return Object(n.a)(s,[{key:"doLogin",value:function(){this.state.userName.match(/^\s*$/)?alert("\u8bf7\u8f93\u5165\u7528\u6237\u540d"):this.state.password.match(/^\s*$/)?alert("\u8bf7\u8f93\u5165\u5bc6\u7801"):(localStorage.setItem("userName",this.state.userName),localStorage.setItem("isLogin",!0),this.props.history.replace("/shop"))}},{key:"render",value:function(){var t=this;return Object(o.jsxs)("div",{children:[Object(o.jsx)("h1",{children:"\u6b22\u8fce\u767b\u5f55"}),Object(o.jsxs)("ul",{children:[Object(o.jsx)("li",{children:"\u7528\u6237\u540d"}),Object(o.jsx)("li",{children:Object(o.jsx)("input",{type:"text",placeholder:"\u8bf7\u8f93\u5165\u7528\u6237\u540d",onChange:function(e){t.setState({userName:e.target.value})}})})]}),Object(o.jsxs)("ul",{children:[Object(o.jsx)("li",{children:"\u5bc6\u7801"}),Object(o.jsx)("li",{children:Object(o.jsx)("input",{type:"text",placeholder:"\u8bf7\u8f93\u5165\u5bc6\u7801",onChange:function(e){t.setState({password:e.target.value})}})})]}),Object(o.jsx)("button",{type:"button",onClick:this.doLogin.bind(this),children:"\u7acb\u5373\u767b\u5f55"})]})}}]),s}(l.a.Component);e.default=h}}]);
|
||||||
|
//# sourceMappingURL=7.24834100.chunk.js.map
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"sources":["pages/login.js"],"names":["Login","state","userName","password","this","match","alert","localStorage","setItem","props","history","replace","type","placeholder","onChange","e","setState","target","value","onClick","doLogin","bind","React","Component"],"mappings":"yJACMA,E,kDACF,aAAc,IAAD,8BACT,gBACKC,MAAM,CACPC,SAAS,GACTC,SAAS,IAJJ,E,2CAOb,WACOC,KAAKH,MAAMC,SAASG,MAAM,SACzBC,MAAM,wCAGPF,KAAKH,MAAME,SAASE,MAAM,SACzBC,MAAM,mCAGVC,aAAaC,QAAQ,WAAWJ,KAAKH,MAAMC,UAC3CK,aAAaC,QAAQ,WAAU,GAC/BJ,KAAKK,MAAMC,QAAQC,QAAQ,Y,oBAE/B,WAAS,IAAD,OACJ,OACI,gCACI,0DACA,+BACI,oDACA,6BACI,uBAAOC,KAAK,OACZC,YAAY,uCACZC,SAAU,SAACC,GAAK,EAAKC,SAAS,CAACd,SAASa,EAAEE,OAAOC,gBAIzD,+BACI,8CACA,6BACI,uBAAON,KAAK,OACZC,YAAY,iCACZC,SAAU,SAACC,GAAK,EAAKC,SAAS,CAACb,SAASY,EAAEE,OAAOC,gBAIzD,wBAAQN,KAAK,SAASO,QAASf,KAAKgB,QAAQC,KAAKjB,MAAjD,6C,GA3CIkB,IAAMC,WAgDXvB","file":"static/js/7.24834100.chunk.js","sourcesContent":["import React from 'react'\nclass Login extends React.Component{\n constructor(){\n super();\n this.state={\n userName:'',\n password:''\n }\n }\n doLogin(){\n if(this.state.userName.match(/^\\s*$/)){\n alert(\"请输入用户名\");\n return;\n }\n if(this.state.password.match(/^\\s*$/)){\n alert(\"请输入密码\");\n return;\n }\n localStorage.setItem('userName',this.state.userName);\n localStorage.setItem('isLogin',true);\n this.props.history.replace('/shop')\n }\n render(){\n return(\n <div>\n <h1>欢迎登录</h1>\n <ul>\n <li>用户名</li>\n <li>\n <input type=\"text\" \n placeholder=\"请输入用户名\" \n onChange={(e)=>{this.setState({userName:e.target.value})}}\n />\n </li>\n </ul>\n <ul>\n <li>密码</li>\n <li>\n <input type=\"text\" \n placeholder=\"请输入密码\" \n onChange={(e)=>{this.setState({password:e.target.value})}}\n />\n </li>\n </ul>\n <button type=\"button\" onClick={this.doLogin.bind(this)}>立即登录</button>\n </div>\n )\n }\n}\nexport default Login\n"],"sourceRoot":""}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
(this.webpackJsonp1=this.webpackJsonp1||[]).push([[8],{39:function(e,t,c){"use strict";c.r(t);var r=c(13),n=c(14),a=c(19),i=c(16),o=c(15),s=c(0),l=c.n(s),u=c(3),h=function(e){Object(i.a)(c,e);var t=Object(o.a)(c);function c(e){var n;return Object(r.a)(this,c),n=t.call(this),localStorage.getItem("userName")?n:(e.history.replace("/"),Object(a.a)(n))}return Object(n.a)(c,[{key:"outlog",value:function(){localStorage.clear(),this.props.history.replace("/")}},{key:"render",value:function(){return Object(u.jsxs)("div",{children:[Object(u.jsxs)("h1",{children:["hi! \u6b22\u8fce",localStorage.getItem("userName"),"\u56de\u6765\u3002"]}),Object(u.jsx)("h1",{children:"this is me"}),Object(u.jsx)("button",{type:"button",onClick:this.outlog.bind(this),children:"\u5b89\u5168\u9000\u51fa"})]})}}]),c}(l.a.Component);t.default=h}}]);
|
||||||
|
//# sourceMappingURL=8.689ed892.chunk.js.map
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"sources":["pages/me.js"],"names":["Me","props","localStorage","getItem","history","replace","clear","this","type","onClick","outlog","bind","React","Component"],"mappings":"iKACMA,E,kDACF,WAAYC,GAAO,IAAD,EAEd,OAFc,oBACd,eACIC,aAAaC,QAAQ,YAFX,GAGVF,EAAMG,QAAQC,QAAQ,KACtB,gB,0CAGR,WACIH,aAAaI,QACbC,KAAKN,MAAMG,QAAQC,QAAQ,O,oBAG/B,WACI,OACI,gCACI,kDAAWH,aAAaC,QAAQ,YAAhC,wBACA,4CACA,wBAAQK,KAAK,SAASC,QAASF,KAAKG,OAAOC,KAAKJ,MAAhD,6C,GAlBCK,IAAMC,WAuBRb","file":"static/js/8.689ed892.chunk.js","sourcesContent":["import React from 'react'\nclass Me extends React.Component{\n constructor(props){\n super();\n if(!localStorage.getItem('userName')){\n props.history.replace('/');\n return;\n }\n }\n outlog(){\n localStorage.clear();\n this.props.history.replace('/')\n\n }\n render(){\n return(\n <div>\n <h1>hi! 欢迎{localStorage.getItem('userName')}回来。</h1>\n <h1>this is me</h1>\n <button type=\"button\" onClick={this.outlog.bind(this)}>安全退出</button>\n </div>\n )\n }\n}\nexport default Me"],"sourceRoot":""}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
(this.webpackJsonp1=this.webpackJsonp1||[]).push([[9],{36:function(t,e,n){"use strict";n.r(e),n.d(e,"getCLS",(function(){return d})),n.d(e,"getFCP",(function(){return S})),n.d(e,"getFID",(function(){return F})),n.d(e,"getLCP",(function(){return k})),n.d(e,"getTTFB",(function(){return C}));var i,a,r,o,u=function(t,e){return{name:t,value:void 0===e?-1:e,delta:0,entries:[],id:"v1-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},c=function(t,e){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){if("first-input"===t&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver((function(t){return t.getEntries().map(e)}));return n.observe({type:t,buffered:!0}),n}}catch(t){}},f=function(t,e){var n=function n(i){"pagehide"!==i.type&&"hidden"!==document.visibilityState||(t(i),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},s=function(t){addEventListener("pageshow",(function(e){e.persisted&&t(e)}),!0)},m="function"==typeof WeakSet?new WeakSet:new Set,p=function(t,e,n){var i;return function(){e.value>=0&&(n||m.has(e)||"hidden"===document.visibilityState)&&(e.delta=e.value-(i||0),(e.delta||void 0===i)&&(i=e.value,t(e)))}},d=function(t,e){var n,i=u("CLS",0),a=function(t){t.hadRecentInput||(i.value+=t.value,i.entries.push(t),n())},r=c("layout-shift",a);r&&(n=p(t,i,e),f((function(){r.takeRecords().map(a),n()})),s((function(){i=u("CLS",0),n=p(t,i,e)})))},v=-1,l=function(){return"hidden"===document.visibilityState?0:1/0},h=function(){f((function(t){var e=t.timeStamp;v=e}),!0)},g=function(){return v<0&&(v=l(),h(),s((function(){setTimeout((function(){v=l(),h()}),0)}))),{get timeStamp(){return v}}},S=function(t,e){var n,i=g(),a=u("FCP"),r=function(t){"first-contentful-paint"===t.name&&(f&&f.disconnect(),t.startTime<i.timeStamp&&(a.value=t.startTime,a.entries.push(t),m.add(a),n()))},o=performance.getEntriesByName("first-contentful-paint")[0],f=o?null:c("paint",r);(o||f)&&(n=p(t,a,e),o&&r(o),s((function(i){a=u("FCP"),n=p(t,a,e),requestAnimationFrame((function(){requestAnimationFrame((function(){a.value=performance.now()-i.timeStamp,m.add(a),n()}))}))})))},y={passive:!0,capture:!0},E=new Date,w=function(t,e){i||(i=e,a=t,r=new Date,b(removeEventListener),L())},L=function(){if(a>=0&&a<r-E){var t={entryType:"first-input",name:i.type,target:i.target,cancelable:i.cancelable,startTime:i.timeStamp,processingStart:i.timeStamp+a};o.forEach((function(e){e(t)})),o=[]}},T=function(t){if(t.cancelable){var e=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;"pointerdown"==t.type?function(t,e){var n=function(){w(t,e),a()},i=function(){a()},a=function(){removeEventListener("pointerup",n,y),removeEventListener("pointercancel",i,y)};addEventListener("pointerup",n,y),addEventListener("pointercancel",i,y)}(e,t):w(e,t)}},b=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return t(e,T,y)}))},F=function(t,e){var n,r=g(),d=u("FID"),v=function(t){t.startTime<r.timeStamp&&(d.value=t.processingStart-t.startTime,d.entries.push(t),m.add(d),n())},l=c("first-input",v);n=p(t,d,e),l&&f((function(){l.takeRecords().map(v),l.disconnect()}),!0),l&&s((function(){var r;d=u("FID"),n=p(t,d,e),o=[],a=-1,i=null,b(addEventListener),r=v,o.push(r),L()}))},k=function(t,e){var n,i=g(),a=u("LCP"),r=function(t){var e=t.startTime;e<i.timeStamp&&(a.value=e,a.entries.push(t)),n()},o=c("largest-contentful-paint",r);if(o){n=p(t,a,e);var d=function(){m.has(a)||(o.takeRecords().map(r),o.disconnect(),m.add(a),n())};["keydown","click"].forEach((function(t){addEventListener(t,d,{once:!0,capture:!0})})),f(d,!0),s((function(i){a=u("LCP"),n=p(t,a,e),requestAnimationFrame((function(){requestAnimationFrame((function(){a.value=performance.now()-i.timeStamp,m.add(a),n()}))}))}))}},C=function(t){var e,n=u("TTFB");e=function(){try{var e=performance.getEntriesByType("navigation")[0]||function(){var t=performance.timing,e={entryType:"navigation",startTime:0};for(var n in t)"navigationStart"!==n&&"toJSON"!==n&&(e[n]=Math.max(t[n]-t.navigationStart,0));return e}();if(n.value=n.delta=e.responseStart,n.value<0)return;n.entries=[e],t(n)}catch(t){}},"complete"===document.readyState?setTimeout(e,0):addEventListener("pageshow",e)}}}]);
|
||||||
|
//# sourceMappingURL=9.13fb6ccd.chunk.js.map
|
||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,2 @@
|
|||||||
|
(this.webpackJsonp1=this.webpackJsonp1||[]).push([[0],{26:function(t,e,n){},33:function(t,e,n){"use strict";n.r(e);var c=n(0),r=n.n(c),a=n(20),j=n.n(a),i=(n(26),n(13)),o=n(14),b=n(16),s=n(15),u=n(17),l=n(1),h=n(3),O=Object(c.lazy)((function(){return n.e(3).then(n.bind(null,41))})),p=Object(c.lazy)((function(){return n.e(7).then(n.bind(null,35))})),d=function(t){Object(b.a)(n,t);var e=Object(s.a)(n);function n(){return Object(i.a)(this,n),e.apply(this,arguments)}return Object(o.a)(n,[{key:"render",value:function(){return Object(h.jsx)(r.a.Fragment,{children:Object(h.jsx)(u.a,{children:Object(h.jsx)(r.a.Fragment,{children:Object(h.jsxs)(c.Suspense,{fallback:Object(h.jsx)(r.a.Fragment,{}),children:[Object(h.jsx)(l.b,{path:"/",exact:!0,component:p}),Object(h.jsx)(l.b,{path:"/shop",component:O}),Object(h.jsx)(l.b,{path:"/login",component:p})]})})})})}}]),n}(r.a.Component),x=function(t){t&&t instanceof Function&&n.e(9).then(n.bind(null,36)).then((function(e){var n=e.getCLS,c=e.getFID,r=e.getFCP,a=e.getLCP,j=e.getTTFB;n(t),c(t),r(t),a(t),j(t)}))};function f(){return Object(h.jsx)(r.a.Fragment,{children:Object(h.jsx)(d,{})})}j.a.render(Object(h.jsx)(r.a.StrictMode,{children:Object(h.jsx)(f,{})}),document.getElementById("root")),x()}},[[33,1,2]]]);
|
||||||
|
//# sourceMappingURL=main.2ddb9c7a.chunk.js.map
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"sources":["router.js","reportWebVitals.js","index.js"],"names":["Shop","lazy","Login","Router","Fragment","fallback","path","exact","component","React","Component","reportWebVitals","onPerfEntry","Function","then","getCLS","getFID","getFCP","getLCP","getTTFB","App","ReactDOM","render","StrictMode","document","getElementById"],"mappings":"sNAQMA,EAAKC,gBAAK,kBAAI,gCACdC,EAAMD,gBAAK,kBAAI,gCAkBNE,E,4JAhBb,WACE,OACE,cAAC,IAAMC,SAAP,UACE,cAAC,IAAD,UACE,cAAC,IAAMA,SAAP,UACE,eAAC,WAAD,CAAUC,SAAU,cAAC,IAAMD,SAAP,IAApB,UACI,cAAC,IAAD,CAAOE,KAAK,IAAKC,OAAK,EAACC,UAAWN,IAClC,cAAC,IAAD,CAAOI,KAAK,QAAQE,UAAWR,IAC/B,cAAC,IAAD,CAAOM,KAAK,SAASE,UAAWN,iB,GAT3BO,IAAMC,WCEZC,EAZS,SAAAC,GAClBA,GAAeA,aAAuBC,UACxC,6BAAqBC,MAAK,YAAkD,IAA/CC,EAA8C,EAA9CA,OAAQC,EAAsC,EAAtCA,OAAQC,EAA8B,EAA9BA,OAAQC,EAAsB,EAAtBA,OAAQC,EAAc,EAAdA,QAC3DJ,EAAOH,GACPI,EAAOJ,GACPK,EAAOL,GACPM,EAAON,GACPO,EAAQP,OCDd,SAASQ,IACP,OACE,cAAC,IAAMhB,SAAP,UACE,cAAC,EAAD,MAINiB,IAASC,OACP,cAAC,IAAMC,WAAP,UACE,cAACH,EAAD,MAEFI,SAASC,eAAe,SAM1Bd,M","file":"static/js/main.2ddb9c7a.chunk.js","sourcesContent":["// HashRouter 哈希路由\n// BrowserRouter history路由\n// Route 设置路由与组件关联\n// switch 相当于break\n// exact 完全匹配路由\n// redirect 路由重定向\nimport React, {lazy,Suspense} from 'react'\nimport {HashRouter,BrowserRouter,Route} from 'react-router-dom'\nconst Shop=lazy(()=>import('./pages/shop'))\nconst Login=lazy(()=>import('./pages/login'))\nclass Router extends React.Component{\n render(){\n return(\n <React.Fragment>\n <BrowserRouter>\n <React.Fragment>\n <Suspense fallback={<React.Fragment></React.Fragment>}>\n <Route path='/' exact component={Login}></Route>\n <Route path='/shop' component={Shop}></Route>\n <Route path='/login' component={Login}></Route>\n </Suspense>\n </React.Fragment>\n </BrowserRouter>\n </React.Fragment>\n )\n }\n} \nexport default Router;\n","const reportWebVitals = onPerfEntry => {\n if (onPerfEntry && onPerfEntry instanceof Function) {\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n getCLS(onPerfEntry);\n getFID(onPerfEntry);\n getFCP(onPerfEntry);\n getLCP(onPerfEntry);\n getTTFB(onPerfEntry);\n });\n }\n};\n\nexport default reportWebVitals;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\n// import RouterComponent from './router';\nimport RouterComponent from './router';\nimport reportWebVitals from './reportWebVitals';\nfunction App(){\n return (\n <React.Fragment>\n <RouterComponent></RouterComponent>\n </React.Fragment>\n )\n}\nReactDOM.render(\n <React.StrictMode>\n <App />\n </React.StrictMode>,\n document.getElementById('root')\n);\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals();\n"],"sourceRoot":""}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
!function(e){function t(t){for(var n,o,c=t[0],i=t[1],f=t[2],l=0,d=[];l<c.length;l++)o=c[l],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&d.push(a[o][0]),a[o]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(s&&s(t);d.length;)d.shift()();return u.push.apply(u,f||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,o=1;o<r.length;o++){var i=r[o];0!==a[i]&&(n=!1)}n&&(u.splice(t--,1),e=c(c.s=r[0]))}return e}var n={},o={1:0},a={1:0},u=[];function c(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,c),r.l=!0,r.exports}c.e=function(e){var t=[];o[e]?t.push(o[e]):0!==o[e]&&{3:1}[e]&&t.push(o[e]=new Promise((function(t,r){for(var n="static/css/"+({}[e]||e)+"."+{3:"868032c0",4:"31d6cfe0",5:"31d6cfe0",6:"31d6cfe0",7:"31d6cfe0",8:"31d6cfe0",9:"31d6cfe0"}[e]+".chunk.css",a=c.p+n,u=document.getElementsByTagName("link"),i=0;i<u.length;i++){var f=(s=u[i]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(f===n||f===a))return t()}var l=document.getElementsByTagName("style");for(i=0;i<l.length;i++){var s;if((f=(s=l[i]).getAttribute("data-href"))===n||f===a)return t()}var d=document.createElement("link");d.rel="stylesheet",d.type="text/css",d.onload=t,d.onerror=function(t){var n=t&&t.target&&t.target.src||a,u=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");u.code="CSS_CHUNK_LOAD_FAILED",u.request=n,delete o[e],d.parentNode.removeChild(d),r(u)},d.href=a,document.getElementsByTagName("head")[0].appendChild(d)})).then((function(){o[e]=0})));var r=a[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=a[e]=[t,n]}));t.push(r[2]=n);var u,i=document.createElement("script");i.charset="utf-8",i.timeout=120,c.nc&&i.setAttribute("nonce",c.nc),i.src=function(e){return c.p+"static/js/"+({}[e]||e)+"."+{3:"db0e6efd",4:"2ced80f9",5:"e00c0244",6:"708fac83",7:"24834100",8:"689ed892",9:"13fb6ccd"}[e]+".chunk.js"}(e);var f=new Error;u=function(t){i.onerror=i.onload=null,clearTimeout(l);var r=a[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;f.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",f.name="ChunkLoadError",f.type=n,f.request=o,r[1](f)}a[e]=void 0}};var l=setTimeout((function(){u({type:"timeout",target:i})}),12e4);i.onerror=i.onload=u,document.head.appendChild(i)}return Promise.all(t)},c.m=e,c.c=n,c.d=function(e,t,r){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},c.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(c.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)c.d(r,n,function(t){return e[t]}.bind(null,n));return r},c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="/",c.oe=function(e){throw console.error(e),e};var i=this.webpackJsonp1=this.webpackJsonp1||[],f=i.push.bind(i);i.push=t,i=i.slice();for(var l=0;l<i.length;l++)t(i[l]);var s=f;r()}([]);
|
||||||
|
//# sourceMappingURL=runtime-main.5c31da0c.js.map
|
||||||
File diff suppressed because one or more lines are too long
@@ -21,7 +21,7 @@ const publicUrlOrPath = getPublicUrlOrPath(
|
|||||||
process.env.PUBLIC_URL
|
process.env.PUBLIC_URL
|
||||||
);
|
);
|
||||||
|
|
||||||
const buildPath = process.env.BUILD_PATH || 'build';
|
const buildPath = process.env.BUILD_PATH || 'build1';
|
||||||
|
|
||||||
const moduleFileExtensions = [
|
const moduleFileExtensions = [
|
||||||
'web.mjs',
|
'web.mjs',
|
||||||
|
|||||||
@@ -5,14 +5,14 @@
|
|||||||
// exact 完全匹配路由
|
// exact 完全匹配路由
|
||||||
// redirect 路由重定向
|
// redirect 路由重定向
|
||||||
import React, {lazy,Suspense} from 'react'
|
import React, {lazy,Suspense} from 'react'
|
||||||
import {HashRouter,Route} from 'react-router-dom'
|
import {HashRouter,BrowserRouter,Route} from 'react-router-dom'
|
||||||
const Shop=lazy(()=>import('./pages/shop'))
|
const Shop=lazy(()=>import('./pages/shop'))
|
||||||
const Login=lazy(()=>import('./pages/login'))
|
const Login=lazy(()=>import('./pages/login'))
|
||||||
class Router extends React.Component{
|
class Router extends React.Component{
|
||||||
render(){
|
render(){
|
||||||
return(
|
return(
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<HashRouter>
|
<BrowserRouter>
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<Suspense fallback={<React.Fragment></React.Fragment>}>
|
<Suspense fallback={<React.Fragment></React.Fragment>}>
|
||||||
<Route path='/' exact component={Login}></Route>
|
<Route path='/' exact component={Login}></Route>
|
||||||
@@ -20,7 +20,7 @@ class Router extends React.Component{
|
|||||||
<Route path='/login' component={Login}></Route>
|
<Route path='/login' component={Login}></Route>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
</HashRouter>
|
</BrowserRouter>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user