| | |
| | | "reportForm/index/index", |
| | | "reportForm/Detail/index", |
| | | "video/station/index", |
| | | "video/single/index" |
| | | "video/single/index", |
| | | "corpIndex/szjt/index" |
| | | ], |
| | | "window": { |
| | | "backgroundTextStyle": "light", |
| | |
| | | "location" |
| | | ], |
| | | "tabBar": { |
| | | "custom": true, |
| | | "color": "#8E9397", |
| | | "selectedColor": "#16b5cb", |
| | | "backgroundColor": "#ffffff", |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Component({ |
| | | data: { |
| | | selected: 1, |
| | | color: "#8E9397", |
| | | selectedColor: "#16b5cb", |
| | | list: [ |
| | | { |
| | | pagePath: "/station/list/index", |
| | | text: "å表", |
| | | iconPath: "/images/tabbar/minitorUnActive.png", |
| | | selectedIconPath: "/images/tabbar/minitorActive.png" |
| | | }, |
| | | { |
| | | pagePath: "/workDesktop/index/index", |
| | | text: "å·¥ä½", |
| | | iconPath: "/images/tabbar/workDesktopUnActive.png", |
| | | selectedIconPath: "/images/tabbar/workDesktopActive.png" |
| | | }, |
| | | { |
| | | pagePath: "/map/index", |
| | | text: "å°å¾", |
| | | iconPath: "/images/tabbar/mapUnActive.png", |
| | | selectedIconPath: "/images/tabbar/mapActive.png" |
| | | }, |
| | | { |
| | | pagePath: "/mine/index/index", |
| | | text: "æç", |
| | | iconPath: "/images/tabbar/mineUnActive.png", |
| | | selectedIconPath: "/images/tabbar/mineActive.png" |
| | | } |
| | | ] |
| | | }, |
| | | attached() { |
| | | }, |
| | | methods: { |
| | | switchTab(e) { |
| | | console.log(e,37) |
| | | const data = e.currentTarget.dataset |
| | | const url = data.path |
| | | this.setData({ |
| | | selected: data.index |
| | | }) |
| | | console.log(this.data.selected,43) |
| | | wx.switchTab({url}) |
| | | } |
| | | } |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "component": true |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!--miniprogram/custom-tab-bar/index.wxml--> |
| | | <cover-view class="tab-bar"> |
| | | <cover-view class="tab-bar-border"></cover-view> |
| | | <cover-view wx:for="{{list}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab"> |
| | | <cover-image src="{{selected === index ? item.selectedIconPath : item.iconPath}}"></cover-image> |
| | | <cover-view style="color: {{selected === index ? selectedColor : color}}">{{item.text}}</cover-view> |
| | | </cover-view> |
| | | </cover-view> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .tab-bar { |
| | | position: fixed; |
| | | bottom: 0; |
| | | left: 0; |
| | | right: 0; |
| | | height: 96rpx; |
| | | background: white; |
| | | display: flex; |
| | | padding-bottom: env(safe-area-inset-bottom); |
| | | } |
| | | |
| | | .tab-bar-border { |
| | | background-color: rgba(0, 0, 0, 0.33); |
| | | position: absolute; |
| | | left: 0; |
| | | top: 0; |
| | | width: 100%; |
| | | height: 1px; |
| | | transform: scaleY(0.5); |
| | | } |
| | | |
| | | .tab-bar-item { |
| | | flex: 1; |
| | | text-align: center; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .tab-bar-item cover-image { |
| | | width: 54rpx; |
| | | height: 54rpx; |
| | | } |
| | | |
| | | .tab-bar-item cover-view { |
| | | font-size: 20rpx; |
| | | } |
| | |
| | | wx.switchTab({ |
| | | url: '../../workDesktop/index/index', |
| | | }) |
| | | |
| | | // var pages = getCurrentPages(); |
| | | // if (pages.length >= 2) { |
| | | // //var currPage = pages[pages.length - 1]; //å½åé¡µé¢ |
| | | // var prevPage = pages[pages.length - 2]; //è¿åä¸ä¸ä¸ªé¡µé¢ |
| | | // //console.log(prevPage.route) |
| | | // if (prevPage) { |
| | | // var fn = prevPage.refreshUserInfo; |
| | | // if (typeof fn == "function") |
| | | // fn(); |
| | | // wx.navigateBack(); |
| | | // } else { |
| | | // wx.navigateTo({ |
| | | // url: "/workDestop/index/index" |
| | | // }); |
| | | // } |
| | | // } else { |
| | | // wx.navigateBack(); |
| | | // } |
| | | }, |
| | | //ç¹å»çå®ç¨æ·ç»å½æé® |
| | | tapBindUserReal: function (e) { |
| | |
| | | ] |
| | | }, |
| | | onLoad: function (options) { |
| | | // console.log(wx.getSystemInfoSync()) |
| | | // console.log(wx.getSystemInfoSync().windowHeight * 0.2 * -1 - 10) |
| | | var userInfo = app.globalData.userInfo; |
| | | // console.log(userInfo) |
| | | if (userInfo) { |
| | |
| | | // this.getRepairFormList(); |
| | | }, |
| | | onReady: function () {}, |
| | | onShow(){ |
| | | if (typeof this.getTabBar === 'function' && |
| | | this.getTabBar()) { |
| | | this.getTabBar().setData({ |
| | | selected: 2 |
| | | }) |
| | | } |
| | | }, |
| | | //å±ç¤ºææmarkeræ ç¹çè§é |
| | | setIncludePoints() { |
| | | var MapContext = wx.createMapContext('detailMap'); |
| | |
| | | <view wx:else="{{markerTipInfo.markerInfo.Records.length==0}}" class="zanWuShuju"> |
| | | ææ çæ§æ°æ® |
| | | </view> |
| | | <view wx:if="{{link_box}}" class="block_list_url"> |
| | | <view wx:if="{{link_box}}" class="block_list_url" > |
| | | <view bindtap="tapOpenStationMonitorPageInList" data-stationid="{{markerTipInfo.markerInfo.ObjectID}}" |
| | | data-stationname="{{markerTipInfo.markerInfo.ObjectName}}"> |
| | | <icon class="iconfont icon-jiankong"></icon> <span style="padding-left:10px;padding-right:10px;">çæ§</span> |
| | |
| | | </movable-view> |
| | | </movable-area> --> |
| | | |
| | | <view class="drawerBox" style="bottom:{{drawerMenuMoveData.bottom}}rpx" bindtouchstart="drawerTouchStart" |
| | | <view wx:if="{{false}}" class="drawerBox" style="bottom:{{drawerMenuMoveData.bottom}}rpx" bindtouchstart="drawerTouchStart" |
| | | bindtouchend="drawerTouchEnd" bindtouchmove="drawerTouchMove"> |
| | | <view class="cu-card case no-card shadow drawerBody" style="height:{{drawerMenuMoveData.height}}rpx;"> |
| | | <view style="width: 100%;display: flex;justify-content: center;align-items: center;"> |
| | |
| | | top: 0; |
| | | width: 100%; |
| | | opacity: 0.5; |
| | | } |
| | | |
| | | .cu-modal.bottom-modal.show { |
| | | margin-bottom: 155rpx; |
| | | } |
| | | .cu-modal.bottom-modal { |
| | | margin-bottom: -1000rpx; |
| | | } |
| | | .cu-modal.show { |
| | | opacity: 1; |
| | | transition-duration: 0.3s; |
| | | -ms-transform: scale(1); |
| | | transform: scale(1); |
| | | overflow-x: hidden; |
| | | overflow-y: auto; |
| | | pointer-events: auto; |
| | | } |
| | |
| | | userInfo: userInfo |
| | | }); |
| | | } |
| | | if (typeof this.getTabBar === 'function' && |
| | | this.getTabBar()) { |
| | | this.getTabBar().setData({ |
| | | selected: 3 |
| | | }) |
| | | } |
| | | }, |
| | | openSetting: function () { |
| | | wx.openSetting({ |
| | |
| | | }, |
| | | //è·åæ³µç«è¿è¡æ¶é´ |
| | | getWorkTime: function () { |
| | | wx.showLoading({ |
| | | title: 'æ£å¨è·å弿ºæ¶é´', |
| | | }) |
| | | var that = this; |
| | | var machineList = this.data.machineList; |
| | | var userInfo = app.globalData.userInfo; |
| | |
| | | 'content-type': 'application/json' |
| | | }, |
| | | success(res) { |
| | | // console.log(res,306) |
| | | wx.hideLoading() |
| | | console.log(res,306) |
| | | var result = res.data |
| | | if (result.Code != 0) { |
| | | return; |
| | |
| | | this.initialStationTree(); |
| | | return; |
| | | }, |
| | | onShow(){ |
| | | if (typeof this.getTabBar === 'function' && |
| | | this.getTabBar()) { |
| | | this.getTabBar().setData({ |
| | | selected: 0 |
| | | }) |
| | | } |
| | | }, |
| | | onShareAppMessage: function () { |
| | | return Constant.Share; |
| | | }, |
| | |
| | | Login: { |
| | | DemoUserID: 11, |
| | | DemoEmployeeID: 11, |
| | | LogoUrl: "http://demo.beng35.com/assets/miniProgram/LoginLogo.png", |
| | | BackgroupImageUrl: "http://demo.beng35.com/assets/miniProgram/LoginBackground.png" |
| | | LogoUrl: "http://demo.beng35.com/assets/miniProgram/LoginLogo.png?v=11", |
| | | BackgroupImageUrl: "http://demo.beng35.com/assets/miniProgram/LoginBackground.png?v=22" |
| | | } |
| | | }, |
| | | } |
| | |
| | | onShareAppMessage: function () { |
| | | return Constant.Share; |
| | | }, |
| | | onShow: function () {}, |
| | | onShow: function () { |
| | | if (typeof this.getTabBar === 'function' && |
| | | this.getTabBar()) { |
| | | this.getTabBar().setData({ |
| | | selected: 1 |
| | | }) |
| | | } |
| | | }, |
| | | onReady: function () {}, |
| | | onHide: function () {} |
| | | }) |