|
@@ -61,8 +61,61 @@ export default class Home extends React.Component {
|
|
|
}, 500);
|
|
|
}
|
|
|
/* 如果不是 dva 2.0 请删除 end */
|
|
|
+ // 预加载图片
|
|
|
+ ["http://questnet.cn/image/trophy/a.png",
|
|
|
+ "http://questnet.cn/image/trophy/b.png",
|
|
|
+ "http://questnet.cn/image/trophy/c.png",
|
|
|
+ "http://questnet.cn/image/trophy/d.png",
|
|
|
+ "http://questnet.cn/image/trophy/e.png",
|
|
|
+ "http://questnet.cn/image/trophy/f.png",
|
|
|
+ "http://questnet.cn/image/trophy/g.png",
|
|
|
+ "http://questnet.cn/image/trophy/h.png",
|
|
|
+ "http://questnet.cn/image/trophy/i.png",
|
|
|
+ "http://questnet.cn/image/trophy/j.png",
|
|
|
+ "http://questnet.cn/image/trophy/k.png",
|
|
|
+ "http://questnet.cn/image/trophy/l.png",
|
|
|
+ "http://questnet.cn/image/trophy/m.png",
|
|
|
+ "http://questnet.cn/image/sr/1.png",
|
|
|
+ "http://questnet.cn/image/sr/2.png",
|
|
|
+ "http://questnet.cn/image/sr/3.png",
|
|
|
+ "http://questnet.cn/image/sr/4.png",
|
|
|
+ "http://questnet.cn/image/sr/5.png",
|
|
|
+ "http://questnet.cn/image/sr/6.png",
|
|
|
+ "http://questnet.cn/image/sr/7.png",
|
|
|
+ "http://questnet.cn/image/sr/8.png",
|
|
|
+ "http://questnet.cn/image/sr/9.png",
|
|
|
+ "http://questnet.cn/image/sr/10.png",
|
|
|
+ "http://questnet.cn/image/sr/11.png",
|
|
|
+ "http://questnet.cn/image/sr/12.png",
|
|
|
+ "http://questnet.cn/image/sr/13.png",
|
|
|
+ "http://questnet.cn/image/sr/14.png",
|
|
|
+ "http://questnet.cn/image/sr/15.png",
|
|
|
+ "http://questnet.cn/image/sthd/21.png",
|
|
|
+ "http://questnet.cn/image/sthd/22.png",
|
|
|
+ "http://questnet.cn/image/sthd/23.png",
|
|
|
+ "http://questnet.cn/image/sthd/24.png",
|
|
|
+ "http://questnet.cn/image/sthd/25.png",
|
|
|
+ "http://questnet.cn/image/sthd/26.png",
|
|
|
+ "http://questnet.cn/image/sthd/27.png",
|
|
|
+ "http://questnet.cn/image/sthd/28.png",
|
|
|
+ "http://questnet.cn/image/sthd/29.png",
|
|
|
+ "http://questnet.cn/image/sthd/30.png",
|
|
|
+ "http://questnet.cn/image/sthd/31.png",
|
|
|
+ "http://questnet.cn/image/sthd/32.png",
|
|
|
+ "http://questnet.cn/image/sthd/33.png",
|
|
|
+ "http://questnet.cn/image/sthd/34.png",
|
|
|
+ "http://questnet.cn/image/sthd/35.png"].forEach((v, idx, arr) => {
|
|
|
+ let img = new Image();
|
|
|
+ img.src = v;
|
|
|
+ img.onload = () => {
|
|
|
+ arr.successLength = (arr.successLength || 0) + 1;
|
|
|
+ console.log(`进度:${arr.successLength / arr.length}`)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
render() {
|
|
|
const children = [
|
|
|
<Nav0
|