-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #386 from lwYU/master
- Loading branch information
Showing
5 changed files
with
143 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,27 @@ | ||
{ | ||
"pages":[ | ||
"pages/index/index", | ||
"pages/logs/logs" | ||
"pages/logs/logs", | ||
"pages/sy/sy" | ||
], | ||
"window":{ | ||
"backgroundTextStyle":"light", | ||
"navigationBarBackgroundColor": "#fff", | ||
"navigationBarTitleText": "WeChat", | ||
"navigationBarTextStyle":"black" | ||
}, | ||
"tabBar": { | ||
"color": "#000000", | ||
"selectedColor": "#009444", | ||
"list": [ | ||
{ | ||
"pagePath": "pages/index/index", | ||
"text": "首页" | ||
}, | ||
{ | ||
"pagePath": "pages/sy/sy", | ||
"text": "我" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
//index.js | ||
//获取应用实例 | ||
const app = getApp() | ||
|
||
Page({ | ||
data: { | ||
/*搜索栏数据 */ | ||
inputShowed: false, | ||
inputVal: "", | ||
/************ */ | ||
ranks: [ | ||
{ title: 1, text: "类型1"}, | ||
{ type: 2, text: "类型2" }, | ||
{ type: 3, text: "类型3" }, | ||
{ type: 4, text: "类型4" }, | ||
{ type: 5, text: "类型5" }, | ||
|
||
], | ||
//scroll-view变量start | ||
windowHeight: 0, | ||
windowWidth: 0, | ||
scrollTop: 10, | ||
//scroll-view表里end | ||
|
||
}, | ||
/*搜索栏函数*/ | ||
showInput: function () { | ||
this.setData({ | ||
inputShowed: true | ||
}); | ||
}, | ||
hideInput: function () { | ||
this.setData({ | ||
inputVal: "", | ||
inputShowed: false | ||
}); | ||
}, | ||
clearInput: function () { | ||
this.setData({ | ||
inputVal: "" | ||
}); | ||
}, | ||
inputTyping: function (e) { | ||
this.setData({ | ||
inputVal: e.detail.value | ||
}); | ||
}, | ||
/********* */ | ||
//事件处理函数 | ||
bindViewTap: function () { | ||
wx.navigateTo({ | ||
url: '../logs/logs' | ||
}) | ||
}, | ||
|
||
onLoad: function () { | ||
var that = this; | ||
//获取窗口大小 | ||
wx.getSystemInfo({ | ||
success: (res) => { | ||
that.setData({ | ||
windowHeight: res.windowHeight - 5, | ||
windowWidth: res.windowWidth | ||
}) | ||
}, | ||
fail: (res) => ({ | ||
|
||
}), | ||
}) | ||
}, | ||
|
||
|
||
getUserInfo: function (e) { | ||
console.log(e) | ||
app.globalData.userInfo = e.detail.userInfo | ||
this.setData({ | ||
userInfo: e.detail.userInfo, | ||
hasUserInfo: true | ||
}) | ||
}, | ||
|
||
|
||
//scroll-view相关函数start | ||
upper: function (e) { | ||
console.log(e) | ||
}, | ||
lower: function (e) { | ||
console.log(e) | ||
}, | ||
scroll: function (e) { | ||
|
||
}, | ||
tap: function (e) { | ||
|
||
}, | ||
tapMove: function (e) { | ||
}, | ||
//scroll-view相关函数end | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
<view class="page"> | ||
<view class="page__bd"> | ||
<scroll-view scroll-y style="height: {{windowHeight}}px;" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" scroll-into-view="{{toView}}" scroll-top="{{scrollTop}}"> | ||
<view class="weui-panel weui-panel_access"> | ||
<block wx:for="{{ranks}}" wx:key="{{item.type}}" > | ||
<view class="weui-panel__hd">{{item.text}}</view> | ||
<view class="weui-panel__bd"> | ||
<navigator url="" class="weui-media-box weui-media-box_appmsg" hover-class="weui-cell_active"> | ||
<view class="weui-media-box__hd weui-media-box__hd_in-appmsg"> | ||
<image class="weui-media-box__thumb" src="../tupian/1.jpg" /> | ||
</view> | ||
<view class="weui-media-box__bd weui-media-box__bd_in-appmsg"> | ||
<view class="weui-media-box__desc">111111</view> | ||
</view> | ||
</navigator> | ||
</view> | ||
|
||
</block> | ||
</view> | ||
</scroll-view> | ||
</view> | ||
|
||
</view> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* pages/sy/sy.wxss */ |