diff --git a/config.js b/config.js index a5527a144..50fe82e75 100644 --- a/config.js +++ b/config.js @@ -1,7 +1,7 @@ /* * @Author: Lamdaer * @Date: 2020-10-24 02:08:13 - * @LastEditTime: 2020-10-24 02:15:06 + * @LastEditTime: 2020-10-24 10:36:37 * @Description: * @FilePath: /opengauss/config.js */ diff --git a/model/hobby-parent.js b/model/hobby-parent.js new file mode 100644 index 000000000..8a19bd744 --- /dev/null +++ b/model/hobby-parent.js @@ -0,0 +1,15 @@ +/* + * @Author: Lamdaer + * @Date: 2020-10-24 02:56:28 + * @LastEditTime: 2020-10-24 03:27:02 + * @Description: + * @FilePath: /opengauss/model/hobby-parent.js + */ +import { HTTP } from '../utils/http' +export class HobbyParentModel extends HTTP { + getHobbyList() { + return this.request({ + url: '/gauss/hobby_parent/with_children', + }) + } +} diff --git a/pages/index/index.js b/pages/index/index.js index 1f5434c18..0d7123cec 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -1,13 +1,15 @@ /* * @Author: Lamdaer * @Date: 2020-10-24 01:58:20 - * @LastEditTime: 2020-10-24 02:53:00 + * @LastEditTime: 2020-10-24 03:28:07 * @Description: * @FilePath: /opengauss/pages/index/index.js */ // pages/index/index.js import { JobModel } from '../../model/job' +import { HobbyParentModel } from '../../model/hobby-parent' const jobModel = new JobModel() +const hobbyParentModel = new HobbyParentModel() Page({ getJobList() { jobModel.getJobList().then((response) => { @@ -17,11 +19,17 @@ Page({ console.log(response) }) }, + getHobbyList() { + hobbyParentModel.getHobbyList().then((res) => { + console.log(res) + }) + }, /** * 页面的初始数据 */ data: { jobList: [], + hobbyParentList: [], }, /** @@ -29,6 +37,7 @@ Page({ */ onLoad: function (options) { this.getJobList() + this.getHobbyList() }, /** diff --git a/project.config.json b/project.config.json index 46046e19d..1ce2a08f8 100644 --- a/project.config.json +++ b/project.config.json @@ -4,7 +4,7 @@ "ignore": [] }, "setting": { - "urlCheck": true, + "urlCheck": false, "es6": true, "enhance": false, "postcss": true,