From 306a4dbfc6ad763ce154710e31b1db88c0d0462b Mon Sep 17 00:00:00 2001 From: SongOf <46475785+SongOf@users.noreply.github.com> Date: Tue, 15 Jan 2019 21:35:46 +0800 Subject: [PATCH 01/39] Update ai.wxml --- pages/second/ai/ai.wxml | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/pages/second/ai/ai.wxml b/pages/second/ai/ai.wxml index 33bbd93..58d3c1e 100644 --- a/pages/second/ai/ai.wxml +++ b/pages/second/ai/ai.wxml @@ -1,4 +1,28 @@ - - - + + + {{item.name}} + + + + + + + + + + {{item.cate}} + + + + + {{val.name}} + + + + + + + From 2f7f9959148d26712e49b3b381b26b7df313d8e3 Mon Sep 17 00:00:00 2001 From: SongOf <46475785+SongOf@users.noreply.github.com> Date: Wed, 16 Jan 2019 11:05:00 +0800 Subject: [PATCH 02/39] Update ai.js --- pages/second/ai/ai.js | 111 +++++++++++++++++++----------------------- 1 file changed, 50 insertions(+), 61 deletions(-) diff --git a/pages/second/ai/ai.js b/pages/second/ai/ai.js index 971f646..a1f6931 100644 --- a/pages/second/ai/ai.js +++ b/pages/second/ai/ai.js @@ -1,66 +1,55 @@ // pages/second/ai/ai.js Page({ - - /** - * 页面的初始数据 - */ data: { - - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { + category: [ + { name: '语音助手', id: 'vioce-Assistant' }, + { name: '聊天室', id: 'chatRoom' }, + { name: '其他', id: 'others' } + ], + detail: [ + { + "id": "vioce-Assistant", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "语音助手", + "detail": [] + }, + { + "id": "chatRoom", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "聊天室", + "detail": [] + }, + { + "id": "others", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "其他", + "detail": [{ + }] + }, + ], + curIndex: 0, + isScroll: false, + toView: 'vioce-Assistant' + }, + onReady() { + }, + switchTab(e) { + const self = this; + this.setData({ + isScroll: true + }) + setTimeout(function () { + self.setData({ + toView: e.target.dataset.id, + curIndex: e.target.dataset.index + }) + }, 0) + setTimeout(function () { + self.setData({ + isScroll: false + }) + }, 1) } -}) \ No newline at end of file + +}) From 26437ba7dee0a16687308f13a0901cc275f3e1b4 Mon Sep 17 00:00:00 2001 From: SongOf <46475785+SongOf@users.noreply.github.com> Date: Wed, 16 Jan 2019 11:06:18 +0800 Subject: [PATCH 03/39] Update ai.wxss --- pages/second/ai/ai.wxss | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pages/second/ai/ai.wxss b/pages/second/ai/ai.wxss index 7f32cc8..a9b0c67 100644 --- a/pages/second/ai/ai.wxss +++ b/pages/second/ai/ai.wxss @@ -1,6 +1,3 @@ /* pages/second/ai/ai.wxss */ @import "../../tpls/base.wxss"; -page{ - width: 100%; - height: 100%; - } \ No newline at end of file +@import "../../tpls/staticSecondPage/staticSecondPage.wxss"; From 5aa946bdd21e4000266f6f40581e665949fdfa89 Mon Sep 17 00:00:00 2001 From: SongOf <46475785+SongOf@users.noreply.github.com> Date: Wed, 16 Jan 2019 11:28:26 +0800 Subject: [PATCH 04/39] Update alert.js --- pages/second/alert/alert.js | 133 ++++++++++++++++++++---------------- 1 file changed, 74 insertions(+), 59 deletions(-) diff --git a/pages/second/alert/alert.js b/pages/second/alert/alert.js index 4f5394f..57e408d 100644 --- a/pages/second/alert/alert.js +++ b/pages/second/alert/alert.js @@ -1,66 +1,81 @@ // pages/second/alert/alert.js Page({ - - /** - * 页面的初始数据 - */ data: { - - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - + category: [ + { name: '私家车安防', id: 'carGuard' }, + { name: '家居安防', id: 'homeGuard' }, + { name: '企业安防', id: 'corporateGuard' }, + { name: '校园安防', id: 'campusGuard' }, + { name: '其他', id: 'others' } + ], + detail: [ + { + "id": "carGuard", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "私家车安防", + "detail":[{ + "thumb": "/imgs/static/car.jpg", + "name":"1号" + }] + }, + { + "id": "homeGuard", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "家居安防", + "detail": [{ + "thumb": "/imgs/index/smartCommunity.png", + "name": "A座" + }] + }, + { + "id": "corporateGuard", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "企业安防", + "detail": [{ + "thumb": "/imgs/index/smartCommunity.png", + "name": "冠川智能" + }] + }, + { + "id": "campusGuard", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "校园安防", + "detail": [{ + "thumb": "/imgs/index/smartSchool.png", + "name": "红星高中" + }] + }, + { + "id": "others", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "其他", + "detail": [{ + }] + }, + ], + curIndex: 0, + isScroll: false, + toView: 'carGuard' }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - + onReady() { }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { + switchTab(e) { + const self = this; + this.setData({ + isScroll: true + }) + setTimeout(function () { + self.setData({ + toView: e.target.dataset.id, + curIndex: e.target.dataset.index + }) + }, 0) + setTimeout(function () { + self.setData({ + isScroll: false + }) + }, 1) } -}) \ No newline at end of file + +}) From 853ff3d43380f40d9f6de0e895af7d9d8d5ab0d0 Mon Sep 17 00:00:00 2001 From: SongOf <46475785+SongOf@users.noreply.github.com> Date: Wed, 16 Jan 2019 11:29:11 +0800 Subject: [PATCH 05/39] Update alert.wxml --- pages/second/alert/alert.wxml | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/pages/second/alert/alert.wxml b/pages/second/alert/alert.wxml index d097ea4..e45be60 100644 --- a/pages/second/alert/alert.wxml +++ b/pages/second/alert/alert.wxml @@ -1,4 +1,28 @@ - - - + + + {{item.name}} + + + + + + + + + + {{item.cate}} + + + + + {{val.name}} + + + + + + + From a7565b6076233e646b2f98c6d3e77974f38bd07a Mon Sep 17 00:00:00 2001 From: SongOf <46475785+SongOf@users.noreply.github.com> Date: Wed, 16 Jan 2019 11:29:38 +0800 Subject: [PATCH 06/39] Update alert.wxss --- pages/second/alert/alert.wxss | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pages/second/alert/alert.wxss b/pages/second/alert/alert.wxss index e0459ed..ed91127 100644 --- a/pages/second/alert/alert.wxss +++ b/pages/second/alert/alert.wxss @@ -1,6 +1,3 @@ /* pages/second/alert/alert.wxss */ @import "../../tpls/base.wxss"; -page{ - width: 100%; - height: 100%; - } \ No newline at end of file +@import "../../tpls/staticSecondPage/staticSecondPage.wxss"; From 5159e44f6a38c9e03f4f37a64cbc24495019f7c5 Mon Sep 17 00:00:00 2001 From: SongOf <46475785+SongOf@users.noreply.github.com> Date: Wed, 16 Jan 2019 11:31:07 +0800 Subject: [PATCH 07/39] Update city.js --- pages/second/city/city.js | 129 +++++++++++++++++++++----------------- 1 file changed, 70 insertions(+), 59 deletions(-) diff --git a/pages/second/city/city.js b/pages/second/city/city.js index 1716107..d2a7c41 100644 --- a/pages/second/city/city.js +++ b/pages/second/city/city.js @@ -1,66 +1,77 @@ // pages/second/city/city.js Page({ - - /** - * 页面的初始数据 - */ data: { - - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - + category: [ + { name: '政务', id: 'gov-affairs' }, + { name: '交通', id: 'traffic' }, + { name: '医疗', id: 'hospital' }, + { name: '教育', id: 'education' }, + { name: '食居', id: 'food-hotel' }, + { name: '其他', id: 'others' } + ], + detail: [ + { + "id": "gov-affairs", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "政务", + "detail": [] + }, + { + "id": "traffic", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "交通", + "detail": [] + }, + { + "id": "hospital", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "医疗", + "detail": [] + }, + { + "id": "education", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "教育", + "detail": [] + }, + { + "id": "food-hotel", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "食居", + "detail": [{ + }] + }, + { + "id": "others", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "其他", + "detail": [{ + }] + }, + ], + curIndex: 0, + isScroll: false, + toView: 'gov-affairs' }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - + onReady() { }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { + switchTab(e) { + const self = this; + this.setData({ + isScroll: true + }) + setTimeout(function () { + self.setData({ + toView: e.target.dataset.id, + curIndex: e.target.dataset.index + }) + }, 0) + setTimeout(function () { + self.setData({ + isScroll: false + }) + }, 1) } -}) \ No newline at end of file + +}) From e0c41561b92adc1b4639bab86cac56e8e9c994c5 Mon Sep 17 00:00:00 2001 From: SongOf <46475785+SongOf@users.noreply.github.com> Date: Wed, 16 Jan 2019 11:31:42 +0800 Subject: [PATCH 08/39] Update city.wxml --- pages/second/city/city.wxml | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/pages/second/city/city.wxml b/pages/second/city/city.wxml index 692ddeb..13b0342 100644 --- a/pages/second/city/city.wxml +++ b/pages/second/city/city.wxml @@ -1,4 +1,28 @@ - - - \ No newline at end of file + + + {{item.name}} + + + + + + + + + + {{item.cate}} + + + + + {{val.name}} + + + + + + + From ca6cb413002bd6e834ea8fcf87d35eb04ab450da Mon Sep 17 00:00:00 2001 From: SongOf <46475785+SongOf@users.noreply.github.com> Date: Wed, 16 Jan 2019 11:32:13 +0800 Subject: [PATCH 09/39] Update city.wxss --- pages/second/city/city.wxss | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pages/second/city/city.wxss b/pages/second/city/city.wxss index 8cb9184..73b0610 100644 --- a/pages/second/city/city.wxss +++ b/pages/second/city/city.wxss @@ -1,6 +1,3 @@ /* pages/second/city/city.wxss */ @import "../../tpls/base.wxss"; -page{ - width: 100%; - height: 100%; - } \ No newline at end of file +@import "../../tpls/staticSecondPage/staticSecondPage.wxss"; From d86864ff9f4ff0dee7d1967c9b595eb40e5ceefd Mon Sep 17 00:00:00 2001 From: SongOf <46475785+SongOf@users.noreply.github.com> Date: Wed, 16 Jan 2019 11:32:58 +0800 Subject: [PATCH 10/39] Update community.js --- pages/second/community/community.js | 157 +++++++++++++++++----------- 1 file changed, 98 insertions(+), 59 deletions(-) diff --git a/pages/second/community/community.js b/pages/second/community/community.js index ec94953..0203fa8 100644 --- a/pages/second/community/community.js +++ b/pages/second/community/community.js @@ -1,66 +1,105 @@ // pages/second/community/community.js Page({ - - /** - * 页面的初始数据 - */ data: { - - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - + category: [ + { name: '停车', id: 'carParking' }, + { name: '便利店', id: 'store' }, + { name: '商场', id: 'mall' }, + { name: '医院', id: 'hospital' }, + { name: '学校', id: 'school' }, + { name: '安保', id: 'safeGuard' }, + { name: '其他', id: 'others' } + ], + detail: [ + { + "id": "carParking", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "停车", + "detail": [{ + }] + }, + { + "id": "store", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "便利店", + "detail": [{ + "thumb": "/imgs/index/smartCommunity.png", + "name": "XXXX便利店" + }] + }, + { + "id": "mall", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "商场", + "detail": [{ + "thumb": "/imgs/index/smartCommunity.png", + "name": "XXX商场" + }] + }, + { + "id": "hospital", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "医院", + "detail": [{ + "thumb": "/imgs/static/hos.jpg", + "name": "XXX医院" + }] + }, + { + "id": "school", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "学校", + "detail": [{ + "thumb": "/imgs/index/smartSchool.png", + "name": "XXX小学" + }, + { + "thumb": "/imgs/index/smartSchool.png", + "name": "XXX中学" + }, + { + "thumb": "/imgs/index/smartSchool.png", + "name": "XXX中学" + }] + }, + { + "id": "safeGuard", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "安保", + "detail": [{ + }] + }, + { + "id": "others", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "其他", + "detail": [{ + }] + }, + ], + curIndex: 0, + isScroll: false, + toView: 'carParking' }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - + onReady() { }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { + switchTab(e) { + const self = this; + this.setData({ + isScroll: true + }) + setTimeout(function () { + self.setData({ + toView: e.target.dataset.id, + curIndex: e.target.dataset.index + }) + }, 0) + setTimeout(function () { + self.setData({ + isScroll: false + }) + }, 1) } -}) \ No newline at end of file + +}) From 7c490e26369b4cbf24bb76b88acaf82c3914751d Mon Sep 17 00:00:00 2001 From: SongOf <46475785+SongOf@users.noreply.github.com> Date: Wed, 16 Jan 2019 11:33:23 +0800 Subject: [PATCH 11/39] Update community.wxml --- pages/second/community/community.wxml | 30 ++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/pages/second/community/community.wxml b/pages/second/community/community.wxml index 36b6bb7..5335c55 100644 --- a/pages/second/community/community.wxml +++ b/pages/second/community/community.wxml @@ -1,4 +1,28 @@ - - - + + + {{item.name}} + + + + + + + + + + {{item.cate}} + + + + + {{val.name}} + + + + + + + From 039632dfeeaed60b81d798ff355a70c7fdbd6373 Mon Sep 17 00:00:00 2001 From: SongOf <46475785+SongOf@users.noreply.github.com> Date: Wed, 16 Jan 2019 11:33:47 +0800 Subject: [PATCH 12/39] Update community.wxss --- pages/second/community/community.wxss | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pages/second/community/community.wxss b/pages/second/community/community.wxss index dfe9a34..ef6a050 100644 --- a/pages/second/community/community.wxss +++ b/pages/second/community/community.wxss @@ -1,6 +1,3 @@ /* pages/second/community/community.wxss */ @import "../../tpls/base.wxss"; -page{ - width: 100%; - height: 100%; - } \ No newline at end of file +@import "../../tpls/staticSecondPage/staticSecondPage.wxss"; From 98e169ebd24701d5616d99e159e080134e2ab0b0 Mon Sep 17 00:00:00 2001 From: SongOf <46475785+SongOf@users.noreply.github.com> Date: Wed, 16 Jan 2019 11:36:54 +0800 Subject: [PATCH 13/39] Update farm.js --- pages/second/farm/farm.js | 153 +++++++++++++++++++++++--------------- 1 file changed, 94 insertions(+), 59 deletions(-) diff --git a/pages/second/farm/farm.js b/pages/second/farm/farm.js index 82f5f4e..48f626c 100644 --- a/pages/second/farm/farm.js +++ b/pages/second/farm/farm.js @@ -1,66 +1,101 @@ // pages/second/farm/farm.js Page({ - - /** - * 页面的初始数据 - */ data: { - - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - + category: [ + { name: '温度', id: 'temperature' }, + { name: '湿度', id: 'wet' }, + { name: '虫害', id: 'warm' }, + { name: '光照', id: 'light' }, + { name: '其他', id: 'others' } + ], + detail: [ + { + "id": "temperature", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "温度", + "detail": [{ + "thumb": "/imgs/static/tem.jpg", + "name": "东二区" + }, + { + "thumb": "/imgs/static/tem.jpg", + "name": "南一区" + }, + { + "thumb": "/imgs/static/tem.jpg", + "name": "北一区" + }] + }, + { + "id": "wet", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "湿度", + "detail": [{ + "thumb": "/imgs/static/wet.jpg", + "name": "西二区" + }, + { + "thumb": "/imgs/static/wet.jpg", + "name": "东一区" + }] + }, + { + "id": "warm", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "虫害", + "detail": [{ + "thumb": "/imgs/static/bug.jpg", + "name": "室内一区" + }, + { + "thumb": "/imgs/static/bug.jpg", + "name": "室内二区" + }, + { + "thumb": "/imgs/static/bug.jpg", + "name": "室外一区" + }] + }, + { + "id": "light", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "光照", + "detail": [{ + "thumb": "/imgs/test/lightSensor.png", + "name": "室内一区" + }] + }, + { + "id": "others", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "其他", + "detail": [{ + }] + }, + ], + curIndex: 0, + isScroll: false, + toView: 'carGuard' }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - + onReady() { }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { + switchTab(e) { + const self = this; + this.setData({ + isScroll: true + }) + setTimeout(function () { + self.setData({ + toView: e.target.dataset.id, + curIndex: e.target.dataset.index + }) + }, 0) + setTimeout(function () { + self.setData({ + isScroll: false + }) + }, 1) } -}) \ No newline at end of file + +}) From f4f3bc357aacc42813f376f5d3b821a60218d2a9 Mon Sep 17 00:00:00 2001 From: SongOf <46475785+SongOf@users.noreply.github.com> Date: Wed, 16 Jan 2019 11:37:20 +0800 Subject: [PATCH 14/39] Update farm.wxml --- pages/second/farm/farm.wxml | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/pages/second/farm/farm.wxml b/pages/second/farm/farm.wxml index 6970276..4d134ff 100644 --- a/pages/second/farm/farm.wxml +++ b/pages/second/farm/farm.wxml @@ -1,4 +1,29 @@ - - - + + + {{item.name}} + + + + + + + + + + {{item.cate}} + + + + + {{val.name}} + + + + + + + + From e8bf03819e67619334c04dc1822d3d90ab6f6da9 Mon Sep 17 00:00:00 2001 From: SongOf <46475785+SongOf@users.noreply.github.com> Date: Wed, 16 Jan 2019 11:37:49 +0800 Subject: [PATCH 15/39] Update farm.wxss --- pages/second/farm/farm.wxss | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pages/second/farm/farm.wxss b/pages/second/farm/farm.wxss index 560f8dc..a8a01ef 100644 --- a/pages/second/farm/farm.wxss +++ b/pages/second/farm/farm.wxss @@ -1,6 +1,3 @@ /* pages/second/farm/farm.wxss */ @import "../../tpls/base.wxss"; -page{ - width: 100%; - height: 100%; - } \ No newline at end of file +@import "../../tpls/staticSecondPage/staticSecondPage.wxss"; From 7a030c349ebe0f382c6c9a7ef3986aa2477a0340 Mon Sep 17 00:00:00 2001 From: SongOf <46475785+SongOf@users.noreply.github.com> Date: Wed, 16 Jan 2019 11:38:38 +0800 Subject: [PATCH 16/39] Update firecontrol.js --- pages/second/firecontrol/firecontrol.js | 133 +++++++++++++----------- 1 file changed, 74 insertions(+), 59 deletions(-) diff --git a/pages/second/firecontrol/firecontrol.js b/pages/second/firecontrol/firecontrol.js index ebf71f5..4b92c1c 100644 --- a/pages/second/firecontrol/firecontrol.js +++ b/pages/second/firecontrol/firecontrol.js @@ -1,66 +1,81 @@ // pages/second/firecontrol/firecontrol.js Page({ - - /** - * 页面的初始数据 - */ data: { - - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - + category: [ + { name: '私家车消防', id: 'carFireAlarm' }, + { name: '家居消防', id: 'homeFireAlarm' }, + { name: '企业消防', id: 'corporateFireAlarm' }, + { name: '校园消防', id: 'campusFireAlarm' }, + { name: '其他', id: 'others' } + ], + detail: [ + { + "id": "carFireAlarm", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "私家车消防", + "detail": [{ + "thumb": "/imgs/static/car.jpg", + "name": "1号" + }] + }, + { + "id": "homeFireAlarm", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "家居消防", + "detail": [{ + "thumb": "/imgs/index/smartCommunity.png", + "name": "A座" + }] + }, + { + "id": "corporateFireAlarm", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "企业消防", + "detail": [{ + "thumb": "/imgs/index/smartCommunity.png", + "name": "冠川智能" + }] + }, + { + "id": "campusFireAlarm", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "校园消防", + "detail": [{ + "thumb": "/imgs/index/smartSchool.png", + "name": "北邮" + }] + }, + { + "id": "others", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "其他", + "detail": [{ + }] + }, + ], + curIndex: 0, + isScroll: false, + toView: 'carFireAlarm' }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - + onReady() { }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { + switchTab(e) { + const self = this; + this.setData({ + isScroll: true + }) + setTimeout(function () { + self.setData({ + toView: e.target.dataset.id, + curIndex: e.target.dataset.index + }) + }, 0) + setTimeout(function () { + self.setData({ + isScroll: false + }) + }, 1) } -}) \ No newline at end of file + +}) From d70bfd7196e670f45cdcf5cb5a075413fe5ed60b Mon Sep 17 00:00:00 2001 From: SongOf <46475785+SongOf@users.noreply.github.com> Date: Wed, 16 Jan 2019 11:39:05 +0800 Subject: [PATCH 17/39] Update firecontrol.wxml --- pages/second/firecontrol/firecontrol.wxml | 31 ++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/pages/second/firecontrol/firecontrol.wxml b/pages/second/firecontrol/firecontrol.wxml index a569f81..6017492 100644 --- a/pages/second/firecontrol/firecontrol.wxml +++ b/pages/second/firecontrol/firecontrol.wxml @@ -1,4 +1,29 @@ - - - + + + {{item.name}} + + + + + + + + + + {{item.cate}} + + + + + {{val.name}} + + + + + + + + From 7ddc828753ea9d4de301d61421110003d17c4497 Mon Sep 17 00:00:00 2001 From: SongOf <46475785+SongOf@users.noreply.github.com> Date: Wed, 16 Jan 2019 11:39:33 +0800 Subject: [PATCH 18/39] Update firecontrol.wxss --- pages/second/firecontrol/firecontrol.wxss | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pages/second/firecontrol/firecontrol.wxss b/pages/second/firecontrol/firecontrol.wxss index e3c640c..c95ef11 100644 --- a/pages/second/firecontrol/firecontrol.wxss +++ b/pages/second/firecontrol/firecontrol.wxss @@ -1,6 +1,3 @@ /* pages/second/firecontrol/firecontrol.wxss */ @import "../../tpls/base.wxss"; -page{ - width: 100%; - height: 100%; - } \ No newline at end of file +@import "../../tpls/staticSecondPage/staticSecondPage.wxss"; From a6942fb3fb597a0fbe06a1b3ba081e3805a065eb Mon Sep 17 00:00:00 2001 From: SongOf <46475785+SongOf@users.noreply.github.com> Date: Wed, 16 Jan 2019 11:40:52 +0800 Subject: [PATCH 19/39] Update hotel.js --- pages/second/hotel/hotel.js | 177 +++++++++++++++++++++++++----------- 1 file changed, 122 insertions(+), 55 deletions(-) diff --git a/pages/second/hotel/hotel.js b/pages/second/hotel/hotel.js index 91881b1..b13c1f7 100644 --- a/pages/second/hotel/hotel.js +++ b/pages/second/hotel/hotel.js @@ -1,66 +1,133 @@ // pages/second/hotel/hotel.js const app = getApp() Page({ - - /** - * 页面的初始数据 - */ data: { - - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - this.setData({ - netStatus: app.globalData.netStatus - }); + category: [ + { name: '酒店业务', id: 'service' }, + { name: '门禁', id: 'door-lock' }, + { name: '照明灯', id: 'lamp' }, + { name: '中央空调', id: 'cac' }, + { name: '窗帘', id: 'curtain' }, + { name: '插座', id: 'soc' }, + { name: 'Wifi', id: 'wifi' }, + { name: '其他', id: 'others' }, + ], + detail: [ + { + "id": "service", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "酒店业务", + "detail": [{ + "thumb": "/imgs/static/phone.jpg", + "name": "前台咨询" + }, + { + "thumb": "/imgs/static/dining.jpg", + "name": "叫餐" + }] + }, + { + "id": "door-lock", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "门禁", + "detail": [{ + "thumb": "/imgs/test/smartLock.png", + "name": "一键开门" + }] + }, + { + "id": "lamp", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "照明灯", + "detail": [{ + "thumb": "/imgs/test/switch@off.png", + "name": "主灯" + }, + { + "thumb": "/imgs/test/switch@off.png", + "name": "台灯" + }, + { + "thumb": "/imgs/test/switch@off.png", + "name": "卫生间灯" + }] + }, + { + "id": "cac", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "中央空调", + "detail": [{ + "thumb": "/imgs/static/tem.jpg", + "name": "温度" + }, + { + "thumb": "/imgs/static/wet.jpg", + "name": "湿度" + }, + { + "thumb": "/imgs/static/wind.jpg", + "name": "风速" + }, + ] + }, + { + "id": "curtain", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "窗帘", + "detail": [{ + "thumb": "/imgs/test/curtain.png", + "name": "主窗帘" + }] + }, + { + "id": "soc", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "插座", + "detail": [{ + "thumb": "/imgs/test/socket@off.png", + "name": "插座A" + }] + }, + { + "id": "wifi", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "Wifi", + "detail": [{ + "thumb": "/imgs/static/wifi.jpg", + "name": "一键接入" + }] + }, + { + "id": "others", + "banner": "/imgs/swiper/swiper-03.jpg", + "cate": "其他", + "detail": [{ + }] + }, + ], + curIndex: 0, + isScroll: false, + toView: 'service' }, - - //获取入住号 - getHomeNumber:function(e){ - let that = this - let homeNumber = e.detail.value // 获取输入框的数据 - that.setData({ - homeNumber:homeNumber - }); + onReady() { }, - - //获取手机号 - getPhone: function (e) { - let that = this - let phone = e.detail.value // 获取输入框的数据 - that.setData({ - phone: phone - }); - }, - - loginHotel:function(){ + switchTab(e) { + const self = this; this.setData({ - netStatus: app.globalData.netStatus - }); - var phone = this.data.phone; - var homeNumber = this.data.homeNumber; - if(phone == undefined){ - wx.showToast({ - title: '请输入您的入住号', - icon:'none', - duration:2500, + isScroll: true + }) + setTimeout(function () { + self.setData({ + toView: e.target.dataset.id, + curIndex: e.target.dataset.index }) - }else{ - wx.showToast({ - title: '请核实您的手机号和入住号', - icon: 'none', - duration: 2500, + }, 0) + setTimeout(function () { + self.setData({ + isScroll: false }) - } - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { + }, 1) } -}) \ No newline at end of file + +}) From 0381dfeb167cd69e24ffc3f2d710611e3eb8536e Mon Sep 17 00:00:00 2001 From: SongOf <46475785+SongOf@users.noreply.github.com> Date: Wed, 16 Jan 2019 11:41:37 +0800 Subject: [PATCH 20/39] Update hotel.wxml --- pages/second/hotel/hotel.wxml | 44 +++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/pages/second/hotel/hotel.wxml b/pages/second/hotel/hotel.wxml index 7db5d73..7ac3264 100644 --- a/pages/second/hotel/hotel.wxml +++ b/pages/second/hotel/hotel.wxml @@ -1,20 +1,28 @@ - - - -