diff --git a/1514080901111/app.json b/1514080901111/app.json index 29b5dcec..64b6ba77 100644 --- a/1514080901111/app.json +++ b/1514080901111/app.json @@ -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": "我" + } + ] } } diff --git a/1514080901111/pages/sy/sy.js b/1514080901111/pages/sy/sy.js new file mode 100644 index 00000000..9a840222 --- /dev/null +++ b/1514080901111/pages/sy/sy.js @@ -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 + +}) \ No newline at end of file diff --git a/1514080901111/pages/sy/sy.json b/1514080901111/pages/sy/sy.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/1514080901111/pages/sy/sy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/1514080901111/pages/sy/sy.wxml b/1514080901111/pages/sy/sy.wxml new file mode 100644 index 00000000..c042b81e --- /dev/null +++ b/1514080901111/pages/sy/sy.wxml @@ -0,0 +1,25 @@ + + + + + + + {{item.text}} + + + + + + + 111111 + + + + + + + + + + + diff --git a/1514080901111/pages/sy/sy.wxss b/1514080901111/pages/sy/sy.wxss new file mode 100644 index 00000000..056361ea --- /dev/null +++ b/1514080901111/pages/sy/sy.wxss @@ -0,0 +1 @@ +/* pages/sy/sy.wxss */ \ No newline at end of file