This commit is contained in:
SelfRidicule 2024-02-23 17:54:15 +08:00
parent 9390b91434
commit 818285bac9
5 changed files with 151 additions and 52 deletions

View File

@ -102,7 +102,7 @@ Page({
{ {
name: "远程门禁", name: "远程门禁",
img: "/profile/static/index/menu-ycmj.png", img: "/profile/static/index/menu-ycmj.png",
path: "" path: "/pages/meeting/accessControl/accessControl"
}, },
{ {
name: "报修服务", name: "报修服务",

View File

@ -1,18 +1,32 @@
// pages/meeting/accessControl.js const app = getApp()
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
IMG_NAME: app.IMG_NAME,
activeNames: [0],
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
let title = options.name;
if (!title) {
title = '远程门禁';
}
// 页面初始化 options为页面跳转所带来的参数
wx.setNavigationBarTitle({
title
})
},
onChange(event) {
this.setData({
activeNames: event.detail,
});
}, },
/** /**

View File

@ -1,3 +1,6 @@
{ {
"usingComponents": {} "usingComponents": {
"van-collapse": "@vant/weapp/collapse/index",
"van-collapse-item": "@vant/weapp/collapse-item/index"
}
} }

View File

@ -1,2 +1,21 @@
<!--pages/meeting/accessControl.wxml--> <view class="container">
<text>pages/meeting/accessControl.wxml</text> <!-- 门禁控制列表 -->
<view class="controlView">
<van-collapse value="{{ activeNames }}" bind:change="onChange">
<van-collapse-item title="{{idx+'标题'}}" name="{{idx}}" wx:for="{{2}}" wx:for-index="idx">
<view class="controlItem" wx:for="{{3}}">
<view class="msg">
<view class="title">西大门</view>
<view class="status">在线</view>
</view>
<image class="openCloseImg" src="{{IMG_NAME + '/profile/static/meeting/accessControl/openClose.png'}}" mode="aspectFill" />
</view>
</van-collapse-item>
</van-collapse>
</view>
</view>

View File

@ -1 +1,64 @@
/* pages/meeting/accessControl.wxss */ .container{
width: 100vw;
height: 100vh;
overflow-y: auto;
background: #fcfcfc;
}
.van-collapse-item__content{
background-color: #f7f7f7 !important;
padding: 0 !important;
}
.controlView{
}
.controlView .controlItem{
box-shadow: rgba(0,0,0,0.075) 0px 1px 2px 0px;
display: flex;
justify-content: space-between;
align-items: center;
background: #ffffff;
border-radius: 10rpx;
margin: 24rpx 20rpx;
padding: 24rpx 30rpx;
}
.controlView .controlItem .msg{
flex: 1;
word-break: break-all;
}
.controlView .controlItem .msg .title{
font-size: 36rpx;
}
.controlView .controlItem .msg .status{
position: relative;
margin-top: 24rpx;
margin-left: 24rpx;
font-size: 24rpx;
}
.controlView .controlItem .msg .status::after{
display: block;
content: '';
position: absolute;
margin-right: 10rpx;
right: 100%;
top: 10rpx;
width: 16rpx;
height: 16rpx;
background: #84c786;
border-radius: 10rpx;
}
.controlView .controlItem .openCloseImg{
width: 69rpx;
height: 69rpx;
}