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 @@
-
-
-
-
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+
+ {{item.cate}}
+
+
+
+
+ {{val.name}}
+
+
+
+
+
+
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/second/hotel/hotel.wxss b/pages/second/hotel/hotel.wxss
index 706571a..4449e40 100644
--- a/pages/second/hotel/hotel.wxss
+++ b/pages/second/hotel/hotel.wxss
@@ -1,58 +1,3 @@
/* pages/second/hotel/hotel.wxss */
@import "../../tpls/base.wxss";
- @import "../../tpls/roll/roll_tpl.wxss";
-page{
- width: 100%;
- height: 100%;
-}
-
-.loginHotel{
- width: 100%;
- display: flex;
- flex-direction:column;
- align-items: center;
- padding:0 60rpx;
- box-sizing: border-box;
- background-size: 100% 100%;
- position: absolute;
- top: 230rpx;
-}
-.usercontainer{
- position:relative;
- margin-top:80rpx;
-}
-.emailinfo{
- position:absolute;
- top:50%;
- margin-top:-20rpx;
- right:0rpx;
- width: 40rpx;
- height: 40rpx;
-}
-input{
- width:600rpx;
- font-size:45rpx;
- height: 60rpx;
- padding-left:35px;
- box-sizing: border-box;
- color: #F0BC42;
-}
-
-.input-placeholder{
- color: #F0BC42;
- font-size: 40rpx;
-}
-.user{
- border-bottom:1rpx solid #F0BC42;
-}
-.btn{
- width:600rpx;
- height:80rpx;
- margin-top:80rpx;
- line-height: 80rpx;
- background-color:#F0BC42!important;
- font-size:40rpx;
- color:#ffffff;
- text-align: center;
- border-radius:10rpx;
-}
\ No newline at end of file
+@import "../../tpls/staticSecondPage/staticSecondPage.wxss";
diff --git a/pages/second/office/office.js b/pages/second/office/office.js
index 7c185e7..66e04c8 100644
--- a/pages/second/office/office.js
+++ b/pages/second/office/office.js
@@ -1,66 +1,77 @@
// pages/second/office/office.js
Page({
-
- /**
- * 页面的初始数据
- */
data: {
-
- },
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
-
- },
-
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
-
+ category: [
+ { name: '管理人员', id: 'exc' },
+ { name: '人事部', id: 'hr' },
+ { name: '销售部', id: 'sale-club' },
+ { name: '研发部', id: 'study-club' },
+ { name: '新员工', id: 'newWorker' },
+ { name: '其他', id: 'others' }
+ ],
+ detail: [
+ {
+ "id": "exc",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "管理人员",
+ "detail": []
+ },
+ {
+ "id": "hr",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "人事部",
+ "detail": []
+ },
+ {
+ "id": "sale-club",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "销售部",
+ "detail": []
+ },
+ {
+ "id": "study-club",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "研发部",
+ "detail": []
+ },
+ {
+ "id": "newWorker",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "新员工",
+ "detail": [{
+ }]
+ },
+ {
+ "id": "others",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "其他",
+ "detail": [{
+ }]
+ },
+ ],
+ curIndex: 0,
+ isScroll: false,
+ toView: 'exc'
},
-
- /**
- * 页面上拉触底事件的处理函数
- */
- 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/office/office.wxml b/pages/second/office/office.wxml
index d82a54a..f0762c2 100644
--- a/pages/second/office/office.wxml
+++ b/pages/second/office/office.wxml
@@ -1,4 +1,28 @@
-
-
-
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+
+ {{item.cate}}
+
+
+
+
+ {{val.name}}
+
+
+
+
+
+
+
diff --git a/pages/second/office/office.wxss b/pages/second/office/office.wxss
index ef220ee..7d49af6 100644
--- a/pages/second/office/office.wxss
+++ b/pages/second/office/office.wxss
@@ -1,6 +1,3 @@
/* pages/second/office/office.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/old/old.js b/pages/second/old/old.js
index c20113d..4daf517 100644
--- a/pages/second/old/old.js
+++ b/pages/second/old/old.js
@@ -1,66 +1,69 @@
// pages/second/old/old.js
Page({
-
- /**
- * 页面的初始数据
- */
data: {
-
- },
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
-
- },
-
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
-
+ category: [
+ { name: '被看护人信息', id: 'info' },
+ { name: '被看护人位置', id: 'location' },
+ { name: '被看护人安全', id: 'health-info' },
+ { name: '其他', id: 'others' }
+ ],
+ detail: [
+ {
+ "id": "info",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "被看护人信息",
+ "detail": []
+ },
+ {
+ "id": "location",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "被看护人位置",
+ "detail": []
+ },
+ {
+ "id": "health-info",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "被看护人安全",
+ "detail": [{
+ "thumb": "70/min",
+ "name": "心率"
+ },
+ {
+ "thumb": "120/70 mmHg",
+ "name": "血压"
+ }]
+ },
+ {
+ "id": "others",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "其他",
+ "detail": [{
+ }]
+ },
+ ],
+ curIndex: 0,
+ isScroll: false,
+ toView: 'office'
},
-
- /**
- * 页面上拉触底事件的处理函数
- */
- 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/old/old.wxml b/pages/second/old/old.wxml
index d7628ed..b7cc458 100644
--- a/pages/second/old/old.wxml
+++ b/pages/second/old/old.wxml
@@ -1,4 +1,28 @@
-
-
-
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+
+ {{item.cate}}
+
+
+
+ {{val.thumb}}
+ {{val.name}}
+
+
+
+
+
+
+
diff --git a/pages/second/old/old.wxss b/pages/second/old/old.wxss
index 2cafb7e..5d54dd4 100644
--- a/pages/second/old/old.wxss
+++ b/pages/second/old/old.wxss
@@ -1,6 +1,3 @@
/* pages/second/old/old.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/s-city/s-city.js b/pages/second/s-city/s-city.js
index b2358b2..5a56f12 100644
--- a/pages/second/s-city/s-city.js
+++ b/pages/second/s-city/s-city.js
@@ -1,66 +1,80 @@
// pages/second/s-city/s-city.js
Page({
-
- /**
- * 页面的初始数据
- */
data: {
-
- },
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
-
- },
-
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
-
+ category: [
+ { name: '住宅', id: 'home' },
+ { name: '车辆', id: 'vehicle' },
+ { name: '交通状况', id: 'traffic' },
+ { name: '其他', id: 'others' },
+ ],
+ detail: [
+ {
+ "id": "home",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "住宅",
+ "detail": [{
+ "thumb": "/imgs/static/power.jpg",
+ "name": "电力"
+ },
+ {
+ "thumb": "/imgs/index/cloudFireControl.png",
+ "name": "消防"
+ },
+ {
+ "thumb": "/imgs/static/moniter.jpg",
+ "name": "监控"
+ }]
+ },
+ {
+ "id": "vehicle",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "车辆",
+ "detail": [{
+ "thumb": "/imgs/static/autobike.jpg",
+ "name": "电动车A"
+ },
+ {
+ "thumb": "/imgs/static/car.jpg",
+ "name": "汽车B"
+ }]
+ },
+ {
+ "id": "traffic",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "交通状况",
+ "detail": []
+ },
+ {
+ "id": "others",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "其他",
+ "detail": [{
+ }]
+ },
+ ],
+ curIndex: 0,
+ isScroll: false,
+ toView: 'service'
},
-
- /**
- * 页面上拉触底事件的处理函数
- */
- 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/s-city/s-city.wxml b/pages/second/s-city/s-city.wxml
index 59376aa..a63e93b 100644
--- a/pages/second/s-city/s-city.wxml
+++ b/pages/second/s-city/s-city.wxml
@@ -1,4 +1,29 @@
-
-
-
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+
+ {{item.cate}}
+
+
+
+
+ {{val.name}}
+
+
+
+
+
+
+
+
diff --git a/pages/second/s-city/s-city.wxss b/pages/second/s-city/s-city.wxss
index 6aa4ea0..b6cc922 100644
--- a/pages/second/s-city/s-city.wxss
+++ b/pages/second/s-city/s-city.wxss
@@ -1,6 +1,3 @@
/* pages/second/s-city/s-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/school/school.js b/pages/second/school/school.js
index e9e8c05..e3b952f 100644
--- a/pages/second/school/school.js
+++ b/pages/second/school/school.js
@@ -1,66 +1,113 @@
// pages/second/school/school.js
Page({
-
- /**
- * 页面的初始数据
- */
data: {
-
- },
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
-
- },
-
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
-
+ category: [
+ { name: '办公室', id: 'office' },
+ { name: '教室', id: 'classroom' },
+ { name: '餐厅', id: 'dining-hall' },
+ { name: '宿舍', id: 'dormitory' },
+ { name: '学生活动中心', id: 'sac' },
+ { name: '其他', id: 'others' }
+ ],
+ detail: [
+ {
+ "id": "office",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "办公室",
+ "detail": [{
+ "thumb": "/imgs/index/smartOffice.png",
+ "name": "教二"
+ },
+ {
+ "thumb": "/imgs/index/smartOffice.png",
+ "name": "教三"
+ },
+ {
+ "thumb": "/imgs/index/smartOffice.png",
+ "name": "教四"
+ }]
+ },
+ {
+ "id": "classroom",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "教室",
+ "detail": [{
+ "thumb": "/imgs/index/smartCommunity.png",
+ "name": "教一"
+ },
+ {
+ "thumb": "/imgs/index/smartCommunity.png",
+ "name": "教二"
+ }]
+ },
+ {
+ "id": "dining-hall",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "餐厅",
+ "detail": [{
+ "thumb": "/imgs/static/dining.jpg",
+ "name": "一餐厅"
+ },
+ {
+ "thumb": "/imgs/static/dining.jpg",
+ "name": "二餐厅"
+ },
+ {
+ "thumb": "/imgs/static/dining.jpg",
+ "name": "三餐厅"
+ }]
+ },
+ {
+ "id": "dormitory",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "宿舍",
+ "detail": [{
+ "thumb": "/imgs/static/dom.jpg",
+ "name": "学生2公寓"
+ },
+ {
+ "thumb": "/imgs/static/dom.jpg",
+ "name": "学生6公寓"
+ }]
+ },
+ {
+ "id": "sac",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "学生活动中心",
+ "detail": [{
+ }]
+ },
+ {
+ "id": "others",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "其他",
+ "detail": [{
+ }]
+ },
+ ],
+ curIndex: 0,
+ isScroll: false,
+ toView: 'office'
},
-
- /**
- * 页面上拉触底事件的处理函数
- */
- 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/school/school.wxml b/pages/second/school/school.wxml
index 41047fc..4de8868 100644
--- a/pages/second/school/school.wxml
+++ b/pages/second/school/school.wxml
@@ -1,4 +1,30 @@
-
-
-
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+
+ {{item.cate}}
+
+
+
+
+ {{val.name}}
+
+
+
+
+
+
+
+
+
diff --git a/pages/second/school/school.wxss b/pages/second/school/school.wxss
index 94659d1..9b570e4 100644
--- a/pages/second/school/school.wxss
+++ b/pages/second/school/school.wxss
@@ -1,6 +1,3 @@
/* pages/second/school/school.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/support/support.js b/pages/second/support/support.js
index e3c066a..1956990 100644
--- a/pages/second/support/support.js
+++ b/pages/second/support/support.js
@@ -1,66 +1,82 @@
// pages/second/support/support.js
Page({
-
- /**
- * 页面的初始数据
- */
data: {
-
- },
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
-
- },
-
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
-
+ category: [
+ { name: '真伪查询', id: 'check' },
+ { name: '维修查询', id: 'fix-info' },
+ { name: '查询支付', id: 'payment-info' },
+ { name: '寄送快修', id: 'packing-fix' },
+ { name: '上门快修', id: 'repair-at-home' },
+ { name: '预约维修', id: 'book-repair' },
+ { name: '其他', id: 'others' }
+ ],
+ detail: [
+ {
+ "id": "check",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "真伪查询",
+ "detail": []
+ },
+ {
+ "id": "fix-info",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "维修查询",
+ "detail": []
+ },
+ {
+ "id": "payment-info",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "查询支付",
+ "detail": []
+ },
+ {
+ "id": "packing-fix",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "寄送快修",
+ "detail": []
+ },
+ {
+ "id": "repair-at-home",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "上门快修",
+ "detail": []
+ },
+ {
+ "id": "book-repair",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "预约维修",
+ "detail": []
+ },
+ {
+ "id": "others",
+ "banner": "/imgs/swiper/swiper-03.jpg",
+ "cate": "其他",
+ "detail": []
+ },
+ ],
+ curIndex: 0,
+ isScroll: false,
+ toView: 'check'
},
-
- /**
- * 页面上拉触底事件的处理函数
- */
- 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/support/support.wxml b/pages/second/support/support.wxml
index b5c70d1..db97eb4 100644
--- a/pages/second/support/support.wxml
+++ b/pages/second/support/support.wxml
@@ -1,4 +1,28 @@
-
-
-
\ No newline at end of file
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+
+ {{item.cate}}
+
+
+
+
+ {{val.name}}
+
+
+
+
+
+
+
diff --git a/pages/second/support/support.wxss b/pages/second/support/support.wxss
index c2e6cfa..a1e4ea8 100644
--- a/pages/second/support/support.wxss
+++ b/pages/second/support/support.wxss
@@ -1,6 +1,3 @@
/* pages/second/support/support.wxss */
@import "../../tpls/base.wxss";
-page{
- width: 100%;
- height: 100%;
- }
\ No newline at end of file
+@import "../../tpls/staticSecondPage/staticSecondPage.wxss";