Skip to content

Commit

Permalink
hzuapps#3 hzuapps#174 第3次实验代码
Browse files Browse the repository at this point in the history
  • Loading branch information
wazhuroujuan committed Nov 19, 2017
1 parent 362f57f commit cfa99c5
Show file tree
Hide file tree
Showing 4 changed files with 243 additions and 0 deletions.
199 changes: 199 additions & 0 deletions 1514080901134/pages/YZY/YZY.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
// pages/test/test.js
Page({

/**
* 页面的初始数据
*/
data: {

items: [{ one: "scroll-view", }, { one: "2017.7.25" }, { one: "2017.8.2" }, { one: "2017.8.16" }, { one: "2017.9.1" }, { one: "2017.9.2" }, { one: "2017.9.15" }, { one: "2017.10.1" }, { one: "2017.10.2" }, { one: "2017.10.25" }, { one: "2017.10.26" }]

},

/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {

},

/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {

},

/**
* 生命周期函数--监听页面显示
*/
onShow: function () {

},

/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {

},

/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {

},

/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {

},

/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {

},

/**
Page({
/**
* 页面的初始数据
*/
data: {
inputShowed: false,
inputVal: "",
list: [
{
title: "攻略1",
note: "如何在配兵攻城中获得优胜?",
},
{
title: "攻略2",
note: "如何有效对待撞田问题?",
},
{
title: "攻略3",
note: "如何合理地分配资源田矿?",
},
{
title: "攻略4",
note: "科技的优先升级情况",
},
{
title: "攻略5",
note: "对于充值最大利益点",
},
{
title: "攻略6",
note: "对于武将的优先升级分析",
},
]
},

/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {

},

/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {

},

/**
* 生命周期函数--监听页面显示
*/
onShow: function () {

},

/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {

},

/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {

},

/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {

},

/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {

},

/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {

},
onUpper: function () { },
onLower: function () {
var that = this
that.setData({
isLower: false,
isend: true
});
// load more data
console.log("onLower")
},
onScroll: function () {
console.log("onScroll")
},

//searchbar
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
});
},
onLoad: function (options) {
wx.showToast({
title: '加载中',
icon: 'loading',
duration: 10000//loading时间
});
//wx.hideToast();隐藏loading
},

})
1 change: 1 addition & 0 deletions 1514080901134/pages/YZY/YZY.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
40 changes: 40 additions & 0 deletions 1514080901134/pages/YZY/YZY.wxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!--pages/comp/scroll.wxml-->
<view class="page">
<view class="weui-search-bar">
<view class="weui-search-bar__form">
<view class="weui-search-bar__box">
<icon class="weui-icon-search_in-box" type="search" size="14"></icon>
<input type="text" class="weui-search-bar__input" placeholder="搜索" value="{{inputVal}}" focus="{{inputShowed}}" bindinput="inputTyping" />
<view class="weui-icon-clear" wx:if="{{inputVal.length > 0}}" bindtap="clearInput">
<icon type="clear" size="14"></icon>
</view>
</view>
<label class="weui-search-bar__label" hidden="{{inputShowed}}" bindtap="showInput">
<icon class="weui-icon-search" type="search" size="14"></icon>
<view class="weui-search-bar__text">搜索</view>
</label>
</view>
<view class="weui-search-bar__cancel-btn" hidden="{{!inputShowed}}" bindtap="hideInput">取消</view>
</view>

<view class="weui-panel">
<view class="weui-panel__hd">攻略</view>
<scroll-view scroll-y style="height: 100vh">
<view wx:for="{{list}}" wx:for-item="lists">
<view class="weui-panel__bd">
<view class="weui-media-box weui-media-box_text">
<view class="weui-media-box__title weui-media-box__title_in-text">{{lists.title}}</view>
<view class="weui-media-box__desc">{{lists.note}}</view>
<view class="weui-media-box__info">
<view class="weui-media-box__info__meta">{{lists.time}}</view>
</view>
</view>
</view>
</view>

</scroll-view>

</view>


</view>
3 changes: 3 additions & 0 deletions 1514080901134/pages/YZY/YZY.wxss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
page{
background-color: #cccccc;
}

0 comments on commit cfa99c5

Please sign in to comment.