Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
306a4db
Update ai.wxml
SongOf Jan 15, 2019
2f7f995
Update ai.js
SongOf Jan 16, 2019
26437ba
Update ai.wxss
SongOf Jan 16, 2019
5aa946b
Update alert.js
SongOf Jan 16, 2019
853ff3d
Update alert.wxml
SongOf Jan 16, 2019
a7565b6
Update alert.wxss
SongOf Jan 16, 2019
5159e44
Update city.js
SongOf Jan 16, 2019
e0c4156
Update city.wxml
SongOf Jan 16, 2019
ca6cb41
Update city.wxss
SongOf Jan 16, 2019
d86864f
Update community.js
SongOf Jan 16, 2019
7c490e2
Update community.wxml
SongOf Jan 16, 2019
039632d
Update community.wxss
SongOf Jan 16, 2019
98e169e
Update farm.js
SongOf Jan 16, 2019
f4f3bc3
Update farm.wxml
SongOf Jan 16, 2019
e8bf038
Update farm.wxss
SongOf Jan 16, 2019
7a030c3
Update firecontrol.js
SongOf Jan 16, 2019
d70bfd7
Update firecontrol.wxml
SongOf Jan 16, 2019
7ddc828
Update firecontrol.wxss
SongOf Jan 16, 2019
a6942fb
Update hotel.js
SongOf Jan 16, 2019
0381dfe
Update hotel.wxml
SongOf Jan 16, 2019
6f300ed
Update hotel.wxss
SongOf Jan 16, 2019
ba8a226
Update office.js
SongOf Jan 16, 2019
92b3f9f
Update office.wxml
SongOf Jan 16, 2019
0304087
Update office.wxss
SongOf Jan 16, 2019
e45d84b
Update old.js
SongOf Jan 16, 2019
518672c
Update old.wxml
SongOf Jan 16, 2019
d1c69cd
Update old.wxss
SongOf Jan 16, 2019
eb54777
Update s-city.js
SongOf Jan 16, 2019
07c0513
Update s-city.wxml
SongOf Jan 16, 2019
1af38d3
Update s-city.wxss
SongOf Jan 16, 2019
deac293
Update school.js
SongOf Jan 16, 2019
a431291
Update school.wxml
SongOf Jan 16, 2019
e6b193e
Update school.wxss
SongOf Jan 16, 2019
2a0a732
Update support.js
SongOf Jan 16, 2019
b4706c7
Update support.wxml
SongOf Jan 16, 2019
01ad644
Update support.wxss
SongOf Jan 16, 2019
4c3c13f
Create README.md
SongOf Jan 16, 2019
0d4dc88
Create static
SongOf Jan 16, 2019
f88d88f
Delete static
SongOf Jan 16, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# MiniProgram
微信小程序
静态页面
second-静态页面
imgs/static-图标
staticSecondPage/staticSecondPage.wxss-样式
111 changes: 50 additions & 61 deletions pages/second/ai/ai.js
Original file line number Diff line number Diff line change
@@ -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)

}
})

})
30 changes: 27 additions & 3 deletions pages/second/ai/ai.wxml
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
<!--pages/second/ai/ai.wxml-->
<view class="poster-view">
<image src="/imgs/swiper/bg.jpg" class="poster-image" mode="scaleToFill"></image>
</view>
<view class="main">
<view class="categroy-left">
<view wx:for="{{category}}" wx:key="index" data-id="{{item.id}}" data-index="{{index}}"
bindtap="switchTab"
class="cate-list {{curIndex === index?'on':''}}">{{item.name}}</view>
</view>

<scroll-view class="categroy-right" scroll-y="{{isScroll}}" scroll-into-view="{{toView}}" scroll-with-animation="true">
<block wx:for="{{detail}}" wx:for-index wx:key="idx">
<view id="{{item.id}}" class="cate-box">
<view class="cate-banner">
<image src="{{item.banner}}"></image>
</view>
<view class="cate-title">
<text>{{item.cate}}</text>
</view>
<view class="product">
<view class="product-list" wx:for="{{item.detail}}" wx:key="index" wx:for-item="val">
<image src="{{val.thumb}}"></image>
<text class='product-list-item'>{{val.name}}</text>
</view>
</view>
</view>
</block>
</scroll-view>

</view>
5 changes: 1 addition & 4 deletions pages/second/ai/ai.wxss
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/* pages/second/ai/ai.wxss */
@import "../../tpls/base.wxss";
page{
width: 100%;
height: 100%;
}
@import "../../tpls/staticSecondPage/staticSecondPage.wxss";
133 changes: 74 additions & 59 deletions pages/second/alert/alert.js
Original file line number Diff line number Diff line change
@@ -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)

}
})

})
30 changes: 27 additions & 3 deletions pages/second/alert/alert.wxml
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
<!--pages/second/alert/alert.wxml-->
<view class="poster-view">
<image src="/imgs/swiper/bg.jpg" class="poster-image" mode="scaleToFill"></image>
</view>
<view class="main">
<view class="categroy-left">
<view wx:for="{{category}}" wx:key="index" data-id="{{item.id}}" data-index="{{index}}"
bindtap="switchTab"
class="cate-list {{curIndex === index?'on':''}}">{{item.name}}</view>
</view>

<scroll-view class="categroy-right" scroll-y="{{isScroll}}" scroll-into-view="{{toView}}" scroll-with-animation="true">
<block wx:for="{{detail}}" wx:for-index wx:key="idx">
<view id="{{item.id}}" class="cate-box">
<view class="cate-banner">
<image src="{{item.banner}}"></image>
</view>
<view class="cate-title">
<text>{{item.cate}}</text>
</view>
<view class="product">
<view class="product-list" wx:for="{{item.detail}}" wx:key="index" wx:for-item="val">
<image src="{{val.thumb}}"></image>
<text class='product-list-item'>{{val.name}}</text>
</view>
</view>
</view>
</block>
</scroll-view>

</view>
5 changes: 1 addition & 4 deletions pages/second/alert/alert.wxss
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/* pages/second/alert/alert.wxss */
@import "../../tpls/base.wxss";
page{
width: 100%;
height: 100%;
}
@import "../../tpls/staticSecondPage/staticSecondPage.wxss";
Loading