Browse Source

(+)巡检小程序

master
Archer_cdm 2 years ago
parent
commit
b06503b6b9
  1. 31
      weapp/.eslintrc.js
  2. 48
      weapp/app.js
  3. 45
      weapp/app.json
  4. 10
      weapp/app.wxss
  5. 1
      weapp/images/avatar.svg
  6. BIN
      weapp/images/logo.png
  7. BIN
      weapp/images/password.png
  8. 2
      weapp/images/right.svg
  9. BIN
      weapp/images/tabBar/icon_menu.png
  10. BIN
      weapp/images/tabBar/icon_menu_active.png
  11. BIN
      weapp/images/tabBar/icon_person.png
  12. BIN
      weapp/images/tabBar/icon_person_active.png
  13. BIN
      weapp/images/tabBar/icon_polling.png
  14. BIN
      weapp/images/tabBar/icon_polling_active.png
  15. BIN
      weapp/images/userName.png
  16. 1
      weapp/images/xunjian.svg
  17. 66
      weapp/package/basic/basic.js
  18. 6
      weapp/package/basic/basic.json
  19. 41
      weapp/package/basic/basic.wxml
  20. 60
      weapp/package/basic/basic.wxss
  21. 71
      weapp/package/polling/polling.js
  22. 6
      weapp/package/polling/polling.json
  23. 11
      weapp/package/polling/polling.wxml
  24. 33
      weapp/package/polling/polling.wxss
  25. 66
      weapp/pages/index/index.js
  26. 6
      weapp/pages/index/index.json
  27. 26
      weapp/pages/index/index.wxml
  28. 55
      weapp/pages/index/index.wxss
  29. 91
      weapp/pages/login/login.js
  30. 6
      weapp/pages/login/login.json
  31. 25
      weapp/pages/login/login.wxml
  32. 156
      weapp/pages/login/login.wxss
  33. 72
      weapp/pages/myInfo/myInfo.js
  34. 6
      weapp/pages/myInfo/myInfo.json
  35. 25
      weapp/pages/myInfo/myInfo.wxml
  36. 100
      weapp/pages/myInfo/myInfo.wxss
  37. 73
      weapp/pages/overview/overview.js
  38. 6
      weapp/pages/overview/overview.json
  39. 18
      weapp/pages/overview/overview.wxml
  40. 35
      weapp/pages/overview/overview.wxss
  41. 51
      weapp/project.config.json
  42. 36
      weapp/project.private.config.json
  43. 7
      weapp/sitemap.json
  44. 19
      weapp/utils/util.js

31
weapp/.eslintrc.js

@ -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: {},
}

48
weapp/app.js

@ -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
});
});
}
})

45
weapp/app.json

@ -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"
}

10
weapp/app.wxss

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

1
weapp/images/avatar.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1673618443252" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2117" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M512.3 106c-223.6 0-406.7 183-406.7 406.7s183 406.6 406.7 406.6 406.6-183 406.6-406.7C919 289 736 106 512.3 106z m10.2 122c155 0 155 116.9 155 183s-61 188.1-155 190.6c-91.5 0-155-122-155-190.6 0-66.1 0-183 155-183z m-10.2 668.4c-116.9 0-223.7-53.4-294.8-137.2 10.2-25.4 22.9-53.4 40.7-68.6 38.1-30.5 152.5-81.3 152.5-81.3l71.2 137.2 12.7-33-20.4-40.7 40.7-40.7 40.7 40.7-17.9 43.2 10.2 33.1 73.7-134.7s114.4 50.8 152.5 81.3c17.8 12.7 30.5 35.6 38.1 55.9-68.6 88.9-177.9 144.8-299.9 144.8z m0 0" p-id="2118" fill="#707070"></path></svg>

After

Width:  |  Height:  |  Size: 868 B

BIN
weapp/images/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

BIN
weapp/images/password.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

2
weapp/images/right.svg

@ -0,0 +1,2 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1648710889701" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2504" width="32" height="32" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
</style></defs><path d="M534.826667 935.466667a47.36 47.36 0 0 1-66.986667-66.773334L835.413333 501.333333 467.84 133.973333a47.36 47.36 0 1 1 66.986667-66.773333l400.64 400.64a47.36 47.36 0 0 1 0 66.986667z" fill="#333333" p-id="2505"></path></svg>

After

Width:  |  Height:  |  Size: 915 B

BIN
weapp/images/tabBar/icon_menu.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
weapp/images/tabBar/icon_menu_active.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
weapp/images/tabBar/icon_person.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
weapp/images/tabBar/icon_person_active.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
weapp/images/tabBar/icon_polling.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
weapp/images/tabBar/icon_polling_active.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
weapp/images/userName.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

