diff --git a/components/info/index.js b/components/info/index.js
index 9cc0cb75..838ad9f4 100644
--- a/components/info/index.js
+++ b/components/info/index.js
@@ -1,7 +1,7 @@
/*
* @Author: Lamdaer
* @Date: 2020-10-24 01:54:38
- * @LastEditTime: 2020-10-24 02:06:25
+ * @LastEditTime: 2020-10-24 02:41:40
* @Description:
* @FilePath: /opengauss/components/info/index.js
*/
@@ -19,10 +19,19 @@ Component({
/**
* 组件的初始数据
*/
- data: {},
+ data: {
+ index: null,
+ },
/**
* 组件的方法列表
*/
- methods: {},
+ methods: {
+ jobChange(e) {
+ console.log(e)
+ this.setData({
+ index: e.detail.value,
+ })
+ },
+ },
})
diff --git a/components/info/index.wxml b/components/info/index.wxml
index cd520f1d..0d717f83 100644
--- a/components/info/index.wxml
+++ b/components/info/index.wxml
@@ -1,9 +1,13 @@
-
+
- 普通选择
-
-
- {{index?picker[index]:'禁止换行,超出容器部分会以 ... 方式截断'}}
-
+ 岗位
+
+ {{index?jobList[index].name:"请选择岗位"}}
-
\ No newline at end of file
+
+
+ 多列选择
+
+ {{multiArray[0][multiIndex[0]]}},{{multiArray[1][multiIndex[1]]}}
+
+
\ No newline at end of file
diff --git a/model/job.js b/model/job.js
new file mode 100644
index 00000000..0ac3b77f
--- /dev/null
+++ b/model/job.js
@@ -0,0 +1,15 @@
+/*
+ * @Author: Lamdaer
+ * @Date: 2020-10-24 02:18:15
+ * @LastEditTime: 2020-10-24 02:30:08
+ * @Description:
+ * @FilePath: /opengauss/model/job.js
+ */
+import { HTTP } from '../utils/http'
+export class JobModel extends HTTP {
+ getJobList() {
+ return this.request({
+ url: '/gauss/job',
+ })
+ }
+}
diff --git a/pages/index/index.js b/pages/index/index.js
index 3facff02..1f5434c1 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -1,66 +1,68 @@
+/*
+ * @Author: Lamdaer
+ * @Date: 2020-10-24 01:58:20
+ * @LastEditTime: 2020-10-24 02:53:00
+ * @Description:
+ * @FilePath: /opengauss/pages/index/index.js
+ */
// pages/index/index.js
+import { JobModel } from '../../model/job'
+const jobModel = new JobModel()
Page({
-
+ getJobList() {
+ jobModel.getJobList().then((response) => {
+ this.setData({
+ jobList: response.data.jobList,
+ })
+ console.log(response)
+ })
+ },
/**
* 页面的初始数据
*/
data: {
-
+ jobList: [],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
-
+ this.getJobList()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
- onReady: function () {
-
- },
+ onReady: function () {},
/**
* 生命周期函数--监听页面显示
*/
- onShow: function () {
-
- },
+ onShow: function () {},
/**
* 生命周期函数--监听页面隐藏
*/
- onHide: function () {
-
- },
+ onHide: function () {},
/**
* 生命周期函数--监听页面卸载
*/
- onUnload: function () {
-
- },
+ onUnload: function () {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
- onPullDownRefresh: function () {
-
- },
+ onPullDownRefresh: function () {},
/**
* 页面上拉触底事件的处理函数
*/
- onReachBottom: function () {
-
- },
+ onReachBottom: function () {},
/**
* 用户点击右上角分享
*/
- onShareAppMessage: function () {
-
- }
-})
\ No newline at end of file
+ onShareAppMessage: function () {},
+})
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 73109daf..8dfc8c61 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -1,2 +1,2 @@
-
-
\ No newline at end of file
+
+
\ No newline at end of file