This commit is contained in:
曹前明 2022-11-21 20:43:05 +08:00
parent 4f1d986016
commit b683362763
3 changed files with 25 additions and 36 deletions

View File

@ -19,7 +19,7 @@ Page({
sbtodonum:0,
yhgznum:0,
serverUrl: getApp().globalData.serverUrl,
showAll:false,
companyId:null,
// Banner数据
images: [],
// 是否显示面板指示点
@ -40,7 +40,6 @@ Page({
nextMargin: 0,
msgList: [
{ title: "欢迎参加安全环保专题网络考评!" },{title:"每晚10-11点不定期更新,请尽量不在此时间使用"}],
showAll:true
},
/**
@ -78,6 +77,8 @@ Page({
// })
// }
this.getNew()
},
/**
* 生命周期函数--监听页面初次渲染完成
@ -93,6 +94,9 @@ Page({
var that = this
if(getApp().globalData.sessionId){
that.getNew()
this.setData({
companyId: getApp().globalData.userInfo.companyid
})
}
@ -404,12 +408,6 @@ Page({
}
},
tapexercise: function () {
// if (this.data.showAll) { //练习功能
// wx.showModal({
// content: '本次活动该功能不便访问!',
// showCancel: false
// })
// } else
if (getApp().globalData.userInfo.perms != undefined) {
if (getApp().globalData.userInfo.perms.indexOf(25) != -1) {//考试功能
wx.navigateTo({
@ -429,11 +427,6 @@ Page({
})
}
},
open: function(e){
this.setData({
showAll:e.detail.value
})
},
tapinspect: function () {
if (getApp().globalData.userInfo.perms != undefined) {
if (getApp().globalData.userInfo.perms.indexOf(35) != -1) {//设备巡检

View File

@ -21,7 +21,7 @@
<switch bindchange="open">打开全部功能</switch>
</view> -->
<!-- <view class="weui-cells__title" wx:if="{{!showAll}}">数据采集</view> -->
<view class="weui-grids" wx:if="{{showAll}}">
<view class="weui-grids" wx:if="{{companyId!=2}}">
<navigator url="/pages/checkjob/index" class="weui-grid" hover-class="weui-grid_active">
<image class="weui-grid__icon" src="../images/task.png" />
<view class="weui-grid__label">检查任务</view>
@ -46,7 +46,7 @@
<!-- <view class="weui-badge" style="position: absolute;top: 1em;right: 1em;" wx:if="{{yhgznum!=0}}">{{yhgznum}}</view> -->
</navigator>
</view>
<view class="weui-grids" wx:if="{{showAll}}">
<view class="weui-grids" wx:if="{{companyId!=2}}">
<navigator url="/pages/observe/observe" class="weui-grid" hover-class="weui-grid_active">
<image class="weui-grid__icon" src="../images/watch.png" />
<view class="weui-grid__label">行为观察</view>
@ -63,7 +63,7 @@
<view class="weui-grid__label">合理化建议</view>
</navigator>
</view>
<view class="weui-grids" wx:if="{{showAll}}">
<view class="weui-grids" wx:if="{{companyId!=2}}">
<navigator url="/pages/public/public" class="weui-grid" hover-class="weui-grid_active">
<image class="weui-grid__icon" src="../images/public.png" />
<view class="weui-grid__label">公告</view>
@ -84,7 +84,7 @@
</navigator>
</view>
<view class="weui-grids" wx:if="{{showAll}}">
<view class="weui-grids" wx:if="{{companyId!=2}}">
<navigator url="/pages/operation/operation" class="weui-grid" hover-class="weui-grid_active">
<image class="weui-grid__icon" src="../images/operation.png" />
<view class="weui-grid__label">作业许可</view>
@ -127,7 +127,7 @@
<view class="weui-grid__label">线下培训</view>
<view class="weui-badge" style="position: absolute;top: 1em;right: 1em;" wx:if="{{dqdnum!=0}}">{{dqdnum}}</view>
</navigator>
<view class="weui-grid" hover-class="weui-grid_active" bindtap='tapexercise' wx:if="{{showAll}}">
<view class="weui-grid" hover-class="weui-grid_active" bindtap='tapexercise'>
<image class="weui-grid__icon" src="../images/exercise.png" />
<view class="weui-grid__label">模拟练习</view>
</view>

View File

@ -1,5 +1,5 @@
{
"description": "项目配置文件",
"description": "项目配置文件详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"setting": {
"urlCheck": false,
"es6": true,
@ -18,7 +18,7 @@
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"useMultiFrameRuntime": false,
"useMultiFrameRuntime": true,
"useApiHook": false,
"useApiHostProcess": false,
"babelSetting": {
@ -32,28 +32,24 @@
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true,
"showES6CompileOption": false
"showES6CompileOption": false,
"disableUseStrict": false,
"useCompilerPlugins": false,
"useStaticServer": true
},
"compileType": "miniprogram",
"libVersion": "2.20.0",
"appid": "wx8cc62edbfed029b9",
"projectname": "aqyj",
"isGameTourist": false,
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"list": []
},
"conversation": {
"list": []
},
"game": {
"currentL": -1,
"list": []
},
"miniprogram": {
"list": []
}
"condition": {},
"packOptions": {
"ignore": [],
"include": []
},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
}
}