mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-18 00:45:55 +08:00
添加部分页面
This commit is contained in:
78
wechat/miniprogram/pages/add/index.js
Normal file
78
wechat/miniprogram/pages/add/index.js
Normal file
@@ -0,0 +1,78 @@
|
||||
// miniprogram/pages/add/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
wx.setNavigationBarTitle({
|
||||
title: '添加设备',
|
||||
})
|
||||
},
|
||||
|
||||
addFourG(){
|
||||
wx.navigateTo({
|
||||
url: '/pages/add4G/index',
|
||||
})
|
||||
},
|
||||
addWifi(){
|
||||
wx.navigateTo({
|
||||
url: '/pages/addWiFi/index',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
3
wechat/miniprogram/pages/add/index.json
Normal file
3
wechat/miniprogram/pages/add/index.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
37
wechat/miniprogram/pages/add/index.wxml
Normal file
37
wechat/miniprogram/pages/add/index.wxml
Normal file
@@ -0,0 +1,37 @@
|
||||
<!--miniprogram/pages/add/index.wxml-->
|
||||
<view class="top">
|
||||
<image src="/images/smart.jpg" />
|
||||
</view>
|
||||
<view class="title">添加设备</view>
|
||||
<view class="main">
|
||||
<view class="name">设备分类 >>></view>
|
||||
<view class="content">
|
||||
<view class="item">
|
||||
<view class="type">
|
||||
<image src="/icons/4g.png"></image>
|
||||
<text>4G开关</text>
|
||||
</view>
|
||||
<view class="add" bindtap="addFourG">
|
||||
<image src="/icons/add_1.png" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="type">
|
||||
<image src="/icons/room.png"></image>
|
||||
<text>智慧宿舍</text>
|
||||
</view>
|
||||
<view class="add">
|
||||
<image src="/icons/add_1.png" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="type">
|
||||
<image src="/icons/wifi1.png"></image>
|
||||
<text>WiFi空气盒子</text>
|
||||
</view>
|
||||
<view class="add" bindtap="addWifi">
|
||||
<image src="/icons/add_1.png" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
69
wechat/miniprogram/pages/add/index.wxss
Normal file
69
wechat/miniprogram/pages/add/index.wxss
Normal file
@@ -0,0 +1,69 @@
|
||||
/* miniprogram/pages/add/index.wxss */
|
||||
.top{
|
||||
width:100vw;
|
||||
height: 40vw;
|
||||
}
|
||||
.top>image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.title{
|
||||
/* margin: 30rpx auto; */
|
||||
padding: 30rpx 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 42rpx;
|
||||
background-color: rgb(64, 130, 252);
|
||||
color: #ffffff;
|
||||
}
|
||||
.main{
|
||||
|
||||
}
|
||||
.name{
|
||||
background-color: #ffffff;
|
||||
padding:15rpx 30rpx;
|
||||
border-bottom: 2rpx solid #666;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.content{
|
||||
padding:0 30rpx;
|
||||
margin: 30rpx 0;
|
||||
}
|
||||
.item{
|
||||
background-color: #ffffff;
|
||||
box-shadow: 3rpx 3rpx 3rpx #666666;
|
||||
margin: 30rpx auto;
|
||||
padding: 30rpx;
|
||||
width: 50vw;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.add{
|
||||
width: 130rpx;
|
||||
height: 130rpx;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 5rpx 3rpx #bfbfbb;
|
||||
background-color: #eeeeee;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.add>image{
|
||||
width: 70%;
|
||||
height: 70%;
|
||||
}
|
||||
.add:active{
|
||||
background-color: #bfbfbf;
|
||||
}
|
||||
|
||||
.type{
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
}
|
||||
.type>image{
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user