From 9cb4248a71ea3a3d6829254c03c8c9010dbc36cc Mon Sep 17 00:00:00 2001 From: iwh718 <630020826@qq.com> Date: Sun, 17 Nov 2019 19:22:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E4=B9=A6=E5=80=9F=E9=98=85=E9=A1=B5?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=8C=E8=B0=83=E6=95=B4=E7=B4=A0=E8=B4=A8?= =?UTF-8?q?=E7=AD=BE=E5=88=B0=E4=BD=8D=E7=BD=AE=E5=88=B0=E6=88=91=E7=9A=84?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/library/library.js | 33 +++++++++++------------ pages/library/library.wxml | 55 +++++++++++++++++++++----------------- pages/library/library.wxss | 21 +++++++++++++++ pages/me/me.js | 18 ++++++++++++- pages/me/me.wxml | 4 +-- 5 files changed, 85 insertions(+), 46 deletions(-) diff --git a/pages/library/library.js b/pages/library/library.js index 032b524..d8ac3be 100644 --- a/pages/library/library.js +++ b/pages/library/library.js @@ -6,7 +6,18 @@ Page({ * 页面的初始数据 */ data: { - booklist: [] + booklist: [{ + book_name:"001", + book_year:"2019-12-11", + book_time:"2019-12-20", + book_author:"test" + }, + { + book_name:"001", + book_year:"2019-12-11", + book_time:"2019-12-20", + book_author:"test" + }] }, /** @@ -42,7 +53,7 @@ Page({ }, onLoad: function (options) { - this.getBooks() + // this.getBooks() }, /** @@ -56,7 +67,7 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function () { - this.getBooks() + // this.getBooks() }, /** @@ -94,21 +105,7 @@ Page({ }, - navigateToLecture: function(){ - var ifbind = wx.getStorageSync("ifbindlibrary") - if(ifbind == ""){ - wx.showToast({ - title: '请先登录!', - icon: "none", - duration: 2000 - }) - } - else{ - wx.navigateTo({ - url: '/pages/liblecture/liblecture', - }) - } - }, + navigateToLogin: function(){ var ifbind = wx.getStorageSync("ifbindlibrary") diff --git a/pages/library/library.wxml b/pages/library/library.wxml index 9ddb938..d5ecf42 100644 --- a/pages/library/library.wxml +++ b/pages/library/library.wxml @@ -1,33 +1,33 @@ - - - - - - - + + + + + + + - - - - - + + + + + - - - - 借书数量 - - - {{booklist[0]['book_count']}} - - - + + + + + + + + + + - - - + + + 书名: {{item.book_name}} 出版年份: {{item.book_year}} 应还日期: {{item.book_time}} @@ -36,3 +36,8 @@ + + + 在借:{{booklist.length}}册 + 【注销】 + diff --git a/pages/library/library.wxss b/pages/library/library.wxss index 6afaec1..688df4f 100644 --- a/pages/library/library.wxss +++ b/pages/library/library.wxss @@ -2,4 +2,25 @@ .scroll { height: 3000px; z-index: 101; +} + +.fixed_box{ + padding: 15rpx; + -webkit-border-radius: 20rpx; + -moz-border-radius: 20rpx; + border-radius: 20rpx; + display: flex; + position: fixed; + z-index: 99999!important; + right: 5%; + color:#fff; + bottom: 15%; + -webkit-box-shadow: 0 1px 2px 2px rgba(0,0,0,0.1) ; + -moz-box-shadow: 0 1px 2px 2px rgba(0,0,0,0.1); + box-shadow: 0 1px 2px 2px rgba(0,0,0,0.1) ; + background: #6f89c5; +} +.quit_btn{ + margin-left: 20rpx; + margin-right: 20rpx; } \ No newline at end of file diff --git a/pages/me/me.js b/pages/me/me.js index 8b921d9..91bb69c 100644 --- a/pages/me/me.js +++ b/pages/me/me.js @@ -161,6 +161,22 @@ Page({ this.setData({ emailStatus:!this.data.emailStatus }) - } + }, + //教育素质签到 + navigateToLecture: function(){ + var ifbind = wx.getStorageSync("ifbindlibrary") + if(ifbind == ""){ + wx.showToast({ + title: '请先登录!', + icon: "none", + duration: 2000 + }) + } + else{ + wx.navigateTo({ + url: '/pages/liblecture/liblecture', + }) + } + }, }) \ No newline at end of file diff --git a/pages/me/me.wxml b/pages/me/me.wxml index fc9515b..1df22eb 100644 --- a/pages/me/me.wxml +++ b/pages/me/me.wxml @@ -15,9 +15,9 @@ -