mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 18:59:36 +08:00
1
This commit is contained in:
parent
9ea828cda7
commit
2176518eb7
@ -72,7 +72,9 @@
|
|||||||
"pages/meeting/exhibition/order/order",
|
"pages/meeting/exhibition/order/order",
|
||||||
"pages/meeting/reservationRecord/exhibitionRecord/list/list",
|
"pages/meeting/reservationRecord/exhibitionRecord/list/list",
|
||||||
"pages/meeting/reservationRecord/exhibitionRecord/detail/detail",
|
"pages/meeting/reservationRecord/exhibitionRecord/detail/detail",
|
||||||
"pages/meeting/meetingRoom/meetingService/meetingService"
|
"pages/meeting/meetingRoom/meetingService/meetingService",
|
||||||
|
"pages/smartDevice/region/region",
|
||||||
|
"pages/smartDevice/room/room"
|
||||||
],
|
],
|
||||||
"window": {
|
"window": {
|
||||||
"backgroundTextStyle": "light",
|
"backgroundTextStyle": "light",
|
||||||
|
@ -123,7 +123,11 @@ Page({
|
|||||||
img: "/profile/static/index/menu-yyjl.png",
|
img: "/profile/static/index/menu-yyjl.png",
|
||||||
path: "/pages/meeting/reservationRecord/meetingRecord/meetingRecord"
|
path: "/pages/meeting/reservationRecord/meetingRecord/meetingRecord"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "智能设备",
|
||||||
|
img: "/profile/static/index/menu-ycmj.png",
|
||||||
|
path: "/pages/smartDevice/region/region"
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// name: "远程门禁",
|
// name: "远程门禁",
|
||||||
// img: "/profile/static/index/menu-ycmj.png",
|
// img: "/profile/static/index/menu-ycmj.png",
|
||||||
|
92
miniprogram/pages/smartDevice/region/region.js
Normal file
92
miniprogram/pages/smartDevice/region/region.js
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
const app = getApp()
|
||||||
|
|
||||||
|
import Notify from '@vant/weapp/notify/notify';
|
||||||
|
|
||||||
|
import {
|
||||||
|
selfFormatTimeYMD,
|
||||||
|
selfFormatTimeHM
|
||||||
|
} from "../../../utils/util.js"
|
||||||
|
|
||||||
|
import {
|
||||||
|
cancelOrderRq
|
||||||
|
} from "../../../api/meeting/meetingRoom.js"
|
||||||
|
|
||||||
|
Page({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
IMG_NAME: app.IMG_NAME,
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
onLoad(options) {
|
||||||
|
let _this = this;
|
||||||
|
_this.setData({
|
||||||
|
userData: wx.getStorageSync('user'),
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
// 跳转房间
|
||||||
|
jumpRoom(){
|
||||||
|
wx.navigateTo({
|
||||||
|
url: '/pages/smartDevice/room/room',
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
*/
|
||||||
|
onReady() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面显示
|
||||||
|
*/
|
||||||
|
onShow() {
|
||||||
|
let _this = this;
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面隐藏
|
||||||
|
*/
|
||||||
|
onHide() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面卸载
|
||||||
|
*/
|
||||||
|
onUnload() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
|
*/
|
||||||
|
onPullDownRefresh() {
|
||||||
|
console.log('onPullDownRefresh', '页面相关事件处理函数--监听用户下拉动作');
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面上拉触底事件的处理函数
|
||||||
|
*/
|
||||||
|
onReachBottom() {
|
||||||
|
console.log('onReachBottom', '页面上拉触底事件的处理函数');
|
||||||
|
let _this = this;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户点击右上角分享
|
||||||
|
*/
|
||||||
|
onShareAppMessage(e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
4
miniprogram/pages/smartDevice/region/region.json
Normal file
4
miniprogram/pages/smartDevice/region/region.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {},
|
||||||
|
"navigationBarTitleText": "智能设备"
|
||||||
|
}
|
13
miniprogram/pages/smartDevice/region/region.wxml
Normal file
13
miniprogram/pages/smartDevice/region/region.wxml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<view class="containerView public">
|
||||||
|
<view class="roomContainer">
|
||||||
|
<view class="roomItem" wx:for="{{10}}" data-obj="{{item}}" bind:tap="jumpRoom">
|
||||||
|
<view class="label">会议室</view>
|
||||||
|
<view class="img" style="background: no-repeat center/cover url({{IMG_NAME + '/profile/static/index/menu-ztyy.png'}});"></view>
|
||||||
|
<view class="deviceNum">设备数:10</view>
|
||||||
|
<view class="sceneNum">场景数:3</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 提示框 -->
|
||||||
|
<van-notify id="van-notify" />
|
52
miniprogram/pages/smartDevice/region/region.wxss
Normal file
52
miniprogram/pages/smartDevice/region/region.wxss
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
.containerView.public {
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.roomContainer {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-evenly;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.roomContainer .roomItem {
|
||||||
|
box-shadow: rgba(214,214,214,0.5) 0px 1px 0px 0px,rgb(238,238,238) 0px 1px 2px 0px;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
position: relative;
|
||||||
|
width: 330rpx;
|
||||||
|
height: 260rpx;
|
||||||
|
margin-top: 24rpx;
|
||||||
|
background: white;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.roomContainer .roomItem .label {
|
||||||
|
position: absolute;
|
||||||
|
left: 20rpx;
|
||||||
|
top: 20rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.roomContainer .roomItem .img {
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.roomContainer .roomItem .deviceNum {
|
||||||
|
position: absolute;
|
||||||
|
left: 20rpx;
|
||||||
|
bottom: 20rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.roomContainer .roomItem .sceneNum {
|
||||||
|
position: absolute;
|
||||||
|
right: 20rpx;
|
||||||
|
bottom: 20rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: gray;
|
||||||
|
}
|
113
miniprogram/pages/smartDevice/room/room.js
Normal file
113
miniprogram/pages/smartDevice/room/room.js
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
const app = getApp()
|
||||||
|
|
||||||
|
Page({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
IMG_NAME: app.IMG_NAME,
|
||||||
|
sceneList: [{
|
||||||
|
name: '茶歇模式',
|
||||||
|
url: 'chaxie1.png',
|
||||||
|
selectUrl: 'chaxie0.png',
|
||||||
|
isSelect: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '开门模式',
|
||||||
|
url: 'kaimen1.png',
|
||||||
|
selectUrl: 'kaimen0.png',
|
||||||
|
isSelect: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
onLoad(options) {
|
||||||
|
let _this = this
|
||||||
|
|
||||||
|
_this.initScene()
|
||||||
|
},
|
||||||
|
|
||||||
|
initScene() {
|
||||||
|
let _this = this
|
||||||
|
let sceneList = _this.data.sceneList.map(item => {
|
||||||
|
item.url = app.IMG_NAME + '/profile/static/shanghai_changyang/device/scene/' + item.url
|
||||||
|
item.selectUrl = app.IMG_NAME + '/profile/static/shanghai_changyang/device/scene/' + item.selectUrl
|
||||||
|
return item
|
||||||
|
})
|
||||||
|
_this.setData({
|
||||||
|
sceneList
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 选择情景
|
||||||
|
selectScene(e) {
|
||||||
|
console.log('selectScene', e);
|
||||||
|
let _this = this
|
||||||
|
let obj = e.currentTarget.dataset.obj
|
||||||
|
let sceneList = _this.data.sceneList
|
||||||
|
sceneList = sceneList.map(item => {
|
||||||
|
if (item.name == obj.name) {
|
||||||
|
item.isSelect = !item.isSelect
|
||||||
|
} else {
|
||||||
|
item.isSelect = false
|
||||||
|
}
|
||||||
|
return item
|
||||||
|
})
|
||||||
|
_this.setData({
|
||||||
|
sceneList
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
*/
|
||||||
|
onReady() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面显示
|
||||||
|
*/
|
||||||
|
onShow() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面隐藏
|
||||||
|
*/
|
||||||
|
onHide() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面卸载
|
||||||
|
*/
|
||||||
|
onUnload() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
|
*/
|
||||||
|
onPullDownRefresh() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面上拉触底事件的处理函数
|
||||||
|
*/
|
||||||
|
onReachBottom() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户点击右上角分享
|
||||||
|
*/
|
||||||
|
onShareAppMessage() {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
4
miniprogram/pages/smartDevice/room/room.json
Normal file
4
miniprogram/pages/smartDevice/room/room.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {},
|
||||||
|
"navigationBarTitleText": "房间"
|
||||||
|
}
|
21
miniprogram/pages/smartDevice/room/room.wxml
Normal file
21
miniprogram/pages/smartDevice/room/room.wxml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<view class="containerView public">
|
||||||
|
<!-- 顶部名称 -->
|
||||||
|
<view class="topHead">
|
||||||
|
<view class="logoImg" style="background: no-repeat center/cover url({{IMG_NAME + '/profile/static/shanghai_changyang/index/is_logo.png'}});"></view>
|
||||||
|
<view class="title">大会议室</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="leftLineTitle">情景模式</view>
|
||||||
|
<view class="sceneView">
|
||||||
|
<view bind:tap="selectScene" data-obj="{{item}}" class="sceneItem {{item.isSelect ? 'activity' : ''}}" wx:for="{{sceneList}}" wx:for-item="item" wx:key="*this">
|
||||||
|
<view class="img" style="background: no-repeat center/cover url({{item.isSelect ? item.selectUrl : item.url }});"></view>
|
||||||
|
<view class="label {{item.isSelect ? 'activity' : ''}}">会议模式</view>
|
||||||
|
<view class="point {{item.isSelect ? 'activity' : ''}}"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view class="leftLineTitle">设备列表</view>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
88
miniprogram/pages/smartDevice/room/room.wxss
Normal file
88
miniprogram/pages/smartDevice/room/room.wxss
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
.view {
|
||||||
|
box-sizing: border-box;
|
||||||
|
line-height: 1;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.containerView.public {
|
||||||
|
padding: 20rpx 32rpx;
|
||||||
|
background: #f8f8f8;
|
||||||
|
min-height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topHead {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topHead .logoImg {
|
||||||
|
width: 91rpx;
|
||||||
|
height: 91rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topHead .title {
|
||||||
|
margin-left: 20rpx;
|
||||||
|
color: #363636;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.leftLineTitle {
|
||||||
|
margin-top: 60rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sceneView {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
overflow: auto;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sceneView .sceneItem {
|
||||||
|
border: 1rpx solid rgba(105, 105, 105, 0.1);
|
||||||
|
border-radius: 20rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 280rpx;
|
||||||
|
height: 140rpx;
|
||||||
|
margin-right: 30rpx;
|
||||||
|
background: white;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sceneView .sceneItem.activity {
|
||||||
|
background: #334D77;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.sceneView .sceneItem .img {
|
||||||
|
width: 54rpx;
|
||||||
|
height: 54rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sceneView .sceneItem .label {
|
||||||
|
font-size: 28rpx;
|
||||||
|
margin-left: 16rpx;
|
||||||
|
color: #334D77;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sceneView .sceneItem .label.activity {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sceneView .sceneItem .point {
|
||||||
|
border-radius: 10rpx;
|
||||||
|
width: 10rpx;
|
||||||
|
height: 10rpx;
|
||||||
|
background: #334D77;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sceneView .sceneItem .point.activity {
|
||||||
|
background: white;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user