1
weapp/images/xunjian.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1673832203014" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4951" width="128" height="128" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M517.654925 447.136478c68.837254 0 124.897433-54.210866 124.897433-120.908418 0-66.697552-56.060179-120.908418-124.897433-120.908418-68.837254 0-124.897433 54.210866-124.897432 120.908418 0 66.697552 56.044896 120.908418 124.897432 120.908418zm0-182.44012c34.647881 0 62.693254 27.86197 62.693254 62.234746 0 34.326925-28.045373 62.234746-62.693254 62.234747-34.60203 0-62.693254-27.907821-62.693253-62.234747 0-34.372776 28.091224-62.234746 62.693253-62.234746zm-120.893134 365.338746c1.803463 2.567642 3.576358 4.630925 5.028299 6.113433 42.136836 51.001313 84.60991 84.930866 86.44394 86.367523l29.589015 23.521433 29.466746-23.704836c1.83403-1.436657 44.169552-35.763582 86.22997-86.581493 1.436657-1.528358 3.270687-3.652776 5.058866-6.266268 60.140896-78.282507 134.908179-191.732537 151.811821-289.944836 3.255403-22.390448 3.347104-35.946985 3.347104-37.429493 0.565493-73.391761-28.717851-142.366567-82.409074-193.994507-51.994746-50.007881-120.801433-77.533612-193.673553-77.533612-72.597015 0-141.220299 27.525731-193.215044 77.533612-53.981612 51.903045-83.448358 121.229373-82.882866 195.156059 0 1.176836 0.091701 14.779224 3.224836 36.099821 18.141612 105.08991 102.537552 226.594388 151.97994 290.663164zm120.893134-522.988895c113.816836 0 206.985552 90.937313 206.160239 203.928836 0 0 0 10.224716-2.47594 27.174209-13.617672 79.123104-77.915701 177.136716-129.467224 244.078806-0.412657 0.794746-1.23797 1.558925-1.635343 1.971582-35.885851 43.680478-72.581731 73.223642-72.581732 73.223642s-36.711164-29.145791-72.581731-72.826269c-0.397373-0.397373-1.222687-1.207403-1.650627-1.971582-51.551522-66.529433-115.849552-164.955701-129.45194-243.712-2.47594-16.903642-2.47594-27.174209-2.47594-27.174209-0.840597-112.976239 92.343403-204.693015 206.160238-204.693015zM219.884896 993.432836 901.471522 993.432836c58.643104 0 107.229612-44.521075 107.229612-100.825791 0-56.304716-48.586507-100.810507-107.229612-100.810508L122.513194 791.796537c-22.023642 0-38.835582-15.405851-38.835582-32.98197 0-17.591403 16.81194-32.997254 38.835582-32.997254l121.718448 0a34.036537 34.036537 0 0 0 34.189373-33.914268 34.051821 34.051821 0 0 0-34.189373-33.914269L122.513194 657.988776c-58.627821 0-107.214328 44.505791-107.214328 100.825791 0 56.304716 48.586507 100.810507 107.214328 100.810508l778.958328 0c22.038925 0 38.850866 15.390567 38.850866 32.98197s-16.81194 32.98197-38.850866 32.98197L219.884896 925.589015a34.067104 34.067104 0 0 0-34.189374 33.929552A34.067104 34.067104 0 0 0 219.884896 993.432836z" fill="#7F8389" p-id="4952"></path></svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

66
weapp/package/basic/basic.js

@ -0,0 +1,66 @@
// package/basic/basic.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

6
weapp/package/basic/basic.json

@ -0,0 +1,6 @@
{
"navigationBarBackgroundColor": "#1979ff",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "基本信息",
"enablePullDownRefresh": false
}

41
weapp/package/basic/basic.wxml

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

60
weapp/package/basic/basic.wxss

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

71
weapp/package/polling/polling.js

@ -0,0 +1,71 @@
// package/polling/polling.js
Page({
/**
* 页面的初始数据
*/
data: {
},
// 顶部tab切换
clickTab(e) {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

6
weapp/package/polling/polling.json

@ -0,0 +1,6 @@
{
"navigationBarBackgroundColor": "#1979ff",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "巡检",
"enablePullDownRefresh": false
}

11
weapp/package/polling/polling.wxml

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

33
weapp/package/polling/polling.wxss

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

66
weapp/pages/index/index.js

@ -0,0 +1,66 @@
// pages/index/index.js
Page({
/**
* 页面的初始数据
*/
data: {
dataList:[1,2,3,4]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

6
weapp/pages/index/index.json

@ -0,0 +1,6 @@
{
"navigationBarBackgroundColor": "#1979ff",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "巡检总览",
"enablePullDownRefresh": false
}

26
weapp/pages/index/index.wxml

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

55
weapp/pages/index/index.wxss

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

91
weapp/pages/login/login.js

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

6
weapp/pages/login/login.json

@ -0,0 +1,6 @@
{
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "登录",
"enablePullDownRefresh": false
}

25
weapp/pages/login/login.wxml

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

156
weapp/pages/login/login.wxss

@ -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
}

72
weapp/pages/myInfo/myInfo.js

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

6
weapp/pages/myInfo/myInfo.json

@ -0,0 +1,6 @@
{
"navigationBarBackgroundColor": "#1979ff",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "我的",
"enablePullDownRefresh": false
}

25
weapp/pages/myInfo/myInfo.wxml

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

100
weapp/pages/myInfo/myInfo.wxss

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

73
weapp/pages/overview/overview.js

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

6
weapp/pages/overview/overview.json

@ -0,0 +1,6 @@
{
"navigationBarBackgroundColor": "#1979ff",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "工作台",
"enablePullDownRefresh": false
}

18
weapp/pages/overview/overview.wxml

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

35
weapp/pages/overview/overview.wxss

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

51
weapp/project.config.json

@ -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
}
}

36
weapp/project.private.config.json

@ -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"
}

7
weapp/sitemap.json

@ -0,0 +1,7 @@
{
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
"rules": [{
"action": "allow",
"page": "*"
}]
}

19
weapp/utils/util.js

@ -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
}
Loading…
Cancel
Save