Commit 156b315c authored by wildfirecode13's avatar wildfirecode13

1

parent dd7f4ebf
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
"start":"spark dev --type h5",
"build":"spark build --type taobao",
"prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'" "prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'"
}, },
"dependencies": { "dependencies": {
......
'use strict'; "use strict";
import React, { Component } from 'react'; import React, { Component } from "react";
import resList from '../../resconfig/resList'; import resList from "../../resconfig/resList";
//import API from '../../api'; import API from "../../api";
import './pagefrontpage.less'; import "./pagefrontpage.less";
class Pagefrontpage extends Component { class Pagefrontpage extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = this.state || { resList: resList }; this.state = this.state || { resList: resList };
} }
componentDidMount() {
API.getRule().then((res) => {
console.log(res)
});
}
render() { render() {
return ( return (
<div className="frontpage"> <div className="frontpage">
<div className="div" /> <div className="div" />
<img className="image" src={this.state.resList['eb602b5e-fd36-4968-bed0-ec786cd8e1c0'].url} /> <img
className="image"
src={this.state.resList["eb602b5e-fd36-4968-bed0-ec786cd8e1c0"].url}
/>
</div> </div>
); );
} }
......
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