添加部分页面

This commit is contained in:
qianlile
2021-08-21 20:11:09 +08:00
parent fe4902da1c
commit dbaee1db02
903 changed files with 1198 additions and 35963 deletions

View 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 () {
}
})

View File

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

View 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>

View 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;
}