From 53b978b6abeb6049377b0cf2772172cd118680bb Mon Sep 17 00:00:00 2001 From: fengachen <373943794@qq.com> Date: Mon, 20 Dec 2021 18:19:06 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=20?= =?UTF-8?q?=E6=A0=87=E5=8D=8F=E4=BC=9A=E5=91=98=E8=8F=9C=E5=8D=95=E6=9D=83?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/home.js | 139 +++++++++++++++++------ pages/home/home.wxml | 1 + pages/project/project.wxml | 2 +- pages/standardRouter/standardRouter.js | 113 ++++++++++++------ pages/standardRouter/standardRouter.wxml | 12 +- pages/standardRouter/standardRouter.wxss | 7 ++ 6 files changed, 197 insertions(+), 77 deletions(-) diff --git a/pages/home/home.js b/pages/home/home.js index ff81588..369d9c9 100644 --- a/pages/home/home.js +++ b/pages/home/home.js @@ -9,35 +9,7 @@ Page({ */ data: { date: '', - selectArr: [{ - path: '../../assets/images/laikuan-new.png', - text: '项目' - }, - { - path: '../../assets/images/gongzuozu-new.png', - text: '工作组' - }, - { - path: '../../assets/images/fenbiaowei-new.png', - text: '分标委' - }, - { - path: '../../assets/images/huiyi-new.png', - text: '会议活动' - }, - { - path: '../../assets/images/ziliao-new .png', - text: '资料网员' - }, - { - path: '../../assets/images/standard.png', - text: '标协会员' - }, - { - path: '../../assets/images/new-contract.png', - text: '合同' - }, - ], + selectArr: [], titleList: [ '会议通知', '文件通知', @@ -140,21 +112,21 @@ Page({ clickSelect(e) { let index = e.currentTarget.dataset.index let url = '' - if (index === 0) { // 来款项目 + if (this.data.selectArr[index].val === '0') { // 来款项目 url = '../project/project?type=project' - } else if (index === 1) { // 工作组 + } else if (this.data.selectArr[index].val === '1') { // 工作组 // url = '../work/work' url = '../project/project?type=work' - } else if (index === 2) { // 分标委 + } else if (this.data.selectArr[index].val === '2') { // 分标委 url = '../committee/committee' - } else if (index === 3) { // 会议活动 + } else if (this.data.selectArr[index].val=== '3') { // 会议活动 url = '../meeting/meeting' - } else if(index === 4){ // 资料网员 + } else if(this.data.selectArr[index].val === '4'){ // 资料网员 // url = '../data/data' url = '../project/project?type=ziliao' - }else if(index === 5){ + }else if(this.data.selectArr[index].val === '6'){ // 标协会员 url= '../standardRouter/standardRouter' - }else if(index === 6){ + }else if(this.data.selectArr[index].val === '5'){ // 合同 url = '../mineContract/mineContract' } wx.navigateTo({ @@ -172,7 +144,7 @@ Page({ this.loadData() wx.showToast({ title: '已读成功', - icon: 'none' + icon: 'none' }) }) } @@ -260,7 +232,75 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function () { + const that = this + let menuArrStand = [{ + path: '../../assets/images/laikuan-new.png', + val:'0', + text: '项目' + }, + { + path: '../../assets/images/gongzuozu-new.png', + text: '工作组', + val:'1', + }, + { + path: '../../assets/images/fenbiaowei-new.png', + text: '分标委', + val:'2', + }, + { + path: '../../assets/images/huiyi-new.png', + text: '会议活动', + val:'3', + }, + { + path: '../../assets/images/ziliao-new .png', + text: '资料网员', + val:'4', + }, + { + path: '../../assets/images/standard.png', + text: '标协会员', + val:'6', + }, + { + path: '../../assets/images/new-contract.png', + text: '合同', + val:'5', + }, + ] + let menuArr = [{ + path: '../../assets/images/laikuan-new.png', + text: '项目', + val:'0', + }, + { + path: '../../assets/images/gongzuozu-new.png', + text: '工作组', + val:'1', + }, + { + path: '../../assets/images/fenbiaowei-new.png', + text: '分标委', + val:'2', + }, + { + path: '../../assets/images/huiyi-new.png', + text: '会议活动', + val:'3', + }, + { + path: '../../assets/images/ziliao-new .png', + text: '资料网员', + val:'4', + }, + { + path: '../../assets/images/new-contract.png', + text: '合同', + val:'5', + }, +] let searchParams = { pageNo: 1, pageSize: 10, @@ -273,6 +313,31 @@ Page({ searchParams }) this.loadData() + // 默认不显示标协会员的菜单 + wx.getStorage({ + key:'userInfo', + success(res){ + console.log(res); + if(res.data.companyRole === '1' ){ + // 说明不是会员系统的企业 + that.setData({ + 'selectArr':menuArr + }) + }else{ + // 是会员的企业 + that.setData({ + 'selectArr':menuArrStand + }) + } + + }, + fail(){ + // this.data.selectArr = [] + that.setData({ + 'selectArr':menuArr + }) + } + }) }, /** * 页面上拉触底事件的处理函数 diff --git a/pages/home/home.wxml b/pages/home/home.wxml index 0c3e3ef..e28d59e 100644 --- a/pages/home/home.wxml +++ b/pages/home/home.wxml @@ -13,6 +13,7 @@ {{item.text}} + diff --git a/pages/project/project.wxml b/pages/project/project.wxml index 88cce77..8a1f1f8 100644 --- a/pages/project/project.wxml +++ b/pages/project/project.wxml @@ -44,7 +44,7 @@ 负责人电话:{{item.phone || item.principalPhone}} 负责人邮箱:{{item.email || item.principalEmail}} 运行周期:一年 - 缴费凭证:{{item.paymentStatus_dictText}} + 缴费凭证:{{item.paymentStatus_dictText || '无'}} diff --git a/pages/standardRouter/standardRouter.js b/pages/standardRouter/standardRouter.js index 153a37d..c699add 100644 --- a/pages/standardRouter/standardRouter.js +++ b/pages/standardRouter/standardRouter.js @@ -5,38 +5,7 @@ Page({ * 页面的初始数据 */ data: { - pageRputers: [ - { - path: "../standardBasicInfo/standardBasicInfo", - imgPath:'../../assets/images/basic-info.png', - val: "1", - name: "基本信息" - }, - { - path: "../meeting/meeting?type=standard&meetingType=2&tbMeetingType=1", // type 是会议类型 - imgPath:'../../assets/images/notice.png', - val: "2", - name: "标准宣贯" - }, - { - path: "../meeting/meeting?type=standard&meetingType=2&tbMeetingType=2", - imgPath:'../../assets/images/train.png', - val: "3", - name: "培训会" - }, - { - path: "../meeting/meeting?type=standard&meetingType=2&tbMeetingType=3", - imgPath:'../../assets/images/info.png', - val: "4", - name: "信息交流会" - }, - { - path: "../council/council?type=standard&meetingType=6", - imgPath:'../../assets/images/lishi.png', - val: "5", - name: "理事会" - }, - ] + pageRouters:[] }, /** * @description 跳转 @@ -68,7 +37,85 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function () { - + const that = this + // 理事会成员展示的 + let councilArr = [ + { + path: "../standardBasicInfo/standardBasicInfo", + imgPath:'../../assets/images/basic-info.png', + val: "1", + name: "基本信息" + }, + { + path: "../meeting/meeting?type=standard&meetingType=2&tbMeetingType=1", // type 是会议类型 + imgPath:'../../assets/images/notice.png', + val: "2", + name: "标准宣贯" + }, + { + path: "../meeting/meeting?type=standard&meetingType=2&tbMeetingType=2", + imgPath:'../../assets/images/train.png', + val: "3", + name: "培训会" + }, + { + path: "../meeting/meeting?type=standard&meetingType=2&tbMeetingType=3", + imgPath:'../../assets/images/info.png', + val: "4", + name: "信息交流会" + }, + { + path: "../council/council?type=standard&meetingType=6", + imgPath:'../../assets/images/lishi.png', + val: "5", + name: "理事会" + }, + ] + // 非理事会成员展示的 + let notCouncilArr = [ + { + path: "../standardBasicInfo/standardBasicInfo", + imgPath:'../../assets/images/basic-info.png', + val: "1", + name: "基本信息" + }, + { + path: "../meeting/meeting?type=standard&meetingType=2&tbMeetingType=1", // type 是会议类型 + imgPath:'../../assets/images/notice.png', + val: "2", + name: "标准宣贯" + }, + { + path: "../meeting/meeting?type=standard&meetingType=2&tbMeetingType=2", + imgPath:'../../assets/images/train.png', + val: "3", + name: "培训会" + }, + { + path: "../meeting/meeting?type=standard&meetingType=2&tbMeetingType=3", + imgPath:'../../assets/images/info.png', + val: "4", + name: "信息交流会" + } + ] + wx.getStorage({ + key:'userInfo', + success(res){ + console.log(res); + if(res.data.isCouncil === '1' ){ + // 说明是理事会成员 + that.setData({ + 'pageRouters':councilArr + }) + }else{ + // 说明不是理事会成员 + that.setData({ + 'pageRouters':notCouncilArr + }) + } + + }, + }) }, /** diff --git a/pages/standardRouter/standardRouter.wxml b/pages/standardRouter/standardRouter.wxml index 0e19b90..673a0f8 100644 --- a/pages/standardRouter/standardRouter.wxml +++ b/pages/standardRouter/standardRouter.wxml @@ -2,10 +2,10 @@ - + - @@ -13,10 +13,10 @@ {{item.name}} - - - - + + + + diff --git a/pages/standardRouter/standardRouter.wxss b/pages/standardRouter/standardRouter.wxss index 224b1b3..1327217 100644 --- a/pages/standardRouter/standardRouter.wxss +++ b/pages/standardRouter/standardRouter.wxss @@ -50,4 +50,11 @@ page { background-color: #fff; border-radius: 10px; height: 150pt; +} + +.wrap-length4 { + margin: 0 auto; + background-color: #fff; + border-radius: 10px; + height: 100pt; } \ No newline at end of file