正在显示
72 个修改的文件
包含
1215 行增加
和
0 行删除
app.js
0 → 100644
1 | +//app.js | ||
2 | +App({ | ||
3 | + onLaunch: function () { | ||
4 | + // 展示本地存储能力 | ||
5 | + var logs = wx.getStorageSync('logs') || [] | ||
6 | + logs.unshift(Date.now()) | ||
7 | + wx.setStorageSync('logs', logs) | ||
8 | + | ||
9 | + // 登录 | ||
10 | + wx.login({ | ||
11 | + success: res => { | ||
12 | + // 发送 res.code 到后台换取 openId, sessionKey, unionId | ||
13 | + } | ||
14 | + }) | ||
15 | + // 获取用户信息 | ||
16 | + wx.getSetting({ | ||
17 | + success: res => { | ||
18 | + if (res.authSetting['scope.userInfo']) { | ||
19 | + // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 | ||
20 | + wx.getUserInfo({ | ||
21 | + success: res => { | ||
22 | + // 可以将 res 发送给后台解码出 unionId | ||
23 | + this.globalData.userInfo = res.userInfo | ||
24 | + | ||
25 | + // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 | ||
26 | + // 所以此处加入 callback 以防止这种情况 | ||
27 | + if (this.userInfoReadyCallback) { | ||
28 | + this.userInfoReadyCallback(res) | ||
29 | + } | ||
30 | + } | ||
31 | + }) | ||
32 | + } | ||
33 | + } | ||
34 | + }) | ||
35 | + }, | ||
36 | + globalData: { | ||
37 | + userInfo: null | ||
38 | + } | ||
39 | +}) |
app.json
0 → 100644
1 | +{ | ||
2 | + "pages": [ | ||
3 | + "pages/login/login", | ||
4 | + "pages/changqu/changqu", | ||
5 | + "pages/shebei/shebeilist/shebeilist", | ||
6 | + | ||
7 | + "pages/mine/mine", | ||
8 | + "pages/index/index", | ||
9 | + "pages/logs/logs", | ||
10 | + | ||
11 | + "pages/qiye/qiye", | ||
12 | + "pages/yujing/yujing", | ||
13 | + "pages/shebei/shebeidetail/shebeidetail" | ||
14 | + ], | ||
15 | + "window": { | ||
16 | + "backgroundTextStyle": "light", | ||
17 | + "navigationBarBackgroundColor": "#fff", | ||
18 | + "navigationBarTitleText": "", | ||
19 | + "navigationBarTextStyle": "black" | ||
20 | + }, | ||
21 | + "tabBar": { | ||
22 | + "selectedColor": "#FF8839", | ||
23 | + "list": [ | ||
24 | + { | ||
25 | + "pagePath": "pages/changqu/changqu", | ||
26 | + "text": "厂区", | ||
27 | + "selectedColor": "#FF9400", | ||
28 | + "iconPath": "img/demo (10).png", | ||
29 | + "selectedIconPath": "img/demo (17).png" | ||
30 | + }, | ||
31 | + { | ||
32 | + "pagePath": "pages/qiye/qiye", | ||
33 | + "text": "企业", | ||
34 | + "selectedColor": "#FF9400", | ||
35 | + "iconPath": "img/demo (11).png", | ||
36 | + "selectedIconPath": "img/demo (16).png" | ||
37 | + }, | ||
38 | + { | ||
39 | + "pagePath": "pages/yujing/yujing", | ||
40 | + "text": "预警", | ||
41 | + "selectedColor": "#FF9400", | ||
42 | + "iconPath": "img/demo (12).png", | ||
43 | + "selectedIconPath": "img/demo (15).png" | ||
44 | + }, | ||
45 | + { | ||
46 | + "pagePath": "pages/mine/mine", | ||
47 | + "text": "我的", | ||
48 | + "selectedColor": "#FF9400", | ||
49 | + "iconPath": "img/demo (13).png", | ||
50 | + "selectedIconPath": "img/demo (14).png" | ||
51 | + } | ||
52 | + ] | ||
53 | + }, | ||
54 | + "sitemapLocation": "sitemap.json" | ||
55 | +} |
app.wxss
0 → 100644
1 | +/**app.wxss**/ | ||
2 | +.container { | ||
3 | + height: 100%; | ||
4 | + display: flex; | ||
5 | + flex-direction: column; | ||
6 | + align-items: center; | ||
7 | + justify-content: space-between; | ||
8 | + padding: 200rpx 0; | ||
9 | + box-sizing: border-box; | ||
10 | +} | ||
11 | +image{ | ||
12 | + width:100%; | ||
13 | + height:100%; | ||
14 | +} | ||
15 | +.rowimg{ | ||
16 | + width:23rpx; | ||
17 | + height:23rpx; | ||
18 | + font-size: 0 | ||
19 | +} |
img/demo (1).png
0 → 100644
2.1 KB
img/demo (10).png
0 → 100644
1.5 KB
img/demo (11).png
0 → 100644
608 字节
img/demo (12).png
0 → 100644
833 字节
img/demo (13).png
0 → 100644
844 字节
img/demo (14).png
0 → 100644
627 字节
img/demo (15).png
0 → 100644
737 字节
img/demo (16).png
0 → 100644
619 字节
img/demo (17).png
0 → 100644
1.2 KB
img/demo (18).png
0 → 100644
1.4 KB
img/demo (19).png
0 → 100644
1.5 KB
img/demo (2).png
0 → 100644
2.4 KB
img/demo (20).png
0 → 100644
1.2 KB
img/demo (21).png
0 → 100644
1.9 KB
img/demo (22).png
0 → 100644
2.5 KB
img/demo (23).png
0 → 100644
2.1 KB
img/demo (24).png
0 → 100644
2.5 KB
img/demo (3).png
0 → 100644
1.8 KB
img/demo (4).png
0 → 100644
2.1 KB
img/demo (5).png
0 → 100644
1.2 KB
img/demo (6).png
0 → 100644
1.5 KB
img/demo (7).png
0 → 100644
2.3 KB
img/demo (8).png
0 → 100644
2.1 KB
img/demo (9).png
0 → 100644
1.4 KB
img/ico_password.png
0 → 100644
3.4 KB
img/ico_username.png
0 → 100644
3.5 KB
img/login.png
0 → 100644
3.5 KB
img/logo3.png
0 → 100644
59.2 KB
img/row.png
0 → 100644
1.2 KB
img/search.png
0 → 100644
2.2 KB
pages/changqu/changqu.js
0 → 100644
1 | +// pages/changqu/changqu.js | ||
2 | +Page({ | ||
3 | + | ||
4 | + /** | ||
5 | + * 页面的初始数据 | ||
6 | + */ | ||
7 | + data: { | ||
8 | + markers: [{ | ||
9 | + iconPath: "", | ||
10 | + id: 0, | ||
11 | + latitude: 23.099994, | ||
12 | + longitude: 113.324520, | ||
13 | + width: 50, | ||
14 | + height: 50 | ||
15 | + }], | ||
16 | + polyline: [{ | ||
17 | + points: [{ | ||
18 | + longitude: 113.3245211, | ||
19 | + latitude: 23.10229 | ||
20 | + }, { | ||
21 | + longitude: 113.324520, | ||
22 | + latitude: 23.21229 | ||
23 | + }], | ||
24 | + color: "#FF0000DD", | ||
25 | + width: 2, | ||
26 | + dottedLine: true | ||
27 | + }], | ||
28 | + controls: [{ | ||
29 | + id: 1, | ||
30 | + iconPath: '', | ||
31 | + position: { | ||
32 | + left: 0, | ||
33 | + top: 300 - 50, | ||
34 | + width: 50, | ||
35 | + height: 50 | ||
36 | + }, | ||
37 | + clickable: true | ||
38 | + }] | ||
39 | + }, | ||
40 | + | ||
41 | + /** | ||
42 | + * 生命周期函数--监听页面加载 | ||
43 | + */ | ||
44 | + onLoad: function(options) { | ||
45 | + | ||
46 | + }, | ||
47 | + | ||
48 | + regionchange(e) { | ||
49 | + console.log(e.type) | ||
50 | + }, | ||
51 | + markertap(e) { | ||
52 | + console.log(e.markerId) | ||
53 | + }, | ||
54 | + controltap(e) { | ||
55 | + console.log(e.controlId) | ||
56 | + }, | ||
57 | + | ||
58 | + /** | ||
59 | + * 生命周期函数--监听页面初次渲染完成 | ||
60 | + */ | ||
61 | + onReady: function() { | ||
62 | + | ||
63 | + }, | ||
64 | + | ||
65 | + /** | ||
66 | + * 生命周期函数--监听页面显示 | ||
67 | + */ | ||
68 | + onShow: function() { | ||
69 | + | ||
70 | + }, | ||
71 | + | ||
72 | + /** | ||
73 | + * 生命周期函数--监听页面隐藏 | ||
74 | + */ | ||
75 | + onHide: function() { | ||
76 | + | ||
77 | + }, | ||
78 | + | ||
79 | + /** | ||
80 | + * 生命周期函数--监听页面卸载 | ||
81 | + */ | ||
82 | + onUnload: function() { | ||
83 | + | ||
84 | + }, | ||
85 | + | ||
86 | + /** | ||
87 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
88 | + */ | ||
89 | + onPullDownRefresh: function() { | ||
90 | + | ||
91 | + }, | ||
92 | + | ||
93 | + /** | ||
94 | + * 页面上拉触底事件的处理函数 | ||
95 | + */ | ||
96 | + onReachBottom: function() { | ||
97 | + | ||
98 | + }, | ||
99 | + | ||
100 | + /** | ||
101 | + * 用户点击右上角分享 | ||
102 | + */ | ||
103 | + onShareAppMessage: function() { | ||
104 | + | ||
105 | + } | ||
106 | +}) |
pages/changqu/changqu.json
0 → 100644
pages/changqu/changqu.wxml
0 → 100644
1 | +<view class="mapbox"> | ||
2 | + <view class="search"> | ||
3 | + <view class="searchimg"> | ||
4 | + <image src="img/demo (10).png"></image> | ||
5 | + </view> | ||
6 | + <view class="searchinput"> | ||
7 | + <input placeholder='湖南' placeholder-class='searchword'/> | ||
8 | + </view> | ||
9 | + </view> | ||
10 | + <map id="map" longitude="113.324520" latitude="23.099994" scale="14" controls="{{controls}}" bindcontroltap="controltap" markers="{{markers}}" bindmarkertap="markertap" polyline="{{polyline}}" bindregionchange="regionchange" show-location style="width: 100%;height:100% "></map> | ||
11 | +</view> |
pages/changqu/changqu.wxss
0 → 100644
1 | +page { | ||
2 | + height: 100%; | ||
3 | +} | ||
4 | + | ||
5 | +.mapbox { | ||
6 | + height: 100%; | ||
7 | + position: relative; | ||
8 | +} | ||
9 | + | ||
10 | +#map { | ||
11 | + height: 100%; | ||
12 | +} | ||
13 | + | ||
14 | +.search { | ||
15 | + width: 690rpx; | ||
16 | + height: 90rpx; | ||
17 | + background: rgba(255, 255, 255, 1); | ||
18 | + opacity: 1; | ||
19 | + border-radius: 10rpx; | ||
20 | + display: flex; | ||
21 | + align-items: center; | ||
22 | + position: fixed; | ||
23 | + top: 29rpx; | ||
24 | + left: 37rpx; | ||
25 | + z-index: 999; | ||
26 | + padding: 24rpx 30rpx; | ||
27 | + box-sizing: border-box; | ||
28 | +} | ||
29 | + | ||
30 | +.searchimg { | ||
31 | + width: 41rpx; | ||
32 | + height: 41rpx; | ||
33 | + font-size: 0; | ||
34 | +} | ||
35 | + | ||
36 | +.searchinput { | ||
37 | + margin-left: 66rpx; | ||
38 | + height: 40rpx; | ||
39 | + width: 550rpx; | ||
40 | + color: #666666ff; | ||
41 | + font-size: 28rpx; | ||
42 | +} | ||
43 | + | ||
44 | +.searchword { | ||
45 | + color: #666666ff; | ||
46 | + font-size: 28rpx; | ||
47 | +} |
pages/index/index.js
0 → 100644
1 | +//index.js | ||
2 | +//获取应用实例 | ||
3 | +const app = getApp() | ||
4 | + | ||
5 | +Page({ | ||
6 | + data: { | ||
7 | + motto: 'Hello World', | ||
8 | + userInfo: {}, | ||
9 | + hasUserInfo: false, | ||
10 | + canIUse: wx.canIUse('button.open-type.getUserInfo') | ||
11 | + }, | ||
12 | + //事件处理函数 | ||
13 | + bindViewTap: function() { | ||
14 | + wx.navigateTo({ | ||
15 | + url: '../logs/logs' | ||
16 | + }) | ||
17 | + }, | ||
18 | + onLoad: function () { | ||
19 | + if (app.globalData.userInfo) { | ||
20 | + this.setData({ | ||
21 | + userInfo: app.globalData.userInfo, | ||
22 | + hasUserInfo: true | ||
23 | + }) | ||
24 | + } else if (this.data.canIUse){ | ||
25 | + // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 | ||
26 | + // 所以此处加入 callback 以防止这种情况 | ||
27 | + app.userInfoReadyCallback = res => { | ||
28 | + this.setData({ | ||
29 | + userInfo: res.userInfo, | ||
30 | + hasUserInfo: true | ||
31 | + }) | ||
32 | + } | ||
33 | + } else { | ||
34 | + // 在没有 open-type=getUserInfo 版本的兼容处理 | ||
35 | + wx.getUserInfo({ | ||
36 | + success: res => { | ||
37 | + app.globalData.userInfo = res.userInfo | ||
38 | + this.setData({ | ||
39 | + userInfo: res.userInfo, | ||
40 | + hasUserInfo: true | ||
41 | + }) | ||
42 | + } | ||
43 | + }) | ||
44 | + } | ||
45 | + }, | ||
46 | + getUserInfo: function(e) { | ||
47 | + console.log(e) | ||
48 | + app.globalData.userInfo = e.detail.userInfo | ||
49 | + this.setData({ | ||
50 | + userInfo: e.detail.userInfo, | ||
51 | + hasUserInfo: true | ||
52 | + }) | ||
53 | + } | ||
54 | +}) |
pages/index/index.json
0 → 100644
pages/index/index.wxml
0 → 100644
1 | +<!--index.wxml--> | ||
2 | +<view class="container"> | ||
3 | + <view class="userinfo"> | ||
4 | + <button wx:if="{{!hasUserInfo && canIUse}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo"> 获取头像昵称 </button> | ||
5 | + <block wx:else> | ||
6 | + <image bindtap="bindViewTap" class="userinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image> | ||
7 | + <text class="userinfo-nickname">{{userInfo.nickName}}</text> | ||
8 | + </block> | ||
9 | + </view> | ||
10 | + <view class="usermotto"> | ||
11 | + <text class="user-motto">{{motto}}</text> | ||
12 | + </view> | ||
13 | +</view> |
pages/index/index.wxss
0 → 100644
1 | +/**index.wxss**/ | ||
2 | +.userinfo { | ||
3 | + display: flex; | ||
4 | + flex-direction: column; | ||
5 | + align-items: center; | ||
6 | +} | ||
7 | + | ||
8 | +.userinfo-avatar { | ||
9 | + width: 128rpx; | ||
10 | + height: 128rpx; | ||
11 | + margin: 20rpx; | ||
12 | + border-radius: 50%; | ||
13 | +} | ||
14 | + | ||
15 | +.userinfo-nickname { | ||
16 | + color: #aaa; | ||
17 | +} | ||
18 | + | ||
19 | +.usermotto { | ||
20 | + margin-top: 200px; | ||
21 | +} |
pages/login/login.js
0 → 100644
1 | +// pages/login/login.js | ||
2 | +Page({ | ||
3 | + | ||
4 | + /** | ||
5 | + * 页面的初始数据 | ||
6 | + */ | ||
7 | + data: { | ||
8 | + | ||
9 | + }, | ||
10 | + | ||
11 | + /** | ||
12 | + * 生命周期函数--监听页面加载 | ||
13 | + */ | ||
14 | + onLoad: function (options) { | ||
15 | + | ||
16 | + }, | ||
17 | + | ||
18 | + /** | ||
19 | + * 生命周期函数--监听页面初次渲染完成 | ||
20 | + */ | ||
21 | + onReady: function () { | ||
22 | + | ||
23 | + }, | ||
24 | + | ||
25 | + /** | ||
26 | + * 生命周期函数--监听页面显示 | ||
27 | + */ | ||
28 | + onShow: function () { | ||
29 | + | ||
30 | + }, | ||
31 | + | ||
32 | + /** | ||
33 | + * 生命周期函数--监听页面隐藏 | ||
34 | + */ | ||
35 | + onHide: function () { | ||
36 | + | ||
37 | + }, | ||
38 | + | ||
39 | + /** | ||
40 | + * 生命周期函数--监听页面卸载 | ||
41 | + */ | ||
42 | + onUnload: function () { | ||
43 | + | ||
44 | + }, | ||
45 | + | ||
46 | + /** | ||
47 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
48 | + */ | ||
49 | + onPullDownRefresh: function () { | ||
50 | + | ||
51 | + }, | ||
52 | + | ||
53 | + /** | ||
54 | + * 页面上拉触底事件的处理函数 | ||
55 | + */ | ||
56 | + onReachBottom: function () { | ||
57 | + | ||
58 | + }, | ||
59 | + | ||
60 | + /** | ||
61 | + * 用户点击右上角分享 | ||
62 | + */ | ||
63 | + onShareAppMessage: function () { | ||
64 | + | ||
65 | + } | ||
66 | +}) |
pages/login/login.json
0 → 100644
pages/login/login.wxml
0 → 100644
1 | +<view class="page"> | ||
2 | + <view class="ganzhi"> | ||
3 | + <image src="/img/logo3.png"></image> | ||
4 | + | ||
5 | + <view class="zhineng"> | ||
6 | + <text>感</text> | ||
7 | + <text>知</text> | ||
8 | + <text>制</text> | ||
9 | + <text>能</text> | ||
10 | + | ||
11 | + </view> | ||
12 | + | ||
13 | + | ||
14 | + </view> | ||
15 | + | ||
16 | + <view class="nameuser"> | ||
17 | + <view class="username "> | ||
18 | + <view class="userleft"> | ||
19 | + <image src="/img/ico_username.png"></image> | ||
20 | + </view> | ||
21 | + <view class="entername"> | ||
22 | + <input placeholder='请输入用户姓名' placeholder-class='name' /> | ||
23 | + </view> | ||
24 | + </view> | ||
25 | + | ||
26 | + <view class="username pass"> | ||
27 | + <view class="userleft"> | ||
28 | + <image src="/img/ico_password.png"></image> | ||
29 | + </view> | ||
30 | + <view class="entername"> | ||
31 | + <input placeholder='请输入密码' type="password" placeholder-class='name' /> | ||
32 | + </view> | ||
33 | + </view> | ||
34 | + </view> | ||
35 | + | ||
36 | + <view class="loginimg"> | ||
37 | + <image src="/img/login.png"></image> | ||
38 | + <view class="denglu">登录</view> | ||
39 | + </view> | ||
40 | + | ||
41 | + | ||
42 | + | ||
43 | +</view> |
pages/login/login.wxss
0 → 100644
1 | +page{ | ||
2 | + background: #ED9527 | ||
3 | +} | ||
4 | +.page{ | ||
5 | + overflow: hidden; | ||
6 | +} | ||
7 | +.ganzhi{ | ||
8 | + width:605rpx; | ||
9 | + height:605rpx; | ||
10 | + font-size: 0; | ||
11 | + margin: 0 auto ; | ||
12 | + position: relative | ||
13 | +} | ||
14 | +.zhineng{ | ||
15 | + font-size: 44rpx; | ||
16 | + position: absolute; | ||
17 | + bottom:50rpx; | ||
18 | + | ||
19 | + color:#fff; | ||
20 | + text-align: center; | ||
21 | + left:210rpx; | ||
22 | + z-index: 99 | ||
23 | + | ||
24 | +} | ||
25 | +.zhineng text{ | ||
26 | + margin-right:6rpx; | ||
27 | +} | ||
28 | +.username{ | ||
29 | + display:flex; | ||
30 | + align-items: center; | ||
31 | + width:600rpx; | ||
32 | + height:80rpx; | ||
33 | + margin:0 auto; | ||
34 | +} | ||
35 | +.userleft{ | ||
36 | + width:40rpx; | ||
37 | + height:40rpx; | ||
38 | + font-size: 0 | ||
39 | +} | ||
40 | +.userleft image{ | ||
41 | + width:100%; | ||
42 | + height:100%; | ||
43 | +} | ||
44 | +.entername{ | ||
45 | + width:530rpx; | ||
46 | + height:72rpx; | ||
47 | + background: #fff; | ||
48 | + border-radius: 15rpx; | ||
49 | + margin-left:30rpx; | ||
50 | + color:#C5C5C5; | ||
51 | + font-size: 35rpx; | ||
52 | + | ||
53 | + | ||
54 | +} | ||
55 | +.entername input{ | ||
56 | + width:530rpx; | ||
57 | + height:72rpx; | ||
58 | + padding: 0 30rpx; | ||
59 | + box-sizing: border-box; | ||
60 | + | ||
61 | +} | ||
62 | +.name{ | ||
63 | + color:#C5C5C5; | ||
64 | + font-size: 35rpx; | ||
65 | + | ||
66 | +} | ||
67 | +.pass{ | ||
68 | + margin-top:30rpx; | ||
69 | +} | ||
70 | +.nameuser{ | ||
71 | + margin-top:80rpx; | ||
72 | +} | ||
73 | +.loginimg{ | ||
74 | + width:320rpx; | ||
75 | + height:90rpx; | ||
76 | + margin:85rpx auto 0; | ||
77 | + position: relative | ||
78 | +} | ||
79 | +.denglu{ | ||
80 | + position: absolute; | ||
81 | + color:#fff; | ||
82 | + font-size: 42rpx; | ||
83 | + left:120rpx; | ||
84 | + top:15rpx | ||
85 | + | ||
86 | +} |
pages/logs/logs.js
0 → 100644
pages/logs/logs.json
0 → 100644
pages/logs/logs.wxml
0 → 100644
pages/logs/logs.wxss
0 → 100644
pages/mine/mine.js
0 → 100644
1 | +// pages/mine/mine.js | ||
2 | +Page({ | ||
3 | + | ||
4 | + /** | ||
5 | + * 页面的初始数据 | ||
6 | + */ | ||
7 | + data: { | ||
8 | + | ||
9 | + }, | ||
10 | + | ||
11 | + /** | ||
12 | + * 生命周期函数--监听页面加载 | ||
13 | + */ | ||
14 | + onLoad: function (options) { | ||
15 | + | ||
16 | + }, | ||
17 | + | ||
18 | + /** | ||
19 | + * 生命周期函数--监听页面初次渲染完成 | ||
20 | + */ | ||
21 | + onReady: function () { | ||
22 | + | ||
23 | + }, | ||
24 | + | ||
25 | + /** | ||
26 | + * 生命周期函数--监听页面显示 | ||
27 | + */ | ||
28 | + onShow: function () { | ||
29 | + | ||
30 | + }, | ||
31 | + | ||
32 | + /** | ||
33 | + * 生命周期函数--监听页面隐藏 | ||
34 | + */ | ||
35 | + onHide: function () { | ||
36 | + | ||
37 | + }, | ||
38 | + | ||
39 | + /** | ||
40 | + * 生命周期函数--监听页面卸载 | ||
41 | + */ | ||
42 | + onUnload: function () { | ||
43 | + | ||
44 | + }, | ||
45 | + | ||
46 | + /** | ||
47 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
48 | + */ | ||
49 | + onPullDownRefresh: function () { | ||
50 | + | ||
51 | + }, | ||
52 | + | ||
53 | + /** | ||
54 | + * 页面上拉触底事件的处理函数 | ||
55 | + */ | ||
56 | + onReachBottom: function () { | ||
57 | + | ||
58 | + }, | ||
59 | + | ||
60 | + /** | ||
61 | + * 用户点击右上角分享 | ||
62 | + */ | ||
63 | + onShareAppMessage: function () { | ||
64 | + | ||
65 | + } | ||
66 | +}) |
pages/mine/mine.json
0 → 100644
pages/mine/mine.wxml
0 → 100644
pages/mine/mine.wxss
0 → 100644
1 | +/* pages/mine/mine.wxss */ |
pages/qiye/qiye.js
0 → 100644
1 | +// pages/qiye/qiye.js | ||
2 | +Page({ | ||
3 | + | ||
4 | + /** | ||
5 | + * 页面的初始数据 | ||
6 | + */ | ||
7 | + data: { | ||
8 | + | ||
9 | + }, | ||
10 | + | ||
11 | + /** | ||
12 | + * 生命周期函数--监听页面加载 | ||
13 | + */ | ||
14 | + onLoad: function (options) { | ||
15 | + | ||
16 | + }, | ||
17 | + | ||
18 | + /** | ||
19 | + * 生命周期函数--监听页面初次渲染完成 | ||
20 | + */ | ||
21 | + onReady: function () { | ||
22 | + | ||
23 | + }, | ||
24 | + | ||
25 | + /** | ||
26 | + * 生命周期函数--监听页面显示 | ||
27 | + */ | ||
28 | + onShow: function () { | ||
29 | + | ||
30 | + }, | ||
31 | + | ||
32 | + /** | ||
33 | + * 生命周期函数--监听页面隐藏 | ||
34 | + */ | ||
35 | + onHide: function () { | ||
36 | + | ||
37 | + }, | ||
38 | + | ||
39 | + /** | ||
40 | + * 生命周期函数--监听页面卸载 | ||
41 | + */ | ||
42 | + onUnload: function () { | ||
43 | + | ||
44 | + }, | ||
45 | + | ||
46 | + /** | ||
47 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
48 | + */ | ||
49 | + onPullDownRefresh: function () { | ||
50 | + | ||
51 | + }, | ||
52 | + | ||
53 | + /** | ||
54 | + * 页面上拉触底事件的处理函数 | ||
55 | + */ | ||
56 | + onReachBottom: function () { | ||
57 | + | ||
58 | + }, | ||
59 | + | ||
60 | + /** | ||
61 | + * 用户点击右上角分享 | ||
62 | + */ | ||
63 | + onShareAppMessage: function () { | ||
64 | + | ||
65 | + } | ||
66 | +}) |
pages/qiye/qiye.json
0 → 100644
pages/qiye/qiye.wxml
0 → 100644
pages/qiye/qiye.wxss
0 → 100644
1 | +/* pages/qiye/qiye.wxss */ |
pages/shebei/shebeidetail/shebeidetail.js
0 → 100644
1 | +// pages/shebei/shebeidetail/shebeidetail.js | ||
2 | +Page({ | ||
3 | + | ||
4 | + /** | ||
5 | + * 页面的初始数据 | ||
6 | + */ | ||
7 | + data: { | ||
8 | + | ||
9 | + }, | ||
10 | + | ||
11 | + /** | ||
12 | + * 生命周期函数--监听页面加载 | ||
13 | + */ | ||
14 | + onLoad: function (options) { | ||
15 | + | ||
16 | + }, | ||
17 | + | ||
18 | + /** | ||
19 | + * 生命周期函数--监听页面初次渲染完成 | ||
20 | + */ | ||
21 | + onReady: function () { | ||
22 | + | ||
23 | + }, | ||
24 | + | ||
25 | + /** | ||
26 | + * 生命周期函数--监听页面显示 | ||
27 | + */ | ||
28 | + onShow: function () { | ||
29 | + | ||
30 | + }, | ||
31 | + | ||
32 | + /** | ||
33 | + * 生命周期函数--监听页面隐藏 | ||
34 | + */ | ||
35 | + onHide: function () { | ||
36 | + | ||
37 | + }, | ||
38 | + | ||
39 | + /** | ||
40 | + * 生命周期函数--监听页面卸载 | ||
41 | + */ | ||
42 | + onUnload: function () { | ||
43 | + | ||
44 | + }, | ||
45 | + | ||
46 | + /** | ||
47 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
48 | + */ | ||
49 | + onPullDownRefresh: function () { | ||
50 | + | ||
51 | + }, | ||
52 | + | ||
53 | + /** | ||
54 | + * 页面上拉触底事件的处理函数 | ||
55 | + */ | ||
56 | + onReachBottom: function () { | ||
57 | + | ||
58 | + }, | ||
59 | + | ||
60 | + /** | ||
61 | + * 用户点击右上角分享 | ||
62 | + */ | ||
63 | + onShareAppMessage: function () { | ||
64 | + | ||
65 | + } | ||
66 | +}) |
pages/shebei/shebeidetail/shebeidetail.json
0 → 100644
pages/shebei/shebeidetail/shebeidetail.wxml
0 → 100644
pages/shebei/shebeidetail/shebeidetail.wxss
0 → 100644
1 | +/* pages/shebei/shebeidetail/shebeidetail.wxss */ |
pages/shebei/shebeilist/shebeilist.js
0 → 100644
1 | +// pages/shebei/shebeilist/shebeilist.js | ||
2 | +Page({ | ||
3 | + | ||
4 | + /** | ||
5 | + * 页面的初始数据 | ||
6 | + */ | ||
7 | + data: { | ||
8 | + | ||
9 | + }, | ||
10 | + | ||
11 | + /** | ||
12 | + * 生命周期函数--监听页面加载 | ||
13 | + */ | ||
14 | + onLoad: function (options) { | ||
15 | + | ||
16 | + }, | ||
17 | + | ||
18 | + /** | ||
19 | + * 生命周期函数--监听页面初次渲染完成 | ||
20 | + */ | ||
21 | + onReady: function () { | ||
22 | + | ||
23 | + }, | ||
24 | + | ||
25 | + /** | ||
26 | + * 生命周期函数--监听页面显示 | ||
27 | + */ | ||
28 | + onShow: function () { | ||
29 | + | ||
30 | + }, | ||
31 | + | ||
32 | + /** | ||
33 | + * 生命周期函数--监听页面隐藏 | ||
34 | + */ | ||
35 | + onHide: function () { | ||
36 | + | ||
37 | + }, | ||
38 | + | ||
39 | + /** | ||
40 | + * 生命周期函数--监听页面卸载 | ||
41 | + */ | ||
42 | + onUnload: function () { | ||
43 | + | ||
44 | + }, | ||
45 | + | ||
46 | + /** | ||
47 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
48 | + */ | ||
49 | + onPullDownRefresh: function () { | ||
50 | + | ||
51 | + }, | ||
52 | + | ||
53 | + /** | ||
54 | + * 页面上拉触底事件的处理函数 | ||
55 | + */ | ||
56 | + onReachBottom: function () { | ||
57 | + | ||
58 | + }, | ||
59 | + | ||
60 | + /** | ||
61 | + * 用户点击右上角分享 | ||
62 | + */ | ||
63 | + onShareAppMessage: function () { | ||
64 | + | ||
65 | + } | ||
66 | +}) |
pages/shebei/shebeilist/shebeilist.json
0 → 100644
pages/shebei/shebeilist/shebeilist.wxml
0 → 100644
1 | +<view class="shebeinum"><text class="she">设备数量:</text> | ||
2 | + <text class="num"> 3</text> </view> | ||
3 | + | ||
4 | +<view class="shebelist"> | ||
5 | + | ||
6 | + <view class="shebielistitem"> | ||
7 | + <view class="car"> | ||
8 | + <view class="cartop">1车间:胶合机胶合机胶合机胶合机</view> | ||
9 | + <view class="carbottom">运行中</view> | ||
10 | + </view> | ||
11 | + <view class="day"> | ||
12 | + <view class="daytop">27.5</view> | ||
13 | + <view class="daybottom">昨日(小时)</view> | ||
14 | + </view> | ||
15 | + <view class="month"> | ||
16 | + <view class="monthtop">27.5</view> | ||
17 | + <view class="monthbottom">上月(小时)</view> | ||
18 | + </view> | ||
19 | + <view class="rowimg"> | ||
20 | + <image src="img/demo (24).png"></image> | ||
21 | + </view> | ||
22 | + | ||
23 | + </view> | ||
24 | + <view class="shebielistitem"> | ||
25 | + <view class="car"> | ||
26 | + <view class="cartop">1车间:胶合机胶合机胶合机胶合机</view> | ||
27 | + <view class="carbottom yun">运行中</view> | ||
28 | + </view> | ||
29 | + <view class="day"> | ||
30 | + <view class="daytop">27.5</view> | ||
31 | + <view class="daybottom">昨日(小时)</view> | ||
32 | + </view> | ||
33 | + <view class="month"> | ||
34 | + <view class="monthtop">27.5</view> | ||
35 | + <view class="monthbottom">上月(小时)</view> | ||
36 | + </view> | ||
37 | + <view class="rowimg"> | ||
38 | + <image src="img/demo (24).png"></image> | ||
39 | + </view> | ||
40 | + | ||
41 | + </view> | ||
42 | + <view class="shebielistitem"> | ||
43 | + <view class="car"> | ||
44 | + <view class="cartop">1车间:胶合机胶合机胶合机胶合机</view> | ||
45 | + <view class="carbottom yun">运行中</view> | ||
46 | + </view> | ||
47 | + <view class="day"> | ||
48 | + <view class="daytop">27.5</view> | ||
49 | + <view class="daybottom">昨日(小时)</view> | ||
50 | + </view> | ||
51 | + <view class="month"> | ||
52 | + <view class="monthtop">27.5</view> | ||
53 | + <view class="monthbottom">上月(小时)</view> | ||
54 | + </view> | ||
55 | + <view class="rowimg"> | ||
56 | + <image src="img/demo (24).png"></image> | ||
57 | + </view> | ||
58 | + | ||
59 | + </view> | ||
60 | + <view class="shebielistitem"> | ||
61 | + <view class="car"> | ||
62 | + <view class="cartop">1车间:胶合机胶合机胶合机胶合机</view> | ||
63 | + <view class="carbottom yun">运行中</view> | ||
64 | + </view> | ||
65 | + <view class="day"> | ||
66 | + <view class="daytop">27.5</view> | ||
67 | + <view class="daybottom">昨日(小时)</view> | ||
68 | + </view> | ||
69 | + <view class="month"> | ||
70 | + <view class="monthtop">27.5</view> | ||
71 | + <view class="monthbottom">上月(小时)</view> | ||
72 | + </view> | ||
73 | + <view class="rowimg"> | ||
74 | + <image src="img/demo (24).png"></image> | ||
75 | + </view> | ||
76 | + | ||
77 | + </view> | ||
78 | + <view class="shebielistitem"> | ||
79 | + <view class="car"> | ||
80 | + <view class="cartop">1车间:胶合机胶合机胶合机胶合机</view> | ||
81 | + <view class="carbottom noyun">未运行</view> | ||
82 | + </view> | ||
83 | + <view class="day"> | ||
84 | + <view class="daytop">27.5</view> | ||
85 | + <view class="daybottom">昨日(小时)</view> | ||
86 | + </view> | ||
87 | + <view class="month"> | ||
88 | + <view class="monthtop">27.5</view> | ||
89 | + <view class="monthbottom">上月(小时)</view> | ||
90 | + </view> | ||
91 | + <view class="rowimg"> | ||
92 | + <image src="img/demo (24).png"></image> | ||
93 | + </view> | ||
94 | + | ||
95 | + </view> | ||
96 | +</view> |
pages/shebei/shebeilist/shebeilist.wxss
0 → 100644
1 | +page { | ||
2 | + background: #fff; | ||
3 | +} | ||
4 | + | ||
5 | +.shebeinum { | ||
6 | + color: #333; | ||
7 | + font-size: 32rpx; | ||
8 | + font-weight: bold; | ||
9 | + padding: 30rpx; | ||
10 | + box-sizing: border-box; | ||
11 | + border-bottom: 1rpx solid #f5f5f5; | ||
12 | + border-top: 1rpx solid #f5f5f5; | ||
13 | + position: relative; | ||
14 | +} | ||
15 | +.she{ | ||
16 | + margin-left:18rpx; | ||
17 | +} | ||
18 | +.shebeinum::before{ | ||
19 | + content:''; | ||
20 | + display:block; | ||
21 | + width:8rpx; | ||
22 | + height:33rpx; | ||
23 | + background: #FF9400FF; | ||
24 | + position: absolute; | ||
25 | + top:33rpx; | ||
26 | + left:30rpx; | ||
27 | + | ||
28 | +} | ||
29 | + | ||
30 | +.num { | ||
31 | + margin-left: 10rpx; | ||
32 | +} | ||
33 | + | ||
34 | +.shebelist { | ||
35 | + padding: 30rpx; | ||
36 | + box-sizing: border-box; | ||
37 | +} | ||
38 | + | ||
39 | +.shebielistitem { | ||
40 | + width: 690rpx; | ||
41 | + height: 138rpx; | ||
42 | + border: 1rpx solid #f5f5f5; | ||
43 | + border-radius: 10rpx; | ||
44 | + display: flex; | ||
45 | + align-items: center; | ||
46 | + justify-content: space-around; | ||
47 | +} | ||
48 | + | ||
49 | +.cartop { | ||
50 | + width: 236rpx; | ||
51 | + font-size: 28rpx; | ||
52 | + color: #333; | ||
53 | + font-weight: bold; | ||
54 | + overflow: hidden; | ||
55 | + text-overflow: ellipsis; | ||
56 | + white-space: nowrap; | ||
57 | +} | ||
58 | + | ||
59 | +.carbottom { | ||
60 | + font-size: 20rpx; | ||
61 | + margin-top: 10rpx; | ||
62 | +} | ||
63 | + | ||
64 | +.yun { | ||
65 | + color: #eb483aff; | ||
66 | +} | ||
67 | + | ||
68 | +.noyun { | ||
69 | + color: #538aeeff; | ||
70 | +} | ||
71 | + | ||
72 | +.daytop { | ||
73 | + color: #333333ff; | ||
74 | + font-size: 28rpx; | ||
75 | +} | ||
76 | + | ||
77 | +.daybottom { | ||
78 | + color: #666666ff; | ||
79 | + font-size: 20rpx; | ||
80 | + margin-top: 10rpx; | ||
81 | +} | ||
82 | + | ||
83 | +.monthtop { | ||
84 | + color: #333333ff; | ||
85 | + font-size: 28rpx; | ||
86 | +} | ||
87 | + | ||
88 | +.monthbottom { | ||
89 | + color: #666666ff; | ||
90 | + font-size: 20rpx; | ||
91 | + margin-top: 10rpx; | ||
92 | +} |
pages/yujing/yujing.js
0 → 100644
1 | +// pages/yujing/yujing.js | ||
2 | +Page({ | ||
3 | + | ||
4 | + /** | ||
5 | + * 页面的初始数据 | ||
6 | + */ | ||
7 | + data: { | ||
8 | + | ||
9 | + }, | ||
10 | + | ||
11 | + /** | ||
12 | + * 生命周期函数--监听页面加载 | ||
13 | + */ | ||
14 | + onLoad: function (options) { | ||
15 | + | ||
16 | + }, | ||
17 | + | ||
18 | + /** | ||
19 | + * 生命周期函数--监听页面初次渲染完成 | ||
20 | + */ | ||
21 | + onReady: function () { | ||
22 | + | ||
23 | + }, | ||
24 | + | ||
25 | + /** | ||
26 | + * 生命周期函数--监听页面显示 | ||
27 | + */ | ||
28 | + onShow: function () { | ||
29 | + | ||
30 | + }, | ||
31 | + | ||
32 | + /** | ||
33 | + * 生命周期函数--监听页面隐藏 | ||
34 | + */ | ||
35 | + onHide: function () { | ||
36 | + | ||
37 | + }, | ||
38 | + | ||
39 | + /** | ||
40 | + * 生命周期函数--监听页面卸载 | ||
41 | + */ | ||
42 | + onUnload: function () { | ||
43 | + | ||
44 | + }, | ||
45 | + | ||
46 | + /** | ||
47 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
48 | + */ | ||
49 | + onPullDownRefresh: function () { | ||
50 | + | ||
51 | + }, | ||
52 | + | ||
53 | + /** | ||
54 | + * 页面上拉触底事件的处理函数 | ||
55 | + */ | ||
56 | + onReachBottom: function () { | ||
57 | + | ||
58 | + }, | ||
59 | + | ||
60 | + /** | ||
61 | + * 用户点击右上角分享 | ||
62 | + */ | ||
63 | + onShareAppMessage: function () { | ||
64 | + | ||
65 | + } | ||
66 | +}) |
pages/yujing/yujing.json
0 → 100644
pages/yujing/yujing.wxml
0 → 100644
pages/yujing/yujing.wxss
0 → 100644
1 | +/* pages/yujing/yujing.wxss */ |
project.config.json
0 → 100644
1 | +{ | ||
2 | + "description": "项目配置文件", | ||
3 | + "packOptions": { | ||
4 | + "ignore": [] | ||
5 | + }, | ||
6 | + "setting": { | ||
7 | + "urlCheck": true, | ||
8 | + "es6": true, | ||
9 | + "postcss": true, | ||
10 | + "minified": true, | ||
11 | + "newFeature": true, | ||
12 | + "autoAudits": false | ||
13 | + }, | ||
14 | + "compileType": "miniprogram", | ||
15 | + "libVersion": "2.8.0", | ||
16 | + "appid": "wx1f51f42105b63343", | ||
17 | + "projectname": "APPUI", | ||
18 | + "debugOptions": { | ||
19 | + "hidedInDevtools": [] | ||
20 | + }, | ||
21 | + "isGameTourist": false, | ||
22 | + "simulatorType": "wechat", | ||
23 | + "simulatorPluginLibVersion": {}, | ||
24 | + "condition": { | ||
25 | + "search": { | ||
26 | + "current": -1, | ||
27 | + "list": [] | ||
28 | + }, | ||
29 | + "conversation": { | ||
30 | + "current": -1, | ||
31 | + "list": [] | ||
32 | + }, | ||
33 | + "game": { | ||
34 | + "currentL": -1, | ||
35 | + "list": [] | ||
36 | + }, | ||
37 | + "miniprogram": { | ||
38 | + "current": -1, | ||
39 | + "list": [] | ||
40 | + } | ||
41 | + } | ||
42 | +} |
sitemap.json
0 → 100644
utils/util.js
0 → 100644
1 | +const formatTime = date => { | ||
2 | + const year = date.getFullYear() | ||
3 | + const month = date.getMonth() + 1 | ||
4 | + const day = date.getDate() | ||
5 | + const hour = date.getHours() | ||
6 | + const minute = date.getMinutes() | ||
7 | + const second = date.getSeconds() | ||
8 | + | ||
9 | + return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':') | ||
10 | +} | ||
11 | + | ||
12 | +const formatNumber = n => { | ||
13 | + n = n.toString() | ||
14 | + return n[1] ? n : '0' + n | ||
15 | +} | ||
16 | + | ||
17 | +module.exports = { | ||
18 | + formatTime: formatTime | ||
19 | +} |
-
请 注册 或 登录 后发表评论