diff --git a/package-lock.json b/package-lock.json index c11bcd6..90646f1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,17 @@ { "name": "global.highlights.hub", - "version": "0.0.0", + "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "global.highlights.hub", - "version": "0.0.0", + "version": "0.1.0", "dependencies": { "antd": "^5.4.0", "mobx": "^6.9.0", "mobx-react": "^7.6.0", + "moment": "^2.29.4", "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "^6.10.0" @@ -1536,6 +1537,14 @@ } } }, + "node_modules/moment": { + "version": "2.29.4", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", + "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", + "engines": { + "node": "*" + } + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", diff --git a/package.json b/package.json index c6bf54a..1716ae8 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "antd": "^5.4.0", "mobx": "^6.9.0", "mobx-react": "^7.6.0", + "moment": "^2.29.4", "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "^6.10.0" diff --git a/src/stores/Plan.js b/src/stores/Plan.js index 8bf24c5..5d83775 100644 --- a/src/stores/Plan.js +++ b/src/stores/Plan.js @@ -1,20 +1,51 @@ -import { makeAutoObservable } from "mobx"; +import { makeAutoObservable, runInAction } from "mobx"; +import * as req from '../utils/request'; +import { prepareUrl } from '../utils/commons'; class Plan { - count = 0; constructor(root) { makeAutoObservable(this, { rootStore: false }); this.root = root; } - increase() { - this.count += 1; + fetchRecent() { + runInAction(() => { + this.planList = [ + { + key: '1', + name: '中华游111029-N111025076', + age: 32, + address: '5大1小', + tags: ['nice', 'developer'], + }, + { + key: '2', + name: '中华游111030-HY110704017', + age: 42, + address: '2大', + tags: ['loser'], + }, + { + key: '3', + name: '中华游111030-Y111004040', + age: 32, + address: '30大', + tags: ['cool', 'teacher'], + }, + ]; + }); } - decrease() { - this.count -= 1; - } + planList = [ + { + key: '1', + name: '-', + age: 0, + address: '-', + tags: ['*'], + } + ]; } export default Plan; \ No newline at end of file diff --git a/src/views/App.jsx b/src/views/App.jsx index f65051c..263b8ae 100644 --- a/src/views/App.jsx +++ b/src/views/App.jsx @@ -113,13 +113,6 @@ export default function App() { - - { console.info('planId: ' + planId); - }, [planId]); + }, [planId]); return ( - - - Parameter: {planId} - - - - - - - - - - - - + Newest Plans + + + Parameter: {planId} + + + + Group Date: + + + + + + + + + +
+ + ); }