From 8090914833b9cbfd689d4cbcf587aadafde1034e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E5=A4=A9=E6=80=A1?= <10205501416@stu.ecnu.edu.cn> Date: Thu, 2 Jun 2022 10:46:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E8=87=B3?= =?UTF-8?q?=20'hangout-master/Pages/community/index'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hangout-master/Pages/community/index/index.js | 94 +++++++++++++++++++++++++ hangout-master/Pages/community/index/index.json | 8 +++ hangout-master/Pages/community/index/index.wxml | 24 +++++++ hangout-master/Pages/community/index/index.wxss | 49 +++++++++++++ 4 files changed, 175 insertions(+) create mode 100644 hangout-master/Pages/community/index/index.js create mode 100644 hangout-master/Pages/community/index/index.json create mode 100644 hangout-master/Pages/community/index/index.wxml create mode 100644 hangout-master/Pages/community/index/index.wxss diff --git a/hangout-master/Pages/community/index/index.js b/hangout-master/Pages/community/index/index.js new file mode 100644 index 0000000..4d97e04 --- /dev/null +++ b/hangout-master/Pages/community/index/index.js @@ -0,0 +1,94 @@ +// Pages/community/index/index.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + currentTab : 0, + list : [{ + iconPath: "/asset/img/icon-share1.png", + selectedIconPath: "/asset/img/icon-share0.png", + text: "社区", + },{ + iconPath: "/asset/img/icon-history.png", + selectedIconPath: "/asset/img/icon-history0.png", + text: "浏览历史", + },{ + iconPath: "/asset/img/icon-fav.png", + selectedIconPath: "/asset/img/icon-fav0.png", + text: "收藏", + },{ + iconPath: "/asset/img/icon-id1.png", + selectedIconPath: "/asset/img/icon-id0.png", + text: "个人主页", + }] + }, + + switchTab: function (e) { + let that = this; + if (this.data.currentTab === e.target.dataset.current) { + return false; + } else { + that.setData({ + currentTab: e.target.dataset.current, + }); + } + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/hangout-master/Pages/community/index/index.json b/hangout-master/Pages/community/index/index.json new file mode 100644 index 0000000..42547dd --- /dev/null +++ b/hangout-master/Pages/community/index/index.json @@ -0,0 +1,8 @@ +{ + "usingComponents": { + "community" : "/components/community/community", + "history" : "/components/history/history", + "stat" : "/components/star/star", + "id" : "/components/id/id" + } +} \ No newline at end of file diff --git a/hangout-master/Pages/community/index/index.wxml b/hangout-master/Pages/community/index/index.wxml new file mode 100644 index 0000000..5830c39 --- /dev/null +++ b/hangout-master/Pages/community/index/index.wxml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + {{item.text}} + + + diff --git a/hangout-master/Pages/community/index/index.wxss b/hangout-master/Pages/community/index/index.wxss new file mode 100644 index 0000000..eaf2fed --- /dev/null +++ b/hangout-master/Pages/community/index/index.wxss @@ -0,0 +1,49 @@ +/* Pages/travel/follow/index/index.wxss */ +.tab-bar{ + width:100%; + position: fixed; + bottom:20px; + left:30px; + display: flex; + padding-bottom: env(safe-area-inset-bottom); +} + +.tab-bar-item{ + width: 15%; + padding: 0; + margin: 0px; + padding-left: 1.5vw; + text-align: center; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + height: 30%; +} + +.default{ + font-weight: 550; + font-size: 12px; + color: #7B8B6F; +} + +.active{ + font-size: 13px; + font-weight: 900; + color:black; +} + +.tab-bar-item cover-image { + width: 25px; + height: 27px; +} + +.hg{ + padding: 0; + margin: 0; + position: absolute; + width: 50px; + height: 130px; + left: 65%; + bottom: env(safe-area-inset-bottom); +} \ No newline at end of file