@ -0,0 +1,31 @@ |
|||
/* |
|||
* Eslint config file |
|||
* Documentation: https://eslint.org/docs/user-guide/configuring/
|
|||
* Install the Eslint extension before using this feature. |
|||
*/ |
|||
module.exports = { |
|||
env: { |
|||
es6: true, |
|||
browser: true, |
|||
node: true, |
|||
}, |
|||
ecmaFeatures: { |
|||
modules: true, |
|||
}, |
|||
parserOptions: { |
|||
ecmaVersion: 2018, |
|||
sourceType: 'module', |
|||
}, |
|||
globals: { |
|||
wx: true, |
|||
App: true, |
|||
Page: true, |
|||
getCurrentPages: true, |
|||
getApp: true, |
|||
Component: true, |
|||
requirePlugin: true, |
|||
requireMiniProgram: true, |
|||
}, |
|||
// extends: 'eslint:recommended',
|
|||
rules: {}, |
|||
} |
@ -0,0 +1,48 @@ |
|||
// app.js
|
|||
App({ |
|||
onLaunch() { |
|||
// // 展示本地存储能力
|
|||
// const logs = wx.getStorageSync('logs') || []
|
|||
// logs.unshift(Date.now())
|
|||
// wx.setStorageSync('logs', logs)
|
|||
|
|||
// // 登录
|
|||
// wx.login({
|
|||
// success: res => {
|
|||
// // 发送 res.code 到后台换取 openId, sessionKey, unionId
|
|||
// }
|
|||
// })
|
|||
}, |
|||
globalData: { |
|||
userInfo: null |
|||
}, |
|||
onShow(e) { |
|||
// 检查是否有更新
|
|||
const updateManager = wx.getUpdateManager(); |
|||
updateManager.onCheckForUpdate(function (res) { |
|||
// 请求完新版本信息的回调
|
|||
console.log(res.hasUpdate); |
|||
}); |
|||
updateManager.onUpdateReady(function () { |
|||
wx.showModal({ |
|||
title: "更新提示", |
|||
content: "新版本已经准备好,是否重启应用?", |
|||
success(res) { |
|||
if (res.confirm) { |
|||
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
|||
updateManager.applyUpdate(); |
|||
} |
|||
} |
|||
}); |
|||
}); |
|||
|
|||
updateManager.onUpdateFailed(function () { |
|||
// 新版本下载失败
|
|||
wx.showToast({ |
|||
title: "新版本下载失败", |
|||
icon: "none", |
|||
duration: 1000 |
|||
}); |
|||
}); |
|||
} |
|||
}) |
@ -0,0 +1,45 @@ |
|||
{ |
|||
"pages": [ |
|||
"pages/index/index", |
|||
"pages/login/login", |
|||
"pages/myInfo/myInfo", |
|||
"pages/overview/overview" |
|||
], |
|||
"subPackages": [{ |
|||
"root": "package", |
|||
"pages": [ |
|||
"polling/polling", |
|||
"basic/basic" |
|||
] |
|||
}], |
|||
"window": { |
|||
"backgroundTextStyle": "dark", |
|||
"navigationBarBackgroundColor": "#1979ff", |
|||
"navigationBarTextStyle": "white" |
|||
}, |
|||
"tabBar": { |
|||
"color": "#000000", |
|||
"selectedColor": "#2F54FF", |
|||
"borderStyle": "black", |
|||
"backgroundColor": "#ffffff", |
|||
"list": [{ |
|||
"pagePath": "pages/index/index", |
|||
"iconPath": "images/tabBar/icon_polling.png", |
|||
"selectedIconPath": "images/tabBar/icon_polling_active.png", |
|||
"text": "巡检总览" |
|||
}, { |
|||
"pagePath": "pages/overview/overview", |
|||
"iconPath": "images/tabBar/icon_menu.png", |
|||
"selectedIconPath": "images/tabBar/icon_menu_active.png", |
|||
"text": "工作台" |
|||
}, |
|||
{ |
|||
"pagePath": "pages/myInfo/myInfo", |
|||
"iconPath": "images/tabBar/icon_person.png", |
|||
"selectedIconPath": "images/tabBar/icon_person_active.png", |
|||
"text": "我的" |
|||
} |
|||
] |
|||
}, |
|||
"sitemapLocation": "sitemap.json" |
|||
} |
@ -0,0 +1,10 @@ |
|||
/**app.wxss**/ |
|||
.container { |
|||
height: 100%; |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
padding: 200rpx 0; |
|||
box-sizing: border-box; |
|||
} |
After Width: | Height: | Size: 868 B |
After Width: | Height: | Size: 9.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 915 B |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 2.8 KiB |
@ -0,0 +1,66 @@ |
|||
// package/basic/basic.js
|
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad(options) { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage() { |
|||
|
|||
} |
|||
}) |
@ -0,0 +1,6 @@ |
|||
{ |
|||
"navigationBarBackgroundColor": "#1979ff", |
|||
"navigationBarTextStyle": "white", |
|||
"navigationBarTitleText": "基本信息", |
|||
"enablePullDownRefresh": false |
|||
} |
@ -0,0 +1,41 @@ |
|||
<!--package/basic/basic.wxml--> |
|||
<view class="page"> |
|||
<view class='header-item-container'> |
|||
<image class='logo' src='../../images/avatar.svg' /> |
|||
<view> |
|||
<text class='userName'>超级管理</text> |
|||
</view> |
|||
</view> |
|||
<view class='list'> |
|||
<view class='content'> |
|||
<view class='title'>姓名:</view> |
|||
<view class='value'> |
|||
管理员 |
|||
</view> |
|||
</view> |
|||
<view class='content'> |
|||
<view class='title'>电话:</view> |
|||
<view class='value'> |
|||
18965662365 |
|||
</view> |
|||
</view> |
|||
<view class='content'> |
|||
<view class='title'>部门:</view> |
|||
<view class='value'> |
|||
管理部门 |
|||
</view> |
|||
</view> |
|||
<view class='content'> |
|||
<view class='title'>职务:</view> |
|||
<view class='value'> |
|||
系统管理员 |
|||
</view> |
|||
</view> |
|||
<view class='content'> |
|||
<view class='title'>邮箱:</view> |
|||
<view class='value'> |
|||
chendingming@free-sun.com.cn |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
@ -0,0 +1,60 @@ |
|||
/* package/basic/basic.wxss */ |
|||
|
|||
page { |
|||
background-color: rgb(242, 242, 245); |
|||
} |
|||
|
|||
.page { |
|||
padding: 30rpx; |
|||
} |
|||
|
|||
.header-item-container { |
|||
width: 100%; |
|||
height: 180rpx; |
|||
background: rgb(255, 255, 255); |
|||
border-radius: 10rpx; |
|||
flex-direction: row; |
|||
display: flex; |
|||
justify-content: start; |
|||
align-items: center; |
|||
box-shadow: 0rpx 0rpx 16rpx #ccc; |
|||
} |
|||
|
|||
.logo { |
|||
width: 120rpx; |
|||
height: 120rpx; |
|||
padding: 30rpx; |
|||
} |
|||
|
|||
.userName { |
|||
font-size: 36rpx; |
|||
font-weight: 600; |
|||
} |
|||
|
|||
.list { |
|||
color: #6C6C6C; |
|||
background: #fff; |
|||
padding: 40rpx; |
|||
box-sizing: border-box; |
|||
width: 100%; |
|||
margin: 40rpx auto; |
|||
border-radius: 10rpx; |
|||
box-shadow: 0rpx 0rpx 16rpx #ccc; |
|||
} |
|||
|
|||
.content { |
|||
width: 100%; |
|||
overflow: hidden; |
|||
margin: 20rpx auto; |
|||
} |
|||
|
|||
.title { |
|||
float: left; |
|||
} |
|||
|
|||
.value { |
|||
float: left; |
|||
margin-left: 80rpx; |
|||
width: 400rpx; |
|||
word-break: break-word; |
|||
} |
@ -0,0 +1,71 @@ |
|||
// package/polling/polling.js
|
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
|
|||
}, |
|||
|
|||
// 顶部tab切换
|
|||
clickTab(e) { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad(options) { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage() { |
|||
|
|||
} |
|||
}) |
@ -0,0 +1,6 @@ |
|||
{ |
|||
"navigationBarBackgroundColor": "#1979ff", |
|||
"navigationBarTextStyle": "white", |
|||
"navigationBarTitleText": "巡检", |
|||
"enablePullDownRefresh": false |
|||
} |
@ -0,0 +1,11 @@ |
|||
<!--package/polling/polling.wxml--> |
|||
<view class="page"> |
|||
<!-- 顶部tab切换 --> |
|||
<view class='swiper-tab'> |
|||
<view class="swiper-tab-item active" data-current="0" bindtap="clickTab">巡检记录</view> |
|||
<!-- <view class="swiper-tab-item active" data-current="1" bindtap="clickTab">问题上报</view> --> |
|||
</view> |
|||
<view class='swiper-tab' style="top:100rpx;"> |
|||
<view class="swiper-tab-item" data-current="0" bindtap="clickTab">待巡检</view> |
|||
</view> |
|||
</view> |
@ -0,0 +1,33 @@ |
|||
/* package/polling/polling.wxss */ |
|||
|
|||
.page { |
|||
min-height: 100vh; |
|||
background: #F7F7FA; |
|||
position: relative; |
|||
} |
|||
|
|||
/* 顶部tab */ |
|||
.swiper-tab { |
|||
display: flex; |
|||
height: 98rpx; |
|||
line-height: 98rpx; |
|||
width: 100%; |
|||
position: fixed; |
|||
top: 0; |
|||
z-index: 100; |
|||
background: #fff; |
|||
border-bottom: 2rpx solid #e8e8e8; |
|||
} |
|||
|
|||
.swiper-tab-item { |
|||
flex: 1; |
|||
font-size: 28rpx; |
|||
text-align: center; |
|||
color: #333333; |
|||
position: relative; |
|||
} |
|||
|
|||
.active { |
|||
color: #1979ff; |
|||
position: relative; |
|||
} |
@ -0,0 +1,66 @@ |
|||
// pages/index/index.js
|
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
dataList:[1,2,3,4] |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad(options) { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage() { |
|||
|
|||
} |
|||
}) |
@ -0,0 +1,6 @@ |
|||
{ |
|||
"navigationBarBackgroundColor": "#1979ff", |
|||
"navigationBarTextStyle": "white", |
|||
"navigationBarTitleText": "巡检总览", |
|||
"enablePullDownRefresh": false |
|||
} |
@ -0,0 +1,26 @@ |
|||
<!--pages/index/index.wxml--> |
|||
<view> |
|||
<view class="searchFixed"> |
|||
<view class="searchBoxs"> |
|||
<input class="searchInps" bindinput="formInp" bindconfirm="bindconfirm" value='{{name}}' type="text" placeholder="请输入结构物名称" /> |
|||
<button class="btnSearch" bindtap="goSearch">搜索</button> |
|||
</view> |
|||
</view> |
|||
|
|||
<view style="margin-top: 117rpx;"> |
|||
<block wx:for="{{dataList}}"> |
|||
<view style="padding-bottom: 60rpx;"> |
|||
<image style="width: 100%;height: 372rpx;display: block;" src="https://dingyue.ws.126.net/2021/0428/099be11ej00qs9xld006bc000xc00m7m.jpg"></image> |
|||
<view class="box"> |
|||
<view style="font-weight:bold;font-size:32rpx;">结构物A</view> |
|||
<view style="font-size:28rpx;color: rgb(166,166,166);"> |
|||
<view style=" margin-top:6rpx;">今日问题:<text>12</text></view> |
|||
<view style="float:left;width:360rpx;">未处理问题:<text>12</text></view> |
|||
<view style="float:left;width:350rpx;">已处理问题:<text>12</text></view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</block> |
|||
</view> |
|||
|
|||
</view> |
@ -0,0 +1,55 @@ |
|||
/* pages/index/index.wxss */ |
|||
page { |
|||
background: rgb(242, 242, 245); |
|||
} |
|||
|
|||
.searchBoxs { |
|||
position: relative; |
|||
margin: 20rpx 0rpx; |
|||
height: 76rpx; |
|||
} |
|||
|
|||
.searchInps { |
|||
background-color: #fff; |
|||
width: 542rpx; |
|||
height: 76rpx; |
|||
border-radius: 8rpx; |
|||
padding-left: 32rpx; |
|||
padding-right: 144rpx; |
|||
border: 1px solid rgba(225, 225, 225, 0.44); |
|||
position: absolute; |
|||
top: -2rpx; |
|||
left: 16rpx; |
|||
font-size: 28rpx; |
|||
} |
|||
|
|||
.btnSearch { |
|||
width: 128rpx; |
|||
height: 68rpx; |
|||
line-height: 68rpx; |
|||
border-radius: 8rpx; |
|||
color: #fff; |
|||
font-size: 28rpx; |
|||
background: linear-gradient(180deg, #1979ff 0%, #1979ff 100%); |
|||
position: absolute; |
|||
top: 6rpx; |
|||
right: 28rpx; |
|||
z-index: 10; |
|||
} |
|||
|
|||
.searchFixed { |
|||
position: fixed; |
|||
top: 0; |
|||
width: 100%; |
|||
background-color: #fff; |
|||
box-shadow: 0rpx -4rpx 20rpx #c2c2c2; |
|||
z-index: 10; |
|||
} |
|||
|
|||
.box { |
|||
padding: 20rpx; |
|||
box-shadow: 0rpx 0rpx 10rpx #ccc; |
|||
overflow: hidden; |
|||
line-height: 50rpx; |
|||
background: #fff; |
|||
} |
@ -0,0 +1,91 @@ |
|||
// pages/login/login.js
|
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
|
|||
}, |
|||
|
|||
setColor: function () { |
|||
this.setData({ |
|||
backgroundInput: this.data.userNameCan == true && this.data.passwordCan == true ? 'rgb(51, 133, 255)' : 'rgb(255,255,255)', |
|||
colorInput: this.data.userNameCan == true && this.data.passwordCan == true ? 'rgb(255, 255, 255)' : 'rgb(201,201,201)', |
|||
}) |
|||
}, |
|||
bindUserName: function (e) { |
|||
this.setData({ |
|||
userNameCan: e.detail.value.length > 0 ? true : false, |
|||
}) |
|||
this.setColor(); |
|||
}, |
|||
bindPassword: function (e) { |
|||
this.setData({ |
|||
passwordCan: e.detail.value.length > 0 ? true : false, |
|||
}) |
|||
this.setColor(); |
|||
}, |
|||
|
|||
getLogin: function (e) { |
|||
wx.switchTab({ |
|||
url: '/pages/index/index', |
|||
}) |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad(options) { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage() { |
|||
|
|||
} |
|||
}) |
@ -0,0 +1,6 @@ |
|||
{ |
|||
"navigationBarBackgroundColor": "#fff", |
|||
"navigationBarTextStyle": "white", |
|||
"navigationBarTitleText": "登录", |
|||
"enablePullDownRefresh": false |
|||
} |
@ -0,0 +1,25 @@ |
|||
<!--pages/login/login.wxml--> |
|||
<view class='logo-container'> |
|||
<image class='logo' src='/images/logo.png' mode='aspectFit' /> |
|||
</view> |
|||
|
|||
<view class="body-container" wx:if='{{!isAutoLogin}}'> |
|||
<form report-submit='true' bindsubmit='getLogin'> |
|||
<view class='userName-container marginBottom'> |
|||
<image class='userName-logo' src='/images/userName.png' /> |
|||
<input class='input' name='username' placeholder='请输入用户名' value='' type='text' maxlength="50" confirm-type="next" bindinput='bindUserName' /> |
|||
</view> |
|||
|
|||
<view class='userName-container'> |
|||
<image class='password-logo' src='/images/password.png' /> |
|||
<input class='input' name='password' placeholder='输入密码' value='' type='text' password='true' maxlength="50" confirm-type="done" bindinput='bindPassword' /> |
|||
</view> |
|||
|
|||
<button class='login-btn' disabled="{{!userNameCan || !passwordCan}}" style='background:{{backgroundInput}}; color:{{colorInput}};' form-type="submit">登录</button> |
|||
</form> |
|||
</view> |
|||
|
|||
<view class='co-info'> |
|||
<view>仅提供内部人员使用</view> |
|||
<view>©飞尚科技</view> |
|||
</view> |
@ -0,0 +1,156 @@ |
|||
/* pages/login/login.wxss */ |
|||
page { |
|||
background: rgb(255, 255, 255); |
|||
} |
|||
|
|||
.logo-container { |
|||
margin-top: 85rpx; |
|||
margin-bottom: 125rpx; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
text-align: center; |
|||
} |
|||
|
|||
.logo { |
|||
width: 180rpx; |
|||
height: 180rpx; |
|||
} |
|||
|
|||
.body-container { |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
} |
|||
|
|||
.marginBottom { |
|||
margin-bottom: 30rpx; |
|||
} |
|||
|
|||
.userName-container { |
|||
width: 580rpx; |
|||
height: 95rpx; |
|||
background: rgb(245, 245, 247); |
|||
border-radius: 10rpx; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
} |
|||
|
|||
.userName-logo { |
|||
width: 30rpx; |
|||
height: 34rpx; |
|||
padding-right: 15rpx; |
|||
border-right: 1px dashed #8A8A8A; |
|||
} |
|||
|
|||
.password-logo { |
|||
width: 30rpx; |
|||
height: 34rpx; |
|||
padding-right: 15rpx; |
|||
border-right: 1px dashed #8A8A8A; |
|||
} |
|||
|
|||
.input { |
|||
width: 492rpx; |
|||
height: 95rpx; |
|||
padding-left: 15rpx; |
|||
font-size: 32rpx; |
|||
} |
|||
|
|||
.login-btn { |
|||
width: 580rpx !important; |
|||
height: 98rpx; |
|||
margin-top: 90rpx; |
|||
color: rgb(201, 201, 201); |
|||
background: rgb(255, 255, 255); |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
border-radius: 10rpx; |
|||
} |
|||
|
|||
.backColor { |
|||
color: rgb(138, 138, 138); |
|||
} |
|||
|
|||
|
|||
|
|||
/* 按钮 */ |
|||
.cancle-sure { |
|||
width: 100%; |
|||
/* height: 100rpx; */ |
|||
background: white; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
border-bottom: 1px solid #E5E5E5; |
|||
} |
|||
|
|||
.sure { |
|||
color: rgb(36, 123, 255); |
|||
padding: 30rpx; |
|||
font-size: 36rpx; |
|||
} |
|||
|
|||
.picker-view-column-container { |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
} |
|||
|
|||
.sitePicker { |
|||
width: 100%; |
|||
height: 240rpx; |
|||
font-size: 34rpx; |
|||
padding-left: 30rpx; |
|||
padding-right: 30rpx; |
|||
} |
|||
|
|||
.picker-item { |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
font-size: 34rpx; |
|||
overflow: hidden; |
|||
} |
|||
|
|||
.sensorTypePicker { |
|||
width: 100%; |
|||
height: 240rpx; |
|||
font-size: 34rpx; |
|||
padding-left: 30rpx; |
|||
padding-right: 30rpx; |
|||
} |
|||
|
|||
.indecate { |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
color: rgb(241, 241, 242); |
|||
} |
|||
|
|||
|
|||
.noSensor-container { |
|||
height: 800rpx; |
|||
flex-direction: column; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
/* background: rgb(0,0,0); */ |
|||
} |
|||
|
|||
|
|||
.selectIndex { |
|||
height: 80rpx; |
|||
} |
|||
|
|||
.co-info { |
|||
position: fixed; |
|||
bottom: 10px; |
|||
left: 0; |
|||
width: 100vw; |
|||
color: #ccc; |
|||
text-align: center; |
|||
font-size: 14px |
|||
} |
@ -0,0 +1,72 @@ |
|||
// pages/myInfo/myInfo.js
|
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
|
|||
}, |
|||
|
|||
bindClick() { |
|||
wx.navigateTo({ |
|||
url: '/package/basic/basic', |
|||
}) |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad(options) { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage() { |
|||
|
|||
} |
|||
}) |
@ -0,0 +1,6 @@ |
|||
{ |
|||
"navigationBarBackgroundColor": "#1979ff", |
|||
"navigationBarTextStyle": "white", |
|||
"navigationBarTitleText": "我的", |
|||
"enablePullDownRefresh": false |
|||
} |
@ -0,0 +1,25 @@ |
|||
<!--pages/myInfo/myInfo.wxml--> |
|||
<view class='box'> |
|||
<view class='header-item-container'> |
|||
<image class='logo' src='../../images/avatar.svg' /> |
|||
<view> |
|||
<text class='userName'>超级管理</text> |
|||
</view> |
|||
</view> |
|||
|
|||
<view class='body-container'> |
|||
<view class='body-item' bindtap="bindClick"> |
|||
<view class='body-info'>基本信息</view> |
|||
<image class="right" src="/images/right.svg"></image> |
|||
</view> |
|||
|
|||
<!-- <view class='body-item'> |
|||
<view class='body-info'>通知消息</view> |
|||
<image class="right" src="/images/right.svg"></image> |
|||
</view> --> |
|||
</view> |
|||
|
|||
<view class='foot-container'> |
|||
<view class='foot-item' bindtap='logout'>退出登录</view> |
|||
</view> |
|||
</view> |
@ -0,0 +1,100 @@ |
|||
/* pages/myInfo/myInfo.wxss */ |
|||
|
|||
page { |
|||
background-color: rgb(242, 242, 245); |
|||
} |
|||
|
|||
/* 容器 */ |
|||
.box { |
|||
padding: 30rpx; |
|||
font-family: 'PingFang SC-Medium'; |
|||
} |
|||
|
|||
.header-item-container { |
|||
width: 100%; |
|||
height: 180rpx; |
|||
background: rgb(255, 255, 255); |
|||
border-radius: 10rpx; |
|||
flex-direction: row; |
|||
display: flex; |
|||
justify-content: start; |
|||
align-items: center; |
|||
} |
|||
|
|||
.logo { |
|||
width: 120rpx; |
|||
height: 120rpx; |
|||
padding: 30rpx; |
|||
} |
|||
|
|||
.userName { |
|||
font-size: 36rpx; |
|||
font-weight: 600; |
|||
} |
|||
|
|||
.company { |
|||
font-size: 28rpx; |
|||
font-family: "PingFang SC"; |
|||
color: rgb(138, 138, 138); |
|||
margin-top: 14rpx; |
|||
} |
|||
|
|||
.body-container { |
|||
width: 100%; |
|||
background: rgb(255, 255, 255); |
|||
border-radius: 10rpx; |
|||
flex-direction: column; |
|||
display: flex; |
|||
margin-top: 30rpx; |
|||
margin-bottom: 30rpx; |
|||
} |
|||
|
|||
.body-item { |
|||
height: 110rpx; |
|||
flex-direction: row; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
padding: 0 30rpx; |
|||
border-bottom: 1px solid #EFEFF4; |
|||
} |
|||
|
|||
.body-info { |
|||
font-size: 32rpx; |
|||
font-family: "PingFang SC"; |
|||
font-weight: 600; |
|||
} |
|||
|
|||
.body-number { |
|||
font-size: 30rpx; |
|||
font-family: "PingFang SC"; |
|||
color: rgb(138, 138, 138); |
|||
} |
|||
|
|||
.foot-container { |
|||
width: 100%; |
|||
background: rgb(255, 255, 255); |
|||
border-radius: 10rpx; |
|||
flex-direction: column; |
|||
display: flex; |
|||
border: 1px #FFFFFF; |
|||
} |
|||
|
|||
.foot-item { |
|||
color: rgb(0, 0, 0); |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
padding: 30rpx; |
|||
font-size: 32rpx; |
|||
font-family: "PingFang SC"; |
|||
font-weight: 600; |
|||
} |
|||
|
|||
.right { |
|||
width: 32rpx; |
|||
height: 32rpx; |
|||
display: block; |
|||
float: right; |
|||
margin: 38rpx 40rpx; |
|||
} |
@ -0,0 +1,73 @@ |
|||
// pages/overview/overview.js
|
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
|
|||
}, |
|||
|
|||
// 巡检
|
|||
bindPolling() { |
|||
wx.navigateTo({ |
|||
url: '/package/polling/polling', |
|||
}) |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad(options) { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage() { |
|||
|
|||
} |
|||
}) |
@ -0,0 +1,6 @@ |
|||
{ |
|||
"navigationBarBackgroundColor": "#1979ff", |
|||
"navigationBarTextStyle": "white", |
|||
"navigationBarTitleText": "工作台", |
|||
"enablePullDownRefresh": false |
|||
} |
@ -0,0 +1,18 @@ |
|||
<!--pages/overview/overview.wxml--> |
|||
<view style="margin-top: 42rpx;"> |
|||
<view class="box" bindtap="bindPolling"> |
|||
<image class="logo" src="/images/xunjian.svg"></image> |
|||
<view class="txt">巡检</view> |
|||
<image class="right" src="/images/right.svg"></image> |
|||
</view> |
|||
<!-- <view class="box"> |
|||
<image class="logo" src="/images/tabBar/icon_menu.png"></image> |
|||
<view class="txt">问题处理</view> |
|||
<image class="right" src="/images/right.svg"></image> |
|||
</view> |
|||
<view class="box"> |
|||
<image class="logo" src="/images/tabBar/icon_menu.png"></image> |
|||
<view class="txt">巡检报告</view> |
|||
<image class="right" src="/images/right.svg"></image> |
|||
</view> --> |
|||
</view> |
@ -0,0 +1,35 @@ |
|||
/* pages/overview/overview.wxss */ |
|||
|
|||
page { |
|||
background-color: rgb(242, 242, 245); |
|||
} |
|||
|
|||
.box { |
|||
width: 672rpx; |
|||
height: 178rpx; |
|||
margin: 42rpx auto 21rpx; |
|||
background: #fff; |
|||
box-shadow: 0rpx 0rpx 10rpx #ccc; |
|||
border-radius: 8rpx; |
|||
} |
|||
|
|||
.logo { |
|||
width: 90rpx; |
|||
height: 90rpx; |
|||
float: left; |
|||
margin: 48rpx 50rpx 0 50rpx; |
|||
} |
|||
|
|||
.txt { |
|||
float: left; |
|||
line-height: 112rpx; |
|||
margin: 34rpx; |
|||
} |
|||
|
|||
.right { |
|||
width: 32rpx; |
|||
height: 32rpx; |
|||
display: block; |
|||
float: right; |
|||
margin: 74rpx 40rpx; |
|||
} |
@ -0,0 +1,51 @@ |
|||
{ |
|||
"description": "项目配置文件", |
|||
"packOptions": { |
|||
"ignore": [], |
|||
"include": [] |
|||
}, |
|||
"setting": { |
|||
"bundle": false, |
|||
"userConfirmedBundleSwitch": false, |
|||
"urlCheck": true, |
|||
"scopeDataCheck": false, |
|||
"coverView": true, |
|||
"es6": true, |
|||
"postcss": true, |
|||
"compileHotReLoad": false, |
|||
"lazyloadPlaceholderEnable": false, |
|||
"preloadBackgroundData": false, |
|||
"minified": true, |
|||
"autoAudits": false, |
|||
"newFeature": false, |
|||
"uglifyFileName": false, |
|||
"uploadWithSourceMap": true, |
|||
"useIsolateContext": true, |
|||
"nodeModules": false, |
|||
"enhance": true, |
|||
"useMultiFrameRuntime": true, |
|||
"useApiHook": true, |
|||
"useApiHostProcess": true, |
|||
"showShadowRootInWxmlPanel": true, |
|||
"packNpmManually": false, |
|||
"enableEngineNative": false, |
|||
"packNpmRelationList": [], |
|||
"minifyWXSS": true, |
|||
"showES6CompileOption": false, |
|||
"minifyWXML": true, |
|||
"babelSetting": { |
|||
"ignore": [], |
|||
"disablePlugins": [], |
|||
"outputPath": "" |
|||
} |
|||
}, |
|||
"compileType": "miniprogram", |
|||
"libVersion": "2.19.4", |
|||
"appid": "wxe9595234589a0147", |
|||
"projectname": "miniprogram-92", |
|||
"condition": {}, |
|||
"editorSetting": { |
|||
"tabIndent": "insertSpaces", |
|||
"tabSize": 2 |
|||
} |
|||
} |
@ -0,0 +1,36 @@ |
|||
{ |
|||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", |
|||
"projectname": "%E5%B7%A1%E6%A3%80%E5%B0%8F%E7%A8%8B%E5%BA%8F", |
|||
"setting": { |
|||
"compileHotReLoad": false, |
|||
"urlCheck": false |
|||
}, |
|||
"condition": { |
|||
"miniprogram": { |
|||
"list": [ |
|||
{ |
|||
"name": "", |
|||
"pathName": "pages/login/login", |
|||
"query": "", |
|||
"launchMode": "default", |
|||
"scene": null |
|||
}, |
|||
{ |
|||
"name": "", |
|||
"pathName": "package/polling/polling", |
|||
"query": "", |
|||
"launchMode": "default", |
|||
"scene": null |
|||
}, |
|||
{ |
|||
"name": "", |
|||
"pathName": "package/basic/basic", |
|||
"query": "", |
|||
"launchMode": "default", |
|||
"scene": null |
|||
} |
|||
] |
|||
} |
|||
}, |
|||
"libVersion": "2.29.0" |
|||
} |
@ -0,0 +1,7 @@ |
|||
{ |
|||
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", |
|||
"rules": [{ |
|||
"action": "allow", |
|||
"page": "*" |
|||
}] |
|||
} |
@ -0,0 +1,19 @@ |
|||
const formatTime = date => { |
|||
const year = date.getFullYear() |
|||
const month = date.getMonth() + 1 |
|||
const day = date.getDate() |
|||
const hour = date.getHours() |
|||
const minute = date.getMinutes() |
|||
const second = date.getSeconds() |
|||
|
|||
return `${[year, month, day].map(formatNumber).join('/')} ${[hour, minute, second].map(formatNumber).join(':')}` |
|||
} |
|||
|
|||
const formatNumber = n => { |
|||
n = n.toString() |
|||
return n[1] ? n : `0${n}` |
|||
} |
|||
|
|||
module.exports = { |
|||
formatTime |
|||
} |