diff --git a/README.md b/README.md new file mode 100644 index 0000000..2b12149 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# MiniProgram +微信小程序 +静态页面 +second-静态页面 +imgs/static-图标 +staticSecondPage/staticSecondPage.wxss-样式 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 + +}) 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}} + + + + + + + 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"; 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 + +}) 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}} + + + + + + + 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"; 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 + +}) 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}} + + + + + + + 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"; 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 + +}) 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}} + + + + + + + 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"; 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 + +}) 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}} + + + + + + + + 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"; 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 + +}) 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}} + + + + + + + + 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"; 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 + +}) 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 @@ - - - -