Skip to content

Commit

Permalink
处理:成绩页面,课程表页面,图书馆页面
Browse files Browse the repository at this point in the history
  • Loading branch information
iwh718 committed Nov 21, 2019
1 parent 9cb4248 commit 5f3d4eb
Show file tree
Hide file tree
Showing 21 changed files with 392 additions and 274 deletions.
1 change: 0 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
20 changes: 20 additions & 0 deletions app.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
38 changes: 30 additions & 8 deletions pages/curriculum/curriculum.js
Original file line number Diff line number Diff line change
@@ -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: [],
Expand Down Expand Up @@ -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
})
},

/**
* 生命周期函数--监听页面加载
Expand All @@ -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 == ""){
Expand Down Expand Up @@ -169,6 +189,8 @@ Page({

that.setData({
wlist: _wlist
},()=>{
wx.hideLoading(tips)
})
}
})
Expand Down
17 changes: 17 additions & 0 deletions pages/curriculum/curriculum.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,20 @@
</view>
</view>
</scroll-view>
<view class="class_info_box" hidden="{{!selectClassInfo}}">
<view class="class_info">
<view class="close_btn" bindtap="close_classInfo">+</view>
<view wx:for="{{time}}" class="class_item">

<view class="class_item padding-xl radius shadow bg-index text-white margin-top">
<view>上课时间: {{item.time}}</view>
<view>上课周次: {{item.week}}</view>
<view>上课地点: {{item.place}}</view>
</view>

</view>

</view>


</view>
75 changes: 74 additions & 1 deletion pages/curriculum/curriculum.wxss
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/* pages/curriculum/curriculum.wxss */
page{
background: #fff;
}
.flex-item {
width: 95rpx;
height: 100px;
Expand Down Expand Up @@ -70,4 +73,74 @@
.pre_box image,.next_box image{
width: 50rpx;
height: 50rpx;
}
}
.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%;

}
72 changes: 11 additions & 61 deletions pages/function/function.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
}
})

},


/**
Expand Down Expand Up @@ -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}`
})
Expand Down
8 changes: 1 addition & 7 deletions pages/function/function.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -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%;
Expand Down
83 changes: 0 additions & 83 deletions pages/lessoninfo/lessoninfo.js

This file was deleted.

Loading

0 comments on commit 5f3d4eb

Please sign in to comment.