初始化

This commit is contained in:
2025-12-11 09:50:02 +08:00
commit c25e282398
127 changed files with 63158 additions and 0 deletions

147
pages/NewHome/NewHome.js Normal file
View File

@@ -0,0 +1,147 @@
const app = getApp()
// pages/NewHome.js
Page({
options: {
addGlobalClass: true,
},
/**
* 页面的初始数据
*/
data: {
elements: [{
title: '查房',
name: 'MakingRounds',
color: 'cyan',
icon: 'newsfill'
},
{
title: '查房异常记录',
name: 'MakingRoundsAbnormal',
color: 'blue',
icon: 'colorlens'
},
{
title: '主机升级',
name: 'HostUpgrade',
color: 'purple',
icon: 'font'
},
{
title: '主机绑定 ',
name: 'HostBinding',
color: 'mauve',
icon: 'icon'
},
{
title: '人脸机绑定',
name: 'FacialDeviceBinding',
color: 'pink',
icon: 'btn'
},
{
title: '红外转发码库下载',
name: 'InfraredLibraryDownload',
color: 'brown',
icon: 'tagfill'
},
{
title: '程序配置',
name: 'ProgramConfiguration',
color: 'red',
icon: 'myfill'
},
{
title: '日志查询',
name: 'progress',
color: 'orange',
icon: 'icloading'
},
],
//权限信息
autho: null,
//酒店信息
Hotelinfo: null,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: async function (options) {
if (!options.HotelId || app.globalData.autho == null) {
app.toast(2, "无酒店信息~")
return;
}
this.setData({
autho: app.globalData.autho
})
try {
this.data.autho.forEach((element, index) => {
element.Hotels.forEach((elements, indexs) => {
if (elements.HotelId == options.HotelId) {
this.setData({
Hotelinfo: elements
})
throw new Error();
}
})
});
} catch (error) {
console.log("已经找到,无需循环~")
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@@ -0,0 +1,5 @@
{
"usingComponents": {
}
}

View File

@@ -0,0 +1,21 @@
<cu-custom bgColor="bg-gradual-blue"
isBack="true">
<block bindtap="back" slot="backText" >返回</block>
<view slot="content">{{Hotelinfo.HotelName}}({{Hotelinfo.Code}})</view>
</cu-custom>
<scroll-view scroll-y >
<view class='nav-list' style="margin-top: 20rpx;">
<navigator open-type="navigate" hover-class="navigator-hover" url="/pages/basics/{{item.name}}/{{item.name}}?HotelId={{Hotelinfo.HotelId}}" class="nav-li bg-{{item.color}}" wx:for="{{elements}}" wx:key>
<view class="nav-title ">{{item.title}}</view>
<!-- <view class="nav-name">{{item.name}}</view> -->
<!-- <text class='cuIcon-{{item.icon}}'></text> -->
</navigator>
</view>
<view class='cu-tabbar-height'></view>
</scroll-view>

View File

@@ -0,0 +1,6 @@
.flex-center {
display: flex;
justify-content: center; /* 水平 */
align-items: center; /* 垂直 */
text-align: center; /* 多行时文字也居中 */
}