diff --git a/nsgk_entry/image/index/child_function_01.png b/nsgk_entry/image/index/child_function_01.png new file mode 100644 index 0000000..5dfd9dc Binary files /dev/null and b/nsgk_entry/image/index/child_function_01.png differ diff --git a/nsgk_entry/image/index/child_function_02.png b/nsgk_entry/image/index/child_function_02.png new file mode 100644 index 0000000..7f90f19 Binary files /dev/null and b/nsgk_entry/image/index/child_function_02.png differ diff --git a/nsgk_entry/image/index/child_function_03.png b/nsgk_entry/image/index/child_function_03.png new file mode 100644 index 0000000..4412f3c Binary files /dev/null and b/nsgk_entry/image/index/child_function_03.png differ diff --git a/nsgk_entry/image/index/child_function_04.png b/nsgk_entry/image/index/child_function_04.png new file mode 100644 index 0000000..1b483e7 Binary files /dev/null and b/nsgk_entry/image/index/child_function_04.png differ diff --git a/nsgk_entry/image/index/child_function_05.png b/nsgk_entry/image/index/child_function_05.png new file mode 100644 index 0000000..7f51070 Binary files /dev/null and b/nsgk_entry/image/index/child_function_05.png differ diff --git a/nsgk_entry/image/index/header_bg.png b/nsgk_entry/image/index/header_bg.png new file mode 100644 index 0000000..24aa8b0 Binary files /dev/null and b/nsgk_entry/image/index/header_bg.png differ diff --git a/nsgk_entry/image/index/header_job.png b/nsgk_entry/image/index/header_job.png new file mode 100644 index 0000000..a647433 Binary files /dev/null and b/nsgk_entry/image/index/header_job.png differ diff --git a/nsgk_entry/image/index/nav_01.png b/nsgk_entry/image/index/nav_01.png new file mode 100644 index 0000000..f40fa7c Binary files /dev/null and b/nsgk_entry/image/index/nav_01.png differ diff --git a/nsgk_entry/image/index/nav_02.png b/nsgk_entry/image/index/nav_02.png new file mode 100644 index 0000000..dab3971 Binary files /dev/null and b/nsgk_entry/image/index/nav_02.png differ diff --git a/nsgk_entry/image/index/nav_03.png b/nsgk_entry/image/index/nav_03.png new file mode 100644 index 0000000..5f6aff5 Binary files /dev/null and b/nsgk_entry/image/index/nav_03.png differ diff --git a/nsgk_entry/image/index/nav_04.png b/nsgk_entry/image/index/nav_04.png new file mode 100644 index 0000000..e47b48e Binary files /dev/null and b/nsgk_entry/image/index/nav_04.png differ diff --git a/nsgk_entry/image/index/process_icon.png b/nsgk_entry/image/index/process_icon.png new file mode 100644 index 0000000..707bcc8 Binary files /dev/null and b/nsgk_entry/image/index/process_icon.png differ diff --git a/nsgk_entry/pages/index/index.js b/nsgk_entry/pages/index/index.js index 104b04d..8f61f3f 100644 --- a/nsgk_entry/pages/index/index.js +++ b/nsgk_entry/pages/index/index.js @@ -1,69 +1,46 @@ -// pages/index/index.js import * as UTIL from '../../utils/util.js'; Page({ - - /** - * 页面的初始数据 - */ data: { - isIPhoneX:false + //顶部胶囊按钮位置信息rect + CustomMenuButton: null, + wrokScrollHeight:0 }, - - /** - * 生命周期函数--监听页面加载 - */ onLoad: function (options) { - this.setData({ - isIPhoneX:UTIL.isIPhoneX() - }) + this.computeBarLocation() }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ onReady: function () { - }, - - /** - * 生命周期函数--监听页面显示 - */ onShow: function () { - }, - - /** - * 生命周期函数--监听页面隐藏 - */ onHide: function () { - }, - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - + * 计算bar 高度 + */ + computeBarLocation() { + var that = this; + let CustomMenuButton = wx.getMenuButtonBoundingClientRect(); + let CustomWidows = wx.getSystemInfoSync(); + // 根据文档,先创建一个SelectorQuery对象实例 + let query = wx.createSelectorQuery().in(this); + query.select('.top_title').boundingClientRect(); + query.select('.information_header').boundingClientRect(); + query.select('.navList_main').boundingClientRect(); + query.select('.child_function').boundingClientRect(); + query.select('.work_plan').boundingClientRect(); + + query.exec((res) => { + let wrokScrollHeight = CustomWidows.windowHeight; + res.forEach((v)=>{ + wrokScrollHeight = wrokScrollHeight - v.height; + }) + wrokScrollHeight = wrokScrollHeight-CustomMenuButton.top-CustomMenuButton.bottom -15; + that.setData({ + wrokScrollHeight: wrokScrollHeight, + }); + }) + that.setData({ + CustomMenuButton: CustomMenuButton, + }); }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { - - } }) \ No newline at end of file diff --git a/nsgk_entry/pages/index/index.wxml b/nsgk_entry/pages/index/index.wxml index 6e6e430..f0f6e58 100644 --- a/nsgk_entry/pages/index/index.wxml +++ b/nsgk_entry/pages/index/index.wxml @@ -1,15 +1,249 @@ - - - 农村事项审批与记账 - 报账简单,操作便捷 + + + + + + + + + + 张没事 + + + 报账员 + + + + + 已完成 + 120件 + + + 已完成 + 120件 + + + + + 山东省威海市环翠区李 + + + + + + + + + + + 支出申请 + + + + + + 收入登记 + + + + + + 记账申请 + + + + + + 财务公开 + -