diff --git a/app.json b/app.json
index a72a26d..12fcde5 100644
--- a/app.json
+++ b/app.json
@@ -10,7 +10,6 @@
"pages/calendar/calendar",
"pages/library/library",
"pages/librarylogin/librarylogin",
- "pages/lessoninfo/lessoninfo",
"pages/liblecture/liblecture",
"pages/score/score",
"pages/liblectureinfo/liblectureinfo"
diff --git a/app.wxss b/app.wxss
index 35bfb53..0e30e4d 100644
--- a/app.wxss
+++ b/app.wxss
@@ -14,3 +14,23 @@ Page{
opacity: 1;
}
}
+.text-index{
+ color: #6f89c5;
+}
+.bg-index{
+ background: #6f89c5;
+}
+.functions_title{
+ font-size: 50rpx;
+ font-weight: bolder;
+ margin-left: 5%;
+ margin-top: 20rpx;
+ margin-bottom: 20rpx;
+}
+.truncate{
+ text-wrap: normal;
+ white-space: nowrap;
+ -ms-text-overflow: ellipsis;
+ text-overflow: ellipsis;
+ overflow: hidden;
+}
diff --git a/pages/curriculum/curriculum.js b/pages/curriculum/curriculum.js
index 3fda9ba..ad2f272 100644
--- a/pages/curriculum/curriculum.js
+++ b/pages/curriculum/curriculum.js
@@ -1,11 +1,13 @@
// pages/curriculum/curriculum.js
-var util = require("../../utils/util.js")
+var util = require("../../utils/util.js");
+let tips = null;
Page({
/**
* 页面的初始数据
*/
data: {
+ selectClassInfo:null,
colorArrays: ["#85B8CF", "#90C652", "#D8AA5A", "#FC9F9D", "#0A9A84", "#61BC69", "#12AEF3", "#E29AAD"],
wlist: [],
months: [],
@@ -98,11 +100,27 @@ Page({
},
showCardView: function(e){
- console.log(e.currentTarget.dataset.index)
- wx.navigateTo({
- url: "/pages/lessoninfo/lessoninfo?lesson=" + JSON.stringify(this.data.wlist[e.currentTarget.dataset.index])
- })
+ console.log(e.currentTarget.dataset.index);
+ var _time = [];
+ let lesson = this.data.wlist[e.currentTarget.dataset.index];
+ for(var i = 0; i < lesson['time'].length; i++){
+ var _t = {};
+ _t['time'] = lesson['time'][i]['上课时间'];
+ _t['week'] = lesson['time'][i]['上课周次'];
+ _t['place'] = lesson['time'][i]['上课地点'];
+ _time.push(_t);
+ }
+
+ this.setData({
+ selectClassInfo:true,
+ time: _time
+ });
},
+ close_classInfo(e){
+ this.setData({
+ selectClassInfo:false
+ })
+ },
/**
* 生命周期函数--监听页面加载
@@ -122,10 +140,12 @@ Page({
* 生命周期函数--监听页面显示
*/
onLoad: function () {
-
- this.timeInit()
+ tips = wx.showLoading({
+ title:"加载中.."
+ });
+ this.timeInit();
- var that = this
+ var that = this;
var ifbind = wx.getStorageSync("ifbind")
if(ifbind == ""){
@@ -169,6 +189,8 @@ Page({
that.setData({
wlist: _wlist
+ },()=>{
+ wx.hideLoading(tips)
})
}
})
diff --git a/pages/curriculum/curriculum.wxml b/pages/curriculum/curriculum.wxml
index 32e06cf..cfeeb44 100644
--- a/pages/curriculum/curriculum.wxml
+++ b/pages/curriculum/curriculum.wxml
@@ -35,3 +35,20 @@
+
+
+ +
+
+
+
+ 上课时间: {{item.time}}
+ 上课周次: {{item.week}}
+ 上课地点: {{item.place}}
+
+
+
+
+
+
+
+
diff --git a/pages/curriculum/curriculum.wxss b/pages/curriculum/curriculum.wxss
index 3bd9145..9a4743d 100644
--- a/pages/curriculum/curriculum.wxss
+++ b/pages/curriculum/curriculum.wxss
@@ -1,4 +1,7 @@
/* pages/curriculum/curriculum.wxss */
+page{
+ background: #fff;
+}
.flex-item {
width: 95rpx;
height: 100px;
@@ -70,4 +73,74 @@
.pre_box image,.next_box image{
width: 50rpx;
height: 50rpx;
-}
\ No newline at end of file
+}
+.class_info_box{
+ z-index: 9999!important;
+ position: fixed;
+ width: 100%;
+ border-radius: 10rpx 10rpx 0 0;
+ -webkit-box-shadow: 0 1px 3px 3px rgba(0,0,0,0.1);
+ -moz-box-shadow: 0 1px 3px 3px rgba(0,0,0,0.1);
+ box-shadow: 0 1px 3px 3px rgba(0,0,0,0.1) ;
+ left: 0;
+
+ -webkit-animation-name: toTop;
+ -moz-animation-name: toTop;
+ -o-animation-name: toTop;
+ animation-name: toTop;
+ background: #fff;
+ animation-fill-mode: forwards;
+ -webkit-animation-duration: 1000ms;
+ -moz-animation-duration: 1000ms;
+ -o-animation-duration: 1000ms;
+ animation-duration: 1000ms;
+}
+.close_btn{
+
+ -webkit-animation-name: scale;
+
+ animation-fill-mode: forwards;
+
+ -moz-animation-name: scale;
+ -o-animation-name: scale;
+ animation-name: scale;
+ position: absolute;
+ right: 5%;
+ -webkit-animation-duration:2000ms;
+ -moz-animation-duration: 2000ms;
+ -o-animation-duration: 2000ms;
+ animation-duration: 2000ms;
+ margin-top: 20rpx;
+ font-size: 30rpx;
+
+
+}
+@keyframes scale {
+ from{
+ -webkit-transform: rotate(0);
+ -moz-transform: rotate(0);
+ -ms-transform: rotate(0);
+ -o-transform: rotate(0);
+ transform: rotate(0);
+ }
+ to{
+ -webkit-transform: rotate(404deg) scale(1.7);
+ -moz-transform: rotate(404deg) scale(1.7);
+ -ms-transform: rotate(404deg) scale(1.7);
+ -o-transform: rotate(404deg) scale(1.7);
+ transform: rotate(404deg) scale(1.7);
+ }
+}
+@keyframes toTop {
+ from{
+ bottom: -100%
+ }
+ to{
+ bottom: 0;
+ }
+}
+.class_item{
+ width: 90%;
+ margin-left: 5%;
+
+}
diff --git a/pages/function/function.js b/pages/function/function.js
index 9adfbcd..340f26f 100644
--- a/pages/function/function.js
+++ b/pages/function/function.js
@@ -38,67 +38,6 @@ Page({
]
},
- openLecture:function(){
- var ifbind = wx.getStorageSync("ifbind")
- if(ifbind == ""){
- wx.showToast({
- title: '未登录!',
- icon: "none",
- duration: 2000
- })
- return;
- }
- var openid = wx.getStorageSync("openid")
- wx.request({
- data: util.json2Form({
- openid: openid,
- state: "1"
- }),
- header: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- url: 'https://www.neumark.top/user/update_lecture_state',
- method: "POST",
- success: (res) => {
- wx.showToast({
- title: '开启人文邮件通知服务!',
- icon: "none",
- duration: 2000
- })
- }
- })
- },
- closeLecture:function(){
- var ifbind = wx.getStorageSync("ifbind")
- if(ifbind == ""){
- wx.showToast({
- title: '未登录!',
- icon: "none",
- duration: 2000
- })
- return;
- }
- var openid = wx.getStorageSync("openid")
- wx.request({
- data: util.json2Form({
- openid: openid,
- state: "0"
- }),
- header: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- url: 'https://www.neumark.top/user/update_lecture_state',
- method: "POST",
- success: (res) => {
- wx.showToast({
- title: '关闭人文邮件通知服务!',
- icon: "none",
- duration: 2000
- })
- }
- })
-
- },
/**
@@ -192,6 +131,17 @@ Page({
});
return
}
+ if(type === 'library'){
+ if(wx.getStorageSync('ifbindlibrary') !== 'yes'){
+ wx.showToast({
+ title:"未登录"
+ });
+ wx.navigateTo({
+ url:`/pages/librarylogin/librarylogin`
+ })
+ return
+ }
+ }
wx.navigateTo({
url:`/pages/${type}/${type}`
})
diff --git a/pages/function/function.wxss b/pages/function/function.wxss
index ca7e67a..aa0813a 100644
--- a/pages/function/function.wxss
+++ b/pages/function/function.wxss
@@ -2,13 +2,7 @@
page{
background: #fff;
}
-.functions_title{
- font-size: 40rpx;
- font-weight: bolder;
- margin-left: 5%;
- margin-top: 20rpx;
- margin-bottom: 20rpx;
-}
+
.function_list{
width: 100%;
diff --git a/pages/lessoninfo/lessoninfo.js b/pages/lessoninfo/lessoninfo.js
deleted file mode 100644
index 9f11614..0000000
--- a/pages/lessoninfo/lessoninfo.js
+++ /dev/null
@@ -1,83 +0,0 @@
-// pages/lessoninfo/lessoninfo.js
-Page({
-
- /**
- * 页面的初始数据
- */
- data: {
- lesson: {},
- time:[]
- },
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- // console.log(JSON.parse(options.lesson))
- this.setData({
- lesson: JSON.parse(options.lesson)
- })
- // console.log(options.lesson)
- var _time = []
- for(var i = 0; i < this.data.lesson['time'].length; i++){
- var _t = {}
- _t['time'] = this.data.lesson['time'][i]['上课时间']
- _t['week'] = this.data.lesson['time'][i]['上课周次']
- _t['place'] = this.data.lesson['time'][i]['上课地点']
- _time.push(_t)
- }
-
- this.setData({
- time: _time
- })
- },
-
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
-
- },
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
-
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
-
- }
-})
\ No newline at end of file
diff --git a/pages/lessoninfo/lessoninfo.json b/pages/lessoninfo/lessoninfo.json
deleted file mode 100644
index 8835af0..0000000
--- a/pages/lessoninfo/lessoninfo.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "usingComponents": {}
-}
\ No newline at end of file
diff --git a/pages/lessoninfo/lessoninfo.wxml b/pages/lessoninfo/lessoninfo.wxml
deleted file mode 100644
index f0a806e..0000000
--- a/pages/lessoninfo/lessoninfo.wxml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
- 上课时间: {{item.time}}
- 上课周次: {{item.week}}
- 上课地点: {{item.place}}
-
-
-
\ No newline at end of file
diff --git a/pages/lessoninfo/lessoninfo.wxss b/pages/lessoninfo/lessoninfo.wxss
deleted file mode 100644
index 5c1a72d..0000000
--- a/pages/lessoninfo/lessoninfo.wxss
+++ /dev/null
@@ -1 +0,0 @@
-/* pages/lessoninfo/lessoninfo.wxss */
\ No newline at end of file
diff --git a/pages/liblecture/liblecture.wxml b/pages/liblecture/liblecture.wxml
index f1d5674..fee4aee 100644
--- a/pages/liblecture/liblecture.wxml
+++ b/pages/liblecture/liblecture.wxml
@@ -1,6 +1,6 @@
-
+
{{item.title}}
@@ -10,7 +10,7 @@
-
+
讲座名称: {{item.name}}
讲座地点: {{item.place}}
主讲人: {{item.who}}
diff --git a/pages/library/library.js b/pages/library/library.js
index d8ac3be..6b33873 100644
--- a/pages/library/library.js
+++ b/pages/library/library.js
@@ -7,11 +7,17 @@ Page({
*/
data: {
booklist: [{
- book_name:"001",
+ book_name:"0011212121212121",
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"
+ },
{
book_name:"001",
book_year:"2019-12-11",
@@ -35,12 +41,12 @@ Page({
}
var that = this
wx.request({
- data: util.json2Form({
- openid: openid,
- }),
- header: {
- "Content-Type": "application/x-www-form-urlencoded"
+ data: {
+ openid,
},
+ // header: {
+ // "Content-Type": "application/x-www-form-urlencoded"
+ // },
url: 'https://www.neumark.top/library-user/query_borrowed_books',
method: "POST",
success: (res) => {
@@ -174,6 +180,22 @@ Page({
}
})
}
- }
+ },
+ //教育素质签到
+ 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/library/library.wxml b/pages/library/library.wxml
index d5ecf42..25d6783 100644
--- a/pages/library/library.wxml
+++ b/pages/library/library.wxml
@@ -1,43 +1,51 @@
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
-
+
-
-
-
-
-
-
-
+
+
-
-
-
-
-
- 书名: {{item.book_name}}
- 出版年份: {{item.book_year}}
- 应还日期: {{item.book_time}}
- 作者: {{ item.book_author }}
+
+
+
+
+
+我的图书馆
+
+
+
+
+
+
+ 书名:{{item.book_name}}
+ 出版年份:{{item.book_year}}
+ 应还日期:{{item.book_time}}
+ 作者:{{ item.book_author }}
+
+
+
-
-
- 在借:{{booklist.length}}册
- 【注销】
-
diff --git a/pages/library/library.wxss b/pages/library/library.wxss
index 688df4f..e4d09c8 100644
--- a/pages/library/library.wxss
+++ b/pages/library/library.wxss
@@ -1,26 +1,70 @@
/* pages/library/library.wxss */
-.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
+page{
+ background: #fff;
+}
+
+.quit_btn {
+ margin-left: 20 rpx;
+ margin-right: 20 rpx;
+}
+
+.library_header {
+ display: flex;
+ align-content: space-between;
+ width: 100%;
+ align-items: center;
+}
+
+.functions_title{
+ font-size: 50rpx;
+ font-weight: bolder;
+ margin-left: 5%;
+ margin-top: 20 rpx;
+ margin-bottom: 20 rpx;
+}
+
+.library_left {
+ display: flex;
+
+ margin-left: 5%;
+
+}
+.books_item_box{
+ display: flex;
+ width: 100%;
+ margin-left: 50rpx;
+ margin-right: 50rpx;
+ flex-wrap: wrap;
+}
+.books_item {
+ width: 300rpx;
+ margin-top: 50rpx;
+ margin-right: 50rpx;
+ background: #6f89c5;
+ color: #fff;
+ -webkit-border-radius: 10rpx;
+ -moz-border-radius: 10rpx;
+ border-radius: 10rpx;
+ -webkit-box-shadow: 0 1px 3px 4px rgba(0,0,0,0.05) ;
+ -moz-box-shadow: 0 1px 3px 4px rgba(0,0,0,0.05);
+ box-shadow: 0 1px 3px 4px rgba(0,0,0,0.05) ;
+}
+.books_info{
+
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ padding: 10rpx;
+
+}
+.books_name{
+
+ word-break: normal;
+ white-space: nowrap;
+ overflow: hidden;
+ -ms-text-overflow: ellipsis;
+ text-overflow: ellipsis;
+}
+.books_info view{
+ margin-top: 10rpx;
+}
diff --git a/pages/me/me.js b/pages/me/me.js
index 91bb69c..e5ff26c 100644
--- a/pages/me/me.js
+++ b/pages/me/me.js
@@ -158,25 +158,76 @@ Page({
})
},
emailsSwitch(){
+ if(this.data.emailStatus){
+ this.openLecture()
+ }else{
+ this.closeLecture()
+ }
this.setData({
emailStatus:!this.data.emailStatus
})
},
- //教育素质签到
- navigateToLecture: function(){
- var ifbind = wx.getStorageSync("ifbindlibrary")
+ openLecture:function(){
+ var ifbind = wx.getStorageSync("ifbind")
if(ifbind == ""){
wx.showToast({
- title: '请先登录!',
+ title: '未登录!',
icon: "none",
duration: 2000
})
+ return;
}
- else{
- wx.navigateTo({
- url: '/pages/liblecture/liblecture',
+ var openid = wx.getStorageSync("openid")
+ wx.request({
+ data: util.json2Form({
+ openid: openid,
+ state: "1"
+ }),
+ header: {
+ "Content-Type": "application/x-www-form-urlencoded"
+ },
+ url: 'https://www.neumark.top/user/update_lecture_state',
+ method: "POST",
+ success: (res) => {
+ wx.showToast({
+ title: '开启人文邮件通知服务!',
+ icon: "none",
+ duration: 2000
+ })
+ }
+ })
+ },
+ closeLecture:function(){
+ var ifbind = wx.getStorageSync("ifbind")
+ if(ifbind == ""){
+ wx.showToast({
+ title: '未登录!',
+ icon: "none",
+ duration: 2000
})
+ return;
}
+ var openid = wx.getStorageSync("openid")
+ wx.request({
+ data: util.json2Form({
+ openid: openid,
+ state: "0"
+ }),
+ header: {
+ "Content-Type": "application/x-www-form-urlencoded"
+ },
+ url: 'https://www.neumark.top/user/update_lecture_state',
+ method: "POST",
+ success: (res) => {
+ wx.showToast({
+ title: '关闭人文邮件通知服务!',
+ icon: "none",
+ duration: 2000
+ })
+ }
+ })
+
},
-
+
+
})
\ No newline at end of file
diff --git a/pages/me/me.wxml b/pages/me/me.wxml
index 1df22eb..1ea74af 100644
--- a/pages/me/me.wxml
+++ b/pages/me/me.wxml
@@ -14,24 +14,14 @@
{{emailStatus ? "已开启人文邮件服务":"已关闭人文邮件服务"}}
-
-
-
-
-
-
+
+